/* FK Přímětice – administrace */
:root { --cyan: #00bae9; --cyan-dark: #0096bd; --black: #0b0b0b; --muted: #5b6b73; --line: #e6eaee; --bg: #f3f6f8; --danger: #c62828; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif; font-size: 15px; color: var(--black); background: var(--bg); line-height: 1.5; }
a { color: var(--cyan-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.yes { color: #1b8a3c; font-weight: 700; }
.no { color: #b0bcc2; }
code { background: #e9eef1; padding: 2px 6px; border-radius: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 2px solid transparent; font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; white-space: nowrap; text-decoration: none !important; }
.btn-primary { background: var(--cyan); color: var(--black); border-color: var(--cyan); }
.btn-primary:hover { background: var(--cyan-dark); border-color: var(--cyan-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--black); border-color: #c8d2d8; }
.btn-outline:hover { border-color: var(--black); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c4c4; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.pill { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--black); }
.pill.active { background: var(--black); color: #fff; border-color: var(--black); }
.pill:hover { text-decoration: none; border-color: var(--black); }

.flash { padding: 12px 16px; margin-bottom: 16px; border-radius: 6px; font-weight: 600; }
.flash-ok { background: #e5f8fd; color: #05506a; border-left: 4px solid var(--cyan); }
.flash-error { background: #fdecec; color: #8a1c1c; border-left: 4px solid #d33; }

/* login */
body.bare { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-box { background: #fff; padding: 32px; width: 100%; max-width: 440px; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.login-box img { margin-bottom: 16px; }

/* layout */
.a-top { height: 56px; background: var(--black); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px; position: sticky; top: 0; z-index: 20; }
.a-top a { color: #fff; }
.a-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.a-brand img { height: 32px; }
.a-top-right { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.a-burger { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }
.a-body { display: flex; min-height: calc(100vh - 56px); }
.a-nav { width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); padding: 12px 0; }
.a-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 18px; color: var(--black); font-weight: 500; }
.a-nav a:hover { background: var(--bg); text-decoration: none; }
.a-nav a.active { background: #e5f8fd; color: var(--cyan-dark); box-shadow: inset 3px 0 0 var(--cyan); }
.a-nav .ico { width: 22px; text-align: center; }
.a-nav .badge { margin-left: auto; background: var(--cyan); color: var(--black); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.a-main { flex-grow: 1; padding: 24px; min-width: 0; max-width: 1200px; }
@media (max-width: 900px) {
  .a-burger { display: block; }
  .a-nav { position: fixed; top: 56px; left: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; z-index: 15; overflow-y: auto; }
  body.menu-open .a-nav { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .a-main { padding: 16px; }
  .a-top-right a:first-child { display: none; }
}

.a-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.a-head h1 { margin: 0; }
.a-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.a-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.a-filter input, .a-filter select { height: 34px; padding: 0 10px; border: 1px solid #c8d2d8; border-radius: 6px; font: inherit; }
.a-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.a-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; color: var(--black); }
.a-card:hover { border-color: var(--cyan); text-decoration: none; }
.a-card .n { font-size: 32px; font-weight: 800; line-height: 1; color: var(--cyan-dark); }
.a-card .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.a-grid2 { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 900px) { .a-grid2 { grid-template-columns: 1fr 1fr; } }
.a-panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.a-list { list-style: none; margin: 0; padding: 0; }
.a-list li { padding: 6px 0; border-bottom: 1px solid #f0f3f5; }
.a-list li:last-child { border: 0; }
.a-help { padding-left: 20px; }
.a-help li { margin-bottom: 6px; }

.a-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; }
.a-table th, .a-table td { padding: 10px 12px; border-bottom: 1px solid #f0f3f5; text-align: left; vertical-align: middle; font-size: 14px; }
.a-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafbfc; }
.a-table tr:hover td { background: #fafcfd; }
.a-rowlink { color: var(--black); font-weight: 600; }
.a-rowactions { white-space: nowrap; text-align: right; }
.a-rowactions form { display: inline; }
.a-table tr.muted td { color: #9aa7ad; }

/* formuláře */
.a-form { display: flex; flex-direction: column; gap: 14px; }
.a-form-wide { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 900px; }
.a-form label, .a-form .field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; }
.a-form .lbl { font-weight: 600; }
.a-form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.a-form label.check input { width: auto; min-height: 0; }
.a-form input, .a-form textarea, .a-form select { font: inherit; font-weight: 400; padding: 9px 12px; border: 1px solid #c8d2d8; border-radius: 6px; background: #fff; width: 100%; min-height: 42px; }
.a-form input[type=file] { padding: 8px; background: var(--bg); }
.a-form textarea { resize: vertical; }
.a-form input:focus, .a-form textarea:focus, .a-form select:focus, .editor-area:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--cyan); }
.a-form .help { font-weight: 400; font-size: 12px; color: var(--muted); }
.a-form .row2 { display: grid; gap: 14px; }
@media (min-width: 700px) { .a-form .row2 { grid-template-columns: 1fr 1fr; } }
.a-form-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.img-preview { display: flex; align-items: center; gap: 12px; }
.img-preview img { max-height: 120px; border: 1px solid var(--line); border-radius: 6px; }

/* editor */
.editor { border: 1px solid #c8d2d8; border-radius: 6px; overflow: hidden; }
.editor .toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
.editor .toolbar button { font: inherit; font-size: 13px; height: 30px; padding: 0 10px; border: 1px solid #c8d2d8; background: #fff; border-radius: 4px; cursor: pointer; }
.editor .toolbar button:hover { border-color: var(--black); }
.editor-area { min-height: 220px; padding: 12px 14px; font-weight: 400; font-size: 15px; line-height: 1.55; background: #fff; }
.editor-area h2 { font-size: 22px; margin: 16px 0 8px; }
.editor-area h3 { font-size: 18px; margin: 14px 0 6px; }
.editor-area img { max-width: 100%; height: auto; }
.editor-area:empty::before { content: 'Začněte psát…'; color: #9aa7ad; }

/* objednávky */
.order { border-left: 4px solid #c8d2d8; }
.order.status-nova { border-left-color: var(--cyan); }
.order.status-pripravena { border-left-color: #f5b400; }
.order.status-vyzvednuta { border-left-color: #1b8a3c; }
.order.status-zrusena { opacity: .6; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.order-total { font-size: 20px; font-weight: 800; }
.order-body { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 700px) { .order-body { grid-template-columns: 1fr 1fr; } }
.order-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.order-form select, .order-form input[type=text] { height: 34px; padding: 0 10px; border: 1px solid #c8d2d8; border-radius: 6px; font: inherit; }
.order-form input[type=text] { flex: 1 1 200px; }
.badge-status { display: inline-block; background: var(--bg); padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* rychlé filtry stavu zápasů */
.a-quick { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.a-quick .pill b { margin-left: 6px; font-size: 12px; background: #eef2f5; color: #445; border-radius: 999px; padding: 1px 7px; }
.a-quick .pill.active b { background: rgba(255,255,255,.2); color: #fff; }
.a-quick .pill.warn:not(.active) { border-color: #e0a300; }
.a-quick .pill.warn:not(.active) b { background: #fff3c4; color: #7a5a00; }
.a-table tr.row-warn td { background: #fff8e1; }
.a-table th.sortable a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.a-table th.sortable .arrow { font-size: 9px; opacity: .25; }
.a-table th.sortable.asc, .a-table th.sortable.desc { color: var(--black); }
.a-table th.sortable.asc .arrow, .a-table th.sortable.desc .arrow { opacity: 1; color: var(--cyan-dark, #0096bd); }
.a-table th.sortable a:hover .arrow { opacity: .7; }
