* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A24;
    --secondary: #00A896;
    --dark: #1A1A2E;
    --dark-light: #16213E;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --success: #2ECC71;
    --danger: #E74C3C;
    --warning: #f39c12;
    --info: #3498db;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 260px;
    --sidebar-width-mobile: 100%;
    --header-height: 70px;
    --container-padding: 16px;
    --font-base: 16px;
}

/* ===== PRE-LOADER ANIMATIONS ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes spinReverse {
    to { transform: rotate(-360deg); }
}
@keyframes progressBar {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 50px rgba(0, 168, 150, 0.25); }
    50% { box-shadow: 0 0 80px rgba(0, 168, 150, 0.5); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

html {
    font-size: var(--font-base);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== AUTH OVERLAY (PRE-LOADER) ===== */
#authOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0A1628 0%, #1A2A4A 50%, #16213E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    flex-direction: column;
    transition: opacity 0.5s ease;
    padding: 20px;
}

#authOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-ring {
    position: relative;
    width: clamp(100px, 25vw, 130px);
    height: clamp(100px, 25vw, 130px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(0, 168, 150, 0.15);
    border-top: 3px solid #00A896;
    border-right: 3px solid #FF6B35;
    animation: spin 1.2s linear infinite;
    box-shadow: 0 0 40px rgba(0, 168, 150, 0.1);
}

.loader-ring-middle {
    position: absolute;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 53, 0.08);
    border-bottom: 2px solid #FF6B35;
    border-left: 2px solid #00A896;
    animation: spinReverse 2.5s linear infinite;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.05);
}

.loader-logo {
    width: clamp(55px, 14vw, 75px);
    height: clamp(55px, 14vw, 75px);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    object-fit: cover;
    z-index: 2;
    box-shadow: 0 0 50px rgba(0, 168, 150, 0.25);
    animation: pulseGlow 2s ease-in-out infinite;
}

