:root {
  --paper: #f4f4f3;
  --card: #ffffff;
  --ink: #0c0c0c;
  --ink-soft: #3d3d3d;
  --muted: #909090;
  --line: #e7e7e4;
  --chip: #efefec;
  /* "statement" (solid) tile tokens — flip in dark mode */
  --solid-bg: #0c0c0c;
  --solid-fg: #ffffff;
  --solid-muted: rgba(255, 255, 255, 0.62);
  --solid-track: rgba(255, 255, 255, 0.16);
  --radius: 24px;
  --gap: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  transition: background .4s ease, color .4s ease;
}

em { font-style: normal; }

/* ===== SHELL / APP ===== */
.app {
  --pad: clamp(16px, 2.6vw, 28px);
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  max-width: 1340px;
  margin: 0 auto;
  padding: var(--pad);
}
.shell { flex: 1; min-width: 0; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: var(--pad);
  width: 234px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100vh - 2 * var(--pad));
  transition: background .4s ease, border-color .4s ease;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 600; letter-spacing: -.01em;
  padding: 6px 10px 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.asterisk { color: var(--ink); display: inline-block; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; padding-top: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; position: relative;
  transition: background .2s, color .2s;
}
.nav-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); flex-shrink: 0; transition: color .2s; }
.nav-link:hover { background: var(--paper); color: var(--ink); }
.nav-link:hover svg { color: var(--ink-soft); }
.nav-link.is-active { background: var(--chip); color: var(--ink); font-weight: 600; }
.nav-link.is-active svg { color: var(--ink); }
.nav-link.is-active::before {
  content: ""; position: absolute; left: 3px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 3px; background: var(--ink);
}

.nav-user {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 14px;
  border: 1px solid var(--line);
  margin-top: 6px; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.nav-user:hover { background: var(--paper); border-color: var(--ink); }
.nav-user__info { min-width: 0; line-height: 1.25; }
.nav-user__info strong { display: block; font-size: 13px; font-weight: 600; }
.nav-user__info small { color: var(--muted); font-size: 11.5px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; flex-shrink: 0;
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: clamp(14px, 2vw, 22px);
}
.page-title { font-size: clamp(19px, 2.2vw, 25px); font-weight: 600; letter-spacing: -.02em; }

.top-actions { display: flex; align-items: center; gap: 12px; }
.live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 100px;
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(128,128,128,.5); } 70% { box-shadow: 0 0 0 7px rgba(128,128,128,0); } 100% { box-shadow: 0 0 0 0 rgba(128,128,128,0); } }

.theme {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  cursor: pointer; display: grid; place-items: center; color: var(--ink-soft);
}
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .t-moon { display: none; }
body.dark .theme .t-sun { display: none; }
body.dark .theme .t-moon { display: block; }

/* ===== BENTO GRID ===== */
.bento {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 172px 156px 156px 172px;
  grid-template-areas:
    "greet greet hero   stat1"
    "chart chart uptime stat2"
    "chart chart uptime stat3"
    "activity activity activity tasks";
}
.t-greet { grid-area: greet; }
.t-hero { grid-area: hero; }
.t-stat1 { grid-area: stat1; }
.t-chart { grid-area: chart; }
.t-uptime { grid-area: uptime; }
.t-stat2 { grid-area: stat2; }
.t-stat3 { grid-area: stat3; }
.t-activity { grid-area: activity; }
.t-tasks { grid-area: tasks; }

/* ===== TILE BASE ===== */
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; position: relative;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, background .4s, border-color .4s;
  animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(12,12,12,.35); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.tile:nth-child(1) { animation-delay: .02s; }
.tile:nth-child(2) { animation-delay: .07s; }
.tile:nth-child(3) { animation-delay: .12s; }
.tile:nth-child(4) { animation-delay: .17s; }
.tile:nth-child(5) { animation-delay: .22s; }
.tile:nth-child(6) { animation-delay: .27s; }
.tile:nth-child(7) { animation-delay: .32s; }
.tile:nth-child(8) { animation-delay: .37s; }
.tile:nth-child(9) { animation-delay: .42s; }

