.admin { background: var(--paper-2); min-height: 100vh; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code { background: var(--paper-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 40px 32px; box-shadow: var(--shadow); display: grid; gap: 14px; text-align: center; }
.login-card .brand-mark { width: 52px; height: 52px; margin: 0 auto; color: var(--teal); }
.login-card h1 { font-size: 30px; }
.login-card .muted { margin: -8px 0 6px; }
.login-card .field { text-align: left; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; }

/* Top bar */
.admin-top { background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 10; }
.admin-top-in { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; padding: 8px 0; }
.admin-top strong { font: 500 20px var(--serif); }
.admin-top nav { display: flex; gap: 2px; margin-right: auto; flex-wrap: wrap; }
.admin-top nav a { color: rgba(255,255,255,.85); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.admin-top nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-top .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.admin-top .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; color: #fff; font: 600 14px var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }

.admin-main { padding: 28px 0 80px; max-width: 920px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin-bottom: 24px; scroll-margin-top: 80px; }
.panel h2 { font-size: 26px; margin-bottom: 10px; }
.panel form { display: grid; gap: 18px; margin-top: 14px; }
.panel form > .btn { justify-self: start; }

.flash { padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; margin-bottom: 18px; text-align: left; }
.flash-ok { background: #e3f3e9; color: #1f6a40; }
.flash-err { background: #fbeee6; color: #93401b; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
input[type=text], input[type=password], input[type=time], input[type=date], select, textarea {
  width: 100%; font: 500 16px var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-2); box-shadow: 0 0 0 3px var(--teal-soft); }
input:disabled { background: var(--paper); color: var(--muted); }

/* Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch > span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s; }
.switch > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--teal-2); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--sand); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }

/* Hodiny */
.hours-edit { display: grid; gap: 8px; }
.he-head, .he-row { display: grid; grid-template-columns: 90px 70px 140px 140px 1fr; gap: 10px; align-items: center; }
.he-head { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.he-row.is-closed input[type=time] { opacity: .35; }

/* Ceník */
.price-edit { display: grid; gap: 8px; margin-top: 6px; }
.pe-row { display: grid; grid-template-columns: 110px 1fr 170px auto; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--paper); }
.pe-row.is-heading { background: var(--teal-soft); }
.pe-row.is-heading input[type=text]:not(.pe-price) { font-weight: 700; font-family: var(--serif); }
.pe-row.is-heading .pe-price { visibility: hidden; }
.pe-tools { display: flex; gap: 4px; }
.pe-tools button { width: 36px; height: 40px; border: 1.5px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font-size: 15px; color: var(--ink-2); }
.pe-tools button:hover { border-color: var(--teal-2); color: var(--teal); }
.pe-tools .del:hover { border-color: var(--warn); color: var(--warn); }
.pe-add { display: flex; gap: 10px; flex-wrap: wrap; }

.state { padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; margin-top: 14px; }
.state-on { background: #e3f3e9; color: #1f6a40; }
.state-off { background: var(--paper); color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pw-form { max-width: 420px; }

@media (max-width: 720px) {
  .panel { padding: 22px 16px; }
  .he-head { display: none; }
  .he-row { grid-template-columns: 1fr auto; padding: 10px; background: var(--paper); border-radius: 12px; }
  .he-row input[type=time] { grid-column: span 1; }
  .he-row input[type=text] { grid-column: 1 / -1; }
  .pe-row { grid-template-columns: 1fr auto; }
  .pe-row select { grid-column: 1; }
  .pe-row .pe-tools { grid-column: 2; grid-row: 1; }
  .pe-row input[type=text] { grid-column: 1 / -1; }
  .pe-row.is-heading .pe-price { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .admin-top nav { order: 3; width: 100%; }
}
.sub { font-size: 18px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.sub:first-of-type { border-top: 0; padding-top: 0; }
details.api { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
details.api summary { cursor: pointer; font-weight: 700; color: var(--teal); }
details.api > * + * { margin-top: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.api-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.found { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.found li { padding: 12px 14px; background: var(--paper); border-radius: 12px; font-size: 15px; }
.found code { word-break: break-all; }
