/* Fresora admin studio (Savruna admin layout, SegarBowl styling) */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.gate-card { width: min(440px, 100%); }
#studio { display: grid; grid-template-columns: 264px 1fr; min-height: 100dvh; }
#studio[hidden] { display: none; }
.sidebar { position: sticky; top: 0; height: 100dvh; background: #fff; border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; gap: 28px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none; font-weight: 700; color: #57534E; transition: .2s; }
.side-nav a:hover { background: var(--line); color: var(--ink); }
.side-nav a.on { background: var(--ink); color: #fff; }
.side-nav a.on .icon { color: var(--lime); }
.side-nav b { margin-left: auto; background: var(--lime); color: var(--lime-ink); border-radius: 999px; padding: 0 8px; font-size: .75rem; }
.side-foot { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--bg); border-radius: 20px; }
.side-foot b { display: block; font-size: .9rem; }
.avatar { width: 40px; height: 40px; border-radius: 14px; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.studio-main { padding: 32px clamp(16px, 3vw, 44px) 40px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.topbar h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.topbar p { margin: 6px 0 0; color: var(--muted); font-weight: 500; }
.a-section { padding-top: 28px; scroll-margin-top: 12px; }
.a-section + .a-section { margin-top: 32px; border-top: 1px dashed var(--line-2); }
.a-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.a-head h2 { font-size: 2rem; }
.a-head p { margin: 6px 0 0; color: var(--muted); max-width: 36rem; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { font-size: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
.stat span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.stat strong { display: block; font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 2px; }
.stat small { color: var(--muted); }
.stat.hl { background: var(--lime); border-color: var(--lime); }
.stat.hl span, .stat.hl small { color: var(--lime-ink); }
.upcoming { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.up { border: 2px solid var(--line); border-radius: 20px; padding: 16px; cursor: pointer; background: var(--bg); text-align: left; }
.up:hover { border-color: var(--lime); }
.up b { display: block; font-size: 1.05rem; }
.up span { color: var(--muted); font-size: .85rem; }
.admin-cal .cal-day { aspect-ratio: auto; min-height: 76px; align-items: flex-start; justify-content: flex-start; padding: 10px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); cursor: pointer; text-align: left; font-size: .9rem; }
.admin-cal .cal-day::after { display: none; }
.admin-cal .cal-day.past { color: #D6D3D1; cursor: default; background: transparent; }
.admin-cal .cal-day:not(.past):hover { border-color: var(--lime); }
.admin-cal .cal-day.open { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.admin-cal .cal-day.closed { background: var(--line-2); }
.admin-cal .cal-day small { display: block; font-weight: 600; font-size: .7rem; margin-top: 4px; }
.po-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.po-row:last-child { border-bottom: 0; }
.po-row .grow { flex: 1; min-width: 180px; }
.po-row small { display: block; color: var(--muted); }
.table-card { padding: 8px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { text-align: left; font-size: .72rem; letter-spacing: .12em; color: var(--muted); padding: 14px; font-weight: 800; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table .dcell { display: flex; gap: 12px; align-items: center; }
.table .dcell img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--lime-soft); flex: none; }
.table .dcell small { display: block; color: var(--muted); max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-list, .order-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pay-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pay-card h3 { font-size: 1.1rem; }
.pay-card .meta { color: var(--muted); font-size: .85rem; }
.pay-card .actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.pay-card .proof { width: 100%; max-height: 260px; object-fit: contain; background: var(--bg); border: 1px solid var(--line-2); border-radius: 16px; }
.pay-card select { padding: 8px 12px; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; font-weight: 600; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.addon-row { display: grid; grid-template-columns: 1fr 140px 40px; gap: 8px; margin-bottom: 8px; }
.addon-row input { padding: 10px 14px; border: 2px solid var(--line-2); border-radius: 14px; min-width: 0; }
.addon-row button { border: 0; background: var(--red-soft); color: var(--red); border-radius: 12px; cursor: pointer; font-size: 1.1rem; }
.photo-prev { width: 100%; height: 160px; border-radius: 20px; object-fit: cover; background: var(--lime-soft); margin-bottom: 10px; }
.dish-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 280px; overflow: auto; }
.dish-pick .check { margin: 0; font-size: .9rem; }
.dish-pick .check small { display: block; color: var(--muted); font-weight: 500; }
.a-foot { margin-top: 48px; color: var(--soft); font-size: .75rem; letter-spacing: .16em; font-weight: 800; }
dialog.wide { width: min(680px, calc(100vw - 24px)); }

@media (max-width: 1100px) { .stats { grid-template-columns: 1fr 1fr; } .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  #studio { grid-template-columns: 1fr; }
  .sidebar { position: sticky; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar > .brand .brand-word, .side-foot { display: none; }
  .side-nav { flex-direction: row; gap: 4px; }
  .side-nav a { padding: 10px; white-space: nowrap; }
  .side-nav a span { display: none; }
  .admin-cal .cal-day { min-height: 52px; padding: 6px; font-size: .8rem; }
  .admin-cal .cal-day small { display: none; }
  .dish-pick { grid-template-columns: 1fr; }
  .pay-list, .order-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } .stat strong { font-size: 1.8rem; } .addon-row { grid-template-columns: 1fr 100px 36px; } }
