/**
 * Auth Pages Styles
 * Shared styles for authentication pages: login, register, forgot-password, reset-password
 * Load order: base.css (optional), auth.css, Google Fonts
 */

/* CSS Reset - included here since auth pages don't load base.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   Auth Checking State - Hide content until auth is determined
   Prevents flash of login form for already-authenticated users
   ======================================== */
/* Auth reveal - instant transition to prevent stutter when auth completes */
.brand-panel,
.login-panel,
.register-panel,
.forgot-panel,
.reset-panel {
    /* No transition - show immediately when auth-checking is removed */
}

/* Hide panels during auth check - covers both early (html class) and late (body class) states */
html.auth-checking-pending .brand-panel,
html.auth-checking-pending .login-panel,
html.auth-checking-pending .register-panel,
html.auth-checking-pending .forgot-panel,
html.auth-checking-pending .reset-panel,
body.auth-checking .brand-panel,
body.auth-checking .login-panel,
body.auth-checking .register-panel,
body.auth-checking .forgot-panel,
body.auth-checking .reset-panel {
    display: none;
}

body.auth-checking::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: auth-spinner 0.8s linear infinite;
}

@keyframes auth-spinner {
    to { transform: rotate(360deg); }
}

/* Auth page body */
body.page--login,
body.page--register,
body.page--forgot-password,
body.page--reset-password {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

/* ========================================
   Left Panel - Branding
   ======================================== */
.brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    animation: auth-pulse 15s ease-in-out infinite;
}

@keyframes auth-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}

.brand-logo svg {
    width: 44px;
    height: 44px;
    fill: white;
}

.brand-title {
    font-size: 5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: -0.02em;
    text-align: left;
}

.brand-tagline {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-primary, #60a5fa);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.6;
    margin-bottom: 48px;
}

/* ========================================
   Rotating Benefits Animation
   ======================================== */
.rotating-benefits {
    margin-top: 40px;
    height: 28px;
    position: relative;
}

.benefit-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
    opacity: 0;
    animation: fadeInOut 15s ease-in-out infinite;
}

.benefit-item:nth-child(1) { animation-delay: 0s; }
.benefit-item:nth-child(2) { animation-delay: 3s; }
.benefit-item:nth-child(3) { animation-delay: 6s; }
.benefit-item:nth-child(4) { animation-delay: 9s; }
.benefit-item:nth-child(5) { animation-delay: 12s; }

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(8px); }
    2% { opacity: 1; transform: translateY(0); }
    18% { opacity: 1; transform: translateY(0); }
    20% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 0; }
}

/* ========================================
   Value Icons Trio
   ======================================== */
.value-icons {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin: 28px 0 24px;
}

.value-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.value-icon svg {
    width: 36px;
    height: 36px;
    stroke: url(#brand-gradient);
    color: #60a5fa;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.value-icon:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.5));
}

.value-icon span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* Primary Tagline */
.value-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    margin: 28px 0 24px;
    font-style: italic;
}

/* ========================================
   Tagline Highlights
   ======================================== */
.highlight-blue {
    color: #60a5fa;
    font-weight: 600;
}

.highlight-green {
    color: #34d399;
    font-weight: 600;
}

.highlight-white {
    color: #ffffff;
    font-weight: 600;
}

/* ========================================
   Data Showcase Container
   ======================================== */
.data-showcase {
    position: relative;
    height: 480px;
    margin: 32px 0;
}

.showcase-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 420px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 28px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.showcase-view.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Carousel Navigation Controls
   ======================================== */
.carousel-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 4px;
}

.carousel-btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.carousel-btn svg {
    width: 18px;
    height: 18px;
}

.carousel-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    min-height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.carousel-dot.active {
    background: #60a5fa;
    width: 24px;
    border-radius: 4px;
}

/* ========================================
   Dashboard View
   ======================================== */
.metric-row {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
}

.metric {
    flex: 1;
}

.metric-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.risk .progress-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.progress-bar.compliance .progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.metric-trend {
    font-size: 0.7rem;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

.metric-trend.up {
    color: #34d399;
}

.metric-trend.down {
    color: #fbbf24;
}

/* ========================================
   Frameworks Row
   ======================================== */
.frameworks-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 12px 0;
    row-gap: 6px;
}

.framework-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   Metrics Counter View
   ======================================== */
.big-metrics {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 8px 0;
}

