/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header h2 {
    color: #34495e;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 500;
}

.login-header p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 30px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.success-message {
    background: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.help-text {
    color: #95a5a6;
    font-size: 12px;
    margin-top: 15px;
}

.default-credentials {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.default-credentials p {
    margin: 5px 0;
    font-size: 12px;
    color: #7f8c8d;
}

.default-credentials code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

/* Auth Status Bar */
.auth-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.auth-bar span {
    flex: 1;
}

.auth-links {
    display: flex;
    gap: 15px;
}

.auth-bar a {
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-bar a:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* Add top padding to body when auth bar is present to prevent content overlap */
body:has(.auth-bar) {
    padding-top: 50px;
}

/* Fallback for browsers that don't support :has() */
.auth-bar-active {
    padding-top: 50px !important;
}

/* Protected Content Overlay */
.protected-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.protected-message {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
}

.protected-message h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.protected-message p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.protected-message .btn {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.protected-message .btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* User Management Styles */
.user-management {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.user-list {
    margin-bottom: 30px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
}

.user-item:last-child {
    border-bottom: none;
}

.user-info h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.user-info p {
    color: #7f8c8d;
    font-size: 14px;
    margin: 2px 0;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.role-boardmember {
    background: #3498db;
    color: white;
}

.role-homeowner {
    background: #27ae60;
    color: white;
}

/* Add User Form */
.add-user-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    margin-bottom: 0;
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
}

select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-header h2 {
        font-size: 18px;
    }
    
    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .user-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-actions {
        margin-top: 10px;
        width: 100%;
    }
    
    .user-actions button {
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 25px 15px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    .form-group input,
    .login-btn {
        padding: 10px 12px;
        font-size: 16px;
    }
}
