/* ==========================================================================
   Investor Simulator — PT. Buildsource Companion Indonesia
   Design System & Styling
   ========================================================================== */

:root {
    --navy-primary: #142B4A;
    --navy-secondary: #244B75;
    --gold-primary: #C9A45C;
    --gold-light: #F7F1E5;
    --teal-accent: #0D9488;
    --teal-light: #E6FFFA;
    --body-bg: #F4F6F8;
    --card-bg: #FFFFFF;
    --text-primary: #243247;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --border-hover: #CBD5E1;
    --shadow-sm: 0 1px 3px rgba(20, 43, 74, 0.05);
    --shadow-md: 0 4px 14px rgba(20, 43, 74, 0.08);
    --shadow-lg: 0 10px 25px rgba(20, 43, 74, 0.12);
    --shadow-gold: 0 4px 18px rgba(201, 164, 92, 0.25);
    --transition-base: all 0.25s ease-in-out;
}

[data-theme="dark"] {
    --navy-primary: #1B3B65;
    --navy-secondary: #2A5688;
    --gold-primary: #DFB96F;
    --gold-light: #2C2619;
    --teal-accent: #14B8A6;
    --teal-light: #132E2B;
    --body-bg: #0B1320;
    --card-bg: #142132;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-light: #64748B;
    --border-color: #1E314B;
    --border-hover: #2E4B72;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition-base);
    min-height: 100vh;
}

/* Typography & General */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-navy { color: var(--navy-primary) !important; }
.text-gold { color: var(--gold-primary) !important; }
.text-teal { color: var(--teal-accent) !important; }
.bg-navy { background-color: var(--navy-primary) !important; }
.bg-gold { background-color: var(--gold-primary) !important; }
.bg-light-custom { background-color: var(--body-bg) !important; }

/* Header & Navbar */
.navbar-custom {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    transition: var(--transition-base);
}

.brand-badge {
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-secondary));
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
}
.theme-toggle-btn:hover {
    background: var(--border-color);
    transform: rotate(15deg);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0F1E33 0%, #142B4A 60%, #1A385E 100%);
    color: #FFFFFF;
    padding: 3.5rem 0 3rem;
    border-bottom: 3px solid var(--gold-primary);
    overflow: hidden;
}
.hero-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(201, 164, 92, 0.12) 0%, transparent 60%);
    pointer-events: none;
}
.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.25;
}
.hero-subtitle {
    font-size: 1.05rem;
    color: #E2E8F0;
    max-width: 760px;
}
.hero-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Custom Card System */
.card-custom {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    overflow: hidden;
}
.card-custom:hover {
    box-shadow: var(--shadow-md);
}
.card-header-custom {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 1.5rem;
    font-weight: 700;
}

/* Nominal Input & Quick Chips */
.input-rupiah-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-rupiah-prefix {
    position: absolute;
    left: 16px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy-primary);
}
.input-rupiah-field {
    padding-left: 55px !important;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    height: 56px;
    transition: var(--transition-base);
}
.input-rupiah-field:focus {
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
    outline: none;
}

.nominal-chip {
    cursor: pointer;
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition-base);
}
.nominal-chip:hover, .nominal-chip.active {
    background: var(--navy-primary);
    color: #FFFFFF;
    border-color: var(--navy-primary);
}

/* Scheme Selector Radio Cards */
.scheme-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    cursor: pointer;
    transition: var(--transition-base);
    height: 100%;
    position: relative;
    background: var(--card-bg);
}
.scheme-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.scheme-card.selected {
    border-color: var(--navy-primary);
    background: linear-gradient(to bottom, rgba(20, 43, 74, 0.03), transparent);
    box-shadow: 0 0 0 1px var(--navy-primary);
}
.scheme-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Projection Mode Cards (3 Cards) */
.mode-card {
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 1.4rem;
    cursor: pointer;
    transition: var(--transition-base);
    background: var(--card-bg);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.mode-card.selected {
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
}
.mode-card.pesimis.selected {
    border-color: #64748B;
    box-shadow: 0 4px 18px rgba(100, 116, 139, 0.25);
}
.mode-card.realistis.selected {
    border-color: var(--gold-primary);
    box-shadow: 0 4px 20px rgba(201, 164, 92, 0.3);
}
.mode-card.optimis.selected {
    border-color: var(--teal-accent);
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.25);
}
.mode-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    display: inline-block;
}
.mode-metric {
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
}

/* Big Action Buttons */
.btn-simulate {
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-secondary));
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}
.btn-simulate:hover {
    background: linear-gradient(135deg, #0e1e34, var(--navy-primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #FFFFFF;
}
.btn-reset {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 12px;
    transition: var(--transition-base);
}
.btn-reset:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Results Summary KPI Cards */
.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.kpi-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background-color: var(--navy-primary);
}
.kpi-card.kpi-profit::before { background-color: var(--gold-primary); }
.kpi-card.kpi-return::before { background-color: var(--teal-accent); }
.kpi-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}
.kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.kpi-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Tables */
.table-responsive-custom {
    max-height: 520px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.table-custom {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.table-custom th {
    position: sticky;
    top: 0;
    background-color: var(--navy-primary);
    color: #FFFFFF;
    font-weight: 600;
    vertical-align: middle;
    z-index: 2;
    border: none;
    padding: 10px 8px;
}
.table-custom td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
[data-theme="dark"] .table-custom td {
    background-color: var(--card-bg);
}

/* Charts Wrapper */
.chart-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

/* Disclaimer Box */
.disclaimer-container {
    background: rgba(201, 164, 92, 0.08);
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; }
    .input-rupiah-field { font-size: 1.15rem; }
    .kpi-value { font-size: 1.2rem; }
    .chart-wrapper { height: 260px; }
}
