/* ==========================================================================
   eSevaDraft Header & Global Standard OTP UI Styles
   Strictly compliant with: 34px button height, 8px border-radius, desktop ergonomics
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Unified Header Navigation Pills (Distinct Semantic Color Coding)
   -------------------------------------------------------------------------- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

/* Unified Base Pill Button Style (Harmonious Modern Glass) */
.nav-pill-btn {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.09) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    user-select: none !important;
}

.nav-pill-btn i {
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-pill-btn:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.nav-pill-btn:hover i {
    transform: scale(1.08);
}

/* 1. Home Pill Button (Clean Crisp White Icon) */
.nav-btn-home i {
    color: #ffffff;
}
.nav-btn-home:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

/* 2. Desk Pill Button (Amber / Workspace Icon) */
.nav-btn-desk i {
    color: #fcd34d;
}
.nav-btn-desk:hover {
    background: rgba(245, 158, 11, 0.18) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #fef08a !important;
}

/* 3. Counter QR Pill Button (Sky Cyan Icon) */
.nav-btn-qr i {
    color: #38bdf8;
}
.nav-btn-qr:hover {
    background: rgba(6, 182, 212, 0.18) !important;
    border-color: rgba(6, 182, 212, 0.45) !important;
    color: #e0f2fe !important;
}

/* 4. Save Draft Pill Button (Emerald Icon) */
.nav-btn-save i {
    color: #34d399;
}
.nav-btn-save:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #ecfdf5 !important;
}

/* 5. Reset Pill Button (Soft Coral Icon & Focused Danger Hover) */
.nav-btn-reset i {
    color: #fca5a5;
}
.nav-btn-reset:hover {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #fee2e2 !important;
}

/* 6. Profile Badge Button (Gold Store/User Icon) */
.nav-btn-profile i {
    color: #fde047;
}
.nav-btn-profile:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(253, 224, 71, 0.4) !important;
}

/* 7. Logout Button (Soft Rose Icon & Distinct Danger Hover) */
.nav-btn-logout i {
    color: #fda4af;
}
.nav-btn-logout:hover {
    background: rgba(225, 29, 72, 0.26) !important;
    border-color: rgba(244, 63, 94, 0.55) !important;
    color: #ffe4e6 !important;
}

/* Subtle Vertical Section Dividers */
.nav-group-divider {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 3px;
    flex-shrink: 0;
}
.nav-group-divider.win-divider {
    margin-left: 3px;
    margin-right: 5px;
}

/* Group 4: Integrated Windows Desktop Window Controls */
.desktop-window-controls {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 2px;
    -webkit-app-region: no-drag;
    flex-shrink: 0;
}

.win-control-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    outline: none !important;
    user-select: none !important;
}

.win-control-btn i {
    font-size: 10.5px !important;
    flex-shrink: 0;
}

.win-control-btn:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.win-control-btn.win-btn-close:hover {
    background: #dc2626 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

/* Responsive ergonomics: compact padding on laptops, clean icon pills on 1024px displays */
@media (max-width: 1180px) {
    .brand-tagline-text {
        display: none !important;
    }
    .nav-actions {
        gap: 3px;
    }
    .nav-pill-btn {
        padding: 0 6px !important;
        gap: 4px !important;
        font-size: 11px !important;
    }
    .nav-btn-profile {
        max-width: 120px !important;
    }
    .nav-btn-profile .nav-btn-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 1040px) {
    /* Fold secondary utility button labels into clean icon pills to guarantee perfect fit */
    .nav-btn-home .nav-btn-label,
    .nav-btn-qr .nav-btn-label,
    .nav-btn-save .nav-btn-label,
    .nav-btn-reset .nav-btn-label {
        display: none !important;
    }
    .nav-btn-home,
    .nav-btn-qr,
    .nav-btn-save,
    .nav-btn-reset {
        width: 32px !important;
        min-width: 32px !important;
        padding: 0 !important;
        justify-content: center !important;
    }
    .nav-btn-profile {
        max-width: 105px !important;
    }
    .nav-btn-desk {
        padding: 0 6px !important;
        font-size: 10.5px !important;
    }
    .nav-btn-logout {
        padding: 0 6px !important;
        font-size: 10.5px !important;
    }
    #devMockModeBadge {
        max-width: 90px !important;
        font-size: 10.5px !important;
        padding: 0 6px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 820px) {
    .nav-pill-btn .nav-btn-label {
        display: none !important;
    }
    .nav-pill-btn {
        width: 32px !important;
        min-width: 32px !important;
        padding: 0 !important;
        justify-content: center !important;
    }
}

/* --------------------------------------------------------------------------
   2. Global Standard OTP Card & Segmented 6-Digit PIN UI
   -------------------------------------------------------------------------- */
.global-otp-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1.5px solid #93c5fd;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 440px;
}

.global-otp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.global-otp-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.global-otp-timer-badge {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.global-otp-timer-badge.ready {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.otp-progress-container {
    background: #e2e8f0;
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
    width: 100%;
}

.otp-progress-bar {
    background: #ef4444;
    height: 100%;
    width: 100%;
    transition: width 1s linear, background-color 0.3s ease;
}

/* 6-Digit PIN Input Box Container */
.otp-pin-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 4px 0;
}

.otp-pin-box {
    width: 44px;
    height: 48px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    box-sizing: border-box;
    outline: none;
    transition: all 0.15s ease-in-out;
}

.otp-pin-box:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    transform: scale(1.04);
    background: #eff6ff;
}

.otp-pin-box.filled {
    border-color: #10b981;
    background: #f0fdf4;
    color: #166534;
}

/* OTP Action Buttons */
.otp-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.btn-verify-otp {
    flex: 1;
    height: 34px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
}
.btn-verify-otp:hover {
    background: #047857;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}
.btn-verify-otp:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-resend-otp {
    height: 34px;
    padding: 0 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.btn-resend-otp.active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    cursor: pointer;
    font-weight: 800;
}
.btn-resend-otp.active:hover {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.otp-subtext-hint {
    font-size: 10.5px;
    color: #64748b;
    line-height: 1.35;
    text-align: center;
    margin-top: 2px;
}
