/* =====================================================================
   KNIGHT EAST CORE (KEC) — LIGHT ENTERPRISE DESIGN SYSTEM
   Standardized to Knight East Payment Gateway (KEPG) Light UI
   - Main Background   : #F4F6FA (Executive Cool Gray / Off-White)
   - Card Background   : #FFFFFF (Crisp Pure White)
   - Primary Brand Navy: #0F2547 (Deep Royal Navy)
   - Primary Brand Gold: #C5A059 (Metallic Knight Gold)
   - Border Color      : #E2E8F0 / #DDE3EE
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Backgrounds */
    --bg-base: #F4F6FA;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.95);

    /* Knight East Brand Navy */
    --navy-900: #0C1E3A;
    --navy-800: #0F2547;
    --navy-700: #162E58;
    --navy-600: #1E3A6E;

    /* Knight East Brand Gold */
    --gold-300: #F3E5AB;
    --gold-400: #D4AF37;
    --gold-500: #C5A059;
    --gold-600: #A8873C;
    --gold-light: #FDF9F0;
    --gold-gradient: linear-gradient(135deg, #C5A059 0%, #D4AF37 50%, #A8873C 100%);
    --gold-glow: rgba(197, 160, 89, 0.25);

    /* Accents */
    --emerald: #10B981;
    --emerald-light: #ECFDF5;
    --sapphire: #0284C7;
    --sapphire-light: #F0F9FF;
    --amethyst: #7C3AED;
    --amethyst-light: #F5F3FF;
    --danger: #EF4444;

    /* Text */
    --text-pure: #0F2547;
    --text-primary: #0F2547;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-gold: #A8873C;

    /* Borders */
    --border-subtle: #E2E8F0;
    --border-medium: #CBD5E1;
    --border-gold: rgba(197, 160, 89, 0.4);
    --border-gold-bright: #C5A059;

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(15, 37, 71, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 37, 71, 0.08);
    --shadow-lg: 0 16px 36px rgba(15, 37, 71, 0.12);
    --shadow-gold: 0 10px 28px rgba(197, 160, 89, 0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 22px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Subtle clean dotted background for institutional texture */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(15, 37, 71, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.portal-container {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 36px 64px;
}

/* ── MASTER HEADER ─────────────────────────────────────────────────── */
.master-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1.5px solid var(--border-gold);
    box-shadow: 0 4px 14px rgba(197, 160, 89, 0.25);
}

.brand-titles h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--navy-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-titles h1 span.core-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    color: var(--gold-600);
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.brand-titles p {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.header-status-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.system-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--emerald-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10B981;
    box-shadow: 0 0 8px #10B981;
    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 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-clock {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    padding: 7px 16px;
    border-radius: 30px;
    color: var(--navy-800);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-btn:hover {
    background: #F7ECD7;
    border-color: var(--gold-500);
}

/* ── EXECUTIVE BANNER (LIGHT) ─────────────────────────────────────── */
.hero-banner {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 34px 38px;
    margin-bottom: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--gold-gradient);
}

.hero-content {
    max-width: 820px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gold-600);
    margin-bottom: 10px;
}

.hero-banner h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.25;
    color: var(--navy-800);
    margin-bottom: 8px;
}

.hero-banner p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-stats-strip {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.hero-stat-pill {
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    text-align: right;
}

.hero-stat-pill .num {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--navy-800);
}

.hero-stat-pill .label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── SECTION HEADERS ──────────────────────────────────────────────── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-600);
    font-size: 16px;
}

.section-header-title h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--navy-800);
    letter-spacing: -0.3px;
}

.section-header-title p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── 3 CARDS MASTER GRID (LIGHT MODE) ─────────────────────────────── */
.workspace-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 56px;
}

.workspace-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px 28px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: transparent;
    transition: all 0.3s ease;
}

.workspace-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold-500);
    box-shadow: var(--shadow-lg);
}

/* Card Strip Accents */
.card-nozax::before { background: linear-gradient(90deg, #10B981, #059669); }
.card-broker::before { background: linear-gradient(90deg, #0284C7, #2563EB); }
.card-commerce::before { background: linear-gradient(90deg, #C5A059, #A8873C); }

.card-open-tab-cue {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.workspace-card:hover .card-open-tab-cue {
    color: var(--navy-800);
    border-color: var(--border-gold);
    background: var(--gold-light);
}

.card-header-badge-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.card-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.icon-nozax {
    background: var(--emerald-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.icon-broker {
    background: var(--sapphire-light);
    border: 1px solid rgba(2, 132, 199, 0.3);
    color: #0284C7;
}

.icon-commerce {
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    color: var(--gold-600);
}

.card-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-status {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-live { color: #059669; }
.badge-multi { color: #0284C7; }
.badge-retail { color: var(--gold-600); }

.badge-sandbox-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 23px;
    font-weight: 800;
    color: var(--navy-800);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-600);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 56px;
}

/* Institutional Spec Box (Light Mode) */
.card-specs-box {
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.card-spec-item .label {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-spec-item .val {
    color: var(--navy-800);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

/* Card Action Buttons (Light Mode) */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gold-gradient);
    color: var(--navy-900);
    font-weight: 800;
    font-size: 13px;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(197, 160, 89, 0.3);
}

.btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(197, 160, 89, 0.45);
    color: #000000;
}

.btn-secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F8FAFC;
    border: 1px solid var(--border-medium);
    color: var(--navy-800);
    font-weight: 700;
    font-size: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-action:hover {
    background: #EFF6FF;
    border-color: #94A3B8;
    color: var(--navy-900);
}

.btn-dual-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ── ROADMAP GRID (LIGHT) ─────────────────────────────────────────── */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.roadmap-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.roadmap-card:hover {
    border-color: var(--gold-500);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.roadmap-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gold-600);
    flex-shrink: 0;
}

.roadmap-info h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-800);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.roadmap-tag {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--gold-light);
    color: var(--gold-600);
    border: 1px solid var(--border-gold);
    padding: 2px 7px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.roadmap-info p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ── FOOTER (LIGHT) ───────────────────────────────────────────────── */
.portal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: var(--navy-800);
}

/* ── SOP MODAL (LIGHT) ────────────────────────────────────────────── */
#sop-modal .modal-content {
    background: #FFFFFF !important;
    color: var(--navy-800) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* Responsiveness */
@media (max-width: 1180px) {
    .workspace-grid { grid-template-columns: 1fr; }
    .roadmap-grid { grid-template-columns: 1fr; }
    .hero-banner { flex-direction: column; gap: 24px; align-items: flex-start; }
    .hero-stats-strip { width: 100%; justify-content: flex-start; }
}
