/* Bar Javorinka — spoločný vzhľad (podľa náhľadov) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --vino: #6e1414; --vino-svetla: #8f1d1d; --zlata: #d4a23a; --zlata-svetla: #f0c969;
  --drevo-tmava: #1c1310; --drevo: #2a1c15; --krem: #f4ead5; --list: #c0241f;
  --oranzova: #ff9d57;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; }
body {
  font-family: 'Crimson Pro', Georgia, serif; color: var(--krem);
  background:
    radial-gradient(ellipse at top, rgba(212,162,58,0.10), transparent 55%),
    repeating-linear-gradient(92deg, #241710 0 38px, #2c1d14 38px 76px),
    linear-gradient(180deg, #1a1109, #0d0805);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
}
.skryte { display: none !important; }
button { font-family: 'Cinzel', serif; cursor: pointer; }

/* tlačidlá */
.btn-zlate { background: linear-gradient(180deg, var(--zlata-svetla), var(--zlata)); color: #3a1308;
  font-weight: 700; letter-spacing: .5px; border: none; border-radius: 10px; padding: 12px 16px;
  box-shadow: 0 6px 18px rgba(212,162,58,.3); }
.btn-zlate:active { transform: translateY(1px); }
.btn-vino { background: linear-gradient(180deg, var(--vino-svetla), var(--vino)); color: var(--krem);
  border: 1px solid var(--zlata); border-radius: 10px; padding: 12px 16px; }
.btn-ghost { background: rgba(13,8,5,.4); color: var(--krem); border: 1px solid rgba(212,162,58,.3);
  border-radius: 10px; padding: 10px 14px; }
.btn-mini { padding: 7px 11px; font-size: 12px; border-radius: 8px; }

/* polia */
label.pole { display: block; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--zlata); margin: 12px 0 5px; }
input, select { width: 100%; background: rgba(13,8,5,.6); border: 1px solid rgba(212,162,58,.3);
  border-radius: 9px; padding: 11px 13px; color: var(--krem); font-family: 'Crimson Pro', serif; font-size: 16px; }
input:focus, select:focus { outline: none; border-color: var(--zlata); box-shadow: 0 0 0 3px rgba(212,162,58,.16); }
select option { color: #111; }

/* ===== LOGIN ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.jav-card { width: 100%; max-width: 380px; background: linear-gradient(165deg, #321f16, #241510);
  border: 1px solid rgba(212,162,58,.35); border-radius: 18px; padding: 36px 30px 30px; text-align: center;
  box-shadow: 0 30px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(240,201,105,.15); }
/* Reálne logo na prihlasovacej obrazovke — celý obrázok, neorezaný, škáluje sa */
.jav-logo-wrap { position: relative; margin: 0 0 16px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(212,162,58,.3); box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.jav-logo { width: 100%; height: auto; display: block; }
.jav-logo-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(28,17,11,.78), transparent 42%); }

.jav-crest { width: 80px; height: 80px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--vino-svetla), var(--vino) 70%); border: 2px solid var(--zlata);
  box-shadow: 0 0 26px rgba(212,162,58,.4); font-size: 36px; }
.jav-bar { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 5px; font-size: 13px; color: var(--zlata-svetla); }
.jav-title { font-family: 'Cinzel', serif; font-weight: 900; font-size: 32px; color: var(--krem); margin: 2px 0 4px; }
.jav-sub { font-style: italic; color: rgba(244,234,213,.6); margin-bottom: 22px; }
.jav-roles { display: flex; gap: 10px; margin-bottom: 14px; }
.jav-role { flex: 1; padding: 11px 6px; border-radius: 10px; border: 1px solid rgba(212,162,58,.3);
  background: rgba(13,8,5,.4); font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 1px;
  color: rgba(244,234,213,.7); }
.jav-role.active { background: linear-gradient(180deg, var(--vino-svetla), var(--vino)); color: var(--krem); border-color: var(--zlata); }
.jav-role small { display: block; font-family: 'Crimson Pro', serif; font-size: 11px; letter-spacing: 0; opacity: .7; margin-top: 3px; }
.jav-foot { margin-top: 16px; font-size: 12px; color: rgba(244,234,213,.4); font-style: italic; }
.jav-err { color: var(--oranzova); min-height: 20px; margin-top: 10px; font-size: 14px; }
.text-left { text-align: left; }

/* ===== APP shell ===== */
.app { max-width: 920px; margin: 0 auto; padding: 14px 14px 90px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tb-left { display: flex; align-items: center; gap: 10px; }
.tb-crest { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, var(--vino-svetla), var(--vino)); border: 2px solid var(--zlata); font-size: 18px; }
.tb-title { font-family: 'Cinzel', serif; font-weight: 700; font-size: 19px; }
.tb-title small { display: block; font-family: 'Crimson Pro', serif; font-size: 12px; color: var(--zlata); }
.tb-actions { display: flex; gap: 8px; align-items: center; }
.nav { display: flex; gap: 8px; margin-bottom: 14px; }
.nav button { flex: 1; }
.nav .active { outline: 2px solid var(--zlata); }

.search input { font-size: 16px; }
.sk-hodnota { font-family: 'Cinzel', serif; font-size: 13px; color: var(--zlata); text-align: right; margin: -2px 0 12px; }
.sk-hodnota b { color: var(--zlata-svetla); }
.hint { color: rgba(244,234,213,.55); font-style: italic; }
.section-title { font-family: 'Cinzel', serif; color: var(--zlata); letter-spacing: 1px; font-size: 13px; margin: 6px 0 10px; }

/* ===== SKLAD grid ===== */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { background: linear-gradient(165deg, rgba(50,31,22,.95), rgba(36,21,16,.95));
  border: 1px solid rgba(212,162,58,.28); border-radius: 12px; padding: 13px; }