.big-metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #60a5fa;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.big-number.static {
    background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.big-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.metrics-tagline {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ========================================
   Module Showcase View
   ======================================== */
.modules-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px 0;
}

.module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    /* Fallback for browsers that don't support color-mix */
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.3);
    /* Modern browsers with color-mix support */
    background: color-mix(in srgb, var(--module-color) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--module-color) 30%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--module-color);
}

.module-item:hover .module-icon {
    transform: scale(1.1);
    /* Fallback for browsers that don't support color-mix */
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    /* Modern browsers with color-mix support */
    box-shadow: 0 0 20px color-mix(in srgb, var(--module-color) 40%, transparent);
}

.module-name {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.modules-tagline {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ========================================
   Enhanced Dashboard View
   ======================================== */
.metric-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #10B981;
}

.metric-change .change-arrow {
    font-size: 1.1rem;
}

.metric-change .change-value {
    color: #10B981;
}

.feature-ticker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.ticker-dot {
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Enhanced Metrics View
   ======================================== */
.metric-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.metric-details span {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.02em;
}

/* ========================================
   Modules Orbit View (Redesigned)
   ======================================== */
.modules-orbit-view {
    padding: 16px 24px !important;
}

.orbit-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.donut-chart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
}

.donut-segment {
    transition: stroke-dasharray 2.5s ease-out, stroke-dashoffset 2.5s ease-out;
}

.donut-percent {
    font-family: inherit;
}

.orbit-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Animation driven by JS for browser compatibility */
}

.orbit-module {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    top: 50%;
    left: 50%;
    /* Initial position - JS updates these transforms for rotation */
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-90px) rotate(calc(-1 * var(--angle)));
}

.orbit-module svg {
    width: 32px;
    height: 32px;
    stroke: var(--module-color);
    /* Fallback for browsers that don't support color-mix */
    filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.5));
    /* Modern browsers with color-mix support */
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--module-color) 50%, transparent));
}