.tile--ink { background: var(--solid-bg); border-color: var(--solid-bg); color: var(--solid-fg); }

/* ===== TEXT BITS ===== */
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tile--ink .eyebrow, .eyebrow--soft { color: var(--solid-muted); }
.label { font-size: 12.5px; letter-spacing: .04em; color: var(--muted); }

.greet { font-size: clamp(26px, 3.4vw, 40px); font-weight: 500; line-height: 1.02; letter-spacing: -.02em; }
.greet em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--solid-fg); }
.greet-sub { font-size: 13px; }
.tile--ink .greet-sub { color: var(--solid-muted); }

.big { font-size: clamp(48px, 6vw, 66px); font-weight: 600; line-height: .9; letter-spacing: -.03em; }
.big i { font-style: normal; font-size: .42em; color: var(--muted); font-weight: 500; }
.big--sm { font-size: clamp(40px, 5vw, 54px); }
.delta { font-size: 12.5px; font-weight: 500; color: var(--ink-soft); }

.mid { font-size: clamp(30px, 4vw, 42px); font-weight: 600; letter-spacing: -.02em; line-height: 1; display: flex; align-items: baseline; }
.mid i { font-style: normal; font-size: .55em; color: var(--muted); margin: 0 1px; }

.trend { font-size: 12px; font-weight: 500; color: var(--ink-soft); }

/* sparkline */
.spark { width: 100%; height: 32px; }
.spark polyline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== CHART TILE ===== */
.tile-head { display: flex; align-items: center; justify-content: space-between; }
.muted-pill { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 3px 10px; }
.chart { flex: 1; margin: 6px 0; min-height: 0; }
.chart svg { width: 100%; height: 100%; display: block; }
.chart .area { fill: var(--ink); opacity: .07; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot-end { fill: var(--ink); }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* ===== UPTIME RING ===== */
.t-uptime { align-items: center; text-align: center; }
.ring-wrap { position: relative; width: 132px; height: 132px; margin: auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--solid-track); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--solid-fg); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1); }
.ring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--solid-fg); }
.ring-center i { font-style: normal; font-size: .5em; color: var(--solid-muted); margin-left: 2px; }

/* ===== ACTIVITY FEED ===== */
.feed { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.feed li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); }
.feed .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex-shrink: 0; }
.feed b { font-weight: 600; color: var(--ink); }
.feed .sep { color: var(--muted); }
.feed .when { margin-left: auto; font-size: 11.5px; color: var(--muted); }

/* ===== TASKS BAR ===== */
.bar { height: 7px; border-radius: 100px; background: var(--chip); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--ink); border-radius: 100px; width: 0; animation: grow 1.2s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: .4s; }
@keyframes grow { from { width: 0; } }

/* ===== FOOTER ===== */
.foot { text-align: center; margin-top: 22px; font-size: 12px; color: var(--muted); }
.foot .asterisk { color: var(--muted); }

/* ===== DARK MODE (B&W inverted) ===== */
body.dark {
  --paper: #0b0b0b;
  --card: #161616;
  --ink: #f4f4f4;
  --ink-soft: #c8c8c8;
  --muted: #828282;
  --line: #262626;
  --chip: #242424;
  --solid-bg: #f4f4f4;
  --solid-fg: #0b0b0b;
  --solid-muted: rgba(0, 0, 0, 0.55);
  --solid-track: rgba(0, 0, 0, 0.14);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 920px) {
  .app { flex-direction: column; }
  .sidebar {
    position: static;
    width: auto;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
  }
  .brand { padding: 0 10px 0 6px; margin-bottom: 0; border-bottom: none; }
  .nav { flex-direction: row; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; padding-top: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 9px 13px; white-space: nowrap; }
  .nav-user { border: none; padding: 0 0 0 6px; margin: 0; }
  .nav-user__info { display: none; }

  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    grid-auto-rows: 150px;
    grid-template-areas:
      "greet greet"
      "hero  stat1"
      "chart chart"
      "uptime uptime"
      "stat2 stat3"
      "activity activity"
      "tasks tasks";
  }
  .t-greet { grid-row: span 1; min-height: 170px; }
  .t-chart { grid-row: span 2; }
  .t-uptime { grid-row: span 2; }
}
@media (max-width: 560px) {
  .bento { display: flex; flex-direction: column; }
  .tile { min-height: 150px; }
  .t-greet { min-height: 200px; }
  .t-chart { min-height: 260px; }
  .t-uptime { min-height: 240px; }
  .top-actions .live { display: none; }
  .nav-link .lbl { display: none; }
  .brand { font-size: 0; gap: 0; }
  .brand .asterisk { font-size: 20px; }
}

