/* ==========================================================================
   Golf by Bobinski - custom.css
   Plik dodatkowy do Tailwind CDN. Tu trafia tylko to, czego nie da sie
   wygodnie wyrazic klasami Tailwinda.
   Wszystkie kolory brandu sa rowniez dostepne jako klasy Tailwinda
   (kontfig w partials/header.php).
   ========================================================================== */

/* ---------- 1. Tokeny designu (CSS variables) -------------------------- */
:root {
    /* Bazowe ciemne tla */
    --ink-950: #050807;
    --ink-900: #0A0F0C;
    --ink-850: #0F1714;
    --ink-800: #141C18;
    --ink-700: #1B2520;
    --ink-600: #38383E;
    --ink-500: #4E4E55;
    --ink-400: #6B6B73;
    --ink-300: #91919A;
    --ink-200: #BFBFC8;
    --ink-100: #E4E4EA;
    --ink-50:  #F5F5F7;

    /* Zielen brandowa */
    --brand-50:  #E6F8F0;
    --brand-100: #C2EFDB;
    --brand-200: #8BDFB8;
    --brand-300: #4FCD92;
    --brand-400: #00C880;
    --brand-500: #00A86A;
    --brand-600: #008857;
    --brand-700: #007349;
    --brand-800: #055B3B;
    --brand-900: #073F2A;

    /* Zloto szampanskie */
    --gold-300: #E4CFA5;
    --gold-400: #D1B585;
    --gold-500: #B8956A;
    --gold-600: #9A7B53;
    --gold-700: #7A6240;

    /* Stany */
    --success: #00C880;
    --warning: #F2B544;
    --danger:  #E5484D;
    --info:    #4FBDF5;

    /* Skala odstepow (px) - referencja, w UI uzywamy klas Tailwinda */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;

    /* Promienie */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Cienie */
    --shadow-card:    0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-card-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    --glow-green:     0 0 28px rgba(0, 200, 128, 0.35);
    --glow-gold:      0 0 24px rgba(184, 149, 106, 0.35);

    /* Easing i tranzycje */
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- 2. Globalny reset/dopelnienie ---------------------------- */
html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--ink-50);
    /* Subtelne radialne tlo na desktopie, daje aplikacji "glebie" */
    background-image:
        radial-gradient(60% 50% at 50% 0%, rgba(0, 0, 0, 0.04), transparent 70%);
    min-height: 100vh;
}

/* Wrapper aplikacji - subtelna "obwodka" na desktopie */
.app-shell {
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

/* Padding na dole, aby tresc nie wpadala pod bottom nav */
.app-shell .has-bottom-nav {
    padding-bottom: 92px;
}

/* ---------- 3. Focus ringi (jednolite) ------------------------------- */
.focus-ring:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--brand-400);
    outline-offset: 2px;
    border-radius: 8px;
}

/* ---------- 4. Gradientowy tekst marki ------------------------------- */
.text-gradient-brand {
    background: linear-gradient(135deg, #00C880 0%, #008857 60%, #007349 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #E4CFA5 0%, #B8956A 60%, #7A6240 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- 5. Karty premium (hairline border + gradient) ------------ */
.card-premium {
    position: relative;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%), var(--ink-800);
    box-shadow: var(--shadow-card);
}

.card-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.card-gold-border::before {
    background: linear-gradient(180deg, rgba(228, 207, 165, 0.55), rgba(184, 149, 106, 0.10));
}

/* ---------- 6. Niestandardowe kontrolki ------------------------------ */
/* Switch (toggle) */
.switch {
    --w: 44px;
    --h: 26px;
    position: relative;
    display: inline-block;
    width: var(--w);
    height: var(--h);
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute;
    inset: 0;
    background: var(--ink-700);
    border-radius: 999px;
    transition: background-color 0.25s var(--ease-out);
    cursor: pointer;
}
.switch .slider::before {
    content: "";
    position: absolute;
    width: 20px; height: 20px;
    left: 3px; top: 3px;
    background: var(--ink-50);
    border-radius: 999px;
    transition: transform 0.25s var(--ease-out);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.switch input:checked + .slider {
    background: var(--brand-600);
    box-shadow: var(--glow-green);
}
.switch input:checked + .slider::before {
    transform: translateX(18px);
}
.switch input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }

/* Custom radio */
.radio-custom {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border: 1.5px solid var(--ink-500);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s var(--ease-out);
}
.radio-custom:checked {
    border-color: var(--brand-400);
}
.radio-custom:checked::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--brand-400);
    border-radius: 999px;
    box-shadow: var(--glow-green);
}

