.admin { background: var(--bg-2); }
.a-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.a-side { background: #0f0f10; color: #d2d2d7; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.a-side .logo { color: #fff; margin: 4px 8px 26px; }
.a-side .logo-mark { background: #fff; }
.a-side .logo-mark::after { border-color: #111; }
.a-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: #a1a1a6; }
.a-side a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.a-side a.active { color: #fff; background: rgba(255, 255, 255, .1); }
.a-side a svg { width: 18px; height: 18px; }
.a-side .badge { margin-left: auto; background: #fff; color: #111; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.a-side .spacer { flex: 1; }
.a-main { padding: 32px 40px 80px; min-width: 0; }
.a-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.a-head h1 { font-size: 28px; margin: 0; letter-spacing: -.03em; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.tile .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 30px; font-weight: 600; letter-spacing: 0; margin-top: 6px; font-variant-numeric: tabular-nums; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 18px; }
.panel h3 { font-size: 15px; margin-bottom: 14px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--bg); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl img.th { width: 44px; height: 52px; object-fit: contain; background: var(--bg-2); border-radius: 8px; }
.tbl-wrap { overflow-x: auto; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { color: #1d5fd1; background: #e8f0fd; }
.st-confirmed, .st-design_review { color: #8a5a00; background: #fdf3e1; }
.st-ready, .st-engraving { color: #6b3fc4; background: #f1ebfd; }
.st-done, .st-shipping { color: #0f766e; background: #e2f5f3; }
.st-delivered { color: var(--ok); background: #e7f4ec; }
.st-cancelled { color: var(--err); background: #fbeaea; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.bar { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.chart svg { width: 100%; height: 180px; display: block; }
.o-items { display: grid; gap: 16px; }
.o-item { border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.o-previews { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.o-prev { width: 170px; text-align: center; font-size: 12px; }
.o-prev img { width: 170px; height: 204px; object-fit: contain; background: var(--bg-2); border-radius: 12px; }
.o-prev.prod img { background: #fff; border: 1px dashed var(--line-2); object-fit: contain; padding: 8px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.hist { display: grid; gap: 10px; font-size: 13px; max-height: 360px; overflow-y: auto; }
.hist .h { padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.hist .h.internal { background: #fff8e6; }
.hist .h small { color: var(--muted); display: block; }
.ed-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.rows { display: grid; gap: 8px; }
.rows .r { display: grid; gap: 8px; align-items: center; }
.rows .r .input, .rows .r .select { height: 38px; font-size: 14px; }
.rows input[type=color] { width: 42px; height: 38px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.ph-list { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-list .ph { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.ph-list .ph img { width: 100%; height: 100%; object-fit: contain; }
.ph-list .ph button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; font-size: 12px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .modal { max-width: 380px; }
.a-mobile-bar { display: none; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(3, 1fr); } .two, .ed-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .a-shell { grid-template-columns: 1fr; }
  .a-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .a-side .logo { margin: 0 12px 0 4px; width: 100%; }
  .a-side .spacer { display: none; }
  .a-main { padding: 20px 16px 60px; }
  .tiles, .three { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  .a-side, .no-print { display: none !important; }
  .a-shell { display: block; }
  .a-main { padding: 0; }
  .panel { border: 0; padding: 0 0 12px; break-inside: avoid; }
  .admin { background: #fff; }
}

.csec summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.csec summary::-webkit-details-marker { display: none; }
.csec summary::after { content: '+'; font-size: 22px; font-weight: 300; color: var(--muted); }
.csec[open] summary::after { content: '−'; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
.citem { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 2px; background: var(--bg); }
.citem-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.citem .icon-btn { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
