/* Custom styles for Factory Dormitory Management Platform */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

body.login-page {
    background: linear-gradient(rgba(30, 60, 114, 0.85), rgba(42, 82, 152, 0.9)), 
                url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    position: relative;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    display: flex;
    flex-direction: column;
}

/* 登录卡片标题样式 */
.login-container .card-header h4 {
    color: #333;
    font-weight: 600;
    margin: 0;
    position: relative;
    padding-bottom: 10px;
}

.login-container .card-header h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2a5298, #56ccf2);
    border-radius: 2px;
}

/* 登录图标样式 */
.login-container .card-header h4 i {
    color: #2a5298;
    margin-right: 10px;
    font-size: 1.2em;
}

.navbar-brand {
    font-weight: 600;
}

.card {
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.btn-primary {
    background-color: #4a6baf;
    border-color: #4a6baf;
}

.btn-primary:hover {
    background-color: #3a5a9f;
    border-color: #3a5a9f;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
}

.form-control:focus, .form-select:focus {
    border-color: #4a6baf;
    box-shadow: 0 0 0 0.25rem rgba(74, 107, 175, 0.25);
}

.login-main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100vh - 120px); /* 减去页脚高度 */
    width: 100%;
    padding: 20px;
}

.login-container {
    max-width: 420px;
    width: 100%;
    margin: 10vh auto 0;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

.login-container .card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
}

.login-container .card-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 25px 30px;
    text-align: center;
}

.login-container .card-header h4 {
    color: #333;
    font-weight: 600;
    margin: 0;
}

.login-container .card-body {
    padding: 30px;
}

.login-container .form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.login-container .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.login-container .form-control:focus {
    background: white;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.2);
    transform: translateY(-2px);
}

.login-container .btn-primary {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.login-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(42, 82, 152, 0.4);
    background: linear-gradient(135deg, #3a62a8 0%, #2e4c82 100%);
}

.login-container .btn-primary:disabled {
    opacity: 0.7;
    transform: none !important;
}

.login-container .alert {
    border-radius: 10px;
    border: none;
    padding: 15px;
}

.login-container .alert-info {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #555;
}

.tenant-card {
    transition: transform 0.2s;
}

.tenant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.alert {
    border-radius: 8px;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    border-radius: 8px;
}

/* 登录页面页脚样式 */
body.login-page .footer {
    background: transparent;
    color: #666;
    padding: 20px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    text-align: center;
}

body.login-page .footer .text-muted {
    color: #666 !important;
    font-size: 0.9rem;
}