/* Custom checkbox */
.checkbox-custom {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border: 1.5px solid var(--ink-500);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s var(--ease-out);
}
.checkbox-custom:checked {
    background: var(--brand-600);
    border-color: var(--brand-400);
    box-shadow: var(--glow-green);
}
.checkbox-custom:checked::after {
    content: "";
    position: absolute;
    left: 6px; top: 2px;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Segmented control */
.segmented {
    display: inline-flex;
    background: var(--ink-800);
    border: 1px solid var(--ink-700);
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}
.segmented button {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-300);
    transition: all 0.2s var(--ease-out);
}
.segmented button[aria-selected="true"] {
    background: var(--brand-600);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 136, 87, 0.4);
}

/* ---------- 7. Pola formularzy --------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-200);
    letter-spacing: 0.01em;
}
.field-input {
    width: 100%;
    background: var(--ink-800);
    border: 1px solid var(--ink-600);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--ink-50);
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Customowy select - wlasna strzalka SVG (chevron-down z lucide).
   appearance:none usuwa natywny wyglad we wszystkich przegladarkach. */
select.field-input {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2391919A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 42px;
    cursor: pointer;
}
select.field-input::-ms-expand { display: none; }
select.field-input option {
    background: var(--ink-850);
    color: var(--ink-50);
}
.field-input::placeholder { color: var(--ink-400); }
.field-input:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px rgba(0, 200, 128, 0.15);
}
.field-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.field-helper {
    font-size: 12px;
    color: var(--ink-200);
}
.field-input.is-success { border-color: var(--success); }
.field-input.is-warning { border-color: var(--warning); }
.field-input.is-error   { border-color: var(--danger); }

.field.is-success .field-helper { color: var(--success); }
.field.is-warning .field-helper { color: var(--warning); }
.field.is-error   .field-helper { color: var(--danger); }

/* ---------- 8. Plakietki (badges) ------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.badge-brand   { background: rgba(0, 136, 87, 0.2); color: var(--brand-300); }
.badge-gold    {
    background: linear-gradient(135deg, #E4CFA5 0%, #B8956A 55%, #7A6240 100%);
    color: #1A1A1A;
    border: 1px solid rgba(228, 207, 165, 0.45);
    box-shadow: 0 2px 8px rgba(184, 149, 106, 0.35);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}
.badge-success { background: rgba(0, 200, 128, 0.15); color: var(--success); }
.badge-warning { background: rgba(242, 181, 68, 0.15); color: var(--warning); }
.badge-danger  { background: rgba(229, 72, 77, 0.15);  color: var(--danger); }
.badge-info    { background: rgba(79, 189, 245, 0.15); color: var(--info); }
.badge-muted   { background: var(--ink-700); color: var(--ink-200); }

/* ---------- 9. Listingi (.list-row) ---------------------------------- */
.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--ink-800);
    border: 1px solid var(--ink-700);
    border-radius: 14px;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.list-row:hover {
    background: var(--ink-700);
    border-color: var(--ink-600);
}
.list-row .row-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--ink-700);
    color: var(--brand-400);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.list-row .row-body { flex: 1; min-width: 0; }
.list-row .row-title { font-size: 14px; font-weight: 600; color: var(--ink-50); }
.list-row .row-meta  { font-size: 12px; color: var(--ink-300); margin-top: 2px; }

