/* Sklep MAOS: okno zakupu, strony po płatności, panel admina. Korzysta z tokenów z styles.css. */

/* ---------- okno zakupu ---------- */
.buy { border: 0; padding: 0; border-radius: 28px; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--white); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(12, 55, 226, .55); }
.buy::backdrop { background: rgba(10, 10, 10, .45); backdrop-filter: blur(4px); }
.buy[open] { animation: buy-in .45s var(--ease); }
@keyframes buy-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.buy__head { background: var(--blue-deep); color: var(--white); padding: 26px 64px 22px 28px; position: relative; }
.buy__head h2 { font: 400 clamp(34px, 6vw, 46px)/1.02 var(--font-display); text-transform: uppercase; }
.buy__head p { color: #c9d2ff; margin-top: 6px; }
.buy__close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: var(--white); font-size: 22px; cursor: pointer; }
.buy__close:hover { background: rgba(255,255,255,.26); }
.buy form { padding: 22px 28px 28px; display: grid; gap: 16px; }
.buy__periods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; padding: 0; margin: 0; }
.buy__periods legend { font-weight: 600; margin-bottom: 8px; }
.buy__period { position: relative; }
.buy__period input { position: absolute; opacity: 0; }
.buy__period span { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 2px solid #e6e6e6; cursor: pointer; transition: border-color .2s, background-color .2s; }
.buy__period b { font: 400 26px/1.05 var(--font-display); }
.buy__period small { color: var(--muted); }
.buy__period input:checked + span { border-color: var(--blue); background: #eef1ff; }
.buy__period input:focus-visible + span { outline: 3px solid var(--magenta); outline-offset: 2px; }
.buy__period input:disabled + span { opacity: .45; cursor: not-allowed; }
.buy label.f { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.buy input[type=email], .buy input[type=text] { height: 50px; border: 2px solid #e6e6e6; border-radius: 14px; padding: 0 14px; font: 400 16px var(--font-body); color: var(--ink); background: #fafafa; }
.buy input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.buy input[aria-invalid=true] { border-color: var(--bad); }
.buy .hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.buy .hint.ok { color: #00651e; }
.buy .hint.err { color: var(--bad); }
.buy__seats { display: grid; gap: 8px; }
.buy__add { justify-self: start; border: 0; background: none; color: var(--blue); font: 600 14px var(--font-body); cursor: pointer; padding: 4px 0; }
.buy .check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.4; }
.buy .check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.buy__error { background: #ffe1e1; color: var(--bad); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.buy__submit { justify-content: center; height: 54px; font-size: 17px; }
.buy__submit[disabled] { opacity: .6; cursor: progress; }
.buy__secure { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.plan__price small { display: block; font: 500 16px/1.3 var(--font-body); text-transform: none; margin-top: 6px; opacity: .8; }

/* ---------- strony sklepu ---------- */
.shop-page { background: var(--pink); min-height: 100vh; }
.shop-main { padding: 48px 16px 80px; }
.shop-card { max-width: 680px; margin: 0 auto; background: var(--white); border-radius: 28px; padding: clamp(24px, 5vw, 48px); box-shadow: 0 30px 60px -36px rgba(65, 7, 52, .45); }
.shop-h1 { font-size: clamp(44px, 7vw, 72px); line-height: 1.02; margin: 14px 0 18px; }
.shop-h2 { font: 600 20px/1.3 var(--font-body); margin: 28px 0 6px; }
.shop-tag { display: inline-block; background: var(--pink-chip); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.shop-tag--lime { background: var(--lime); color: var(--card-lime-ink); }
.shop-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.shop-steps { padding-left: 20px; display: grid; gap: 8px; }
.shop-actions { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.shop-muted { color: var(--muted); font-size: 15px; }
.shop-pill { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: #eee; margin-left: 6px; }
.shop-pill--active { background: #dbfbe0; color: #00651e; }
.shop-pill--invited, .shop-pill--queued { background: #fff2c7; color: #7a5300; }
.shop-pill--invalid { background: #ffe1e1; color: var(--bad); }
.shop-seat { display: grid; gap: 10px; padding: 14px; border: 1.5px solid #eee; border-radius: 16px; }
.shop-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-inline input { flex: 1; min-width: 160px; height: 44px; border: 2px solid #e6e6e6; border-radius: 12px; padding: 0 12px; font: 400 15px var(--font-body); }
.shop-inline .btn { height: 44px; }
.shop-msg { padding: 10px 14px; border-radius: 12px; }
.shop-msg--ok { background: #dbfbe0; color: #00651e; }
.shop-msg--err { background: #ffe1e1; color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- panel admina ---------- */
.admin { background: #f4f2f7; display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.an { background: var(--ink); color: var(--white); padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.an .logo { color: var(--white); margin-bottom: 18px; font-size: 22px; }
.an .logo small { font: 500 12px var(--font-body); color: var(--lime); }
.an .logo__mark { width: 30px; height: 30px; }
.an a:not(.logo) { color: #d6d6d6; text-decoration: none; padding: 9px 12px; border-radius: 10px; }
.an a:not(.logo):hover { background: #1f1f1f; color: var(--white); }
.an form { margin-top: auto; }
.an button { width: 100%; background: none; border: 1px solid #333; color: #d6d6d6; padding: 9px; border-radius: 10px; cursor: pointer; font: 500 14px var(--font-body); }
.am { padding: 32px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.ah { font-size: clamp(36px, 4vw, 52px); margin-bottom: 22px; line-height: 1.05; }
.af { background: #dbfbe0; color: #00651e; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; word-break: break-all; }
.aerr { background: #ffe1e1; color: var(--bad); padding: 10px 14px; border-radius: 12px; }
.awarn { background: #fff2c7; color: #5a3d00; padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; }
.aok { background: #dbfbe0; color: #00651e; padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; }
.atiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.at { background: var(--white); border-radius: 18px; padding: 16px 18px; display: grid; gap: 6px; }
.at span { font-size: 13px; color: var(--muted); }
.at b { font: 400 34px/1 var(--font-display); }
.at--blue { background: var(--blue-deep); color: var(--white); }
.at--blue span { color: #c9d2ff; }
.at--lime { background: var(--lime); }
.at--warn { background: #fff2c7; }
.at--bad { background: #ffe1e1; }
.agrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.acard { background: var(--white); border-radius: 20px; padding: 20px; min-width: 0; margin-bottom: 16px; }
.acard h2 { font: 600 18px/1.3 var(--font-body); margin-bottom: 12px; }
.atable { overflow-x: auto; }
.atable table { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid #eee; white-space: nowrap; }
.atable td { padding: 10px; border-bottom: 1px solid #f1f1f1; vertical-align: top; }
.atable td small { display: block; color: #8a8a8a; font-size: 12px; }
.atable a { color: var(--blue); font-weight: 600; text-decoration: none; }
.awrap { max-width: 380px; word-break: break-word; }
.ab { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.ab--ok { background: #dbfbe0; color: #00651e; }
.ab--warn { background: #fff2c7; color: #7a5300; }
.ab--bad { background: #ffe1e1; color: var(--bad); }
.ab--muted { background: #eee; color: #555; }
.adl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; margin: 0 0 14px; }
.adl dt { color: var(--muted); }
.adl dd { margin: 0; word-break: break-word; }
.aform { display: grid; gap: 12px; }
.aform.awide { max-width: 620px; background: var(--white); padding: 24px; border-radius: 20px; }
.aform label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.aform input, .aform select, .aform textarea, .afilter input, .afilter select, .ai input { border: 1.5px solid #ddd; border-radius: 10px; padding: 9px 12px; font: 400 15px var(--font-body); background: var(--white); }
.aform input:focus, .aform textarea:focus, .afilter input:focus { outline: none; border-color: var(--blue); }
.alogin { max-width: 380px; background: var(--white); padding: 28px; border-radius: 22px; }
.admin:has(.alogin) { display: block; }
.admin:has(.alogin) .am { max-width: 440px; margin: 10vh auto 0; }
.afilter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.afilter input { min-width: 260px; flex: 1; }
.ai { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 8px 4px 0; }
.ai .btn { height: 38px; font-size: 14px; padding: 0 14px; }
.ac { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 500 !important; font-size: 13px !important; color: var(--muted); }
.btn--bad { background: var(--bad); color: var(--white); }
.btn--ghost { background: var(--white); color: var(--ink); border: 1.5px solid #ddd; }
.aactions { display: grid; gap: 6px; }
.amuted { color: var(--muted); font-size: 14px; margin: 8px 0; }
.atabs { display: flex; gap: 6px; margin-bottom: 14px; }
.atabs a { padding: 7px 14px; border-radius: 999px; background: var(--white); text-decoration: none; font-size: 14px; }
.atabs a.on { background: var(--ink); color: var(--white); }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .an { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .an .logo { width: 100%; margin-bottom: 6px; }
  .an form { margin: 0; }
}

/* ---------- logowanie do panelu ---------- */
.login-page { background: var(--pink); min-height: 100vh; margin: 0; }
.login { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 32px 16px; }
.login__logo { font-size: 26px; }
.login__card { width: min(420px, calc(100vw - 32px)); background: var(--white); border-radius: 28px; padding: 32px 28px 26px; display: grid; gap: 14px; box-shadow: 0 30px 60px -34px rgba(65, 7, 52, .45); }
.login__kicker { justify-self: start; background: var(--lime); color: var(--card-lime-ink); padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.login__title { font-size: 52px; line-height: 1.05; margin: 2px 0 6px; }
.login__f { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.login__f input { height: 50px; border: 2px solid #e6e6e6; border-radius: 14px; padding: 0 14px; font: 400 16px var(--font-body); color: var(--ink); background: #fafafa; transition: border-color .2s, background-color .2s; }
.login__f input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.login__code { letter-spacing: .4em; font-weight: 600 !important; }
.login__btn { justify-content: center; height: 52px; margin-top: 6px; font-size: 17px; }
.login__err { background: #ffe1e1; color: var(--bad); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.login__note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); }
.login__back { font-size: 15px; }
