/* =========================================================================
   FiyatTakip — design tokens, primitives, components.
   Light SaaS theme with gold accent, dark ticker for live prices.
   ========================================================================= */

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

:root {
    --bg: #FAF7F2;              /* warm cream */
    --surface: #FFFFFF;
    --surface-2: #F6F4EF;
    --surface-3: #FAF8F4;
    --border: #ECE6DC;
    --border-strong: #D7CEBE;

    --text: #1F1B16;
    --text-2: #3D362D;
    --text-dim: #6E6457;
    --text-faint: #998B79;

    --gold: #B98545;
    --gold-2: #D4A574;
    --gold-3: #E8C99F;
    --gold-soft: #FBF3E5;
    --gold-dark: #8E6633;       /* sidebar active/hover */
    --gold-darker: #6E4D26;     /* deepest accent */

    --accent: #B98545;          /* brand = gold */
    --brand: #B98545;
    --brand-hover: #8E6633;
    --brand-soft: #FBF3E5;
    --success: #16A34A;
    --success-soft: #ECFDF5;
    --danger: #D72C0D;
    --danger-soft: #FDF1EE;
    --warning: #C97A1A;
    --warning-soft: #FFF1DD;

    --dark: #0B1220;
    --dark-2: #131A2B;
    --dark-3: #1B2236;
    --dark-text: #E2E8F0;
    --dark-text-dim: #94A3B8;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Polaris-style soft shadows */
    --shadow-sm: 0 0 0 1px rgba(63, 63, 68, .05), 0 1px 2px rgba(63, 63, 68, .05);
    --shadow: 0 0 0 1px rgba(63, 63, 68, .05), 0 1px 3px rgba(63, 63, 68, .12);
    --shadow-md: 0 0 0 1px rgba(63, 63, 68, .05), 0 4px 12px rgba(63, 63, 68, .12);
    --shadow-lg: 0 0 0 1px rgba(63, 63, 68, .05), 0 16px 40px rgba(63, 63, 68, .18);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 600; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-2); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; }
kbd { background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------- App shell (sidebar + topbar + main) ---------- */
.shell {
    min-height: 100vh; display: grid;
    grid-template-columns: 240px 1fr;
    background: var(--bg);
}

/* --- Sidebar (gold) --- */
.sidebar {
    background: var(--gold);
    color: #FFF8EB;
    display: flex; flex-direction: column;
    padding: 22px 14px;
    position: sticky; top: 0; height: 100vh;
    box-shadow: inset -1px 0 0 rgba(0,0,0,.05);
}
.sidebar__brand {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px 22px;
    font-weight: 700; font-size: 18px;
    color: #fff; letter-spacing: -0.01em;
}
.sidebar__logo {
    width: 28px; height: 28px; border-radius: 8px;
    background: rgba(255,255,255,.18);
    display: grid; place-items: center; color: #FFF8EB;
    font-weight: 700; font-size: 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.sidebar__tag {
    margin-top: 2px; padding: 2px 10px; border-radius: 999px;
    background: rgba(255,255,255,.12); color: #FFF8EB;
    font-size: 11px; font-weight: 500;
}
.sidebar__group { display: flex; flex-direction: column; gap: 2px; }
.sidebar__spacer { flex: 1; }
.sidebar__sep {
    margin: 16px 10px; height: 1px;
    background: rgba(255,255,255,.12);
}
.sidebar__item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    color: rgba(255, 248, 235, .82);
    font-weight: 500; font-size: 13px;
    text-decoration: none; transition: all .15s ease;
    cursor: pointer;
}
.sidebar__item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sidebar__item.is-active {
    background: rgba(255,255,255,.16); color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.sidebar__icon {
    width: 18px; height: 18px; flex-shrink: 0;
    opacity: .9;
}
.sidebar__item.is-active .sidebar__icon { opacity: 1; }
.sidebar__logout {
    margin: 0; padding: 9px 12px; border-radius: 8px;
    background: transparent; border: none;
    color: rgba(255, 248, 235, .82); font: inherit; font-size: 13px; font-weight: 500;
    text-align: left; cursor: pointer; transition: all .15s ease;
    display: flex; align-items: center; gap: 10px; width: 100%;
}
.sidebar__logout:hover { background: rgba(255,255,255,.08); color: #fff; }

/* --- Content column --- */
.content { display: flex; flex-direction: column; min-width: 0; }

/* --- Topbar --- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.topbar__inner {
    padding: 18px 32px;
    display: flex; align-items: center; gap: 20px;
    flex-wrap: wrap;
}
.welcome {
    display: flex; flex-direction: column; min-width: 0;
}
.welcome__hello { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.welcome__hello strong { color: var(--gold); font-weight: 700; }
.welcome__sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.topbar__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.search {
    position: relative; min-width: 220px;
}
.search input {
    width: 100%; height: 38px; padding: 8px 14px 8px 36px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(185,133,69,.15);
}
.search__icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text-faint);
    pointer-events: none;
}
.bell {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--border);
    display: grid; place-items: center; color: var(--text-2);
    position: relative; cursor: pointer;
}
.bell:hover { background: var(--surface-2); }
.bell__badge {
    position: absolute; top: 6px; right: 7px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger); box-shadow: 0 0 0 2px var(--bg);
}
.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 6px; border-radius: 999px;
}
.user-chip__avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    display: grid; place-items: center; color: #FFF8EB;
    font-weight: 700; font-size: 13px; letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(110,77,38,.25);
}
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip__name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-chip__email { font-size: 11px; color: var(--text-dim); }

/* --- Main area --- */
.main {
    flex: 1; padding: 24px 32px 48px;
    min-width: 0;
}

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; padding: 14px 14px 8px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
    .sidebar__brand { padding: 0 8px 0 4px; }
    .sidebar__spacer { display: none; }
    .sidebar__sep { display: none; }
    .sidebar__group { flex-direction: row; flex-wrap: wrap; flex: 1; }
    .sidebar__item { padding: 6px 10px; }
    .sidebar__item span:not(.sidebar__icon) { display: none; }
    .topbar__inner, .main { padding-left: 16px; padding-right: 16px; }
    .search { min-width: 0; flex: 1; }
    .user-chip__meta { display: none; }
}

/* ---------- Typography helpers ---------- */
.muted { color: var(--text-dim); }
.eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--text-dim); }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.mono { font-family: var(--font-mono); }