/* ---------- 10. Loadery ---------------------------------------------- */
.spinner {
    width: 24px; height: 24px;
    border: 2.5px solid rgba(255,255,255,0.12);
    border-top-color: var(--brand-400);
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, var(--ink-800) 0%, var(--ink-700) 50%, var(--ink-800) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 11. Pasek postepu --------------------------------------- */
.progress-track {
    width: 100%;
    height: 8px;
    background: var(--ink-700);
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
    border-radius: 999px;
    transition: width 0.6s var(--ease-out);
}

/* Circular ring (SVG based - kontrolowane przez stroke-dashoffset) */
.ring-progress { transform: rotate(-90deg); }
.ring-progress .ring-track { stroke: var(--ink-700); }
.ring-progress .ring-fill  { stroke: var(--brand-400); transition: stroke-dashoffset 0.6s var(--ease-out); }

/* ---------- 12. Toast ------------------------------------------------ */
.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--ink-800);
    border: 1px solid var(--ink-600);
    border-left-width: 4px;
    border-radius: 12px;
    box-shadow: var(--shadow-card-lg);
    color: var(--ink-50);
    font-size: 14px;
    line-height: 1.4;
    transform: translateY(-12px);
    opacity: 0;
    transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast .toast-icon { flex-shrink: 0; margin-top: 2px; }

/* Warianty toastow - kolor wypelnia tlo, akcent boczny, ikona dopasowana */
.toast.toast-success {
    background: linear-gradient(90deg, rgba(0, 200, 128, 0.18) 0%, rgba(0, 200, 128, 0.04) 100%), var(--ink-850);
    border-color: rgba(0, 200, 128, 0.45);
    border-left-color: var(--success);
}
.toast.toast-success .toast-icon { color: var(--success); }

.toast.toast-warning {
    background: linear-gradient(90deg, rgba(242, 181, 68, 0.18) 0%, rgba(242, 181, 68, 0.04) 100%), var(--ink-850);
    border-color: rgba(242, 181, 68, 0.45);
    border-left-color: var(--warning);
}
.toast.toast-warning .toast-icon { color: var(--warning); }

.toast.toast-danger {
    background: linear-gradient(90deg, rgba(229, 72, 77, 0.18) 0%, rgba(229, 72, 77, 0.04) 100%), var(--ink-850);
    border-color: rgba(229, 72, 77, 0.45);
    border-left-color: var(--danger);
}
.toast.toast-danger .toast-icon { color: var(--danger); }

.toast.toast-info {
    background: linear-gradient(90deg, rgba(79, 189, 245, 0.18) 0%, rgba(79, 189, 245, 0.04) 100%), var(--ink-850);
    border-color: rgba(79, 189, 245, 0.45);
    border-left-color: var(--info);
}
.toast.toast-info .toast-icon { color: var(--info); }

/* ---------- 13. Modal & overlay ------------------------------------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 8, 7, 0.7);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: end center;
    padding: 16px;
    z-index: 90;
}
@media (min-width: 481px) {
    .modal-overlay { place-items: center; }
}
.modal-panel {
    width: 100%;
    max-width: 388px;
    background: var(--ink-850);
    border: 1px solid var(--ink-700);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-card-lg);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.modal-overlay.is-visible .modal-panel { transform: translateY(0); opacity: 1; }

/* ---------- 14. Drawer (boczny panel) ------------------------------- */
.drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 8, 7, 0.65);
    backdrop-filter: blur(4px);
    z-index: 80;
    opacity: 0;
    transition: opacity 0.25s var(--ease-out);
    pointer-events: none;
}
.drawer-overlay.is-visible { opacity: 1; pointer-events: auto; }
.drawer-panel {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: 86%; max-width: 360px;
    background: var(--ink-850);
    border-right: 1px solid var(--ink-700);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    box-shadow: var(--shadow-card-lg);
}
.drawer-overlay.is-visible .drawer-panel { transform: translateX(0); }
.drawer-panel.right { right: 0; left: auto; transform: translateX(100%); border-right: 0; border-left: 1px solid var(--ink-700); }
.drawer-overlay.is-visible .drawer-panel.right { transform: translateX(0); }

/* ---------- 15. Popover --------------------------------------------- */
.popover {
    position: absolute;
    background: var(--ink-800);
    border: 1px solid var(--ink-700);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: var(--shadow-card-lg);
    font-size: 13px;
    color: var(--ink-100);
    max-width: 260px;
    z-index: 70;
}

