/* =====================================================================
   PiknikKids — личный кабинет клиента (mobile-first) и печать сертификатов
   ===================================================================== */
body.cab { background: var(--bg); min-height: 100vh; position: relative; overflow-x: hidden; }
.cab-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cab-bg i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; }
.cab-bg i:nth-child(1) { width: 380px; height: 380px; background: rgba(var(--brand-rgb), .55); top: -120px; left: -120px; }
.cab-bg i:nth-child(2) { width: 320px; height: 320px; background: rgba(var(--grad2-rgb), .45); top: 30%; right: -140px; }
.cab-bg i:nth-child(3) { width: 300px; height: 300px; background: rgba(var(--accent-rgb), .4); bottom: -120px; left: 10%; }

.cab-top, .cab-main, .cab-nav { position: relative; z-index: 1; }
.cab-top { max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.cab-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 17px; }
.cab-brand:hover { color: var(--ink); }
.cab-brand .brand-logo { width: 38px; height: 38px; color: #fff; }
.cab-brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: -2px; }
.cab-me .avatar { width: 38px; height: 38px; border-radius: 12px; }
.cab-main { max-width: 520px; margin: 0 auto; padding: 8px 16px 28px; }
body.cab-in .cab-main { padding-bottom: 104px; }
.cab-h1 { font-size: 26px; margin: 10px 2px 14px; }
.cab-hello { font-size: 18px; font-weight: 800; margin: 8px 2px 14px; }

/* Нижняя навигация */
.cab-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; width: calc(100% - 24px); max-width: 496px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 40px rgba(var(--shade-rgb), .18); padding-bottom: calc(7px + env(safe-area-inset-bottom)); }
.cab-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border-radius: 15px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.cab-nav a .ic { width: 22px; height: 22px; }
.cab-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(var(--glow-rgb), .3); }

