/* East Marketing sample systems (talep paneli, randevu, stok, müşteri yönetimi, reklam örneği):
   one shared, app-like look — light, one blue accent, Poppins headings + Helvetica text.
   Self-contained on purpose (own variables), so it never depends on the main site's stylesheet. */

@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("/demo/_em/assets/pop-600-x.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("/demo/_em/assets/pop-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("/demo/_em/assets/pop-700-x.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("/demo/_em/assets/pop-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f4f5f8; --card: #fff; --ink: #12152a; --mut: #5f6580; --line: #e2e5ee;
  --acc: #2b59ff; --acc-d: #1e43d6; --acc-l: #e9eeff;
  --ok: #0c8a4c; --ok-l: #e1f5ea; --warn: #b36b00; --warn-l: #fff1d9; --bad: #c8283f; --bad-l: #fde7eb;
  --r: 12px;
  --head: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ---------- page frame ---------- */
.ap { max-width: 70rem; margin: 0 auto; padding: 20px clamp(14px, 3vw, 28px) 44px; }
.ap-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.ap-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ap-logo { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--acc); color: #fff; }
.ap-logo svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ap-title { font: 700 1.15rem/1.2 var(--head); letter-spacing: -0.01em; }
.ap-sub { color: var(--mut); font-size: 0.85rem; }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-lead { color: var(--mut); max-width: 62ch; margin: -6px 0 18px; font-size: 0.95rem; }

/* ---------- pieces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: 16px 18px; }
.h2 { font: 700 1.05rem/1.3 var(--head); letter-spacing: -0.01em; }
.mut { color: var(--mut); }
.small { font-size: 0.82rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grow { flex: 1 1 auto; }
.stack { display: grid; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0.55rem 0.95rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: 600 0.82rem/1.2 var(--head); white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;   /* colour changes only — buttons never move */
}
.btn:hover { border-color: var(--acc); color: var(--acc); }
.btn--pri { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn--pri:hover { background: var(--acc-d); border-color: var(--acc-d); color: #fff; }
.btn--sm { padding: 0.35rem 0.7rem; font-size: 0.76rem; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--acc-l); color: var(--acc); font: 600 0.72rem/1.5 var(--head); white-space: nowrap; }
.badge--ok { background: var(--ok-l); color: var(--ok); }
.badge--warn { background: var(--warn-l); color: var(--warn); }
.badge--bad { background: var(--bad-l); color: var(--bad); }
.badge--mut { background: #eceef4; color: var(--mut); }

.in, select.in, textarea.in { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.in:focus { border-color: var(--acc); outline: 2px solid rgba(43, 89, 255, 0.25); outline-offset: 0; }
textarea.in { resize: vertical; min-height: 84px; }
.lbl { display: block; margin-bottom: 5px; font: 600 0.72rem/1.3 var(--head); text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { text-align: left; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 0.15s, background-color 0.15s; }
button.kpi:hover, .kpi[aria-pressed="true"] { border-color: var(--acc); background: var(--acc-l); }
.kpi b { display: block; font: 700 1.6rem/1.15 var(--head); }
.kpi span { color: var(--mut); font-size: 0.82rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.toolbar .in { flex: 1 1 11rem; width: auto; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 0.65rem 0.9rem; text-align: left; font: 600 0.7rem/1.3 var(--head); text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); border-bottom: 1px solid var(--line); background: #fafbfd; }
.tbl td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color 0.15s; }
.tbl tbody tr.is-click { cursor: pointer; }
.tbl tbody tr.is-click:hover { background: #f7f9ff; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* table rows turn into cards on phones */
@media (max-width: 719px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { padding: 2px 0; border: 0; }
  .tbl td[data-l]::before { content: attr(data-l) ": "; color: var(--mut); font-size: 0.78rem; }
  .tbl .num { text-align: left; }
}
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }

/* ---------- sheet (dialog): centred on desktop, slides up on phones ---------- */
dialog.sheet { width: min(34rem, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(10, 14, 40, 0.35); overflow: auto; }
dialog.sheet::backdrop { background: rgba(10, 14, 40, 0.45); }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sheet__body { padding: 8px 20px 20px; display: grid; gap: 14px; }
.x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; line-height: 1; transition: background-color 0.15s, color 0.15s; }
.x:hover { background: var(--acc); color: #fff; border-color: var(--acc); }
@media (max-width: 719px) { dialog.sheet { margin: auto auto 0; width: 100%; max-width: none; border-radius: 16px 16px 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheetIn 0.28s var(--ease); }
  dialog.sheet[open]::backdrop { animation: fadeIn 0.28s ease; }
  .rise { animation: rise 0.4s var(--ease) both; }
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 90; max-width: calc(100vw - 28px); padding: 0.7rem 1rem; border-radius: 10px; background: #12152a; color: #fff; font-size: 0.88rem; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity 0.25s, transform 0.25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.tag-sample { display: inline-block; margin-left: 6px; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--warn-l); color: var(--warn); font: 600 0.68rem/1.6 var(--head); vertical-align: middle; }