/* ---------- 16. Tooltip --------------------------------------------- */
.tooltip {
    position: absolute;
    background: var(--ink-700);
    color: var(--ink-50);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

/* ---------- 17. Avatar i kropka statusu ----------------------------- */
.avatar {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    /* Brak overflow:hidden - status-dot ma byc widoczny "na zewnatrz". */
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px; /* Sam obraz przyciety do okragu */
}
.avatar.gold { background: linear-gradient(135deg, var(--gold-400), var(--gold-700)); }
.avatar .status-dot {
    position: absolute;
    right: -1px; bottom: -1px;
    width: 12px; height: 12px;
    border-radius: 999px;
    border: 2px solid var(--ink-900);
    background: var(--ink-400);
}
.avatar .status-dot.online  { background: var(--success); }
.avatar .status-dot.busy    { background: var(--danger); }
.avatar .status-dot.offline { background: var(--ink-400); }

/* ---------- 18. Mikroanimacje ---------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.5s var(--ease-out) both; }

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 128, 0.45); }
    50%      { box-shadow: 0 0 0 12px rgba(0, 200, 128, 0); }
}
.animate-pulse-glow { animation: pulseGlow 1.8s var(--ease-out) infinite; }

@keyframes countUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 19. Hide-scrollbar (do snap row) ------------------------ */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- 20. Style guide layout (tylko dla strony /style-guide/) -- */
.sg-section {
    scroll-margin-top: 80px;
}
.sg-anchor-link {
    color: var(--ink-300);
    transition: color 0.2s var(--ease-out);
}
.sg-anchor-link:hover { color: var(--brand-400); }

/* ==========================================================================
   Koniec custom.css
   ========================================================================== */

/* ==========================================================================
   STYLE GUIDE - klasy uzywane wylacznie na stronie /style-guide/
   (komponenty dokumentacyjne, nie aplikacja).
   ========================================================================== */
.sg-body { background: var(--ink-950); color: var(--ink-100); }
.sg-shell { max-width: 1280px; margin: 0 auto; padding: 24px 20px 96px; }
.sg-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) {
    .sg-grid { grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
    .sg-nav-sticky { position: sticky; top: 24px; }
}
.sg-card {
    background: var(--ink-850);
    border: 1px solid var(--ink-700);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-card);
}
.sg-card h2 { font-size: 22px; font-weight: 700; color: var(--ink-50); margin-bottom: 6px; }
.sg-card .sg-lead { color: var(--ink-200); font-size: 14px; margin-bottom: 20px; }
.sg-h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-200);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 24px 0 12px;
}
.sg-preview {
    background: var(--ink-950);
    border: 1px dashed var(--ink-700);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
}
.sg-mobile-frame {
    width: 100%;
    max-width: 380px;
    background: var(--ink-900);
    border: 1px solid var(--ink-700);
    border-radius: 28px;
    padding: 18px 14px;
    box-shadow: var(--shadow-card-lg);
    margin: 0 auto;
}
.sg-code {
    background: var(--ink-950);
    border: 1px solid var(--ink-700);
    color: var(--brand-200);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre;
}
.sg-token {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--ink-950);
    border: 1px solid var(--ink-700);
    border-radius: 10px;
}
.sg-swatch {
    width: 36px; height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.06);
}

/* ==========================================================================
   Modyfikatory wprowadzone aby uniknac inline style w HTML/PHP.
   ========================================================================== */

/* Style guide header pasek */
.sg-header-bar { padding-top: 20px; padding-bottom: 20px; }

/* Karta TOC stylu guide */
.sg-toc-card { padding: 16px; }
.sg-toc-title { margin: 4px 0 8px; }

/* Wariant .sg-preview ulozony w pionie z lewa */
.sg-preview.is-col {
    flex-direction: column;
    align-items: flex-start;
}

/* Hero style guide - subtelne tlo */
.sg-hero {
    background-image: radial-gradient(120% 80% at 0% 0%, rgba(0,136,87,0.25) 0%, rgba(7,63,42,0.1) 50%, transparent 100%);
    border-color: var(--ink-600) !important;
}

/* Avatary - warianty rozmiarow */
.avatar.avatar-xs { width: 26px; height: 26px; font-size: 11px; }
.avatar.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.avatar-md { width: 48px; height: 48px; font-size: 16px; }
.avatar.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