/* Лендинг */
.cab-hero { position: relative; overflow: hidden; background: var(--grad); color: #fff; border-radius: 28px; padding: 26px 22px 22px; box-shadow: 0 20px 50px rgba(var(--glow-rgb), .3); }
.cab-hero::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .12); right: -90px; top: -90px; }
.cab-hero h1 { color: #fff; font-size: 30px; line-height: 1.12; margin: 12px 0 10px; position: relative; }
.cab-hero p { color: rgba(255, 255, 255, .92); font-size: 15.5px; font-weight: 600; position: relative; }
.cab-hero-badge { display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, .2); padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 12.5px; position: relative; }
.cab-hero-card { position: relative; z-index: 1; margin: 18px auto 0; max-width: 300px; padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); transform: rotate(-3deg); }
.cab-hero-sum { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; line-height: 1; }
.cab-btn-white { background: #fff; color: var(--brand-600); border: 0; position: relative; }
.cab-btn-white:hover { color: var(--brand-600); }
.cab-btn-glass { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .45); position: relative; }
.cab-btn-glass:hover { color: #fff; background: rgba(255, 255, 255, .24); }
.cab-section { margin-top: 22px; }
.cab-section h2 { font-size: 19px; margin: 0 2px 12px; }
.cab-steps { display: grid; gap: 10px; }
.cab-step { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sh-1); }
.cab-step p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.cab-step-n { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }
.cab-rules { list-style: none; margin: 0; padding: 14px 16px; background: #fff; border-radius: 18px; border: 1px solid var(--line); display: grid; gap: 10px; }
.cab-rules li { display: flex; gap: 10px; font-weight: 600; font-size: 14px; }
.cab-rules .ic { color: var(--green); margin-top: 2px; }

/* Панели форм */
.cab-panel { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px 20px; box-shadow: var(--sh-2); margin-bottom: 14px; }
.cab-panel h1 { font-size: 26px; margin-top: 12px; }
.cab-panel h2 { font-size: 17px; display: flex; gap: 8px; align-items: center; }
.cab-panel h2 .ic { color: var(--brand); }
.cab-panel-ic { width: 60px; height: 60px; border-radius: 19px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(var(--glow-rgb), .3); }
.cab-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.cab-code { border: 1px dashed var(--line-2); border-radius: 14px; padding: 10px 14px; background: var(--tint-2); }
.cab-code summary { cursor: pointer; font-weight: 700; color: var(--brand-600); display: flex; gap: 8px; align-items: center; list-style: none; }
.cab-code summary::-webkit-details-marker { display: none; }
.cab-code-input { letter-spacing: .45em; text-align: center; font-weight: 800; font-size: 22px; }

/* Бонусная карта */
.loyalty { position: relative; overflow: hidden; border-radius: 26px; padding: 20px 20px 16px; color: #fff; background: var(--grad-card); box-shadow: 0 22px 50px rgba(var(--glow-rgb), .35); isolation: isolate; }
.loyalty::before { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .13); right: -70px; top: -90px; z-index: -1; }
.loyalty::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .08); left: -60px; bottom: 40px; z-index: -1; }
.loyalty-shine { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); animation: shine 6s ease-in-out infinite; z-index: -1; }
@keyframes shine { 0%, 70% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@media (prefers-reduced-motion: reduce) { .loyalty-shine { animation: none; } }
.loyalty-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.loyalty-brand { font-weight: 800; font-size: 16px; }
.loyalty-pct { background: rgba(255, 255, 255, .22); padding: 4px 10px; border-radius: 99px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.loyalty-label { margin-top: 18px; font-size: 13px; font-weight: 700; opacity: .88; }
.loyalty-balance { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.loyalty-balance span { font-size: 20px; margin-left: 6px; opacity: .85; }
.loyalty-name { margin-top: 6px; font-weight: 700; font-size: 13.5px; opacity: .92; }
.loyalty-code { margin-top: 16px; background: #fff; border-radius: 16px; padding: 12px 14px 8px; text-align: center; }
.loyalty-code svg { width: 100%; height: 64px; display: block; }
.loyalty-code-t { color: var(--ink); font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .22em; font-size: 14px; margin-top: 4px; }
.cab-tip { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; font-size: 13px; margin: 12px 0 16px; }

.cab-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.cab-tile { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 10px; text-align: center; box-shadow: var(--sh-1); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.cab-tile b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cab-tile small { color: var(--muted); font-weight: 600; font-size: 11.5px; }

.cab-list { display: flex; flex-direction: column; }
.cab-section .cab-list { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 4px 14px; box-shadow: var(--sh-1); }
.cab-li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cab-li:last-child { border-bottom: 0; }
.cab-li small, .cab-sale small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.cab-li .r small { text-align: right; }
.cab-li-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.cab-li-ic.plus { background: var(--green-50); color: var(--green); }
.cab-li-ic.minus { background: var(--red-50); color: var(--red); }

.cab-sale { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 10px; box-shadow: var(--sh-1); overflow: hidden; }
.cab-sale summary { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.cab-sale summary::-webkit-details-marker { display: none; }
.cab-sale[open] summary { border-bottom: 1px solid var(--line); background: var(--tint-2); }
.cab-sale-body { padding: 8px 14px 14px; }
.cab-sale-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.cab-sale-row s { color: var(--muted); }
.cab-sale-sum { padding-top: 8px; display: grid; gap: 4px; font-size: 14px; }

/* =====================================================================
   Печать подарочных сертификатов (A4, 2 × 4)
   ===================================================================== */
.cert-sheet { display: grid; grid-template-columns: repeat(2, 92mm); gap: 6mm; justify-content: center; padding: 6mm 0; }
.cert { position: relative; width: 92mm; height: 64mm; border-radius: 5mm; padding: 4mm 5mm; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--grad-card); -webkit-print-color-adjust: exact; print-color-adjust: exact; page-break-inside: avoid; font-family: "Manrope", Arial, sans-serif; }
.cert::after { content: ""; position: absolute; width: 50mm; height: 50mm; border-radius: 50%; background: rgba(255, 255, 255, .12); right: -16mm; top: -18mm; }
.cert-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.cert-brand { font-weight: 800; font-size: 14px; }
.cert-kind { text-align: right; font-weight: 800; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; line-height: 1.25; }
.cert-kind span { font-weight: 600; opacity: .85; text-transform: none; letter-spacing: 0; }
.cert-amount { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; position: relative; z-index: 1; }
.cert-cond { font-size: 9.5px; font-weight: 700; opacity: .92; position: relative; z-index: 1; }
.cert-code { background: #fff; border-radius: 2.5mm; padding: 1.5mm 3mm .5mm; position: relative; z-index: 1; }
.cert-code svg { width: 100%; height: 14mm; display: block; }
.cert-foot { font-size: 8px; opacity: .9; position: relative; z-index: 1; }
.cert-void { filter: grayscale(1); opacity: .7; }
.cert-stamp { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #e5383b; transform: rotate(-14deg); z-index: 2; text-shadow: 0 0 6px #fff; }
@media print { .cert-sheet { padding: 0; } }