/* =====================================================
   LISTING PAGE (listing.html)
   ===================================================== */
.title-count {
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 100px; padding: 2px 10px; margin-left: 8px; vertical-align: middle;
}

/* ---- Toolbar ---- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.search {
  display: flex; align-items: center; gap: 9px;
  flex: 1; min-width: 200px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 100px; padding: 9px 15px; color: var(--muted);
}
.search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.search input { border: none; outline: none; background: transparent; width: 100%; font-family: inherit; font-size: 13.5px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }

.segment {
  display: flex; gap: 2px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 100px; padding: 3px;
}
.seg {
  border: none; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
  padding: 7px 14px; border-radius: 100px; transition: background .2s, color .2s;
}
.seg:hover { color: var(--ink); }
.seg.is-active { background: var(--ink); color: var(--paper); }

.tool-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.select-wrap { position: relative; display: flex; align-items: center; }
.select {
  appearance: none; -webkit-appearance: none;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 100px; padding: 9px 34px 9px 15px;
  font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); cursor: pointer;
}
.select-chev { position: absolute; right: 13px; width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

.viewtoggle {
  display: flex; gap: 2px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 100px; padding: 3px;
}
.vt {
  border: none; background: transparent; cursor: pointer;
  width: 34px; height: 34px; border-radius: 100px;
  display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s;
}
.vt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vt.is-active { background: var(--ink); color: var(--paper); }

.add-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 100px;
  padding: 9px 16px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: transform .2s, opacity .2s;
}
.add-btn:hover { transform: translateY(-1px); opacity: .9; }
.add-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---- List view ---- */
.listing--list { display: flex; flex-direction: column; gap: 10px; }
.site-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 18px;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s;
}
.site-row:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -22px rgba(12,12,12,.4); border-color: var(--ink); }

.site-badge {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  object-fit: cover; display: block;
  background: var(--chip);
}
.site-id { min-width: 0; width: 200px; }
.site-id h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-url { font-size: 12.5px; color: var(--muted); }