/* Spinner - warianty rozmiarow */
.spinner.spinner-xs { width: 14px; height: 14px; border-width: 2px; }
.spinner.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner.spinner-lg { width: 36px; height: 36px; border-width: 3px; }

/* Statyczny popover (do prezentacji w style guide) */
.popover.is-static {
    position: relative;
    margin-top: 8px;
    display: inline-block;
}

/* Ramka tab-bar bez paddingu (do prezentacji) */
.sg-mobile-frame.is-bare {
    padding: 0;
    overflow: hidden;
}

/* Wysokosci minimalne dla prezentacji */
.sg-min-h-200 { min-height: 200px; }
.sg-min-h-160 { min-height: 160px; }


/* ==========================================================================
   Taby - sliding underline aktywnego.
   Markup: <button data-tab-trigger="x" class="tab-trigger">...</button>
   Aktywny dostaje klase .is-active (dodawana przez initTabs).
   ========================================================================== */
.tab-trigger {
    position: relative;
    color: var(--ink-300);
    font-weight: 500;
    padding: 10px 4px;
    transition: color 0.2s var(--ease-out);
}
.tab-trigger::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--brand-400);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s var(--ease-out);
}
.tab-trigger:hover { color: var(--ink-100); }
.tab-trigger.is-active {
    color: var(--ink-50);
    font-weight: 600;
}
.tab-trigger.is-active::after {
    transform: scaleX(1);
}

.tab-list {
    display: flex;
    border-bottom: 1px solid var(--ink-700);
    gap: 8px;
}
.tab-list .tab-trigger { flex: 1; text-align: center; }


/* ==========================================================================
   Style guide - naglowki sekcji z akcentem brand-400.
   ========================================================================== */
.sg-h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink-50);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sg-h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand-400), var(--brand-700));
    flex-shrink: 0;
}

/* Sekcje sg-card - lekkie podswietlenie na hover (dla efektu zywego style guide) */
.sg-card { transition: border-color 0.25s var(--ease-out); }
.sg-card:hover { border-color: var(--ink-600); }

/* Hero sg-hero - wzmocnij zielen */
.sg-hero {
    background-image:
        radial-gradient(120% 80% at 0% 0%, rgba(0, 200, 128, 0.18) 0%, rgba(0, 136, 87, 0.08) 40%, transparent 70%),
        radial-gradient(80% 60% at 100% 100%, rgba(184, 149, 106, 0.10) 0%, transparent 60%);
    border-color: var(--brand-700) !important;
}
/* ==========================================================================
   Step-bullet (kropki w stepperach reset hasla, kreator itp.)
   ========================================================================== */
.step-bullet {
    width: 28px; height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    background: transparent;
    border: 1.5px solid var(--ink-600);
    color: var(--ink-400);
    transition: all 0.25s var(--ease-out);
    flex-shrink: 0;
}
.step-bullet.is-active {
    border-color: var(--brand-400);
    color: var(--brand-400);
    box-shadow: 0 0 0 4px rgba(0, 200, 128, 0.12);
}
.step-bullet.is-done {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}
.step-bullet.is-done::before {
    content: "\2713";
    font-size: 14px;
    line-height: 1;
}
.step-bullet.is-done { font-size: 0; }
.step-bullet.is-done::before { font-size: 14px; }

/* ==========================================================================
   Pola jednoznakowego kodu (np. 6-cyfrowy reset hasla)
   ========================================================================== */
.code-digit {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    background: var(--ink-800);
    border: 1.5px solid var(--ink-600);
    border-radius: 12px;
    color: var(--ink-50);
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    caret-color: var(--brand-400);
}
.code-digit:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px rgba(0, 200, 128, 0.18);
}

/* ==========================================================================
   Akordeon (markup z data-accordion)
   ========================================================================== */
[data-accordion-item] .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out);
}
[data-accordion-item].is-open .accordion-content {
    max-height: 500px;
}
.accordion-icon {
    transition: transform 0.25s var(--ease-out);
}
[data-accordion-item].is-open .accordion-icon {
    transform: rotate(180deg);
}
[data-accordion-item][data-accordion-trigger] {
    cursor: pointer;
}

/* Wariant cienkiego paska postepu (np. na kartach kategorii) */
.progress-track.is-thin { height: 4px; }