.card-row { display: flex; gap: 11px; align-items: center; }
.thumb { width: 46px; height: 46px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(212,162,58,.3), rgba(110,20,20,.4));
  border: 1px solid rgba(212,162,58,.4); font-size: 22px; }
.c-name { font-weight: 600; font-size: 15px; }
.c-meta { font-size: 12px; color: rgba(244,234,213,.6); }
.c-stock { font-family: 'Cinzel', serif; font-size: 14px; color: var(--zlata-svetla); margin-top: 3px; }
.c-low { color: var(--oranzova) !important; }
.c-low .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff7a3c;
  margin-right: 5px; box-shadow: 0 0 8px #ff7a3c; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions button { flex: 1; }

/* ===== PREDAJ mapa ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; align-items: start; }
.tile { aspect-ratio: 1 / 1; border-radius: 14px; border: 1px solid rgba(212,162,58,.3);
  background: linear-gradient(165deg, rgba(50,31,22,.9), rgba(30,18,12,.95)); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; position: relative; overflow: hidden; text-align: center; padding: 8px; }
.tile.obsadeny { border-color: var(--zlata); box-shadow: 0 0 0 2px rgba(212,162,58,.25) inset; }
.tile.rychly { background: linear-gradient(165deg, var(--vino-svetla), var(--vino)); border-color: var(--zlata); }
.tile-name { font-family: 'Cinzel', serif; font-size: 15px; }
.tile-suma { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--zlata); font-family: 'Cinzel', serif; font-size: 13px; color: var(--zlata-svetla); }
.tile-suma.prazdny { color: rgba(244,234,213,.35); border-color: rgba(212,162,58,.3); }
.tile-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid rgba(212,162,58,.35); background: rgba(13,8,5,.55); color: var(--krem);
  font-size: 13px; line-height: 1; display: grid; place-items: center; padding: 0; opacity: .75; }
.tile-del:active { background: var(--vino); }

/* ===== ÚČET / KOŠÍK ===== */
.cart { background: linear-gradient(165deg, rgba(50,31,22,.96), rgba(30,18,12,.96));
  border: 1px solid rgba(212,162,58,.32); border-radius: 13px; padding: 14px; }
.cart-h { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 1px; color: var(--zlata); margin-bottom: 8px; }
.line { display: flex; align-items: center; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px dashed rgba(212,162,58,.2); }
.line:last-of-type { border-bottom: none; }
/* Riadok účtu: pevné stĺpce → ovládač −/počet/+ je vo všetkých riadkoch v rovnakej osi */
.line-ucet { display: grid; grid-template-columns: 1fr auto 72px; column-gap: 10px; }
.line-ucet .qty { justify-self: center; }
.line-ucet .l-price { justify-self: end; }
.l-name { font-size: 15px; }
.l-name small { display: block; font-size: 12px; color: rgba(244,234,213,.55); }
.qty { display: flex; align-items: center; gap: 8px; }
.qbtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(212,162,58,.4);
  background: rgba(13,8,5,.5); color: var(--zlata-svetla); font-size: 18px; display: grid; place-items: center; }
.q { width: 34px; text-align: center; font-family: 'Cinzel', serif; }
.l-price { font-family: 'Cinzel', serif; font-size: 15px; min-width: 64px; text-align: right; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid rgba(212,162,58,.35); }
.total-l { font-family: 'Cinzel', serif; letter-spacing: 1px; }
.total-v { font-family: 'Cinzel', serif; font-weight: 900; font-size: 26px; color: var(--zlata-svetla); }

/* chips (rýchly výber produktu) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chip { background: rgba(50,31,22,.9); border: 1px solid rgba(212,162,58,.3); border-radius: 20px;
  padding: 9px 14px; font-size: 14px; font-family: 'Crimson Pro', serif; color: var(--krem); }
.chip:active { background: rgba(110,20,20,.4); }

/* ===== MODAL ===== */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center;
  justify-content: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; background: linear-gradient(165deg, #321f16, #241510);
  border: 1px solid rgba(212,162,58,.4); border-radius: 16px; padding: 20px; }
.modal h3 { font-family: 'Cinzel', serif; margin: 0 0 6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions button { flex: 1; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80;
  background: #241510; border: 1px solid var(--zlata); color: var(--krem); padding: 12px 18px;
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 15px; max-width: 90%; }
.toast.err { border-color: var(--oranzova); color: var(--oranzova); }

.prazdno { text-align: center; color: rgba(244,234,213,.5); font-style: italic; padding: 30px 10px; }
.prazdno small { display: block; margin-top: 6px; font-size: 13px; opacity: .85; }
.prazdno-full { grid-column: 1 / -1; }

/* Sklad — riadok: hľadanie + „+ Produkt" */
.sklad-top { display: flex; gap: 10px; align-items: stretch; margin-bottom: 14px; flex-wrap: wrap; }
.sklad-top .search { flex: 1 1 220px; margin: 0; }
.sklad-top .search input { height: 100%; }
.sklad-top > button { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 480px) { .sklad-top > button { flex: 1 1 100%; } }
.davky-list { margin-top: 6px; }
.davka-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0;
  border-bottom: 1px dashed rgba(212,162,58,.2); }

/* daňová tabuľka */
table.tax { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.tax th, table.tax td { padding: 8px 10px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid rgba(212,162,58,.18); }
table.tax th { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: .5px; color: var(--zlata);
  text-transform: uppercase; position: sticky; top: 0; background: #241510; }
table.tax th:first-child, table.tax td:first-child { text-align: left; }
table.tax tbody tr:last-child td { border-bottom: none; }