.loader-brand {
    color: white;
    margin-top: 20px;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    font-weight: 800;
    background: linear-gradient(90deg, #FF6B35, #FF8A5C, #00A896);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
    text-align: center;
}

.loader-subtitle {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
}

.loader-progress {
    margin-top: 20px;
    width: min(220px, 70vw);
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.loader-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #FF6B35, #00A896);
    border-radius: 10px;
    animation: progressBar 2.5s ease-in-out infinite;
}

.loader-text {
    color: rgba(255, 255, 255, 0.3);
    margin-top: 12px;
    font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    letter-spacing: 2px;
    text-align: center;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: #e2e8f0;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
    min-height: 20px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-card {
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .info {
    color: var(--gray);
    font-size: clamp(0.7rem, 1.3vw, 0.85rem);
    padding: 6px 10px;
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== INPUT VALIDATION ===== */
.input-wrapper input.valid {
    border-color: var(--success);
    background: #f0fff4;
}

.input-wrapper input.invalid {
    border-color: var(--danger);
    background: #fff5f5;
}

.input-wrapper input:focus.valid {
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.input-wrapper input:focus.invalid {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.validation-message {
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}

.validation-message.show {
    display: block;
}

.validation-message.error {
    color: var(--danger);
}

.validation-message.success {
    color: var(--success);
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.show {
    display: block;
}

.password-strength .bar {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 4px;
}

.password-strength .bar .fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.password-strength .bar .fill.weak { width: 25%; background: #E74C3C; }
.password-strength .bar .fill.fair { width: 50%; background: #f39c12; }
.password-strength .bar .fill.good { width: 75%; background: #3498db; }
.password-strength .bar .fill.strong { width: 100%; background: #2ECC71; }

.password-strength .label {
    font-size: 0.75rem;
    color: var(--gray);
}

.password-strength .label .weak { color: #E74C3C; }
.password-strength .label .fair { color: #f39c12; }
.password-strength .label .good { color: #3498db; }
.password-strength .label .strong { color: #2ECC71; }

.password-requirements {
    list-style: none;
    padding: 0;
    margin-top: 5px;
    font-size: 0.75rem;
    color: var(--gray);
}

.password-requirements li {
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-requirements li.valid {
    color: var(--success);
}

.password-requirements li.invalid {
    color: var(--danger);
}

.password-requirements li i {
    width: 14px;
    font-size: 0.7rem;
}

/* ===== APP CONTENT ===== */
#appContent {
    display: none;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--dark), var(--dark-light));
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.logo-img {
    width: clamp(36px, 6vw, 45px);
    height: clamp(36px, 6vw, 45px);
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    flex-shrink: 0;
}

.logo-text {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), #FF9A3C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.subtitle {
    font-size: clamp(0.6rem, 1.2vw, 0.8rem);
    opacity: 0.7;
    margin-left: 6px;
    white-space: nowrap;
    display: inline-block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    white-space: nowrap;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    min-height: calc(100vh - 200px);
}

/* ===== SIDEBAR - FULLY RESPONSIVE ===== */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 0;
    position: sticky;
    top: calc(var(--header-height) + 10px);
    height: fit-content;
    max-height: calc(100vh - var(--header-height) - 30px);
    overflow-y: auto;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Hide scrollbar for cleaner look */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

.nav-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-weight: 500;
    font-size: clamp(0.85rem, 1.3vw, 0.95rem);
    border-left: 3px solid transparent;
    min-height: 44px;
}

.nav-item i {
    width: 20px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    flex-shrink: 0;
    text-align: center;
}

.nav-item:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-left-color: white;
}

.main-content {
    flex: 1;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(16px, 3vw, 25px);
    min-width: 0;
    overflow: hidden;
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

/* ===== RESPONSIVE: SIDEBAR BECOMES HORIZONTAL TABS ON MOBILE ===== */
@media (max-width: 820px) {
    .sidebar {
        width: 100%;
        position: static;
        display: flex;
        overflow-x: auto;
        overflow-y: visible;
        padding: 8px 12px;
        gap: 4px;
        max-height: none;
        border-radius: var(--radius);
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .sidebar::-webkit-scrollbar {
        height: 3px;
    }
    .sidebar::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 4px;
    }

    .nav-item {
        white-space: nowrap;
        padding: 8px 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: var(--radius-sm);
        min-height: 40px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .nav-item i {
        font-size: 0.85rem;
        width: 18px;
    }

    .nav-item.active {
        border-bottom-color: white;
        border-left-color: transparent;
    }

    .main-layout {
        flex-direction: column;
        gap: 16px;
        margin: 16px 0;
    }

    .main-content {
        padding: clamp(14px, 2.5vw, 20px);
    }
}

/* Very small screens - compact nav items */
@media (max-width: 480px) {
    .sidebar {
        padding: 6px 8px;
        gap: 2px;
        border-radius: var(--radius-sm);
    }

    .nav-item {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-height: 34px;
        gap: 6px;
        border-radius: 6px;
    }

    .nav-item i {
        font-size: 0.7rem;
        width: 16px;
    }

    .main-content {
        padding: 12px;
        border-radius: var(--radius-sm);
    }
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: clamp(12px, 2vw, 20px);
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius);
    padding: clamp(16px, 2.5vw, 20px);
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    word-wrap: break-word;
}

.stat-card:nth-child(1) { background: linear-gradient(135deg, #2ECC71, #27ae60); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #3498db, #2980b9); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #9B59B6, #8E44AD); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #f39c12, #e67e22); }

.stat-value {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
}

.stat-label {
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    opacity: 0.9;
    margin-top: 4px;
    word-break: break-word;
}

/* ===== REFERRAL CODE CARD - FIXED FOR MOBILE ===== */
.referral-card {
    background: linear-gradient(135deg, #1A1A2E, #16213E);
    color: white;
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 25px);
    margin-bottom: 25px;
    text-align: center;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.referral-code-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: clamp(8px, 2vw, 15px);
    margin: 12px 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.referral-code {
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 2px;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
    transition: font-size 0.2s ease;
}

.referral-link {
    background: rgba(255, 255, 255, 0.05);
    padding: clamp(10px, 1.5vw, 12px);
    border-radius: 8px;
    word-break: break-all;
    overflow-wrap: break-word;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    max-width: 100%;
    box-sizing: border-box;
}

/* Tables */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
}

th, td {
    padding: clamp(6px, 1.2vw, 12px);
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 150px;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark);
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
}

input, select, textarea {
    width: 100%;
    padding: clamp(10px, 1.5vw, 12px);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    max-width: 100%;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn {
    padding: clamp(8px, 1.2vw, 10px) clamp(14px, 2vw, 20px);
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    min-height: 40px;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--dark);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    min-height: 30px;
    white-space: nowrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: clamp(0.6rem, 1vw, 0.7rem);
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-info {
    background: #e0e7ff;
    color: #4f46e5;
}

/* ===== MODAL - FULLY RESPONSIVE ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius);
    max-width: min(500px, 95vw);
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: clamp(20px, 4vw, 30px);
    animation: fadeIn 0.3s ease;
    margin: auto;
}

.modal h3 {
    margin-bottom: 14px;
    color: var(--dark);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 18px;
    flex-wrap: wrap;
}

.modal-buttons .btn {
    flex: 0 1 auto;
    min-width: 80px;
}

@media (max-width: 480px) {
    .modal {
        padding: 16px;
        max-height: 90vh;
        border-radius: var(--radius-sm);
    }
    .modal-buttons {
        flex-direction: column;
    }
    .modal-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    background: var(--dark);
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow);
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    max-width: min(450px, calc(100vw - 40px));
    margin-left: auto;
    margin-right: auto;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }
.toast.warning { background: var(--warning); }

/* Document Upload */
.document-upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: var(--radius-sm);
    padding: clamp(20px, 3vw, 30px);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.document-upload-area:hover {
    border-color: var(--primary);
    background: #fef9f5;
}

.document-list {
    margin-top: 12px;
}

.document-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    gap: 8px;
}

/* Verification Status */
.verification-status {
    text-align: center;
    padding: clamp(20px, 4vw, 40px);
}

.status-icon {
    font-size: clamp(3rem, 8vw, 4rem);
    margin-bottom: 12px;
}

.security-card {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: clamp(16px, 2.5vw, 20px);
    margin-bottom: 20px;
    overflow: hidden;
}

.security-card h3 {
    margin-bottom: 12px;
    color: var(--dark);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    gap: 6px;
}

.info-label {
    font-weight: 600;
    color: var(--dark);
    flex-shrink: 0;
}

.info-row > span:last-child {
    text-align: right;
    word-break: break-word;
    max-width: 65%;
}

.empty-state {
    text-align: center;
    padding: clamp(30px, 6vw, 40px);
    color: var(--gray);
}

/* Team Chat */
.team-chat-container {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 16px;
}

.team-chat-header {
    background: var(--dark);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
}

.team-chat-messages {
    height: clamp(200px, 40vh, 300px);
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fa;
}

.team-chat-message {
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    max-width: 85%;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
}

.team-chat-message.sent {
    background: var(--primary);
    color: white;
    margin-left: auto;
}

.team-chat-message.received {
    background: white;
    border: 1px solid #e2e8f0;
}

.team-chat-message .sender {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.team-chat-message .time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 4px;
}

.team-chat-input {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #e2e8f0;
    gap: 8px;
}

.team-chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    min-width: 0;
}

.team-chat-input button {
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    min-height: 42px;
    min-width: 44px;
}

/* Team Members Grid */
.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
    gap: clamp(12px, 2vw, 15px);
    margin-top: 12px;
}

.team-member-card {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: clamp(12px, 2vw, 15px);
    text-align: center;
    border: 1px solid #e2e8f0;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.team-member-card .avatar {
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin: 0 auto 8px;
    flex-shrink: 0;
}

.team-member-card .name {
    font-weight: 600;
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    word-break: break-word;
}

.team-member-card .role {
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    color: var(--gray);
    word-break: break-word;
}

.team-member-card .badge-manager {
    background: #fef3c7;
    color: #d97706;
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* Freeze Status */
.freeze-status {
    background: #fef3c7;
    border-left: 4px solid var(--warning);
    padding: clamp(12px, 2vw, 15px);
    border-radius: var(--radius-sm);
    margin: 12px 0;
    overflow: hidden;
}

.freeze-status.unfrozen {
    background: #d1fae5;
    border-left-color: var(--success);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-bar .fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Commission Badge */
.commission-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    white-space: nowrap;
}
.commission-badge.r20 { background: #e2e8f0; color: var(--gray); }
.commission-badge.r23 { background: #fef3c7; color: #d97706; }
.commission-badge.r25 { background: #d1fae5; color: #059669; }

/* Rank Badge */
.rank-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    font-weight: 700;
    white-space: nowrap;
}

.rank-badge.gold { background: #fef3c7; color: #d97706; }
.rank-badge.silver { background: #e2e8f0; color: #6C757D; }
.rank-badge.bronze { background: #fde8e8; color: #dc2626; }

/* ===== TABLE RESPONSIVE FIXES ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -8px;
    padding: 0 8px;
    width: 100%;
}

.table-responsive table {
    min-width: 400px;
    width: 100%;
}

.table-responsive table td,
.table-responsive table th {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== RESPONSIVE: STATS GRID ON VERY SMALL SCREENS ===== */
@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .stat-card {
        padding: 12px;
        min-height: 80px;
    }
    .stat-value {
        font-size: 1.2rem;
    }
    .stat-label {
        font-size: 0.6rem;
    }
}

/* ===== RESPONSIVE: TEAM MEMBERS GRID ON SMALL SCREENS ===== */
@media (max-width: 480px) {
    .team-members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .team-member-card {
        min-height: 150px;
        padding: 10px;
    }
}

@media (max-width: 360px) {
    .team-members-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== RESPONSIVE: HEADER ADJUSTMENTS ===== */
@media (max-width: 600px) {
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .logo-section {
        flex: 1 1 auto;
        min-width: 0;
    }
    .subtitle {
        font-size: 0.55rem;
        opacity: 0.7;
        margin-left: 4px;
        display: inline-block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
    }
    .header-actions {
        flex-shrink: 0;
    }
    .logout-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .logo-text {
        font-size: 0.85rem;
    }
    .logo-img {
        width: 30px;
        height: 30px;
    }
    .subtitle {
        font-size: 0.5rem;
        max-width: 60px;
        margin-left: 3px;
    }
    header {
        padding: 6px 0;
        min-height: 50px;
    }
    .logout-btn {
        padding: 3px 8px;
        font-size: 0.6rem;
    }
}

/* ===== RESPONSIVE: BUTTON WRAPPING ===== */
@media (max-width: 480px) {
    .btn {
        white-space: normal;
        min-height: 36px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    .btn-sm {
        font-size: 0.6rem;
        padding: 3px 8px;
        min-height: 26px;
    }
    .referral-card .btn {
        white-space: normal;
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: clamp(16px, 3vw, 20px);
    margin-top: 30px;
}

footer p {
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
}

/* ===== BETTER TOUCH TARGETS ===== */
button, .btn, .nav-item, .pagination button {
    touch-action: manipulation;
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar, header, footer, .no-print {
        display: none !important;
    }
    .main-content {
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 20px !important;
    }
    .main-layout {
        display: block !important;
    }
}

/* ===== UTILITY: BREAK WORDS ===== */
.break-words {
    word-break: break-word;
    overflow-wrap: break-word;
}

.truncate {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== RESPONSIVE: CHAT INPUT ON SMALL SCREENS ===== */
@media (max-width: 480px) {
    .team-chat-input {
        flex-wrap: wrap;
    }
    .team-chat-input input {
        width: 100%;
        flex: 1 1 100%;
    }
    .team-chat-input button {
        flex: 1 1 auto;
        min-width: 60px;
    }
}

/* ===== RESPONSIVE: MODAL CONTENT ===== */
@media (max-width: 480px) {
    .modal .form-group input {
        font-size: 14px;
    }
    .modal .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .modal .info-row > span:last-child {
        text-align: left;
        max-width: 100%;
    }
}

/* ===== RESPONSIVE: VERIFICATION STATUS ===== */
@media (max-width: 480px) {
    .verification-status {
        padding: 16px 8px;
    }
    .status-icon {
        font-size: 2.5rem;
    }
}

/* ============================================================
   UX UPGRADES — MOBILE DRAWER, ICON LOGOUT, NOTIFICATIONS
   ============================================================ */

/* ===== MOBILE MENU TOGGLE (hamburger) ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 4px;
}

/* ===== NOTIFICATION ICON ===== */
.notification-icon {
    position: relative;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.notification-icon:hover { background: rgba(255,255,255,0.2); }

/* ===== ICON-ONLY LOGOUT ON MOBILE ===== */
.logout-label { display: inline; }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    display: none;
}
.sidebar-overlay.active { display: block; }

/* ===== NOTIFICATIONS PANEL (COMING SOON) ===== */
.notifications-panel {
    position: absolute;
    top: 70px;
    right: 20px;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    display: none;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}
.notifications-panel.active { display: block; }

.notifications-panel .np-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}
.notifications-panel .np-body {
    padding: 30px 20px;
    text-align: center;
}
.notifications-panel .np-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(255,107,53,0.3);
    animation: pulse 2s ease-in-out infinite;
}
.notifications-panel .np-body h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--dark);
}
.notifications-panel .np-body p {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
}
.notifications-panel .np-badge {
    display: inline-block;
    margin-top: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #fef3c7;
    color: #d97706;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ===== RESPONSIVE: MOBILE DRAWER (≤820px) ===== */
@media (max-width: 820px) {
    /* Show hamburger */
    .mobile-menu-toggle { display: block; }

    /* Hide logout text → icon only */
    .logout-label { display: none; }
    .logout-btn {
        padding: 6px 10px;
        min-width: 38px;
        justify-content: center;
    }

    /* Sidebar becomes fixed drawer */
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100vh;
        height: 100dvh;
        width: 280px !important;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-radius: 0 !important;
        padding: 16px 18px !important;
        max-height: none !important;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column !important;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,0.2);
    }
    body.sidebar-open { overflow: hidden; }

    .nav-item {
        border-left: 3px solid transparent;
        border-bottom: none;
        border-radius: 10px;
        padding: 10px 14px;
        min-height: 44px;
        white-space: normal;
    }
    .nav-item.active {
        border-left-color: white;
        border-bottom-color: transparent;
    }

    .main-layout {
        flex-direction: column !important;
        gap: 16px !important;
        margin: 16px 0 !important;
    }
    .main-content {
        padding: 14px !important;
    }
}

/* ===== RESPONSIVE: NOTIFICATIONS PANEL ON MOBILE ===== */
@media (max-width: 820px) {
    .notifications-panel {
        position: fixed;
        top: 60px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
        border-radius: 12px;
    }
}

/* ===== RESPONSIVE: HIDE SUBTITLE ON SMALL ===== */
@media (max-width: 600px) {
    .subtitle { display: none; }
    .logo-text { font-size: 0.95rem; }
}

/* ===== RESPONSIVE: FULL-WIDTH TOAST ON MOBILE ===== */
@media (max-width: 480px) {
    .toast {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
        text-align: center;
    }
}

/* ============================================================
   TRADER-STYLE SKELETON + SECTION LOADING SYSTEM
   ============================================================ */

/* ===== TOAST UPGRADE (icon-aware, matches trader) ===== */
.toast {
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast.processing { background: #3498db; }

/* ===== SKELETON SHIMMER (replaces old pulse) ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton,
.skeleton-text,
.skeleton-card,
.skeleton-avatar,
.skeleton-image,
.skeleton-price,
.skeleton-stock,
.skeleton-btn {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-card {
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.skeleton-image { height: 120px; width: 100%; }
.skeleton-text { height: 14px; margin: 8px 0 4px; width: 100%; }
.skeleton-price { height: 18px; width: 40%; margin-top: 6px; }
.skeleton-stock { height: 12px; width: 30%; margin-top: 4px; }
.skeleton-btn { height: 28px; width: 60px; border-radius: 6px; }
.skeleton-avatar { width: 50px; height: 50px; border-radius: 50%; }

/* ===== SKELETON GRID ===== */
.skeleton-grid {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    width: 100%;
}

/* ===== SECTION LOADING OVERLAY ===== */
.section-loading-overlay {
    display: block;
    width: 100%;
    padding: 16px 0;
    animation: fadeIn 0.3s ease;
}

/* ===== SMART SKELETON MESSAGES ===== */
.skeleton-loading-messages {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.skeleton-message {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    transition: opacity 0.3s ease;
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.skeleton-message::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulseDot 1.2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulseDot {
    0% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.3; transform: scale(0.8); }
}
.skeleton-progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 12px;
    overflow: hidden;
}
.skeleton-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ===== HIDE REAL CONTENT WHILE SKELETON IS SHOWING ===== */
.content-section.loading-active > *:not(.section-loading-overlay) {
    display: none !important;
}

/* Dark theme skeleton (if you ever add it) */
body.dark-theme .skeleton,
body.dark-theme .skeleton-text,
body.dark-theme .skeleton-card,
body.dark-theme .skeleton-image,
body.dark-theme .skeleton-price {
    background: linear-gradient(90deg, #2d2d4a 25%, #3d3d5a 50%, #2d2d4a 75%);
    background-size: 200% 100%;
}
body.dark-theme .skeleton-loading-messages {
    background: rgba(26, 26, 46, 0.95);
    border-color: #2d2d4a;
}
body.dark-theme .skeleton-message { color: #e0e0e0; }
body.dark-theme .skeleton-progress-bar { background: #2d2d4a; }

/* Mobile close button inside sidebar */
.sidebar-close-btn { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--gray); padding: 5px; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; margin-left: auto; margin-bottom: 10px; }
@media (max-width: 820px) { .sidebar-close-btn { display: flex; } }


/* ============================================================ */
/* PROFILE QUICK-ACCESS SEPARATOR                                */
/* ============================================================ */
.sidebar .nav-item[data-section="profile"] {
    margin-bottom: 18px !important;
    padding-bottom: 18px !important;
    position: relative;
}

/* Solid visible orange line */
.sidebar .nav-item[data-section="profile"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #FF6B35;
    pointer-events: none;
    border-radius: 2px;
}

@media (max-width: 820px) {
    .sidebar .nav-item[data-section="profile"] {
        margin-bottom: 20px !important;
        padding-bottom: 20px !important;
    }
    .sidebar .nav-item[data-section="profile"]::after {
        left: 14px;
        right: 14px;
        height: 3px;
        background: #FF6B35;
    }
}

/* ============================================================================ */
/* VERIFICATION PAGE STYLES                                                    */
/* ============================================================================ */

.verification-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.verification-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray, #6b7280);
}

.verification-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== STATUS CARD BASE ===== */
.vs-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== STATUS HEADER (icon + title) ===== */
.vs-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.vs-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.vs-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.vs-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 4px 0 0 0;
}

/* ===== STATE COLORS ===== */
.vs-card.is-pending     { border-left: 5px solid #f59e0b; }
.vs-card.is-pending .vs-icon { background: #fef3c7; color: #d97706; }

.vs-card.is-breached    { border-left: 5px solid #ef4444; }
.vs-card.is-breached .vs-icon { background: #fee2e2; color: #dc2626; }

.vs-card.is-approved    { border-left: 5px solid #10b981; }
.vs-card.is-approved .vs-icon { background: #d1fae5; color: #059669; }

.vs-card.is-rejected    { border-left: 5px solid #ef4444; }
.vs-card.is-rejected .vs-icon { background: #fee2e2; color: #dc2626; }

.vs-card.is-unsubmitted { border-left: 5px solid #f97316; }
.vs-card.is-unsubmitted .vs-icon { background: #ffedd5; color: #ea580c; }

.vs-card.is-incomplete  { border-left: 5px solid #ef4444; }
.vs-card.is-incomplete .vs-icon { background: #fee2e2; color: #dc2626; }

.vs-card.is-never-submitted { border-left: 5px solid #3b82f6; }
.vs-card.is-never-submitted .vs-icon { background: #dbeafe; color: #2563eb; }

/* ===== HOUR COUNTER (big live clock) ===== */
.vs-hour-counter {
    text-align: center;
    padding: 22px 0;
    margin: 18px 0;
    background: #f9fafb;
    border-radius: 12px;
}

.vs-hour-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #111827;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}

.vs-hour-label {
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
}

.vs-hour-counter.is-breached .vs-hour-number {
    color: #dc2626;
}

/* ===== SLA PROGRESS BAR ===== */
.vs-sla-progress {
    margin: 18px 0;
}

.vs-sla-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.vs-sla-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.vs-sla-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
    border-radius: 999px;
    transition: width 1s linear;
    width: 0%;
}

.vs-sla-fill.is-breached {
    background: #ef4444;
    animation: pulseSla 1.5s ease-in-out infinite;
}

@keyframes pulseSla {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* ===== STATUS MESSAGE ===== */
.vs-message {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #374151;
    margin: 18px 0;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 10px;
}

.vs-message strong { color: #111827; }

/* ===== MISSING FIELDS LIST ===== */
.vs-missing-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    background: #fef2f2;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #fecaca;
}

.vs-missing-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    color: #7f1d1d;
    font-size: 0.92rem;
    line-height: 1.5;
}

.vs-missing-list li::before {
    content: '✗';
    color: #dc2626;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===== ACTION BUTTONS ===== */
.vs-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.vs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vs-btn-primary {
    background: #FF6B35;
    color: white;
}
.vs-btn-primary:hover { background: #e55a2b; transform: translateY(-1px); }

.vs-btn-warning {
    background: #f59e0b;
    color: white;
}
.vs-btn-warning:hover { background: #d97706; transform: translateY(-1px); }

.vs-btn-success {
    background: #10b981;
    color: white;
}
.vs-btn-success:hover { background: #059669; transform: translateY(-1px); }

.vs-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
.vs-btn-secondary:hover { background: #e5e7eb; }

.vs-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== SUBMISSION HISTORY ===== */
.verification-history-section {
    margin-top: 24px;
}

.history-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s;
}

.history-toggle:hover { background: #f3f4f6; }

.history-toggle span { flex: 1; text-align: left; }

.history-toggle #historyToggleIcon {
    transition: transform 0.3s;
}
.history-toggle.open #historyToggleIcon {
    transform: rotate(180deg);
}

.verification-history-body {
    margin-top: 12px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.history-timeline {
    position: relative;
    padding-left: 28px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e5e7eb;
}

.history-item {
    position: relative;
    padding: 12px 0 20px;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px #e5e7eb;
}

.history-item.status-pending::before    { background: #f59e0b; }
.history-item.status-approved::before   { background: #10b981; }
.history-item.status-rejected::before   { background: #ef4444; }
.history-item.status-auto_unsubmitted::before { background: #f97316; }
.history-item.status-auto_rejected::before    { background: #ef4444; }

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.history-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
}

.history-item-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-badge-pending         { background: #fef3c7; color: #d97706; }
.history-badge-approved        { background: #d1fae5; color: #059669; }
.history-badge-rejected        { background: #fee2e2; color: #dc2626; }
.history-badge-auto_unsubmitted{ background: #ffedd5; color: #ea580c; }
.history-badge-auto_rejected   { background: #fee2e2; color: #dc2626; }
.history-badge-expired         { background: #f3f4f6; color: #6b7280; }

.history-item-meta {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ===== REFRESH BUTTON ===== */
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover { background: #f9fafb; }

.btn-refresh.loading i { animation: spin 0.8s linear infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .verification-page { padding: 12px; }
    .vs-card { padding: 20px 16px; }
    .vs-hour-number { font-size: 2.4rem; }
    .vs-actions { flex-direction: column; }
    .vs-btn { width: 100%; }
}