/* Knihovna RFID – ukázka (schoolsuite.cz/knihovna) */
:root {
  --blue: #1e73d8; --blue2: #3d78d8; --btn: #2e7be6; --green: #65b741; --orange: #e58a2e; --red: #d64545;
  --ink: #1d2b44; --muted: #5a6f8f; --line: #d7e1f0; --bg: #eef3fa; --card: #fff; --soft: #f5f8fd;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: var(--btn); }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* horní lišta */
.top { background: linear-gradient(90deg, var(--blue), var(--blue2)); color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand small { font-weight: 500; opacity: .85; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.tabs button { background: rgba(255,255,255,.14); color: #fff; padding: 9px 14px; font-weight: 600; }
.tabs button.on { background: #fff; color: var(--blue); }
.tabs .ghost { background: transparent; border: 1px solid rgba(255,255,255,.5); }

.intro { padding: 22px 0 6px; }
.intro h1 { margin: 0 0 6px; font-size: 28px; }
.intro p { margin: 0; color: var(--muted); max-width: 900px; }

.grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; padding: 16px 0 26px; }
@media (max-width: 980px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(30,64,120,.06); }
.card h2 { font-size: 17px; margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-body { padding: 16px 18px; }
.hint { color: var(--muted); font-size: 14px; }

/* kiosek (monitor) */
.monitor { background: #1b2433; border-radius: 22px; padding: 14px; box-shadow: 0 18px 40px rgba(20,30,60,.25); }
.screen { background: #fff; border-radius: 12px; overflow: hidden; min-height: 470px; display: flex; flex-direction: column; position: relative; }
.screen-top { background: linear-gradient(90deg, var(--blue), var(--blue2)); color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 10px; min-height: 52px; }
.screen-top .title { font-weight: 800; letter-spacing: .5px; }
.screen-top .user { margin-left: auto; font-size: 13px; opacity: .95; text-align: right; }
.screen-top .small-btn { background: #dce7f8; color: #4c6fa8; padding: 6px 12px; font-weight: 600; font-size: 13px; }
.screen-main { flex: 1; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.book-title { font-size: 24px; font-weight: 800; }
.book-meta { color: var(--muted); font-size: 14px; min-height: 20px; }
.big { font-size: 26px; font-weight: 800; color: #fff; background: var(--btn); padding: 22px 34px; border-radius: 18px; min-width: 300px; box-shadow: 0 8px 20px rgba(46,123,230,.25); }
.big.loan { background: var(--green); box-shadow: 0 8px 20px rgba(101,183,65,.3); }
.big.ret { background: var(--orange); box-shadow: 0 8px 20px rgba(229,138,46,.3); }
.big.back { background: #8a9bb5; box-shadow: none; }
.action-hint { color: var(--muted); }
.countdown { color: var(--orange); font-weight: 700; font-size: 14px; min-height: 20px; }
.screen-foot { border-top: 1px solid var(--line); padding: 8px 16px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.login-box { width: min(380px, 100%); display: grid; gap: 10px; text-align: left; }
.login-box label { font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
.login-box input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; }
.login-box .row { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.login-box .btn-login { background: var(--btn); color: #fff; font-weight: 800; padding: 14px; font-size: 18px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.quick button { background: var(--soft); border: 1px solid var(--line); color: var(--ink); padding: 8px 12px; font-size: 13px; }

/* dialog operace se štítkem */
.dlg-back { position: absolute; inset: 0; background: rgba(20,35,60,.35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg { background: #fff; border-radius: 16px; width: min(440px, 100%); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.dlg-head { background: linear-gradient(90deg, var(--blue), var(--blue2)); color: #fff; font-weight: 800; padding: 12px 16px; }
.dlg-body { padding: 18px; text-align: center; display: grid; gap: 10px; }
.dlg-icon { font-size: 40px; line-height: 1; }
.dlg-msg { font-size: 17px; font-weight: 600; }
.dlg-time { color: var(--muted); font-size: 13px; }
.bar { height: 8px; background: #dce7f8; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 40%; background: var(--btn); border-radius: 99px; animation: slide 1.1s infinite ease-in-out; }
.bar.done i { width: 100%; animation: none; background: var(--green); }
.bar.err i { width: 100%; animation: none; background: var(--orange); }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.dlg-cancel { background: #dce7f8; color: #4c6fa8; padding: 8px 16px; justify-self: center; font-weight: 600; }
/* víc knih najednou (verze 2.0) */
.dlg-detail { white-space: pre-line; font-size: 14px; color: var(--ink); text-align: left; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; max-height: 190px; overflow: auto; }
.dlg-help { background: #fff4e0; color: #9a5a12; border: 1px dashed #e5b36c; padding: 7px 14px; justify-self: center; font-size: 13px; font-weight: 600; }
.kbooks { list-style: none; margin: 0; padding: 0; width: min(560px, 100%); max-height: 232px; overflow: auto; text-align: left; border: 1px solid var(--line); border-radius: 12px; }
.kbooks li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.kbooks li:last-child { border-bottom: 0; }
.kb-t { min-width: 0; display: grid; }
.kb-t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-t span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbooks .st { font-style: normal; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; white-space: nowrap; flex: none; }
.st.loan { background: #e4f4dc; color: #2f8a46; }
.st.ret { background: #fdebd8; color: #b35f12; }
.st.na { background: #eef1f5; color: #6b7a90; }
.st.bad, .st.fail { background: #fbe3e0; color: #c0392b; }
.st.ok { background: #dff5d6; color: #2f7a1c; }
.tagrow { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.tagrow .ts-line { display: block; width: fit-content; margin: 2px 0 0; font-size: 12.5px; padding: 2px 7px; }
.ts-icon.tiny { width: 30px; height: 42px; font-size: 16px; }
@media (max-width: 600px) {
  .big { min-width: 0; width: 100%; font-size: 21px; padding: 18px 16px; }
  .kbooks .st { font-size: 11.5px; padding: 3px 7px; }
  .kbooks li { display: grid; gap: 4px; }
  .kbooks .st { justify-self: start; }
}

/* stůl, čtečka, batoh */
.desk { display: grid; gap: 16px; }
.zone { border: 2px dashed var(--line); border-radius: 14px; padding: 12px; background: var(--soft); min-height: 96px; transition: .15s; }
.zone.drop { border-color: var(--btn); background: #e8f1fe; }
.zone-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.reader { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.pad { width: 120px; height: 90px; border-radius: 14px; background: linear-gradient(145deg, #3a4a63, #232f42); position: relative; box-shadow: inset 0 2px 8px rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; color: #9fb4d6; font-size: 12px; font-weight: 700; text-align: center; }
.pad .led { position: absolute; top: 8px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #3a4d6a; }
.pad.read .led { background: #3cd070; box-shadow: 0 0 10px #3cd070; }
.pad.write .led { background: #f6b93b; box-shadow: 0 0 10px #f6b93b; }
.pad.error .led { background: #ff5b5b; box-shadow: 0 0 10px #ff5b5b; }
.books { display: flex; flex-wrap: wrap; gap: 10px; }
.bk { width: 118px; padding: 0; font-size: 13px; position: relative; cursor: grab; user-select: none; background: none; border: 0; }
.bk:active { cursor: grabbing; }
.bk .tag { margin: 6px 0 0; font-size: 11px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bk .tag b { padding: 2px 6px; border-radius: 6px; font-weight: 700; }
.bk .tag b.on { background: #fde2e2; color: #b42318; }
.bk .tag b.off { background: #dff5d6; color: #2f7a1c; }
.bk .tag b.blank { background: #eef1f6; color: #5a6f8f; }
.bk .acts { display: flex; gap: 4px; margin: 6px 0 0; flex-wrap: wrap; }
.bk .acts button { font-size: 11px; padding: 4px 6px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }
.leave { background: var(--ink); color: #fff; padding: 10px 14px; font-weight: 700; }

/* rám */
.gate-back { position: fixed; inset: 0; background: rgba(15,25,45,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.gate { background: #fff; border-radius: 20px; width: min(560px, 100%); padding: 20px; text-align: center; }
.gate-scene { height: 180px; position: relative; margin: 6px auto 14px; width: 320px; max-width: 100%; }
.pillar { position: absolute; top: 10px; width: 26px; height: 160px; border-radius: 10px; background: linear-gradient(#cfd8e6, #9aa9c0); }
.pillar.l { left: 60px; } .pillar.r { right: 60px; }
.gate.alarm .pillar { animation: alarm .35s infinite alternate; }
.gate.ok .pillar { background: linear-gradient(#bfe8b0, #6cbf4f); }
@keyframes alarm { from { background: #ff4d4d; box-shadow: 0 0 30px #ff4d4d; } to { background: #7a1010; box-shadow: none; } }
.walker { position: absolute; bottom: 10px; left: -20px; font-size: 54px; transition: left 1.4s linear; }
.gate h3 { margin: 4px 0; font-size: 22px; }
.gate.alarm h3 { color: var(--red); }
.gate.ok h3 { color: #2f7a1c; }
.gate ul { text-align: left; margin: 8px auto; max-width: 420px; }
.gate button { background: var(--btn); color: #fff; padding: 10px 18px; font-weight: 700; margin-top: 8px; }

/* jak to funguje */
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.scen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.scen button { background: var(--soft); border: 1px solid var(--line); padding: 8px 12px; font-size: 13px; color: var(--ink); }
.log { font-size: 13px; color: var(--muted); max-height: 160px; overflow: auto; margin: 0; padding-left: 18px; }

/* správa knihovny */
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; padding: 16px 0 26px; }
@media (max-width: 980px) { .admin-grid { grid-template-columns: 1fr; } }
.tbl-wrap { overflow: auto; max-height: 520px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { position: sticky; top: 0; background: #f3f7fd; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
tr.loaned td { background: #eaf3ff; }
tr.nl td { background: #fbf3e8; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 99px; font-weight: 700; white-space: nowrap; }
.pill.in { background: #dff5d6; color: #2f7a1c; } .pill.out { background: #dbe9ff; color: #1b4f9c; } .pill.nl { background: #fdebd3; color: #8a4b08; }
.search { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.form input, .form textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.btn { background: var(--btn); color: #fff; padding: 10px 16px; font-weight: 700; }
.btn.light { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.notice { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.notice.ok { background: #dff5d6; color: #245f15; } .notice.warn { background: #fff1d6; color: #7a4a05; } .notice.err { background: #fde2e2; color: #8e1a1a; }

/* poptávka */
.cta { background: linear-gradient(120deg, #13315f, #1e73d8); color: #fff; border-radius: 20px; padding: 26px; margin: 10px 0 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } }
.cta h2 { margin: 0 0 8px; font-size: 24px; }
.cta p, .cta li { color: #dbe7fb; }
.cta .form label { color: #dbe7fb; }
.cta .form input, .cta .form textarea { border: 0; }
.cta .btn { background: #fff; color: var(--blue); }
.hp { position: absolute; left: -9999px; }
footer { color: var(--muted); font-size: 13px; padding: 0 0 30px; }

/* obálky knih */
.cover { --c1:#355070; --c2:#6d8fb5; position: relative; width: 118px; height: 164px; border-radius: 3px 8px 8px 3px; overflow: hidden;
  background: linear-gradient(160deg, var(--c2), var(--c1)); color: #fff; display: flex; flex-direction: column; padding: 12px 10px 10px 16px;
  box-shadow: inset 7px 0 0 rgba(0,0,0,.22), inset 9px 0 0 rgba(255,255,255,.18), 3px 4px 0 -1px #f4efe3, 3px 4px 0 0 #d9d2c0, 0 8px 18px rgba(20,30,60,.22); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.08) 12%, transparent 30%); pointer-events: none; }
.cover .ct { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 13px; line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.25); position: relative; z-index: 1; }
.cover .ca { margin-top: auto; font-size: 10px; letter-spacing: .4px; text-transform: uppercase; opacity: .85; position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover .motif { position: absolute; width: 58px; height: 58px; left: 36px; top: 58px; opacity: .32; }
.cover.l-mid .motif { top: 10px; }
.cover.l-band .ct { background: rgba(255,255,255,.9); color: #1d2b44; text-shadow: none; margin: 18px -10px 0 -16px; padding: 6px 10px 6px 16px; }
.cover.l-band .motif { top: 84px; }
.cover.dark { color: #2b2b2b; }
.cover.dark .ct { text-shadow: none; }
.cover.dark .motif { opacity: .4; }
.cover.mini { width: 58px; height: 82px; padding: 6px 5px 5px 9px; flex: none; box-shadow: inset 4px 0 0 rgba(0,0,0,.22), 2px 3px 0 -1px #f4efe3, 0 4px 10px rgba(20,30,60,.2); }
.cover.mini .ct { font-size: 7.5px; -webkit-line-clamp: 3; margin-top: 0 !important; }
.cover.mini .ca { display: none; }
.cover.mini .motif { width: 30px; height: 30px; left: 18px; top: 38px; }
.cover.mini.l-band .ct { margin: 8px -5px 0 -9px; padding: 2px 5px 2px 9px; }
.cover.tiny { width: 30px; height: 42px; padding: 0; box-shadow: inset 3px 0 0 rgba(0,0,0,.22), 0 2px 5px rgba(20,30,60,.2); }
.cover.tiny .ct, .cover.tiny .ca { display: none; }
.cover.tiny .motif { width: 20px; height: 20px; left: 7px; top: 11px; }
.tagstate { display: flex; gap: 12px; align-items: flex-start; }
.ts-icon { width: 58px; height: 82px; border-radius: 6px; display: grid; place-items: center; font-size: 28px; font-weight: 800; background: #eef1f6; color: #5a6f8f; flex: none; }
.ts-line { margin: 6px 0 2px; font-weight: 700; font-size: 14px; padding: 4px 8px; border-radius: 8px; display: inline-block; }
.ts-line.on { background: #fde2e2; color: #b42318; }
.ts-line.off { background: #dff5d6; color: #2f7a1c; }
.quick span { width: 100%; text-align: center; font-size: 12px; color: var(--muted); }
.login-note { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.4; }
@media (max-width: 600px) { .bk, .cover:not(.mini):not(.tiny) { width: 100px; } .cover:not(.mini):not(.tiny) { height: 140px; } .cover .motif { left: 28px; top: 50px; width: 50px; height: 50px; } }
.cover.l-mid .ca { order: 1; margin-top: 0; }
.cover.l-mid .ct { order: 2; margin-top: auto; }
/* lišta zpět do SchoolSuite (stejně jako u ostatních ukázek) */
.ss-backbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; background: #0b1a33; color: #c9d6ea; font-size: 14px; }
.ss-backbar a { color: #fff; font-weight: 700; text-decoration: none; padding: 4px 10px; border-radius: 8px; }
.ss-backbar a:hover, .ss-backbar a:focus-visible { background: rgba(255,255,255,.12); }
@media (max-width: 600px) { .ss-backbar span { display: none; } }
/* výhody navíc (bez rámu, import) */
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; padding: 0; }
.badges li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 6px 12px; font-size: 14px; color: var(--ink); box-shadow: 0 3px 10px rgba(30,64,120,.05); }
.badges b { color: var(--blue); }
.perks { margin: 26px 0 18px; }
.perks h2 { margin: 0 0 12px; font-size: 24px; }
.perks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .perks-grid { grid-template-columns: 1fr; } }
.perks article { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 10px 30px rgba(30,64,120,.06); }
.perks h3 { margin: 6px 0 6px; font-size: 18px; }
.perks p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.perks p b { color: var(--ink); }
.perk-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #e8f1fe; font-size: 20px; color: var(--blue); }
