/* unified-styles.css - Shared styles for authentication and top bar */

/* Universal Loading System */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #f3f3f3; border-top: 2px solid #e74c3c; border-radius: 50%; animation: spin 0.8s linear infinite; margin-left: 8px; }
.spinner-large { width: 32px; height: 32px; border-width: 3px; }
.spinner-white { border-color: rgba(255,255,255,0.3); border-top-color: white; }
.spinner-blue { border-color: rgba(52, 152, 219, 0.3); border-top-color: #3498db; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 4px; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-text { height: 16px; margin: 8px 0; }
.skeleton-text.large { height: 24px; }
.skeleton-text.small { height: 12px; width: 60%; }
.skeleton-card { height: 120px; margin: 16px 0; }
.skeleton-row { height: 48px; margin: 4px 0; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-table { width: 100%; border-collapse: collapse; }
.skeleton-table td { padding: 12px; border-bottom: 1px solid #ecf0f1; }

.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(44, 62, 80, 0.95); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.loading-overlay.active { opacity: 1; visibility: visible; }
.loading-content { text-align: center; color: white; }
.loading-content h3 { margin: 16px 0 8px; font-size: 1.2rem; }
.loading-content p { margin: 0; opacity: 0.8; }

/* Button loading states */
.btn-loading { position: relative; }
.btn-loading .btn-text { opacity: 0.7; }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* Table loading improvements */
.table-skeleton { width: 100%; }
.table-skeleton td { padding: 16px 12px; }
.table-loading-message { text-align: center; padding: 40px; color: #7f8c8d; font-style: italic; }
.table-loading-message .spinner { margin: 0 8px; }

/* Authentication Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
    margin: 20px;
}

.login-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 800;
    font-family: 'League Spartan', sans-serif;
}

.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #ecf0f1;
}

.login-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'League Spartan', sans-serif;
}

.login-tab.active {
    background: #3498db;
    color: white;
}

.login-tab:hover {
    background: #e9ecef;
}

.login-tab.active:hover {
    background: #2980b9;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 600;
    font-family: 'League Spartan', sans-serif;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'League Spartan', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.login-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s ease;
    width: 100%;
    font-family: 'League Spartan', sans-serif;
    margin-bottom: 10px;
}

.login-btn:hover {
    background: #2980b9;
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.forgot-password-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
    width: 100%;
    padding: 5px;
    font-family: 'League Spartan', sans-serif;
}

.forgot-password-btn:hover {
    color: #2980b9;
}

.check-email-message {
    text-align: center;
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border: 2px solid #4caf50;
    border-radius: 10px;
    color: #2e7d32;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.check-email-message h3 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 1.4rem;
}

.check-email-message p {
    margin: 0 0 10px 0;
    font-size: 1rem;
    line-height: 1.5;
}

.check-email-message .sub-text {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 15px;
}

/* Top Bar Styles */
.header {
    background: #1a252f;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo img {
    height: 50px;
    width: auto;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    font-family: 'League Spartan', sans-serif;
    margin: 0;
}

.header-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'League Spartan', sans-serif;
}

.page-indicator {
    color: #bdc3c7;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.switch-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    font-family: 'League Spartan', sans-serif;
    font-size: 0.9rem;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.switch-btn:hover {
    background: #c0392b;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #ecf0f1;
    font-weight: 600;
    font-size: 0.95rem;
}

.member-name-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    color: #ecf0f1;
    font-weight: 600;
    font-size: 0.95rem;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.member-name-clickable:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: underline;
    border-color: rgba(255,255,255,0.6);
}

.logout-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    font-family: 'League Spartan', sans-serif;
    font-size: 0.9rem;
    height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.logout-btn:hover {
    background: #2980b9;
}

/* Message Styles */
/* Message base styling */
.message {
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-weight: 500;
    border: 1px solid;
}

.message.error, .error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.message.success, .success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.message.info, .info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #b8daff;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-navigation {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .login-card {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .login-tabs {
        font-size: 0.9rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-title {
        font-size: 1.4rem;
    }
    
    .header-navigation {
        gap: 10px;
    }
    
    .switch-btn, .logout-btn {
        padding: 0 12px;
        font-size: 0.8rem;
        height: 28px;
    }
    
    .view-slider {
        order: -1;
        margin-bottom: 10px;
    }
    
    .slider-option {
        padding: 0 12px;
        font-size: 0.75rem;
    }
    
    .slider-track {
        height: 32px;
        padding: 2px;
    }
    
    .page-indicator {
        height: 28px;
        padding: 6px 12px;
    }
    
    .member-name-clickable {
        height: 28px;
        padding: 4px 10px;
    }
}

/* View Slider Switch Styles */
.view-slider {
    display: flex;
    align-items: center;
}

.slider-track {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
    height: 36px;
    box-sizing: border-box;
    align-items: center;
}

.slider-option {
    padding: 0 16px;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    z-index: 2;
    position: relative;
    font-family: 'League Spartan', sans-serif;
    white-space: nowrap;
    user-select: none;
    display: flex;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.slider-option:hover {
    color: rgba(255,255,255,0.9);
}

.slider-option.active {
    color: #2c3e50;
    font-weight: 700;
}

.slider-indicator {
    position: absolute;
    top: 0px;
    bottom: 0px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Page indicator fallback */
.page-indicator {
    color: #ecf0f1;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'League Spartan', sans-serif;
}

/* Super Admin Badge */
.super-admin-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}