/* Pairo yönetim paneli · uygulamanın renkleri (mobile/lib/theme/tokens.dart) */
:root {
  --forest: #003f2c;
  --forest-2: #0b5440;
  --cream: #f0e9de;
  --paper: #f7f3ec;
  --sunk: #e6ddcf;
  --line: rgba(26, 27, 36, 0.12);
  --ink: #1a1b24;
  --muted: #5e584f;
  --lemon: #b3f835;
  --plum: #561248;
  --lilac: #cbb6eb;
  --error: #9e2f26;
  --gold: #c9a452;
  --r: 10px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--forest); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ── Giriş ── */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--forest); padding: 24px; }
.login form { width: 100%; max-width: 360px; background: var(--paper); border-radius: 18px; padding: 32px; display: grid; gap: 14px; }
.login h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.03em; color: var(--forest); }
.login p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

/* ── İskelet ── */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--forest); color: var(--cream); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 800; font-size: 26px; letter-spacing: -0.04em; padding: 4px 12px 18px; color: var(--cream); }
.brand span { color: var(--lemon); font-size: 13px; letter-spacing: 0.06em; font-weight: 600; margin-left: 6px; }
.side .group { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(240, 233, 222, 0.55); padding: 14px 12px 4px; }
.side a { color: var(--cream); text-decoration: none; padding: 9px 12px; border-radius: 8px; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; }
.side a:hover { background: rgba(240, 233, 222, 0.08); }
.side a.on { background: var(--lemon); color: var(--forest); font-weight: 600; }
.side .badge { background: var(--plum); color: var(--cream); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.side .grow { flex: 1; }
.side .me { font-size: 13px; color: rgba(240, 233, 222, 0.7); padding: 12px; border-top: 1px solid rgba(240, 233, 222, 0.15); display: flex; justify-content: space-between; align-items: center; }
.side .me button { background: none; border: 1px solid rgba(240, 233, 222, 0.3); color: var(--cream); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; }
.main { padding: 28px 32px 64px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.top h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.top .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--forest); border-color: var(--forest); font-weight: 600; }

/* ── Kartlar ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.card { background: var(--paper); border-radius: 14px; padding: 16px 18px; }
.card .k { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.card .v { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card.dark { background: var(--forest); color: var(--cream); }
.card.dark .k, .card.dark .s { color: rgba(240, 233, 222, 0.7); }
.panel { background: var(--paper); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

/* ── Tablo ── */
.tablewrap { background: var(--paper); border-radius: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(0, 63, 44, 0.04); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { white-space: nowrap; text-align: right; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Etiketler ── */
.pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill.ok { background: #dff5c4; color: var(--forest); }
.pill.warn { background: #f7e7c2; color: #6b4a00; }
.pill.bad { background: #f3d2ce; color: var(--error); }
.pill.plum { background: var(--lilac); color: var(--plum); }

/* ── Düğme, alan ── */
.btn { border: 1.5px solid var(--forest); background: var(--forest); color: var(--cream); border-radius: var(--r); padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn:hover { background: var(--forest-2); }
.btn.ghost { background: transparent; color: var(--forest); }
.btn.ghost:hover { background: rgba(0, 63, 44, 0.06); }
.btn.danger { background: var(--error); border-color: var(--error); }
.btn.lemon { background: var(--lemon); border-color: var(--lemon); color: var(--forest); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: var(--r); padding: 9px 11px; font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lemon); border-color: var(--forest); }
textarea { min-height: 90px; resize: vertical; }
textarea.code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; min-height: 160px; }
label.f { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
label.f .hint { font-size: 12px; }
label.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.search { max-width: 420px; }
.err { color: var(--error); font-size: 13px; white-space: pre-wrap; }

/* ── Pencere ── */
.backdrop { position: fixed; inset: 0; background: rgba(26, 27, 36, 0.56); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: var(--paper); border-radius: 18px; width: 100%; max-width: 620px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px; display: grid; gap: 14px; }
.modal h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
pre.json { background: #fff; border-radius: var(--r); padding: 12px; overflow: auto; max-height: 420px; font-size: 12px; margin: 0; }
details summary { cursor: pointer; color: var(--forest); font-weight: 600; font-size: 14px; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }
#toast div { background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2); }
#toast div.bad { background: var(--error); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .side .group, .side .grow { display: none; }
  .brand { padding: 4px 8px; width: 100%; }
  .side .me { width: 100%; border: 0; }
  .main { padding: 20px 16px 48px; }
}