/* ---------- Page header ---------- */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head__title {
    margin: 0; font-size: 24px; font-weight: 700;
    color: var(--text); letter-spacing: -0.02em;
}
.page-head__sub { color: var(--text-dim); margin-top: 4px; font-size: 13px; }
.page-head__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px;
    border: 1px solid; display: flex; gap: 10px; align-items: flex-start;
    font-size: 13px;
}
.alert--ok { background: var(--success-soft); border-color: #BBF7D0; color: #14532D; }
.alert--err { background: var(--danger-soft); border-color: #FECACA; color: #7F1D1D; }
.alert ul { margin: 0; padding-left: 20px; }
.alert::before {
    content: ''; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
    margin-top: 2px;
}
.alert--ok::before { background: var(--success); }
.alert--err::before { background: var(--danger); }

/* ---------- Cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card__body { padding: 24px; }
.card__head {
    padding: 18px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card__head h2, .card__head h3 { margin: 0; }

/* ---------- Stat cards (wooden-style: simple label + dropdown + big value) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px 18px;
    box-shadow: var(--shadow-sm); transition: box-shadow .15s ease;
    display: flex; flex-direction: column; gap: 8px;
}
.stat:hover { box-shadow: var(--shadow); }
.stat__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat__label { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.stat__value {
    font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15;
}
.stat__value small { font-size: 14px; font-weight: 500; color: var(--text-dim); margin-left: 4px; }
.stat__sub { font-size: 12px; color: var(--text-dim); margin-top: 0; }
.stat__delta {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-dim);
}
.stat__delta--up   { background: var(--success-soft); color: var(--success); }
.stat__delta--down { background: var(--danger-soft);  color: var(--danger); }
.sparkline { display: block; width: 100%; height: 100%; }

/* ---------- Chart tiles (3-in-a-row mini chart cards) ---------- */
.chart-tiles {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px; margin-bottom: 16px;
}
.chart-tile {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
    min-height: 200px;
}
.chart-tile__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chart-tile__label { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.chart-tile__value {
    font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15;
}
.chart-tile__canvas { flex: 1; min-height: 120px; position: relative; }
.chart-tile__canvas canvas { width: 100% !important; height: 100% !important; }
.chart-tile__legend {
    display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 11px; color: var(--text-2);
    margin-top: 4px;
}
.chart-tile__legend i {
    display: inline-block; width: 8px; height: 8px; border-radius: 2px;
    margin-right: 6px; vertical-align: middle;
}

/* ---------- Period tabs ---------- */
.period-tabs {
    display: inline-flex; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 3px; gap: 2px;
}
.period-tabs a {
    padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--text-2);
    border-radius: calc(var(--radius-sm) - 2px); text-decoration: none;
    transition: all .15s ease;
}
.period-tabs a:hover { background: var(--surface-2); text-decoration: none; }
.period-tabs a.is-active { background: var(--text); color: #fff; }

/* ---------- Big chart card ---------- */
.chart-card { margin-bottom: 16px; }
.chart-card__head {
    padding: 18px 20px 0; display: flex; align-items: flex-start;
    justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.chart-card__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-2); }
.chart-card__value {
    font-size: 28px; font-weight: 600; margin: 4px 0 0;
    letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.chart-card__meta { display: flex; gap: 12px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text-dim); }
.chart-card__body { padding: 8px 12px 16px; }
.chart-card canvas { width: 100% !important; height: 240px !important; }

/* ---------- Price ticker (dark) ---------- */
.ticker {
    background: var(--dark-2); color: var(--dark-text);
    border: 1px solid var(--dark-3); border-radius: var(--radius-lg);
    padding: 16px 24px; margin-bottom: 24px; display: flex; gap: 32px;
    align-items: center; flex-wrap: wrap;
}
.ticker__item { display: flex; flex-direction: column; min-width: 120px; }
.ticker__label {
    font-size: 11px; color: var(--dark-text-dim); letter-spacing: .08em;
    text-transform: uppercase; font-weight: 600;
}
.ticker__value {
    font-family: var(--font-mono); font-weight: 600; font-size: 18px;
    margin-top: 4px; color: #fff; font-variant-numeric: tabular-nums;
}
.ticker__value--gold { color: var(--gold-2); }
.ticker__dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); margin-right: 8px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22,163,74,.6); }
    50%      { opacity: .7; box-shadow: 0 0 0 6px rgba(22,163,74,0); }
}
.ticker__meta { margin-left: auto; font-size: 12px; color: var(--dark-text-dim); display: flex; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font: inherit; font-weight: 500; font-size: 13px; line-height: 1;
    height: 36px; cursor: pointer; transition: all .15s ease;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary {
    background: var(--gold); border-color: var(--gold); color: #FFF8EB;
    box-shadow: 0 1px 2px rgba(185,133,69,.3);
}
.btn--primary:hover { background: var(--gold-hover, #A0732E); border-color: var(--gold-hover, #A0732E); color: #fff; }
.btn--success { background: var(--success); border-color: var(--success); color: #fff; }
.btn--success:hover { background: #15803D; border-color: #15803D; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { height: 30px; padding: 6px 12px; font-size: 12px; }
.btn--block { width: 100%; }
.link-btn {
    background: none; border: none; color: var(--accent); cursor: pointer;
    padding: 0; font: inherit; font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn--danger { color: var(--danger); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 500; color: var(--text); }
.field__hint { font-size: 12px; color: var(--text-dim); }
.field input, .field select, .field textarea {
    width: 100%; height: 38px; padding: 8px 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { height: auto; min-height: 80px; padding: 10px 12px; line-height: 1.5; }
.field input:hover, .field select:hover { border-color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.field--check { flex-direction: row; align-items: center; }
.field--check .field__label { margin: 0; font-weight: 400; }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- Tables ---------- */
.table-wrap {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.table-wrap__head {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.table { width: 100%; border-collapse: collapse; }
.table th {
    background: var(--surface-2); color: var(--text-dim);
    font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    padding: 10px 20px; text-align: left; border-bottom: 1px solid var(--border);
}
/* Gold-header variant matching the wooden-style transactions table */
.table--gold thead th {
    background: var(--gold); color: #FFF8EB;
    border-bottom: none; padding: 14px 20px;
    font-size: 12px; letter-spacing: .03em;
}
.table--gold thead th:first-child { border-top-left-radius: 0; }
.table--gold thead th:last-child  { border-top-right-radius: 0; }
.table--gold tbody tr:hover { background: var(--surface-3); }

/* Inline dropdown chip used in stat-card headers ("This month ▾") */
.chip-select {
    appearance: none; -webkit-appearance: none;
    border: none; background: transparent;
    font: inherit; font-size: 12px; font-weight: 500; color: var(--text-dim);
    padding: 2px 18px 2px 8px; border-radius: 6px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236E6457' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat; background-position: right 4px center;
    cursor: pointer; transition: background-color .15s ease;
}
.chip-select:hover { background-color: var(--surface-2); }
.chip-select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.table td {
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    color: var(--text); font-size: 14px; vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:focus,
.table tbody tr:focus-visible {
    outline: none; background: #EEF4FF;
    box-shadow: inset 3px 0 0 var(--accent);
}
.table .num { text-align: right; font-family: var(--font-mono); }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { display: inline; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--text-dim); }

/* ---------- Pills / badges ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600; line-height: 18px;
    background: var(--surface-2); color: var(--text-2);
}
.pill--ok { background: var(--success-soft); color: #15803D; }
.pill--off { background: var(--surface-2); color: var(--text-dim); }
.pill--warn { background: #FEF3C7; color: #92400E; }
.pill--gold { background: var(--gold-soft); color: var(--gold); }
.pill-dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}

/* ---------- Product cards grid (tenant dashboard) ---------- */
.product-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    margin-bottom: 24px;
}
.pcard {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px 18px 14px;
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
    cursor: pointer;
    position: relative;
}
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--gold-3); }
.pcard:focus,
.pcard:focus-visible {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow);
}
.pcard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pcard__name { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; line-height: 1.3; }
.pcard__edit {
    width: 28px; height: 28px; border-radius: 6px;
    display: grid; place-items: center; color: var(--text-dim);
    transition: all .15s ease; flex-shrink: 0;
}
.pcard__edit:hover { background: var(--surface-2); color: var(--gold); text-decoration: none; }

.pcard__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }

.pcard__prices {
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px 14px 12px; border-radius: 10px;
    background: var(--surface-3); border: 1px solid var(--border);
}
.pcard__priceRow { display: grid; grid-template-columns: 60px 1fr auto; align-items: baseline; gap: 8px; }
.pcard__priceLabel {
    font-size: 11px; color: var(--text-dim); font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
}
.pcard__priceValue {
    font-family: var(--font-mono); font-size: 15px; font-weight: 600;
    text-align: right; color: var(--text); font-variant-numeric: tabular-nums;
    transition: color .8s ease;
}
.pcard__priceCur { font-size: 11px; color: var(--text-dim); }
.pcard__priceRow--sale .pcard__priceValue { font-size: 20px; color: var(--gold-darker); }
.pcard__priceValue.is-up   { color: var(--success); }
.pcard__priceValue.is-down { color: var(--danger); }

.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* New-sale flash highlight on the Satışlar page when polling brings in a
   row that wasn't there before. */
@keyframes saleFlash {
    0%   { background: var(--gold-soft); }
    100% { background: transparent; }
}
.sale-flash > td { animation: saleFlash 1.6s ease-out; }

/* ---------- Big product price (for dashboard rows) ---------- */
.price-cell {
    font-family: var(--font-mono); font-weight: 600; font-size: 15px;
    color: var(--text); white-space: nowrap;
}
.price-cell__cur { color: var(--text-dim); font-weight: 400; font-size: 12px; margin-left: 3px; }
.price-flash--up { animation: flashUp 1s ease; }
.price-flash--down { animation: flashDown 1s ease; }
@keyframes flashUp   { 0% { background: #DCFCE7; } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: #FEE2E2; } 100% { background: transparent; } }

/* ---------- Auth / login screen ---------- */
.auth {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(185,133,69,.08), transparent),
        var(--bg);
}
.auth__card {
    width: 100%; max-width: 400px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 32px;
}
.auth__brand {
    display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px;
}
.auth__logo {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    display: grid; place-items: center; color: #1A1108; font-weight: 700; font-size: 20px;
    box-shadow: 0 8px 16px rgba(185,133,69,.25);
}
.auth__title { margin: 0; font-size: 18px; font-weight: 600; }
.auth__sub { margin: -4px 0 0; font-size: 13px; color: var(--text-dim); }
.auth__foot { margin-top: 20px; text-align: center; font-size: 12px; color: var(--text-dim); }

/* ---------- Hero (landing) ---------- */
.hero { max-width: 720px; margin: 80px auto; text-align: center; }
.hero h1 { font-size: 40px; letter-spacing: -0.02em; }
.hero p { font-size: 16px; color: var(--text-2); }

/* ---------- Empty states ---------- */
.empty { padding: 56px 24px; text-align: center; }
.empty__icon { font-size: 36px; margin-bottom: 8px; opacity: .5; }
.empty__title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty__sub { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }

/* ---------- Dialog ---------- */
dialog {
    border: none; border-radius: var(--radius-lg);
    padding: 0; box-shadow: var(--shadow-lg); max-width: 420px; width: 90vw;
}
dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
dialog form { padding: 24px; display: grid; gap: 16px; }
dialog h3 { margin: 0; }
dialog menu { padding: 0; margin: 0; display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Hint banner ---------- */
.hint {
    background: var(--gold-soft); border: 1px solid #F0DCB6;
    border-radius: var(--radius); padding: 10px 14px; margin-bottom: 20px;
    font-size: 13px; color: #5C3D14;
}
.hint kbd { background: #fff; border-color: #E8D3A4; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    .topbar__inner { padding: 0 16px; gap: 12px; }
    .nav__link { padding: 8px 10px; }
    .main { padding: 20px 16px 40px; }
    .ticker { gap: 20px; padding: 14px 16px; }
    .table th, .table td { padding: 10px 14px; }
}
