/* Administrace – navazuje na style.css */

body.admin { background: #f0f4f8; }
.admin-bar { background: var(--pine); color: var(--white); position: sticky; top: 0; z-index: 20; }
.admin-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding: 8px 0; }
.admin-bar .brand strong { color: var(--white); font-size: 1.15rem; }
.admin-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.admin-nav a, .linkbtn {
  color: #cfe0ee; text-decoration: none; font: 600 .92rem var(--font-body);
  padding: .5em .8em; border-radius: 10px; background: none; border: 0; cursor: pointer;
}
.admin-nav a:hover, .linkbtn:hover { color: var(--white); background: rgba(255, 255, 255, .08); }
.admin-nav a.on { background: rgba(92, 184, 230, .2); color: var(--white); }
.admin-nav form { margin: 0; }
.admin-toggle { display: none; width: 44px; height: 44px; padding: 11px 10px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); cursor: pointer; flex-direction: column; justify-content: space-between; }
.admin-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--white); transition: transform .2s, opacity .2s; }
.is-open .admin-toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.is-open .admin-toggle span:nth-child(2) { opacity: 0; }
.is-open .admin-toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
@media (max-width: 760px) {
  .admin-toggle { display: flex; }
  .admin-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px 0 10px; }
  .is-open .admin-nav { display: flex; }
  .admin-nav a, .linkbtn { display: block; width: 100%; text-align: left; padding: .8em 1em; font-size: 1rem; }
  .admin-main { padding-top: 22px; }
  .admin-head h1 { font-size: 1.7rem; }
}