.site-stats { display: flex; gap: 20px; margin-left: auto; }
.chip { display: flex; flex-direction: column; gap: 2px; width: 58px; }
.chip-k { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chip-v { font-size: 13.5px; font-weight: 600; white-space: nowrap; }

.row-spark { width: 92px; height: 32px; flex-shrink: 0; }
.row-spark polyline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.status { font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 100px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 92px; flex-shrink: 0; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--active { background: #e6f7ec; color: #1f9d57; }
.status--maint { background: var(--chip); color: var(--ink-soft); }
.status--down { background: transparent; color: var(--muted); border: 1px solid var(--line); }
body.dark .status--active { background: rgba(46, 170, 102, 0.18); color: #5fd08e; }

.row-go {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: var(--muted);
  border: 1px solid var(--line); transition: background .2s, color .2s, border-color .2s;
}
.row-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-go:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---- Grid view ---- */
.listing--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.site-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s;
}
.site-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(12,12,12,.4); border-color: var(--ink); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-id h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.card-metric { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.cm-num { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.cm-lbl { font-size: 11.5px; color: var(--muted); }
.card-spark { width: 100%; height: 38px; }
.card-spark polyline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 60px 0; color: var(--muted); }
.empty-state svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .5; margin: 0 auto 8px; display: block; }
.empty-state .asterisk { font-size: 30px; color: var(--muted); }
.empty-state p { margin-top: 10px; font-size: 14px; }

/* ---- Listing responsive ---- */
@media (max-width: 860px) {
  .row-spark { display: none; }
  .site-stats { gap: 18px; }
}
@media (max-width: 680px) {
  .tool-right { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .search { min-width: 100%; }
  .site-stats { display: none; }
  .site-id { width: auto; flex: 1; }
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager:empty { display: none; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, color .2s, border-color .2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.page-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-btn:disabled { opacity: .38; cursor: default; }
.page-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none; place-items: center; padding: 20px;
  background: rgba(8, 8, 8, .48);
  backdrop-filter: blur(3px);
  animation: fade .2s ease;
}
.modal-overlay.is-open { display: grid; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5);
  padding: 22px;
  animation: pop .3s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal__head h2 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.modal__close {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-soft);
  transition: background .2s, color .2s, border-color .2s;
}
.modal__close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.modal__close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.modal__body { display: block; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.field input, .field select {
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 13px; outline: none;
  transition: border-color .2s;
}
.field input::placeholder { color: var(--muted); }
.field input:focus, .field select:focus { border-color: var(--ink); }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--line);
  border-radius: 100px; padding: 9px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }

@media (max-width: 460px) {
  .field-row { flex-direction: column; gap: 0; }
}

/* =====================================================
   MEKAN EKLE / FORM PAGE
   ===================================================== */
.title-wrap { display: flex; align-items: center; gap: 12px; }
.back-link {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-soft);
  transition: background .2s, color .2s, border-color .2s; flex-shrink: 0;
}
.back-link:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.back-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 100px; padding: 8px 15px;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.tab svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.tab-panel[hidden] { display: none; }

/* ---- Layout ---- */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.form-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-side { display: flex; flex-direction: column; gap: 16px; }

/* ---- Form card ---- */
.fcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  position: relative;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.fcard.ztop { z-index: 50; }
.fcard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.fcard__head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.fcard__head p { font-size: 12px; color: var(--muted); text-align: right; max-width: 320px; }
.head-title { display: flex; align-items: center; gap: 12px; }
.add-btn.btn-xs { padding: 5px 11px; font-size: 12px; gap: 5px; }
.add-btn.btn-xs svg { width: 13px; height: 13px; }

/* ---- Fields (floating label) ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.form-grid--single { grid-template-columns: 1fr; gap: 24px; }
.fld { position: relative; }
.fld > label {
  position: absolute; top: -7px; left: 12px; z-index: 1;
  background: var(--card); padding: 0 6px;
  font-size: 11px; color: var(--muted); letter-spacing: .02em;
}
.fld input, .fld select {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 14px; outline: none;
  transition: border-color .2s;
}
.fld select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23909090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px;
}
.fld input::placeholder { color: var(--muted); }
.fld input:focus, .fld select:focus { border-color: var(--ink); }
.fld--icon input { padding-left: 40px; }
.fld-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.fld-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ---- Chips input ---- */
.chips-input {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  min-height: 50px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.chips-input:focus-within { border-color: var(--ink); }
.tagx {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--chip); color: var(--ink-soft);
  border-radius: 8px; padding: 4px 6px 4px 10px; font-size: 12.5px; font-weight: 500;
}
.tagx button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0; }
.tagx button:hover { color: var(--ink); }
.chips-add { border: none; outline: none; background: transparent; flex: 1; min-width: 90px; font-family: inherit; font-size: 13px; color: var(--ink); }
.chips-add::placeholder { color: var(--muted); }

/* ---- Meta rows ---- */
.meta-rows { display: flex; flex-direction: column; gap: 13px; }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.meta-row span { color: var(--muted); }
.meta-row strong { font-weight: 600; text-align: right; }
.meta-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---- Recents ---- */
.recents { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.recent { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 10px; }
.recent:hover { background: var(--paper); }
.ri-badge { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; object-fit: cover; display: block; background: var(--chip); }
.ri-info { flex: 1; min-width: 0; }
.ri-info strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-info small { font-size: 11px; color: var(--muted); }
.ri-tag { font-size: 10.5px; font-weight: 600; color: var(--ink-soft); background: var(--chip); border-radius: 100px; padding: 3px 9px; flex-shrink: 0; }

/* ---- QR ---- */
.qr-wrap { display: grid; place-items: center; padding: 4px; }
.qr-wrap img { width: 172px; height: 172px; background: #fff; padding: 8px; border-radius: 12px; }

/* ---- Gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.gal-slot {
  aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: 14px;
  display: grid; place-items: center; color: var(--muted); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.gal-slot:hover { border-color: var(--ink); color: var(--ink); }
.gal-slot svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Form page responsive ---- */
@media (max-width: 1000px) {
  .form-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .fcard__head p { text-align: left; }
}

/* =====================================================
   ÇALIŞMA SAATLERİ (gelişmiş)
   ===================================================== */
.hours-tools { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }

.hours-list { display: flex; flex-direction: column; gap: 8px; }

.day-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); flex-wrap: wrap;
  transition: background .2s, border-color .2s;
}
.day-row.is-closed { background: var(--paper); }
.day-row.is-closed .day-label { color: var(--muted); }

.day-name { display: flex; align-items: center; gap: 12px; }
.day-label { font-size: 14px; font-weight: 600; min-width: 84px; }

/* Toggle switch */
.switch {
  width: 40px; height: 23px; border-radius: 100px; flex-shrink: 0;
  background: var(--line); border: none; cursor: pointer; padding: 0; position: relative;
  transition: background .2s;
}
.switch.on { background: var(--ink); }
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--card); transition: left .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.switch.on .switch-knob { left: 20px; }

