/* Klub Instytutu Urody – kolory i kroje zgodne ze stroną annamadejska.pl (bez zewnętrznych fontów). */
:root {
  --bg: #F6F1EA;
  --card: #fffdfa;
  --ink: #3B2F2A;
  --muted: #7a6a60;
  --gold: #C9A66B;
  --gold-dark: #A9834B;
  --btn: #8C6D51;       /* kolor z prawego dolnego rogu karty */
  --btn-hover: #73583F;
  --rose: #F1DCD4;
  --line: #e7dccd;
  --ok: #3f7d4e;
  --warn: #9a4b2f;
  --radius: 14px;
  --heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: Montserrat, 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 16px 32px; flex: 1; }
body.nav-admin main { max-width: 1100px; }
h1, h2, h3 { font-family: var(--heading); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--gold-dark); }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }

.top { background: var(--ink); color: #fff; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { border-radius: 50%; object-fit: cover; }
.brand span { font-family: var(--heading); font-size: 1.05rem; line-height: 1.1; }
.brand small { display: block; font-family: var(--body); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.role-tag { font-size: .75rem; border: 1px solid var(--gold); color: var(--gold); padding: 2px 8px; border-radius: 99px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 0 8px; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; padding: 12px 12px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--gold); }
/* Aplikacja klientki: nawigacja na dole ekranu na telefonie */
@media (max-width: 640px) {
  .tabs-customer { position: fixed; bottom: 0; left: 0; right: 0; justify-content: space-around; border-top: 1px solid var(--line); border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
  .tabs-customer a { border-bottom: 0; border-top: 3px solid transparent; padding: 10px 6px; font-size: .85rem; }
  .tabs-customer a.on { border-top-color: var(--gold); }
  body.nav-customer main { padding-bottom: 88px; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(59, 47, 42, .04); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack > label:not(.check) { font-weight: 500; margin-bottom: -4px; }
.narrow { max-width: 420px; margin: 24px auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1 1 200px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.cols label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.inline { display: inline; }

input, select, textarea { font: inherit; color: inherit; padding: 11px 12px; border: 1px solid #d8cab8; border-radius: 10px; background: #fff; width: 100%; min-height: 44px; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(201, 166, 107, .5); outline-offset: 1px; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--gold-dark); flex: 0 0 auto; margin-top: 2px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
label.required { font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0 6px; font-weight: 500; }

.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .2em; padding: 12px 24px; min-height: 46px; border-radius: 99px; border: 1px solid var(--btn); background: transparent; color: var(--btn); text-decoration: none; cursor: pointer; transition: background-color .3s ease, color .3s ease; }
.btn:hover { background: rgba(140, 109, 81, .1); }
/* Główny przycisk – jak „btn-gold” na annamadejska.pl, z przelotnym błyskiem */
.btn.primary { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn.primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.primary::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-130%) skewX(-18deg); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .btn.primary:hover::after, .btn.primary:focus-visible::after { transform: translateX(330%) skewX(-18deg); transition: transform .95s ease; }
}
.btn.big { min-height: 54px; font-size: .85rem; width: 100%; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .7rem; letter-spacing: .15em; }
.btn.danger, .link.danger { color: var(--warn); border-color: var(--warn); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--gold-dark); text-decoration: underline; cursor: pointer; }

.flash { padding: 12px 14px; border-radius: 10px; background: #e8f1e6; color: #24502f; border: 1px solid #c8dcc4; }
.flash.warn { background: #f9e9e1; color: var(--warn); border-color: #ecc9b9; }
.dev { background: #fff6d6; border: 1px dashed #c9a640; padding: 10px; border-radius: 8px; }

.hero { text-align: center; padding: 8px 0 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .25em; font-size: .72rem; color: var(--gold-dark); margin: 0 0 .4em; }

/* Karta Klubu – elegancka oprawa: różowe koło i cienki złoty okrąg za kartą */
.card-stage { position: relative; display: flex; justify-content: center; padding: 26px 0 22px; margin-bottom: 8px; isolation: isolate; }
.card-stage::before { content: ''; position: absolute; z-index: -1; width: min(86vw, 340px); aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #F1DCD4 0%, rgba(241, 220, 212, .55) 55%, rgba(241, 220, 212, 0) 72%); }
.mcard-link { display: block; width: min(100%, 340px); text-decoration: none; border-radius: 18px; }
.mcard-link .mcard { width: 100%; }
.mcard { position: relative; overflow: hidden; width: min(100%, 340px); aspect-ratio: 1.586; border-radius: 18px; padding: 18px 20px; color: #fff8ee; text-align: left;
  background: linear-gradient(135deg, #C9AA82 0%, #AD8D68 50%, #8C6D51 100%);
  box-shadow: 0 18px 36px -18px rgba(90, 65, 40, .55), 0 2px 6px rgba(90, 65, 40, .15), inset 0 0 0 1px rgba(255, 240, 210, .45); }
.mcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .16) 50%, rgba(255, 255, 255, 0) 60%); pointer-events: none; }
.mcard-face { position: absolute; right: 6%; top: 6%; height: 88%; width: auto; opacity: .55; pointer-events: none; }
.mcard-top { position: relative; display: flex; flex-direction: column; gap: 2px; }
.mcard-brand { font-family: var(--heading); font-size: 1.35rem; letter-spacing: .32em; text-transform: uppercase; color: #fbefd8; line-height: 1; }
.mcard-sub { font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: #f1e2c8; max-width: 60%; line-height: 1.5; }
.mcard-pts { position: absolute; right: 20px; bottom: 16px; text-align: right; line-height: 1; z-index: 1; }
.mcard-pts strong { display: block; font-family: var(--heading); font-size: 1.5rem; color: #fff; font-weight: 600; }
.mcard-pts span { font-size: .6rem; letter-spacing: .25em; text-transform: uppercase; color: #fbefd8; }
.mcard-bottom { position: absolute; left: 20px; right: 110px; bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.mcard-name { font-family: var(--heading); font-size: clamp(1.1rem, 5vw, 1.45rem); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-no { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; letter-spacing: .22em; color: #f1e2c8; }
.lead { font-size: 1.1rem; }
.invite { background: var(--rose); padding: 10px 14px; border-radius: 10px; }
.steps ol, .steps ul { padding-left: 1.2em; } .steps li { margin-bottom: 6px; }

.balance { text-align: center; }
.hello { font-family: var(--heading); font-size: 1.2rem; margin-bottom: 0; }
.points { margin: 4px 0 8px; color: var(--muted); }
.points span { font-family: var(--heading); font-size: 2.6rem; color: var(--ink); font-weight: 600; }
progress { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 99px; background: #eadfd0; overflow: hidden; }
progress::-webkit-progress-bar { background: #eadfd0; border-radius: 99px; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--gold); border-radius: 99px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: 84px; }
.tile strong { font-family: var(--heading); font-size: 1.05rem; } .tile span { color: var(--muted); font-size: .85rem; }

.member-card .qr { max-width: 280px; margin: 8px auto; background: #fff; padding: 8px; border-radius: 12px; }
.qr svg { width: 100%; height: auto; display: block; }
.club-no { font-family: ui-monospace, Consolas, monospace; font-size: 1.8rem; letter-spacing: .12em; margin: 4px 0; }
.voucher { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.small-qr { width: 120px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 1.2rem; letter-spacing: .1em; margin: 4px 0; }
.reward { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.reward.locked { opacity: .7; }
.cost { font-weight: 700; color: var(--gold-dark); margin: 0; }

.ledger { list-style: none; padding: 0; margin: 0; }
.ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger li div { display: flex; flex-direction: column; }
.ledger span, .ledger time { font-size: .85rem; color: var(--muted); }
.plus { color: var(--ok); font-weight: 700; white-space: nowrap; } .minus { color: var(--warn); font-weight: 700; white-space: nowrap; }
.list { padding-left: 1.1em; margin: 0; } .list li { margin: 6px 0; }

.customer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.customer-head .points { margin: 0; }
.success { background: #eef6ec; border-color: #c8dcc4; }
.voucher-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.voucher-row.hl { background: #fff4d9; margin: 0 -8px; padding: 10px 8px; border-radius: 8px; }
.services { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; background: #fff; }
.services details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.services summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.svc { padding: 6px 0; }
.scanner video { width: 100%; max-height: 50vh; background: #000; border-radius: 10px; object-fit: cover; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; }
.stat span { color: var(--muted); font-size: .85rem; } .stat strong { font-family: var(--heading); font-size: 1.7rem; } .stat small { color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3ebe0; font-weight: 600; }
.trow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.trow input:not([type=checkbox]) { flex: 1 1 220px; width: auto; }
.trow select { width: auto; flex: 0 1 220px; }
.trow .short { flex: 0 0 90px; }
.off { opacity: .55; }
.edit-row .cols { margin-bottom: 4px; }

.legal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.legal h2 { margin-top: 1.2em; } .legal li { margin-bottom: 6px; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 16px; }
body.nav-customer .foot { padding-bottom: 96px; }
.test-banner { margin: 0; background: #fff1c2; color: #6b4e00; text-align: center; font-size: .85rem; padding: 6px 12px; border-bottom: 1px solid #e8d48a; }
/* Cień twarzy z logo w tle – delikatnie, tylko dekoracja */
body::before { content: ''; position: fixed; z-index: -1; pointer-events: none; right: -6vw; bottom: 4vh; width: min(62vw, 440px); aspect-ratio: 400 / 540; background: url(/face-shadow.png) no-repeat center / contain; opacity: .1; }
body.nav-admin::before, body.nav-staff::before { opacity: .06; }
.card, .tile, .stat, .legal, .table-wrap { background-color: rgba(255, 253, 250, .92); }
.visit { padding: 12px 0; border-bottom: 1px solid var(--line); }
.visit:last-child { border-bottom: 0; }
.visit p { margin-bottom: 4px; }
.visit.hl { background: #fff4d9; margin: 0 -8px; padding: 12px 8px; border-radius: 8px; }
.visit details summary { cursor: pointer; color: var(--btn); font-size: .9rem; padding: 4px 0; }
.visit-note { white-space: pre-wrap; background: #f8f2e8; border-left: 3px solid var(--gold); padding: 8px 10px; border-radius: 0; margin: 4px 0; }
td .visit-note { display: inline-block; }
textarea { font: inherit; color: inherit; padding: 11px 12px; border: 1px solid #d8cab8; border-radius: 10px; background: #fff; width: 100%; resize: vertical; }
[hidden] { display: none !important; }
