/* Atlantis cinemas lojalumo programa – stilius pagal atlantiscinemas.lt */
:root {
  --blue: #3a6ec3;
  --blue-dark: #2f5ba3;
  --blue-soft: #d7e6f4;
  --blue-sel: #b0ceea;
  --bg: #e5e5e5;
  --card: #ffffff;
  --chip: #f5f5f5;
  --line: #e1e1e5;
  --text: #1f1f1f;
  --muted: #666666;
  --green: #3f9e70;
  --green-soft: #e3f4eb;
  --red: #ce3839;
  --red-soft: #fbe9e9;
  --yellow: #fdf3c3;
  --yellow-line: #eccf5c;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--blue); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: 19px; font-weight: 700; text-transform: uppercase; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* Antraštė */
.topbar { background: #fff; border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); }
.topbar-in { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.topbar-in.wide { max-width: 1100px; }
.logo { text-decoration: none; color: var(--text); display: flex; align-items: center; }
.logo-img { height: 44px; width: auto; display: block; }
.logo-text { font-size: 18px; letter-spacing: .02em; color: #5b3a9e; }
.logo-text b { color: var(--red); letter-spacing: .04em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.who { font-size: 15px; color: var(--muted); }

/* Turinys */
.page { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 16px 32px; }
.page.wide { max-width: 1100px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin: -20px -20px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.foot { text-align: center; font-size: 14px; color: var(--muted); padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.foot a { color: var(--muted); }

/* Mygtukai */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 17px;
  padding: 12px 20px; min-height: 48px;
  border-radius: var(--radius); border: 1.5px solid var(--blue);
  background: var(--blue); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn:disabled, .btn.disabled { background: var(--blue-soft); border-color: var(--blue-soft); color: #fff; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--blue); }
.btn-outline:hover { background: var(--blue-soft); color: var(--blue-dark); }
.btn-grey { background: var(--chip); border-color: #ddd; color: var(--text); font-weight: 400; }
.btn-grey:hover { background: #ebebeb; border-color: #ccc; }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-green:hover { background: #358a61; border-color: #358a61; }
.btn-red { background: #fff; border-color: var(--red); color: var(--red); }
.btn-red:hover { background: var(--red-soft); }
.btn-block { width: 100%; }
.btn-sm { font-size: 15px; padding: 6px 12px; min-height: 38px; }
.btn-lg { font-size: 19px; min-height: 56px; }
.arrow::after { content: "→"; font-weight: 400; font-size: 1.15em; line-height: 1; }

/* Formos */
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 11px 12px; min-height: 48px;
  border: 1px solid #cfcfd4; border-radius: var(--radius); background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-sel); border-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 12px; font-size: 16px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.hint { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* Pranešimai */
.alert { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 16px; border: 1px solid; }
.alert-ok { background: var(--green-soft); border-color: #b9e2cc; color: #1f6b45; }
.alert-error { background: var(--red-soft); border-color: #f0c2c2; color: #9b2324; }
.alert-info { background: var(--blue-soft); border-color: var(--blue-sel); color: #24487f; }
.alert-warn { background: var(--yellow); border-color: var(--yellow-line); color: #6b5300; }

/* Kliento kortelė */
.qr-card { text-align: center; }
.qr-box { background: #fff; display: inline-block; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.qr-box canvas, .qr-box img { display: block; width: 240px; height: 240px; image-rendering: pixelated; }
.qr-code-text { font-family: ui-monospace, Menlo, monospace; font-size: 15px; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }
.points-big { font-size: 56px; font-weight: 700; line-height: 1; }
.points-big span { font-size: 24px; color: var(--muted); font-weight: 600; }
.progress { display: grid; gap: 5px; margin: 16px 0 8px; }
.progress i { display: block; height: 14px; border-radius: 2px; background: var(--chip); border: 1px solid #e3e3e3; }
.progress i.on { background: var(--blue); border-color: var(--blue); }
.reward { background: var(--yellow); border: 1.5px solid var(--yellow-line); border-radius: var(--radius); padding: 14px 16px; font-weight: 600; text-align: center; margin-bottom: 16px; }
.reward big { display: block; font-size: 20px; text-transform: uppercase; }

/* Sąrašai */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.plus { color: var(--green); font-weight: 700; }
.minus { color: var(--red); font-weight: 700; }

/* Dienų/statistikos plytelės, kaip datų pasirinkime svetainėje */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.tile { background: var(--chip); border-radius: var(--radius); padding: 12px; text-align: center; border-bottom: 4px solid transparent; }
.tile .label { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tile .num { font-size: 32px; font-weight: 700; line-height: 1.15; }
.tile.on { background: var(--blue-sel); border-bottom-color: var(--blue); }
.page .card .tiles { margin-bottom: 0; }

/* Lentelės */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td a { font-weight: 600; text-decoration: none; }
.tag { display: inline-block; font-size: 13px; padding: 1px 8px; border-radius: 2px; background: var(--chip); border: 1px solid #ddd; }
.tag.blue { background: var(--blue-soft); border-color: var(--blue-sel); color: #24487f; }
.tag.grey { color: var(--muted); }

/* Darbuotojų meniu */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.subnav a { padding: 8px 14px; border-radius: var(--radius); background: #f5f5f5; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; }
.subnav a.on { background: var(--blue-sel); border-bottom-color: var(--blue); }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* ============== KASA ============== */
.kasa { max-width: 560px; margin: 0 auto; }
.scanner { position: relative; background: #111; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; max-height: 300px; width: 100%; margin-bottom: 10px; }
.scanner #reader { width: 100%; height: 100%; }
.scanner #reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner-off { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; color: #ddd; text-align: center; padding: 16px; }
.scan-step { display: flex; align-items: center; gap: 10px; font-weight: 700; text-transform: uppercase; font-size: 15px; letter-spacing: .03em; margin-bottom: 10px; }
.scan-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.manual { display: flex; gap: 8px; margin-bottom: 16px; }
.manual input { flex: 1; }
.cust { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cust-name { font-size: 22px; font-weight: 700; text-transform: uppercase; line-height: 1.15; }
.cust-points { text-align: right; }
.cust-points b { font-size: 40px; line-height: 1; display: block; }
.tickets li code { font-size: 15px; background: var(--chip); padding: 2px 6px; border-radius: 2px; }
.x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; padding: 0 6px; line-height: 1; }
.big-result { text-align: center; padding: 28px 20px; }
.big-result .sym { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.big-result h2 { font-size: 24px; }
.flash-ok { animation: flashok .6s; }
.flash-bad { animation: flashbad .6s; }
@keyframes flashok { from { box-shadow: 0 0 0 6px var(--green); } to { box-shadow: var(--shadow); } }
@keyframes flashbad { from { box-shadow: 0 0 0 6px var(--red); } to { box-shadow: var(--shadow); } }
.hidden { display: none !important; }

/* Html5-qrcode bibliotekos elementų tvarkymas */
#reader__dashboard, #reader__header_message { display: none !important; }
#reader { border: 0 !important; }