.day-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pill-24 {
  border: 1px solid var(--line); background: var(--card); border-radius: 100px;
  padding: 6px 13px; font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.pill-24:hover { border-color: var(--ink); color: var(--ink); }
.pill-24.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.time-range { display: flex; align-items: center; gap: 8px; }
.time-range select {
  font-family: inherit; font-size: 13px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 28px 7px 11px; cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23909090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 14px;
}
.time-range select:focus { border-color: var(--ink); }
.dash {color: #333;}

.day-info { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.day-info--closed { color: var(--muted); }

@media (max-width: 480px) {
  .day-row { align-items: flex-start; }
  .day-right { width: 100%; }
}

/* =====================================================
   CUSTOM SELECT (renkli + ikonlu)
   ===================================================== */
.cselect { position: relative; }
.cselect__btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 12px; font-family: inherit; font-size: 14px; color: var(--ink);
  cursor: pointer; transition: border-color .2s;
}
.cselect.is-open .cselect__btn { border-color: var(--ink); }
.cselect__ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.cselect__ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cselect__ic--pub { background: rgba(91, 110, 245, .14); color: #5b6ef5; }
.cselect__ic--map { background: rgba(19, 168, 158, .15); color: #0f9b91; }
.cselect__ic--region { background: rgba(224, 140, 47, .16); color: #cf7d1c; }
.cselect__val { flex: 1; text-align: left; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cselect__chev { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; flex-shrink: 0; }
.cselect.is-open .cselect__chev { transform: rotate(180deg); }

.cselect__menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 36px -16px rgba(0, 0, 0, .4); padding: 6px; list-style: none;
  max-height: 244px; overflow-y: auto;
  animation: pop .18s cubic-bezier(.2,.8,.2,1);
}
.cselect__opt {
  display: flex; align-items: center; gap: 8px; padding: 10px 11px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.cselect__opt:hover { background: var(--paper); color: var(--ink); }
.cselect__opt.is-active { background: var(--ink); color: var(--paper); }

/* =====================================================
   REKLAM AYARLARI
   ===================================================== */
.add-btn--block { width: 100%; justify-content: center; }
.card-note { font-size: 12px; color: var(--muted); margin: -8px 0 14px; }
.pin-fields { display: flex; flex-direction: column; gap: 16px; }

/* item ekleyici satır */
.adder { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adder .cselect { flex: 1 1 150px; min-width: 0; }
.adder .cselect[data-field="duration"] { flex: 0 0 146px; }
.adder .cselect__btn { padding: 8px 10px; gap: 8px; }
.adder .cselect__ic { width: 24px; height: 24px; }
.adder .adder__btn { flex: 0 0 auto; }
.adder.is-full { opacity: .5; pointer-events: none; }
.text-input { width: 100%; font-family: inherit; font-size: 14px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; transition: border-color .2s; }
.text-input::placeholder { color: var(--muted); }
.text-input:focus { border-color: var(--ink); }
.adder .text-input { flex: 1 1 150px; min-width: 0; }
.adder .text-input.qr-price { flex: 0 0 120px; }
button.status { border: none; cursor: pointer; font-family: inherit; }

/* ikonlu input */
.input-ico { position: relative; }
.input-ico .text-input { padding-left: 38px; width: 100%; }
.input-ico .ii { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.input-ico .ii svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* QR menü kategori blokları */
.qr-cat { margin-bottom: 20px; }
.qr-cat:last-child { margin-bottom: 0; }
.qr-cat__head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 0 4px; }
.qr-cat__title { font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 8px; }
.qr-cat__count { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--chip); border-radius: 100px; padding: 1px 8px; text-transform: none; letter-spacing: 0; }
.qr-cat__del { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0; }
.qr-cat__del:hover { color: var(--ink); }
.qr-items { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.qr-empty { font-size: 12.5px; color: var(--muted); padding: 8px 4px; }
.qr-cat[draggable="true"] { cursor: default; }
.qr-cat.dragging-cat { opacity: .5; }
.cat-grip { cursor: grab; color: var(--muted); display: inline-flex; align-items: center; }
.cat-grip:active { cursor: grabbing; }
.cat-grip svg { width: 15px; height: 15px; fill: currentColor; }
.site-row.dragging { opacity: .45; border-color: var(--ink); }

/* resim yükleme alanı */
.upload {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; color: var(--muted); text-align: center;
  transition: border-color .2s, color .2s;
}
.upload:hover { border-color: var(--ink); color: var(--ink); }
.upload svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.upload span { font-size: 12.5px; }
.upload.has-img { padding: 0; border-style: solid; overflow: hidden; }
.upload.has-img img { width: 100%; height: 170px; object-fit: cover; display: block; }
.item-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.item-list:empty { display: none; }

/* multi/single select option içerikleri */
.cselect .opt-label { flex: 1; }
.opt-check { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; display: none; flex-shrink: 0; }
.cselect__opt.is-active .opt-check { display: block; }
.cselect--multi .cselect__opt.is-active { background: var(--chip); color: var(--ink); }
.cselect__empty { padding: 10px 11px; font-size: 13px; color: var(--muted); list-style: none; }
.cselect.is-empty .cselect__val { color: var(--muted); }
.cselect.is-disabled .cselect__btn { opacity: .55; cursor: not-allowed; }

.chips-out { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips-out:empty { display: none; }

.pinned-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pinned-list:empty { display: none; }
.pinned-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; }
.pinned-item[draggable="true"] { user-select: none; }
.pinned-item.dragging { opacity: .45; border-color: var(--ink); }
.grip { display: inline-flex; align-items: center; color: var(--muted); cursor: grab; flex-shrink: 0; }
.grip:active { cursor: grabbing; }
.grip svg { width: 16px; height: 16px; fill: currentColor; }
.pcat { font-size: 11px; font-weight: 600; background: var(--chip); color: var(--ink-soft); border-radius: 100px; padding: 3px 9px; flex-shrink: 0; }
.pname { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdur { font-size: 11px; font-weight: 600; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); border-radius: 100px; padding: 3px 9px; flex-shrink: 0; }
.pin-rm { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 17px; line-height: 1; padding: 0; }
.pin-rm:hover { color: var(--ink); }

/* kayan yazı önizleme */
.marquee { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); color: var(--paper); padding: 11px 0; margin-top: 12px; white-space: nowrap; }
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 13s linear infinite; font-weight: 500; font-size: 13.5px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ekstra ikon renkleri */
.cselect__ic--home { background: rgba(224, 140, 47, .16); color: #cf7d1c; }
.cselect__ic--search { background: rgba(91, 110, 245, .14); color: #5b6ef5; }
.cselect__ic--type { background: rgba(150, 90, 210, .16); color: #8b54d6; }
.cselect__ic--grid { background: rgba(31, 157, 87, .15); color: #1f9d57; }
.cselect__ic--tag { background: rgba(214, 95, 138, .16); color: #cf5a82; }
.cselect__ic--store { background: rgba(19, 168, 158, .15); color: #0f9b91; }
.cselect__ic--clock { background: rgba(63, 122, 166, .16); color: #3f7aa6; }
.cselect__ic--event { background: rgba(224, 104, 60, .16); color: #d4602f; }

/* =====================================================
   DASHBOARD (Genel Bakış)
   ===================================================== */
.dash { display: flex; flex-direction: column; gap: 16px; }

/* 4 veri kutusu */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 14px;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.stat-box__head { display: flex; align-items: center; gap: 9px; }
.stat-box__icon { width: 30px; height: 30px; border-radius: 9px; background: var(--chip); color: var(--ink-soft); display: grid; place-items: center; flex-shrink: 0; }
.stat-box__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-box__title { font-size: 13px; font-weight: 600; }
.stat-box__body { display: flex; gap: 14px; }
.stat-box__left { flex: 0 0 42%; min-width: 0; }
.stat-box__num { font-size: clamp(24px, 2.4vw, 31px); font-weight: 700; letter-spacing: -.02em; line-height: 1; display: flex; align-items: baseline; white-space: nowrap; }
.num-sfx { font-style: normal; font-size: .42em; color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat-box__note { margin-top: 8px; font-size: 11.5px; font-weight: 500; }
.stat-box__note.up { color: #1f9d57; }
.stat-box__note.down { color: #c0453f; }
.stat-box__note.muted { color: var(--muted); }
.stat-box__right { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 14px; }
.mini-label { font-size: 11px; color: var(--muted); }
.mini-label .info { opacity: .55; }
.mini-val { font-size: 16px; font-weight: 700; margin-top: 3px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.mini-trend { font-size: 10.5px; font-weight: 600; }
.mini-trend.up { color: #1f9d57; }
.mini-trend.muted { color: var(--muted); }
.spark-area { width: 100%; height: 40px; margin-top: auto; }
.spark-area .sa-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* grafik kartları */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.chart-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.chart-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-card__head h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }

/* başlık + metrik (rezervasyon) */
.head-metric { display: flex; flex-direction: column; gap: 6px; }
.head-metric__row { display: flex; align-items: baseline; gap: 8px; }
.head-metric__num { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }

/* en çok rezervasyon sıralama listesi */
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 10px; transition: background .2s; }
.rank-item:hover { background: var(--paper); }
.rank-no { width: 24px; height: 24px; border-radius: 7px; background: var(--chip); color: var(--ink-soft); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.rank-item:first-child .rank-no { background: var(--ink); color: var(--paper); }
.rank-name { flex: 1; font-size: 14px; font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-val { font-size: 14px; font-weight: 700; flex-shrink: 0; }
.rank-unit { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 3px; }

.dchart { width: 100%; height: 240px; display: block; }
.dchart--bar { height: 200px; }
.dchart .grid { stroke: var(--line); stroke-width: 1; }
.dchart .area { fill: var(--ink); opacity: .07; }
.dchart .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dchart .dot { fill: var(--ink); }
.dchart .barv { fill: var(--ink); }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; padding: 0 6px; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { width: 128px; height: 128px; flex-shrink: 0; }
.legend { list-style: none; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.legend li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend .ldot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend .val { margin-left: auto; font-weight: 600; color: var(--muted); }

/* kategori yatay barlar */
.hbar-list { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.hbar-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.hbar-val { font-weight: 600; color: var(--muted); }
.hbar { height: 8px; border-radius: 100px; background: var(--chip); overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--ink); border-radius: 100px; width: 0; animation: grow 1s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: .3s; }

/* responsive */
@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1180px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
}

/* =====================================================
   ÜST YATAY NAVBAR
   ===================================================== */
.navbar { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--line); }
.navbar__inner {
  max-width: 1340px; margin: 0 auto;
  padding: 0 clamp(16px, 2.6vw, 28px); height: 62px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
}
.navbar__menu { display: flex; gap: 2px; overflow-x: auto; min-width: 0; scrollbar-width: none; order: 0; }
.navbar__menu::-webkit-scrollbar { display: none; }
.navlink {
  padding: 8px 13px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  white-space: nowrap; text-decoration: none;
  transition: background .2s, color .2s;
}
.navlink:hover { background: var(--paper); color: var(--ink); }
.navlink.is-active { background: var(--chip); color: var(--ink); font-weight: 600; }

.navbar__logo { display: inline-flex; align-items: center; justify-self: start; order: -1; }
.navbar__logo svg {height: 31px;width: auto;display: block;}
.navbar__logo svg path { fill: var(--ink); transition: fill .4s ease; }

.navbar__profile { display: flex; align-items: center; gap: 10px; justify-self: end; order: 1; }
.navbar__profile::after {
  content: ""; width: 15px; height: 15px; flex-shrink: 0; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23909090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
}

.page { max-width: 1340px; margin: 0 auto; padding: clamp(16px, 2.6vw, 28px); }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; letter-spacing: -.02em; }

@media (max-width: 720px) {
  .navbar__profile .live { display: none; }
  .navbar__logo svg { height: 19px; }
  .navbar__inner { gap: 10px; }
}

/* =====================================================
   BEKLEYEN REZERVASYONLAR TABLOSU
   ===================================================== */
.table-wrap { overflow-x: auto; }
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.rtable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 0 14px 12px; }
.rtable th:last-child { text-align: right; }
.rtable td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.rtable tbody tr:hover { background: var(--paper); }
.rt-mekan { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.rt-badge-img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: var(--chip); flex-shrink: 0; }
.rt-muted { color: var(--muted); white-space: nowrap; }
.rt-empty { text-align: center; color: var(--muted); padding: 28px 0; }

.rbadge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 100px; white-space: nowrap; }
.rbadge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rbadge--acil { color: #c0453f; background: rgba(214, 70, 70, .12); }
.rbadge--bekliyor { color: #9a6f12; background: rgba(224, 160, 30, .16); }
.rbadge--yeni { color: #1f9d57; background: rgba(31, 157, 87, .12); }

.rt-actions { display: flex; gap: 6px; justify-content: flex-end; }
.rt-act { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; color: var(--ink-soft); transition: background .2s, color .2s, border-color .2s; }
.rt-act svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rt-act--ok:hover { background: rgba(31, 157, 87, .14); color: #1f9d57; border-color: transparent; }
.rt-act--no:hover { background: rgba(214, 70, 70, .14); color: #c0453f; border-color: transparent; }

/* =====================================================
   KATEGORİLERE GÖRE İŞLETME TABLOSU
   ===================================================== */
.ctable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ctable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 0 8px 12px; }
.ctable th:first-child { padding-left: 4px; }
.ctable td { padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.ctable td:first-child { padding-left: 4px; font-weight: 600; white-space: nowrap; }
.ctable tbody tr:hover { background: var(--paper); }
.ct-count { font-weight: 700; }
.ct-oran { display: flex; align-items: center; gap: 10px; }
.ct-bar { flex: 1; height: 6px; border-radius: 100px; background: var(--chip); overflow: hidden; min-width: 60px; }
.ct-bar span { display: block; height: 100%; background: var(--ink); border-radius: 100px; width: 0; animation: grow 1s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: .2s; }
.ct-pct { font-size: 12.5px; color: var(--muted); font-weight: 600; width: 38px; text-align: right; }
