/* Forsine Capital — slate / white / gold, per locked design direction */
:root {
    --slate: #1e2530;
    --slate-light: #2a3342;
    --white: #ffffff;
    --gold: #c9a44c;
    --gold-pale: #f3e9d2;
    --text-dark: #1e2530;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --green: #1e8e5a;
    --red: #c0392b;
}

* { box-sizing: border-box; }

/* Plain links default to dark text + a quiet underline, not browser-default
   blue — keeps the palette to black/white/gold throughout the app. Any
   link that needs its own color (sidebar nav, topbar) overrides this. */
a { color: var(--text-dark); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
a:hover { color: var(--gold); text-decoration-color: var(--gold); }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--slate);
    color: var(--text-dark);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    flex-shrink: 0;
    position: relative;
    min-height: 100vh;
}

.sidebar .wordmark {
    font-family: Georgia, serif;
    font-size: 18px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.sidebar .wordmark .f1 { color: var(--slate); font-weight: bold; }
.sidebar .wordmark .f2 { color: var(--gold); font-style: italic; }

.sidebar nav a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover { background: var(--gold-pale); }

.sidebar nav a.active {
    border-left-color: var(--gold);
    color: var(--gold);
    font-weight: 600;
    background: var(--gold-pale);
}

.sidebar .group-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: var(--gold);
    padding: 16px 20px 4px;
}

.main {
    flex: 1;
    background: #f4f5f7;
    padding: 28px 36px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar h1 {
    font-size: 20px;
    margin: 0;
}

.topbar .who {
    font-size: 13px;
    color: var(--text-muted);
}

.topbar .who a { color: var(--gold); text-decoration: none; margin-left: 10px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--gold) !important;
    vertical-align: middle;
}
.icon-btn:hover { background: var(--gold-pale); }

.card {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 20px;
}

.card h2 {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    color: var(--gold);
    margin: 0 0 14px;
}

.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; align-items: stretch; }

/* Two cards side by side in a .stat-row (e.g. Update Harga / Update Kurs)
   must bottom-align even when their intro text or field count differs in
   length — otherwise the row below (e.g. the history tables) visually
   "drops" unevenly between the two columns. */
.stat-row > .card { margin-bottom: 0; display: flex; flex-direction: column; }
.stat-row > .card > form { display: flex; flex-direction: column; flex: 1; }
.stat-row > .card > form .btn { margin-top: auto; align-self: flex-start; }

.stat-tile {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    flex: 1;
    min-width: 180px;
}

.stat-tile .label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--gold);
}

.stat-tile .value { font-size: 24px; font-weight: 600; margin-top: 6px; }
.stat-tile .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
    text-align: left;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--gold);
    background: var(--gold-pale);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

.pos { color: var(--green); }
.neg { color: var(--red); }

.idr { font-weight: 600; }
.usdt-sub { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; }

.btn {
    display: inline-block;
    background: var(--slate);
    color: var(--white);
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.btn-gold { background: var(--gold); color: var(--slate); font-weight: 600; }
.btn-danger { background: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 16px;
    margin-bottom: 14px;
    align-items: start;
}
@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

.form-grid label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-grid input, .form-grid select, .form-grid textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.tag {
    display: inline-block;
    background: var(--gold-pale);
    color: #8a6d1f;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.badge-role {
    font-size: 10px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--slate);
    color: var(--white);
}

.flash {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}
.flash.ok { background: #e6f4ea; color: var(--green); }
.flash.err { background: #fbe9e7; color: var(--red); }

/* Split-screen sign-in page */
.login-split {
    display: flex;
    min-height: 100vh;
}

.login-side {
    flex: 0 0 42%;
    background: var(--slate);
    color: #fff;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

.login-side .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: #9aa3b2;
    margin-bottom: 18px;
}

.login-side .brand { font-family: Georgia, 'Times New Roman', serif; }
.login-side .brand .line1 { font-size: 46px; color: #fff; font-weight: 400; line-height: 1.05; }
.login-side .brand .line2 { font-size: 46px; color: var(--gold); font-style: italic; line-height: 1.05; }

.login-side .rule { width: 60px; height: 2px; background: var(--gold); margin: 24px 0; }

.login-side .tagline { color: #cbd2dc; font-size: 15px; line-height: 1.6; max-width: 380px; }

.login-side .quote {
    font-family: Georgia, serif;
    font-style: italic;
    color: #cbd2dc;
    font-size: 17px;
    line-height: 1.5;
    max-width: 420px;
}

.login-main {
    flex: 1;
    background: #f4f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-wrap { width: 380px; max-width: 100%; }
.login-form-wrap h1 { font-family: Georgia, serif; font-size: 30px; margin: 0 0 8px; color: var(--text-dark); }
.login-form-wrap .sub { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

.login-form-wrap label {
    display: block;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 18px 0 6px;
}

.login-form-wrap input[type="text"],
.login-form-wrap input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.pw-wrap { position: relative; }
.pw-wrap .toggle-show {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--gold);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: none;
    border: none;
}

.login-remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 13px;
    gap: 10px;
    flex-wrap: wrap;
}
.login-remember-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    font-size: 13px;
    color: var(--text-dark);
    margin: 0;
}
.login-remember-row a { color: var(--gold); text-decoration: none; }

.login-form-wrap .btn-signin {
    width: 100%;
    margin-top: 22px;
    padding: 13px;
    background: var(--gold);
    color: var(--slate);
    font-weight: 700;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-transform: uppercase;
}

.login-footer-note {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 760px) {
    .login-split { flex-direction: column; }
    .login-side { flex: none; min-height: auto; padding: 40px 28px; }
    .login-side .brand .line1, .login-side .brand .line2 { font-size: 34px; }
    .login-side .quote { display: none; }
    .login-main { padding: 32px 20px; }
}

.muted { color: var(--text-muted); }
.right { text-align: right; }
.small { font-size: 12px; }