.orbit-module span {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orbit-tagline {
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ========================================
   Product View Base Styles
   ======================================== */
.product-view {
    display: flex;
    flex-direction: column;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.product-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--product-color);
    text-transform: uppercase;
}

.product-tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.product-sales {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: auto;
    padding-top: 8px;
    font-weight: 500;
}

/* Marketing Content Section - pushed to bottom with separator */
.marketing-content {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.marketing-blurb {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 10px;
    text-align: center;
}

.feature-bullets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.feature-bullets li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.feature-bullets li::before {
    content: '\2713';
    color: #10B981;
    font-weight: 700;
    font-size: 0.75rem;
}

.feature-bullets .more-link {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.feature-bullets .more-link::before {
    content: '+';
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Governance View
   ======================================== */
.gov-tiles {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.gov-tile {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 14px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 10px;
}

.gov-tile-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gov-tile-icon svg {
    width: 24px;
    height: 24px;
    stroke: #2563EB;
}

.gov-tile-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gov-tile-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.gov-coverage {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gov-coverage-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.gov-coverage .progress-bar {
    flex: 1;
}

.progress-bar.governance .progress-fill {
    background: linear-gradient(90deg, #2563EB 0%, #60a5fa 100%);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.gov-coverage-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: #60a5fa;
}

/* ========================================
   Risk View
   ======================================== */
.risk-chart {
    margin: 12px 0;
    width: 100%;
    overflow: visible;
}

.trend-chart {
    width: 100%;
    height: auto;
    max-height: 140px;
    display: block;
}

/* Risk chart - JS-driven animation (no CSS active state changes) */
.trend-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    /* No transition - JS handles animation for Edge compatibility */
}

.trend-area {
    opacity: 0;
    /* No transition - JS handles animation */
}

.trend-point {
    opacity: 0;
    transform-origin: center;
    /* No transition - JS handles animation */
}

@keyframes pulsePoint {
    0% { r: 4; }
    50% { r: 8; }
    100% { r: 4; }
}

.risk-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.risk-delta {
    font-size: 1rem;
    font-weight: 700;
    color: #10B981;
}

.delta-value {
    font-variant-numeric: tabular-nums;
}

.risk-caption {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Compliance View
   ======================================== */
.compliance-cards {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 16px 0;
}

.compliance-card {
    flex: 1;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 12px;
}

.compliance-card-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.circular-progress {
    width: 100px;
    height: 100px;
}

.circular-progress svg {
    width: 100%;
    height: 100%;
}

.progress-ring {
    transition: stroke-dasharray 1.3s ease-out;
}

.progress-text {
    font-family: inherit;
}

.remediation-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
}

.remediation-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    font-variant-numeric: tabular-nums;
}

.compliance-trend {
    font-size: 0.65rem;
    font-weight: 600;
}

.compliance-trend.up {
    color: #10B981;
}

.compliance-trend.down {
    color: #10B981;
}

/* ========================================
   Vendor View
   ======================================== */
.vendor-cards {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}

.vendor-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    /* Animation is JS-driven via requestAnimationFrame, no CSS transition needed */
}

.vendor-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.vendor-risk {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.vendor-risk.high {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.vendor-risk.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.vendor-risk.low {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.vendor-risk.pending {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
}

.vendor-rank {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    min-height: 0.75rem;
    line-height: 0.75rem;
}

.vendor-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0 12px;
}

.vendor-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.vendor-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #A78BFA;
}

.vendor-stat-value.high {
    color: #EF4444;
}

.vendor-stat-value.pending {
    color: #F59E0B;
}

.vendor-stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vendor-coverage {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
}

.vendor-coverage-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.vendor-coverage .progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.vendor-coverage .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7C3AED, #A78BFA);
    border-radius: 3px;
    transition: width 1.5s ease-out;
}

.vendor-coverage-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #A78BFA;
}

/* ========================================
   AI Insights View
   ======================================== */
.ai-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.ai-prompt-symbol {
    color: #F59E0B;
    font-weight: 700;
}

.ai-prompt-text {
    color: white;
    font-size: 0.95rem;
    flex: 1;
}

.ai-cursor {
    color: #F59E0B;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.ai-thinking {
    display: none;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
}

.ai-thinking.active {
    display: flex;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background: #F59E0B;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.thinking-dot:nth-child(1) { animation-delay: 0s; }
.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-responses {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.ai-response {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    /* No CSS transition - JS handles all animation */
}

.ai-view.active .ai-response.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ai-bullet {
    color: #F59E0B;
    font-size: 0.75rem;
}

.ai-response-text {
    flex: 1;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.ai-tag {
    font-size: 0.5rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ai-tag.critical {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    animation: none;
}

.ai-view.active .ai-tag.critical.pulse {
    animation: pulseCritical 1s ease-out;
}

@keyframes pulseCritical {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ai-tag.info {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

/* ========================================
   Trust Badges
   ======================================== */
.trust-badges {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

.trust-badge {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.trust-badge svg {
    opacity: 0.5;
}

/* ========================================
   Mobile Brand Header (shown on mobile only)
   ======================================== */
.mobile-brand-header {
    display: none;
}

/* ========================================
   Right Panel - Form Container
   ======================================== */
.login-panel,
.register-panel,
.form-panel {
    flex: 0 0 45%;
    min-width: 320px;
    max-width: 520px;
    min-height: 100vh;
    background: var(--bg-primary, white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
}

.register-panel {
    flex: 0 0 48%;
    max-width: 560px;
    padding: 32px 40px;
    overflow-y: auto;
}

/* ========================================
   Form Headers
   ======================================== */
.login-header,
.register-header,
.form-header {
    margin-bottom: 40px;
}

.register-header,
.form-header {
    margin-bottom: 32px;
}

.login-header h1,
.register-header h1,
.form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin-bottom: 8px;
}

.form-header h1 {
    margin-bottom: 12px;
}

.login-header p,
.register-header p,
.form-header p {
    color: var(--text-muted, #64748b);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========================================
   Form Styles
   ======================================== */
.login-form,
.register-form,
.reset-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.register-form {
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.register-form .form-group {
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary, #374151);
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-primary, #0f172a);
}

.register-form .form-group input {
    padding: 12px 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    background: var(--bg-primary, white);
    box-shadow: 0 0 0 4px var(--color-info-bg-light, rgba(59, 130, 246, 0.1));
}

.form-group input::placeholder {
    color: var(--text-placeholder, #9ca3af);
}

.tos-group {
    margin-top: 12px;
}

.tos-group .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-primary, #0f172a);
}

.tos-group .checkbox-label input {
    margin-top: 4px;
    flex-shrink: 0;
}

.tos-group .checkbox-text a {
    color: var(--primary-color, #60a5fa);
    text-decoration: underline;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hint-text {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    margin-top: 2px;
}

/* ========================================
   Password Requirements
   ======================================== */
.password-requirements {
    background: var(--bg-secondary, #f8fafc);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.password-requirements h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 6px;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary, #e2e8f0);
    flex-shrink: 0;
}

.requirement-icon svg {
    width: 10px;
    height: 10px;
    stroke: var(--text-placeholder, #94a3b8);
}

.requirement.met .requirement-icon {
    background: var(--color-success, #10b981);
}

.requirement.met .requirement-icon svg {
    stroke: white;
}

.requirement.met {
    color: var(--color-success, #059669);
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    padding: 16px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    margin-top: 8px;
}

.register-form .btn-primary {
    padding: 14px 24px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
    left: 50%;
    top: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Links and Footer
   ======================================== */
.link-button {
    background: none;
    border: none;
    color: var(--primary-color, #3b82f6);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-button:hover {
    color: var(--primary-color-hover, #1d4ed8);
    text-decoration: underline;
}

.link-button.disabled {
    color: var(--text-muted, #9ca3af);
    cursor: not-allowed;
    pointer-events: none;
}

.login-footer,
.register-footer,
.form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.register-footer {
    padding-top: 20px;
}

.login-footer span {
    color: var(--text-placeholder, #d1d5db);
}

/* ========================================
   Error and Success Messages
   ======================================== */
.error-text {
    background: var(--color-danger-bg-light, #fef2f2);
    color: var(--color-danger, #dc2626);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid var(--color-danger-border, #fecaca);
}

/* For pages using display toggle */
.error-text:not(.visible) {
    display: none;
}

.success-message {
    background: var(--color-success-bg-light, #f0fdf4);
    color: var(--color-success-dark, #166534);
    padding: 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    border: 1px solid var(--color-success-border, #bbf7d0);
    text-align: center;
    display: none;
    max-width: 400px;
    margin: 0 auto;
}

.success-message.visible {
    display: block;
}

.success-message h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-success-darker, #14532d);
    font-weight: 600;
}

.success-message p {
    color: var(--color-success-dark, #166534);
    line-height: 1.6;
    margin-bottom: 24px;
}

.success-message .btn-primary {
    display: inline-block;
    text-decoration: none;
    margin-top: 0;
}

/* Reset password specific */
.invalid-token {
    background: var(--color-danger-bg-light, #fef2f2);
    padding: 24px;
    border-radius: 10px;
    border: 1px solid var(--color-danger-border, #fecaca);
    text-align: center;
    display: none;
}

.invalid-token.visible {
    display: block;
}

.invalid-token h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-danger-dark, #991b1b);
}

.invalid-token p {
    color: var(--color-danger, #dc2626);
    line-height: 1.5;
    margin-bottom: 20px;
}

.invalid-token .link-button {
    display: inline-block;
}

.loading-state {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color, #e5e7eb);
    border-top-color: var(--primary-color, #3b82f6);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.loading-state p {
    color: var(--text-muted, #64748b);
    font-size: 0.95rem;
}

/* ========================================
   Modal (Org Selection)
   ======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: var(--bg-primary, white);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.3));
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-muted, #64748b);
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-list button {
    padding: 12px 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-primary, white);
    color: var(--text-primary, #0f172a);
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.modal-list button:hover {
    border-color: var(--primary-color, #3b82f6);
    background: var(--color-info-bg-light, #f0f9ff);
}

/* ========================================
   Emulator Notice
   ======================================== */
.emulator-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-warning-bg-light, #fef3c7);
    color: var(--color-warning-dark, #92400e);
    padding: 8px 16px;
    font-size: 0.75rem;
    text-align: center;
}

/* ========================================
   Invite States
   ======================================== */
.invite-state {
    text-align: center;
    padding: 20px 0;
}

.invite-state .loading-spinner {
    margin: 30px auto;
}

.invite-state.is-hidden {
    display: none;
}

/* ========================================
   Utilities
   ======================================== */
.is-hidden {
    display: none;
}

/* ========================================
   Responsive - Both panels always visible
   ======================================== */
@media (max-width: 900px) {
    .brand-panel {
        padding: 32px;
    }

    .brand-title {
        font-size: 3.5rem;
    }

    .brand-tagline {
        font-size: 1.1rem;
    }

    .brand-subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .brand-logo {
        width: 70px;
        height: 70px;
    }

    .brand-logo svg {
        width: 38px;
        height: 38px;
    }

    /* Branding components adjustments */
    .value-icons {
        gap: 28px;
        margin: 20px 0;
    }

    .value-icon svg {
        width: 30px;
        height: 30px;
    }

    .data-showcase {
        height: 420px;
        margin: 24px 0;
    }

    .showcase-view {
        height: 370px;
    }

    /* Orbit view responsive */
    .orbit-container {
        width: 140px;
        height: 140px;
    }

    .donut-chart {
        width: 70px;
        height: 70px;
    }

    .orbit-module {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-60px) rotate(calc(-1 * var(--angle)));
    }

    .orbit-module svg {
        width: 26px;
        height: 26px;
    }

    .orbit-module span {
        font-size: 0.55rem;
    }

    /* Governance view responsive */
    .gov-tiles {
        gap: 10px;
    }

    .gov-tile {
        padding: 8px 6px;
    }

    .gov-tile-value {
        font-size: 1.1rem;
    }

    /* Risk view responsive */
    .trend-chart {
        max-height: 90px;
    }

    /* Compliance view responsive */
    .compliance-cards {
        gap: 14px;
    }

    .circular-progress {
        width: 60px;
        height: 60px;
    }

    .remediation-count {
        width: 60px;
        height: 60px;
    }

    .remediation-value {
        font-size: 1.6rem;
    }

    /* Vendor view responsive */
    .vendor-cards {
        gap: 8px;
    }

    .vendor-card {
        padding: 8px 4px;
    }

    .vendor-name {
        font-size: 0.55rem;
    }

    /* AI view responsive */
    .ai-prompt {
        padding: 8px 12px;
    }

    .ai-prompt-text {
        font-size: 0.75rem;
    }

    .ai-response-text {
        font-size: 0.65rem;
    }

    .showcase-view {
        padding: 16px 20px;
    }

    .big-number {
        font-size: 1.9rem;
    }

    /* Module showcase responsive */
    .modules-grid {
        gap: 14px;
    }

    .module-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .module-icon svg {
        width: 20px;
        height: 20px;
    }

    .module-name {
        font-size: 0.55rem;
    }

    .trust-badges {
        gap: 14px;
        margin-top: 20px;
    }

    .trust-badge {
        font-size: 0.65rem;
    }

    .login-panel,
    .register-panel,
    .form-panel {
        padding: 32px 24px;
    }

    .login-header h1,
    .register-header h1,
    .form-header h1 {
        font-size: 1.5rem;
    }

    .form-group input {
        padding: 12px 14px;
    }

    .btn-primary {
        padding: 14px 20px;
    }
}

@media (max-width: 700px) {
    .brand-panel {
        padding: 24px;
    }

    .brand-title {
        font-size: 2.5rem;
    }

    .brand-tagline {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.875rem;
        margin-bottom: 24px;
    }

    .brand-logo {
        width: 60px;
        height: 60px;
    }

    .brand-logo svg {
        width: 32px;
        height: 32px;
    }

    /* Branding components adjustments */
    .value-icons {
        gap: 20px;
        margin: 16px 0;
    }

    .value-icon svg {
        width: 26px;
        height: 26px;
    }

    .value-icon span {
        font-size: 0.6rem;
    }

    .data-showcase {
        height: 400px;
        margin: 20px 0;
    }

    .showcase-view {
        height: 350px;
    }

    /* Orbit view responsive */
    .orbit-container {
        width: 120px;
        height: 120px;
    }

    .donut-chart {
        width: 60px;
        height: 60px;
    }

    .donut-percent {
        font-size: 12px !important;
    }

    .orbit-module {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-50px) rotate(calc(-1 * var(--angle)));
    }

    .orbit-module svg {
        width: 22px;
        height: 22px;
    }

    .orbit-module span {
        font-size: 0.5rem;
    }

    /* Governance view responsive */
    .gov-tile-icon {
        width: 24px;
        height: 24px;
    }

    .gov-tile-icon svg {
        width: 16px;
        height: 16px;
    }

    .gov-tile-value {
        font-size: 1rem;
    }

    /* Risk view responsive */
    .trend-chart {
        max-height: 75px;
    }

    .risk-delta {
        font-size: 0.85rem;
    }

    /* Compliance view responsive */
    .compliance-card {
        padding: 10px 8px;
    }

    .circular-progress {
        width: 55px;
        height: 55px;
    }

    .remediation-count {
        width: 55px;
        height: 55px;
    }

    .remediation-value {
        font-size: 1.4rem;
    }

    /* Vendor view responsive */
    .vendor-cards {
        flex-wrap: wrap;
    }

    .vendor-card {
        flex: 0 0 calc(50% - 4px);
        padding: 6px 4px;
    }

    .vendor-name {
        font-size: 0.5rem;
    }

    .vendor-summary {
        font-size: 0.65rem;
    }

    /* AI view responsive */
    .ai-prompt-text {
        font-size: 0.7rem;
    }

    .ai-response-text {
        font-size: 0.6rem;
    }

    .ai-response {
        padding: 4px 8px;
    }

    .showcase-view {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .metric-row {
        gap: 20px;
        margin-bottom: 14px;
    }

    .big-number {
        font-size: 1.6rem;
    }

    .big-label {
        font-size: 0.6rem;
    }

    .metrics-tagline {
        font-size: 0.8rem;
        margin-top: 12px;
    }

    /* Module showcase responsive */
    .modules-grid {
        gap: 10px;
    }

    .module-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .module-icon svg {
        width: 18px;
        height: 18px;
    }

    .module-name {
        font-size: 0.5rem;
    }

    .modules-tagline {
        font-size: 0.8rem;
    }

    .frameworks-row {
        gap: 6px;
    }

    .framework-badge {
        font-size: 0.55rem;
        padding: 4px 8px;
    }

    .trust-badges {
        gap: 10px;
        margin-top: 16px;
    }

    .trust-badge {
        font-size: 0.6rem;
        gap: 4px;
    }

    .trust-badge svg {
        width: 12px;
        height: 12px;
    }

    .login-panel,
    .register-panel,
    .form-panel {
        padding: 24px 20px;
    }

    .login-header h1,
    .register-header h1,
    .form-header h1 {
        font-size: 1.25rem;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* ========================================
   MOBILE RESPONSIVE - SINGLE COLUMN LAYOUT
   Stack panels vertically, hide branding on mobile
   ======================================== */

@media (max-width: 768px) {
    /* Stack panels vertically */
    body.page--login,
    body.page--register,
    body.page--forgot-password,
    body.page--reset-password {
        flex-direction: column;
        overflow-y: auto;
        min-height: 100vh;
        /* iOS 100vh fix */
        min-height: calc(var(--vh, 1vh) * 100);
    }

    /* Hide full branding panel on mobile */
    .brand-panel {
        display: none;
    }

    /* Show mobile brand header */
    .mobile-brand-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.5rem 1.5rem;
        background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
        gap: 8px;
    }

    .mobile-brand-logo {
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    }

    .mobile-brand-logo svg {
        width: 28px;
        height: 28px;
        fill: white;
    }

    .mobile-brand-name {
        font-size: 1.5rem;
        font-weight: 700;
        color: white;
        letter-spacing: -0.01em;
    }

    .mobile-brand-tagline {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 500;
        letter-spacing: 0.05em;
    }

    /* Form panel adjustments */
    .login-panel,
    .register-panel,
    .form-panel {
        flex: 1;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 1.5rem;
        box-shadow: none;
    }

    .register-panel {
        padding: 1.5rem 1.25rem;
    }

    /* Reduce header sizes */
    .login-header,
    .register-header,
    .form-header {
        margin-bottom: 2rem;
    }

    .login-header h1,
    .register-header h1,
    .form-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .login-header p,
    .register-header p,
    .form-header p {
        font-size: 0.95rem;
    }

    /* Form adjustments - iOS zoom prevention */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents iOS auto-zoom */
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    /* Touch-friendly buttons */
    .btn-primary {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Touch-friendly links */
    .link-button {
        min-height: 44px;
        padding: 0.75rem;
        display: inline-flex;
        align-items: center;
    }

    /* Footer adjustments */
    .login-footer,
    .register-footer,
    .form-footer {
        flex-direction: column;
        gap: 1rem;
        padding-top: 1.5rem;
    }

    .login-footer span {
        display: none;
    }

    /* Form row - stack on mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Password requirements */
    .password-requirements {
        padding: 1rem;
    }

    .password-requirements h4 {
        font-size: 0.75rem;
    }

    .requirement {
        font-size: 0.8rem;
    }

    /* Modal full-screen on mobile */
    .modal-overlay.visible {
        align-items: flex-end;
    }

    .modal {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 1.5rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    /* TOS checkbox - larger touch target */
    .tos-group .checkbox-label {
        min-height: 44px;
        padding: 0.5rem 0;
    }

    .tos-group .checkbox-label input {
        width: 22px;
        height: 22px;
        margin-top: 2px;
    }

    /* Error messages */
    .error-text {
        padding: 1rem;
        font-size: 0.875rem;
    }

    /* Success message */
    .success-message {
        padding: 1.5rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-panel,
    .register-panel,
    .form-panel {
        padding: 1.5rem 1rem;
    }

    .login-header h1,
    .register-header h1,
    .form-header h1 {
        font-size: 1.375rem;
    }

    .login-header,
    .register-header,
    .form-header {
        margin-bottom: 1.5rem;
    }

    .login-form,
    .register-form,
    .reset-form {
        gap: 1.25rem;
    }

    .modal {
        padding: 1.25rem;
    }
}

/* ========================================
   SSO Login Section
   ======================================== */
.sso-section {
    margin-top: 8px;
}

.sso-section.is-hidden {
    display: none;
}

.sso-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: var(--text-placeholder, #9ca3af);
    font-size: 0.85rem;
}

.sso-divider::before,
.sso-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #e5e7eb);
}

.sso-divider span {
    padding: 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

#ssoButtonContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sso-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sso-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sso-login-btn:active {
    transform: translateY(0);
}

.sso-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sso-login-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sso-login-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.sso-enforced-text {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--color-info-bg-light, #eff6ff);
    border: 1px solid var(--color-info-border, #bfdbfe);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--color-info-dark, #1e40af);
    text-align: center;
}

.sso-enforced-text.is-hidden {
    display: none;
}

/* SSO checking state */
.sso-checking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
}

.sso-checking-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-top-color: var(--primary-color, #3b82f6);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

/* Mobile adjustments for SSO */
@media (max-width: 768px) {
    .sso-login-btn {
        min-height: 48px;
        padding: 12px 16px;
    }

    .sso-enforced-text {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
}

/* ========================================
   TOS Modal Styles
   ======================================== */
.tos-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.tos-modal-overlay.visible {
    display: flex;
}

.tos-modal {
    background: var(--bg-primary, white);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.3));
}

.tos-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.tos-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin: 0;
}

.tos-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted, #64748b);
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.tos-modal-close:hover {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-primary, #0f172a);
}

.tos-modal-close svg {
    width: 20px;
    height: 20px;
    display: block;
}

.tos-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary, #374151);
}

.tos-modal-body h1,
.tos-modal-body h2,
.tos-modal-body h3 {
    color: var(--text-primary, #0f172a);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.tos-modal-body h1:first-child,
.tos-modal-body h2:first-child,
.tos-modal-body h3:first-child {
    margin-top: 0;
}

.tos-modal-body h1 {
    font-size: 1.5rem;
}

.tos-modal-body h2 {
    font-size: 1.25rem;
}

.tos-modal-body h3 {
    font-size: 1.1rem;
}

.tos-modal-body p {
    margin-bottom: 1em;
}

.tos-modal-body ul,
.tos-modal-body ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.tos-modal-body li {
    margin-bottom: 0.5em;
}

.tos-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
    border-radius: 0 0 16px 16px;
}

.tos-modal-version {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
}

.tos-modal-footer .btn-primary {
    margin-top: 0;
    padding: 10px 20px;
}

/* TOS link button - styled as a link but is a button */
.tos-link-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--primary-color, #60a5fa);
    text-decoration: underline;
    font-size: inherit;
    font-family: inherit;
    transition: color 0.2s ease;
}

.tos-link-btn:hover {
    color: var(--primary-color-hover, #3b82f6);
}

.tos-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted, #64748b);
}

.tos-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-top-color: var(--primary-color, #3b82f6);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
    margin-right: 12px;
}

.tos-error {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-danger, #dc2626);
}

/* Mobile adjustments for TOS modal */
@media (max-width: 768px) {
    .tos-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .tos-modal {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }

    .tos-modal-header {
        padding: 16px 20px;
    }

    .tos-modal-body {
        padding: 20px;
    }

    .tos-modal-footer {
        padding: 12px 20px;
        flex-direction: column;
        gap: 12px;
        border-radius: 0;
    }

    .tos-modal-footer .btn-primary {
        width: 100%;
    }
}

/* ========================================
   ACCESSIBILITY - Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    /* Keep basic UI reduced motion (loading spinners, buttons) */
    .btn-primary.loading::after {
        animation: none;
    }

    .loading-spinner {
        animation: none;
    }

    .sso-checking-spinner {
        animation: none;
    }

    /* NOTE: Login branding animations are intentionally NOT disabled
       for reduced-motion users per product requirements. The showcase
       animations on the login page should always run. */
}

/* ========================================
   MFA Inline UI — Shown in Login Panel
   ======================================== */
.login-panel .mfa-inline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-panel .mfa-inline-header {
    text-align: center;
    margin-bottom: 8px;
}

.login-panel .mfa-inline-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-panel .mfa-inline-icon svg {
    width: 26px;
    height: 26px;
    stroke: white;
}

.login-panel .mfa-inline-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin-bottom: 6px;
}

.login-panel .mfa-inline-header p {
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
}

.login-panel .mfa-inline-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-panel .mfa-inline-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary, #374151);
}

.login-panel .mfa-inline-field input {
    padding: 14px 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-primary, #0f172a);
}

.login-panel .mfa-inline-field input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    background: var(--bg-primary, white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-panel .mfa-inline-code-input {
    text-align: center;
    letter-spacing: 0.3em;
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.login-panel .mfa-inline-trust {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary, #374151);
}

.login-panel .mfa-inline-trust input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--primary-color, #3b82f6);
}

.login-panel .mfa-inline-trust label {
    cursor: pointer;
}

.login-panel .mfa-inline-error {
    min-height: 0;
}

.login-panel .mfa-inline-error:empty {
    display: none;
}

.login-panel .mfa-inline-error p {
    background: var(--color-danger-bg-light, #fef2f2);
    color: var(--color-danger, #dc2626);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid var(--color-danger-border, #fecaca);
    margin: 0;
}

.login-panel .mfa-inline-divider {
    display: flex;
    align-items: center;
    color: var(--text-placeholder, #9ca3af);
    font-size: 0.85rem;
    margin: 4px 0;
}

.login-panel .mfa-inline-divider::before,
.login-panel .mfa-inline-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #e5e7eb);
}

.login-panel .mfa-inline-divider span {
    padding: 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.login-panel .mfa-inline-link {
    background: none;
    border: none;
    color: var(--primary-color, #3b82f6);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    display: block;
    width: 100%;
    padding: 8px;
    transition: color 0.2s ease;
}

.login-panel .mfa-inline-link:hover {
    color: var(--primary-color-hover, #1d4ed8);
    text-decoration: underline;
}

.login-panel .mfa-inline-info {
    background: var(--color-info-bg-light, #eff6ff);
    border: 1px solid var(--color-info-border, #bfdbfe);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--color-info-dark, #1e40af);
    text-align: center;
    line-height: 1.5;
}

/* Enrollment steps */
.login-panel .mfa-inline-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-panel .mfa-inline-step {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-panel .mfa-inline-step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin: 0;
}

.login-panel .mfa-inline-step p {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.4;
}

/* QR code */
.login-panel .mfa-inline-qr {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.login-panel .mfa-inline-qr canvas {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Manual secret key */
.login-panel .mfa-inline-secret {
    text-align: center;
}

.login-panel .mfa-inline-secret p {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 4px;
}

.login-panel .mfa-inline-secret code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    background: var(--bg-secondary, #f1f5f9);
    padding: 6px 12px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    display: inline-block;
    word-break: break-all;
}

/* Backup codes */
.login-panel .mfa-inline-backup {
    border-top: 1px solid var(--border-color, #e5e7eb);
    padding-top: 16px;
}

.login-panel .mfa-inline-backup h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin: 0 0 4px;
}

.login-panel .mfa-inline-backup > p {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    margin: 0 0 10px;
}

.login-panel .mfa-inline-backup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.login-panel .mfa-inline-backup-code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    padding: 6px 8px;
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    color: var(--text-primary, #0f172a);
    letter-spacing: 0.08em;
}

/* Loading spinner */
.login-panel .mfa-inline-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}

.login-panel .mfa-inline-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color, #e5e7eb);
    border-top-color: var(--primary-color, #3b82f6);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

.login-panel .mfa-inline-loading p {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Mobile adjustments for MFA inline */
@media (max-width: 768px) {
    .login-panel .mfa-inline-code-input {
        font-size: 1.25rem;
        letter-spacing: 0.2em;
        min-height: 48px;
    }

    .login-panel .mfa-inline-header h2 {
        font-size: 1.25rem;
    }

    .login-panel .mfa-inline-qr canvas {
        max-width: 160px;
        height: auto;
    }

    .login-panel .mfa-inline-backup-grid {
        gap: 4px;
    }

    .login-panel .mfa-inline-backup-code {
        font-size: 0.7rem;
        padding: 5px 6px;
    }
}