.admin-main { padding: 32px 0 80px; max-width: 900px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-head h1 { font-size: 2rem; margin: 0; }
.admin-head p { flex-basis: 100%; margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.panel { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel h2 { font-size: 1.3rem; }
.empty { text-align: center; color: var(--muted); padding: 48px 24px; }

.alert { background: var(--mist); color: var(--pine); border-left: 4px solid var(--teal); padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; }
.alert-err { background: #fdecea; color: #8a2a1f; border-color: #d9534f; }

/* výpis příspěvků */
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.row {
  display: flex; align-items: center; gap: 16px; padding: 12px 18px 12px 12px;
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .15s;
}
.row:hover { transform: translateX(3px); }
.row-thumb { width: 72px; height: 56px; flex: none; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--mist), #d2e6f3); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--muted); }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.state { font-size: .75rem; font-weight: 700; color: var(--muted); }
.st-on { color: var(--teal); }
.st-off { color: #b0563f; }
.row-go { color: var(--teal); font-weight: 700; font-size: .9rem; white-space: nowrap; }
@media (max-width: 560px) { .row-go { display: none; } .row-thumb { width: 56px; height: 48px; } }

/* formuláře */
.form label { display: block; font-weight: 700; font-size: .92rem; color: var(--pine); margin-bottom: 16px; }
.form label small { font-weight: 500; color: var(--muted); }
.form input:not([type=checkbox]):not([type=radio]), .form textarea {
  font: 400 1rem/1.5 var(--font-body); color: var(--ink);
  padding: .7em .9em; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfcfe; width: 100%;
  display: block; margin-top: 6px;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(92, 184, 230, .25); }
.form textarea { resize: vertical; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; cursor: pointer; }
.form .check input { width: 20px; height: 20px; accent-color: var(--teal); }
.check-danger { color: #b0563f !important; }
.checks { display: flex; gap: 24px; flex-wrap: wrap; margin: 6px 0 22px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } .grid2 > div:empty { display: none; } }
.form-foot { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.sticky-foot { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, #f0f4f8 30%); }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: none; color: #b0563f; border-color: #e6c2b8; }
.btn-danger:hover { background: #fdecea; }

.seg { border: 0; padding: 4px; margin: 0 0 20px; display: inline-flex; background: var(--mist); border-radius: 999px; }
.seg label { display: block; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg label { padding: .55em 1.1em; border-radius: 999px; font-weight: 700; }
.seg label:has(input:checked) { background: var(--white); box-shadow: var(--shadow); }
.form.is-news .only-offer { display: none; }

.image-field { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.image-field img { width: 160px; border-radius: 12px; }
.image-field > label:last-child { flex: 1; min-width: 220px; }

/* ceník */
.fish-edit { display: grid; gap: 12px; }
.fish-row { display: grid; grid-template-columns: 1.4fr 2fr 2.4fr 1fr 1fr 72px; gap: 0 12px; align-items: end; padding: 18px 20px 14px; margin: 0; }
.fish-row label { margin-bottom: 10px; }
.f-checks { grid-column: 1 / -1; display: flex; gap: 22px; }
.f-photo { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.f-photo img, .f-photo-empty { width: 96px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; }
.f-photo-empty { display: grid; place-items: center; background: var(--mist); color: var(--muted); font-size: .75rem; font-weight: 600; }
.f-photo label { flex: 1; margin: 0; }
.f-checks { flex-wrap: wrap; }
.fish-new { border: 2px dashed var(--aqua); box-shadow: none; background: #f6fafd; }
.fish-new-label { grid-column: 1 / -1; font-weight: 700; color: var(--teal); margin: 0 0 8px; }
@media (max-width: 760px) {
  .fish-row { grid-template-columns: 1fr 1fr; }
  .f-name, .f-note, .f-cat { grid-column: 1 / -1; }
}

/* přihlášení */
.login { max-width: 400px; margin: 8vh auto 0; text-align: center; }
.login img { margin: 0 auto 16px; }
.login .form { text-align: left; background: var(--white); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); margin: 20px 0; }

/* termíny prodeje */
.sale-row { display: grid; grid-template-columns: 165px 125px 125px 1.2fr 1.4fr 1fr; gap: 0 12px; align-items: end; padding: 16px 20px 10px; margin: 0; }
.sale-row label { margin-bottom: 10px; }
.sale-row.is-past { opacity: .55; }
@media (max-width: 860px) {
  .sale-row { grid-template-columns: 1fr 1fr 1fr; }
  .s-place, .s-loc, .s-note { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .sale-row { grid-template-columns: 1fr 1fr; padding: 16px 16px 10px; }
  .s-date { grid-column: 1 / -1; }
  .fish-row { padding: 16px 16px 12px; }
  .panel { padding: 18px; }
}
.form input { min-width: 0; }

/* sekce webu */
.sections { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.section-row { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin: 0; transition: opacity .15s; }
.section-row.is-off { opacity: .55; }
.section-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.section-info strong { font-size: 1.05rem; color: var(--pine); }
.section-info small { color: var(--muted); }
.section-move { display: flex; gap: 6px; }
.move {
  width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--white);
  font-size: 1.1rem; font-weight: 700; color: var(--pine); cursor: pointer;
}
.move:hover { border-color: var(--aqua); background: var(--mist); }
li:first-child .move[data-dir="-1"], li:last-child .move[data-dir="1"] { opacity: .3; pointer-events: none; }
.form .switch { position: relative; margin: 0; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-ui { display: block; width: 50px; height: 30px; border-radius: 999px; background: #c9d6e0; position: relative; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--teal); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid rgba(92, 184, 230, .5); outline-offset: 2px; }
@media (max-width: 560px) { .section-row { gap: 12px; padding: 14px; } .section-info small { display: none; } }
.save-state { color: var(--muted); font-size: .9rem; font-weight: 600; }
.save-state.is-ok { color: var(--teal); }
.save-state.is-err { color: #8a2a1f; }

/* fotogalerie */
.upload-panel { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.form .dropzone {
  flex: 1; min-width: 240px; position: relative; margin: 0 !important; padding: 22px; border: 2px dashed var(--aqua); border-radius: 14px;
  background: #f6fafd; display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone:hover, .dropzone.is-over { background: var(--mist); border-color: var(--teal); }
.dropzone.has-files { border-style: solid; border-color: var(--teal); background: var(--mist); }
.dropzone.too-many { border-color: #d9534f; background: #fdecea; }
.dropzone-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--white); font-size: 1.6rem; line-height: 1; }
.dropzone strong { color: var(--pine); font-size: 1.05rem; }
.dropzone small { color: var(--muted); font-weight: 500; }
.upload-panel .btn { align-self: center; }
.gallery-count { margin: 4px 0 10px; font-weight: 600; }
.gallery-edit { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.gallery-row { display: flex; align-items: center; gap: 16px; padding: 14px; margin: 0; transition: opacity .15s; }
.gallery-row.is-deleting { opacity: .45; }
.gallery-thumb { flex: none; width: 132px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--mist); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.gallery-fields label:not(.check) { margin: 0; }
@media (max-width: 560px) {
  .upload-panel .btn { width: 100%; justify-content: center; }
  .gallery-row { flex-wrap: wrap; gap: 12px; }
  .gallery-thumb { width: calc(100% - 108px); }
  .gallery-row .section-move { flex-direction: column; margin-left: auto; }
  .gallery-fields { flex-basis: 100%; order: 3; }
}
