:root {
    --bg-dark: #000000;
    --bg-card: rgba(14, 14, 18, 0.85);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(56, 189, 248, 0.25);

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent-blue: #38bdf8;
    --accent-blue-glow: rgba(56, 189, 248, 0.12);
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000000;
    background-image: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    padding: 0.75rem 1.5rem;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-card);
    margin-bottom: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo-img {
    height: 38px !important;
    max-height: 38px !important;
    max-width: 190px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.brand-divider {
    width: 1px !important;
    height: 30px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    margin: 0 0.8rem !important;
}

.poc-main-title {
    font-family: var(--font-serif) !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    background: linear-gradient(135deg, #ffffff 70%, rgba(255, 255, 255, 0.75) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header-badges {
    display: flex;
    gap: 0.75rem;
}

.status-badge {
    font-size: 0.75rem;
    font-family: var(--font-main);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.info {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Workspace Layout: Left Sidebar + Centered Stage */
.workspace-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .workspace-layout {
        grid-template-columns: 1fr;
    }
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stage-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.stage-column>.card {
    width: 100%;
    max-width: 520px;
}

.stage-column>.card.results-card {
    max-width: 820px !important;
    width: 100% !important;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.card-header {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
}

.step-tag {
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-blue);
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-transform: uppercase;
}

.card-header h2 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #ffffff;
}

.card-body {
    padding: 1.25rem;
}

/* Drop Zone: Seamless & Borderless Container (No nested box outlines!) */
.drop-zone {
    border: none !important;
    border-radius: 0 !important;
    padding: 1.25rem 0.5rem !important;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
}

.drop-zone:hover {
    background: transparent !important;
    box-shadow: none !important;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.drop-content {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.upload-icon {
    color: var(--accent-blue);
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.drop-zone:hover .upload-icon {
    color: #60a5fa;
    transform: translateY(-2px);
}

.primary-text {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.secondary-text {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.browse-btn {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Extracted ID Face Preview */
.preview-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.crop-header-badge {
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-blue);
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0.2rem;
}

.preview-container img {
    max-height: 195px;
    width: auto;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.2);
    object-fit: cover;
}

.id-meta {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-emerald);
}

.btn-change {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-change:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Viewfinder */
.viewfinder-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-card);
}

#webcam-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror view */
}

#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: scaleX(-1);
}

.face-guide-oval {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55%;
    height: 70%;
    border: 2px dashed rgba(56, 189, 248, 0.4);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}


/* Active Guidance Motion Prompt Banner */
.active-guidance-banner {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(14, 165, 233, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.6);
    border-radius: 14px;
    padding: 0.75rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    z-index: 15;
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.guidance-pulse-icon {
    font-size: 1.8rem;
    animation: bounceRight 1s infinite alternate ease-in-out;
}

@keyframes bounceRight {
    from { transform: translateX(-4px); }
    to { transform: translateX(6px); }
}

.guidance-text-group {
    flex: 1;
}

.guidance-step-label {
    font-size: 0.65rem;
    font-family: var(--font-main);
    color: #e0f2fe;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.guidance-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.challenge-banner {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(14, 14, 16, 0.95);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.challenge-icon {
    font-size: 1.8rem;
}

.challenge-text-group {
    flex: 1;
}

.challenge-label {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--accent-blue);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.challenge-title {
    font-size: 1rem;
    font-weight: 700;
}

.countdown-circle {
    width: 42px;
    height: 42px;
    background: var(--accent-blue-glow);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-blue);
}

/* Live Metrics Bar */
.live-metrics-bar {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.metric-pill {
    flex: 1;
    background: rgba(14, 14, 16, 0.6);
    border: 1px solid var(--border-card);
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pill-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.pill-val {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
}

/* Action Bar */
.action-bar {
    margin-top: 1rem;
}

.btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: #fff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-primary:disabled {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.42) !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    padding: 0.85rem 1.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* Verdict Banner */
.verdict-banner {
    padding: 1.1rem 1.5rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.verdict-banner.verified {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
}

.verdict-banner.rejected {
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.14) 0%, rgba(244, 63, 94, 0.05) 100%);
    border: 1px solid rgba(244, 63, 94, 0.35);
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.15);
}

.verdict-badge {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.verdict-banner.verified .verdict-badge {
    color: var(--accent-emerald);
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.verdict-banner.rejected .verdict-badge {
    color: var(--accent-rose);
    text-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}

.verdict-reason {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Score Ring Card */
.score-card {
    background: rgba(14, 14, 16, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.score-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.score-ring-svg {
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 12;
}

.ring-fill {
    fill: none;
    stroke: var(--accent-blue);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transition: stroke-dashoffset 1s ease-in-out;
}

.score-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.score-unit {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 700;
}

.score-meta h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.score-meta p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.simplified-3-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .simplified-3-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
}

.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.metric-title {
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-secondary);
}

.metric-status-pill {
    font-family: var(--font-main);
    font-size: 0.7rem;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.metric-status-pill.passed {
    color: #10b981 !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.metric-status-pill.failed {
    color: #f43f5e !important;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

.metric-weight-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    color: var(--text-muted);
}

.metric-row strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.metric-value-big {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.25rem;
}

.latency-card {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.35);
    grid-column: span 2;
    transition: all 0.3s ease;
}

.latency-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.2);
}

.latency-tag {
    color: #f59e0b;
    font-weight: 700;
    font-family: var(--font-mono);
}

.latency-value {
    color: #38bdf8 !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.liveness-metric-card {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.liveness-tag {
    color: var(--accent-emerald);
    font-weight: 700;
    font-family: var(--font-mono);
}

.metric-status-large {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: 0.03em;
}

.status-pass {
    color: #10b981 !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.status-spoof {
    color: #f43f5e !important;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

.match-tile-card {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.match-score-value {
    color: #818cf8 !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    text-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

.pct-unit {
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
    color: var(--text-secondary);
}

/* Dynamic Tile Green / Red Card States */
.metric-card.tile-passed {
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.12);
    transition: all 0.3s ease;
}

.metric-card.tile-passed .metric-value-big {
    color: #10b981 !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.metric-card.tile-failed {
    background: rgba(244, 63, 94, 0.08) !important;
    border: 1px solid rgba(244, 63, 94, 0.4) !important;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.12);
    transition: all 0.3s ease;
}

.metric-card.tile-failed .metric-value-big {
    color: #f43f5e !important;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

.metric-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.session-info-bar {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.latency-pill {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--accent-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
}

.latency-pill code {
    color: #ffffff;
    font-weight: 700;
}

.results-action-bar {
    display: flex;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   STANDALONE FULL-PAGE LOGIN VIEW
   ========================================================================== */
.login-view-container {
    width: 100vw;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 20%, rgba(30, 58, 138, 0.25) 0%, rgba(3, 7, 18, 0.98) 70%), #030712;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.login-page-card {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.12) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.login-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.2rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.35rem;
    font-family: var(--font-display);
}

.login-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Auth Form Controls */
.auth-form .form-group {
    margin-bottom: 1.35rem;
}

.auth-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.45rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.95rem;
    color: #64748b;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.65rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.btn-toggle-password:hover {
    color: #38bdf8;
}


.input-wrapper input:focus {
    outline: none;
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.25rem;
    font-size: 0.98rem;
    margin-top: 0.6rem;
}

.auth-error-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.1rem;
    text-align: center;
}

.auth-credentials-hint {
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
}

.auth-credentials-hint code {
    background: rgba(30, 41, 59, 0.8);
    color: #38bdf8;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* ==========================================================================
   PORTAL NAVIGATION TABS & HEADER ACTIONS
   ========================================================================== */
.portal-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem;
    border-radius: 30px;
    margin: 0 auto;
}

.nav-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.3));
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.nav-badge-unlimited {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
}

.user-profile-pill {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 0.35rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.user-avatar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.btn-logout {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.btn-logout:hover {
    color: #ef4444;
}

/* ==========================================================================
   DEVELOPER API KEYS STANDALONE PAGE VIEW
   ========================================================================== */
.portal-main-content {
    width: 100%;
    margin-top: 1rem;
}

.page-view-section {
    animation: fadeInView 0.25s ease forwards;
}

@keyframes fadeInView {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.api-keys-page-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.page-hero-card {
    padding: 1.5rem 2rem;
}

.page-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.hero-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.4rem;
    font-family: var(--font-display);
}

.hero-page-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 750px;
    line-height: 1.5;
}

.hero-quota-badge {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 0.6rem 1.1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.api-keys-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.full-width-card {
    grid-column: 1 / -1;
}

.styled-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.styled-input:focus {
    outline: none;
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.generate-key-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* API Keys Data Table */
.keys-table-wrapper {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.keys-table th {
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    font-weight: 600;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keys-table td {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    vertical-align: middle;
}

.key-code-pill {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #38bdf8;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.badge-unlimited {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-usage-normal {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

.badge-usage-exhausted {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    font-weight: 700;
}


.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-blocked {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-copied {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}


/* Action Buttons */
.table-actions-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy-key {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-key:hover {
    background: rgba(56, 189, 248, 0.3);
    color: #ffffff;
}

.btn-block-key {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-block-key:hover {
    background: rgba(245, 158, 11, 0.35);
    color: #ffffff;
}

.btn-unblock-key {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-unblock-key:hover {
    background: rgba(16, 185, 129, 0.35);
    color: #ffffff;
}

.btn-delete-key {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-key:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

/* Code Integration Block */
.code-snippet-box {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.snippet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.7);
    padding: 0.6rem 1.1rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.btn-copy-snippet {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-snippet:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.code-block {
    padding: 1.1rem;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #38bdf8;
    line-height: 1.5;
}