/* =========================================================
   IrishTv — Shared design system
   Wspólny plik stylów dla wszystkich podstron.
   ========================================================= */

:root {
    /* Kolory — JEDEN zielony jako brand, jeden ciemny ton tła */
    --brand:            #22c55e;          /* świetlisty zielony */
    --brand-strong:     #16a34a;
    --brand-soft:       rgba(34, 197, 94, 0.15);
    --brand-ring:       rgba(34, 197, 94, 0.4);

    --bg:               #0d0e10;          /* tło strony */
    --surface:          #16181b;          /* karty, header, footer */
    --surface-2:        #1d2024;          /* hovery, inputy */
    --border:           #262a2f;
    --border-strong:    #363b41;

    --text:             #f3f4f6;
    --text-muted:       #9aa1a8;
    --text-dim:         #6b7176;

    --danger:           #ef4444;
    --success:          #22c55e;

    --radius-sm:        6px;
    --radius:           10px;
    --radius-lg:        16px;

    --shadow-sm:        0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow:           0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg:        0 24px 60px rgba(0, 0, 0, 0.5);

    /* Typografia — Plus Jakarta Sans (Google Fonts), z fallbackiem */
    --font-sans:        "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono:        "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Stabilne rozmiary — bez clamp() na każdym kroku */
    --container-max:    1240px;
    --nav-height:       64px;
}

/* ----- Reset & podstawy ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

select,
input,
textarea {
    font: inherit;
    color: inherit;
}

main {
    flex: 1;
}

/* ----- Layout ----- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 14, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Centered nav on desktop — auto margins balance space on both sides */
@media (min-width: 901px) {
    .header-inner > .nav {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Logo --- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.015em;
    color: var(--text);
    flex-shrink: 0;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: block;
    flex-shrink: 0;
}

.logo-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    font-family: "Unbounded", "Plus Jakarta Sans", sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.logo-text .accent {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-left: 4px;
    font-weight: 800;
}

/* --- Nav --- */
.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s, background-color 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-2);
}

.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
}

/* --- Header actions (lang + cta) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 28px 7px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'><path d='M2 4l3 3 3-3' stroke='%239aa1a8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s, background-color 0.15s;
}

.lang-select:hover {
    border-color: var(--border-strong);
    background-color: var(--surface);
}

.lang-select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

/* --- Mobile menu --- */
.nav-toggle {
    display: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
}

.nav-toggle:hover {
    background: var(--surface-2);
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px 14px;
        font-size: 15px;
    }

    .nav-link.active::after {
        left: 0;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        height: 60%;
        width: 3px;
    }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.15s, transform 0.05s, border-color 0.15s;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-strong);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--surface-2);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
    padding: 96px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 400px at 50% -10%, var(--brand-soft), transparent 60%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-ring);
    color: var(--brand);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.hero h1 {
    font-size: 56px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin-bottom: 20px;
    text-wrap: balance;
}

.hero p {
    font-size: 19px;
    color: var(--text-muted);
    margin: 0 auto 36px;
    max-width: 580px;
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero {
        padding: 56px 0 48px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }
}

/* =========================================================
   PAGE HEADER (mniejszy nagłówek na podstronach)
   ========================================================= */
.page-header {
    padding: 64px 0 32px;
    text-align: center;
}

.page-header h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .page-header {
        padding: 40px 0 24px;
    }

    .page-header h1 {
        font-size: 28px;
    }
}

/* =========================================================
   CHANNEL GRID / CARDS
   ========================================================= */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding-bottom: 80px;
}

.channel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.channel-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}

/* Logo placeholder dla kanału — zastępuje brakujące lokalne PNG-i z C:\ */
.channel-logo {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text);
    background-color: var(--surface-2);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0,
            transparent 10px,
            rgba(255, 255, 255, 0.025) 10px,
            rgba(255, 255, 255, 0.025) 20px
        );
    border: 1px solid var(--border);
    text-align: center;
    padding: 8px;
    text-transform: uppercase;
}

.channel-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.channel-meta h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.channel-meta p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* =========================================================
   FEATURED CHANNELS (na home)
   ========================================================= */
.featured-section {
    padding: 24px 0 80px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-head h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-head a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}

.section-head a:hover {
    color: var(--brand);
}

/* =========================================================
   PRICING
   ========================================================= */
.pricing-section {
    padding: 24px 0 96px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 920px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--brand);
    background: linear-gradient(180deg, var(--brand-soft) 0%, var(--surface) 50%);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pricing-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0;
}

.price {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text);
}

.price .unit {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.pricing-features li::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background-color: var(--brand-soft);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M3 6.5l2 2 4-5' stroke='%2322c55e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}

/* =========================================================
   ABOUT / CONTENT PAGE
   ========================================================= */
.prose {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 0 80px;
}

.prose p {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.prose p:first-child {
    font-size: 19px;
    color: var(--text);
}

.prose .cta-row {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================================================
   ABOUT — stats / feature cards
   ========================================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.feature-card .num {
    font-size: 32px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.feature-card .label {
    font-size: 14px;
    color: var(--text-muted);
}

/* =========================================================
   CONTACT FORM
   ========================================================= */
.contact-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding-bottom: 96px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.field input,
.field textarea,
.field select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 38px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1,1 6,7 11,1'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.field select option {
    background: var(--bg);
    color: var(--text);
}

.field textarea {
    min-height: 140px;
    resize: vertical;
}

.field .error-msg {
    display: none;
    font-size: 12px;
    color: var(--danger);
}

.field.has-error input,
.field.has-error textarea {
    border-color: var(--danger);
}

.field.has-error .error-msg {
    display: block;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    text-align: center;
}

.contact-meta a {
    color: var(--brand);
    font-weight: 500;
}

/* =========================================================
   PLAYER
   ========================================================= */
.player-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    padding: 24px 0 48px;
    align-items: start;
}

@media (max-width: 900px) {
    .player-wrap {
        grid-template-columns: 1fr;
    }
}

.channel-list-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

@media (max-width: 900px) {
    .channel-list-panel {
        position: static;
        max-height: 320px;
    }
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding: 0 4px;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.12s, color 0.12s;
    font-size: 14px;
    color: var(--text);
    line-height: 1.3;
}

.channel-item:hover {
    background: var(--surface-2);
}

.channel-item.active {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

.channel-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.channel-num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    min-width: 24px;
}

.channel-item.active .channel-num {
    color: var(--brand);
}

.player-stage {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-frame {
    background: #000;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
}

.video-frame .video-js {
    width: 100% !important;
    height: 100% !important;
}

.player-controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.player-controls .now-playing {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-controls .now-playing .lbl {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.player-controls .now-playing .ttl {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.player-controls select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 30px 8px 12px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'><path d='M2 4l3 3 3-3' stroke='%239aa1a8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.epg-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    max-height: 280px;
    overflow-y: auto;
}

.epg-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.epg-item:last-child {
    border-bottom: 0;
}

.epg-item .time {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* Player tabs (test / premium) */
.player-tabs {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    margin: 16px 0 0;
}

.player-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: background-color 0.15s, color 0.15s;
}

.player-tab:hover {
    color: var(--text);
}

.player-tab.active {
    background: var(--surface-2);
    color: var(--brand);
}

/* =========================================================
   MODALS (subscription / login)
   ========================================================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.modal.is-open {
    display: flex;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.modal-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================================================
   LOGIN
   ========================================================= */
.login-wrap {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.login-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
}

.login-card .sub {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
}

.login-card .actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 56px 0 32px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

@media (max-width: 760px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 16px;
    max-width: 320px;
    line-height: 1.55;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.footer-col a,
.footer-col p {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: var(--brand);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-dim);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--text-dim);
    transition: color 0.15s;
}

.footer-bottom-links a:hover {
    color: var(--text);
}

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* =========================================================
   HEADER CLOCK — elektroniczny zegar obok logo
   ========================================================= */
.header-clock {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--brand);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.05);
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
    min-width: 88px;
    text-align: center;
}

.header-date {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--brand);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.05);
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
    min-width: 96px;
    text-align: center;
    margin-left: 8px;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .header-date { display: none; }
}

@media (max-width: 640px) {
    .header-clock,
    .header-date {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 76px;
        letter-spacing: 0.05em;
    }
    .header-date { margin-left: 6px; }
}

/* =========================================================
   ADMIN PANEL
   ========================================================= */
.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 20px;
    padding: 24px 0 80px;
    align-items: start;
}

@media (max-width: 880px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.admin-card h2 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.admin-card .sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 18px;
}

.admin-status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}

.admin-status.ok { color: var(--brand); }
.admin-status.err { color: var(--danger); }

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.users-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.users-table th:first-child { border-top-left-radius: 8px; }
.users-table th:last-child  { border-top-right-radius: 8px; text-align: right; }

.users-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.users-table td.actions { text-align: right; }
.users-table tr:last-child td { border-bottom: 0; }
.users-table .uname { font-weight: 600; }
.users-table .expires { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.users-table .empty { text-align: center; color: var(--text-muted); padding: 40px 12px; font-size: 14px; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-active   { background: var(--brand-soft); color: var(--brand); }
.status-expired  { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.btn-danger-sm {
    padding: 6px 10px;
    font-size: 12px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--danger);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-danger-sm:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
}

.admin-banner {
    background: var(--brand-soft);
    border: 1px solid var(--brand-ring);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius);
    margin: 20px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-banner strong { color: var(--brand); }

/* Admin tabs */
.admin-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin: 24px 0;
}

.admin-tab {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font: inherit;
    font-weight: 600;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

.admin-tab:hover {
    color: var(--text);
}

.admin-tab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

/* =========================================================
   FOCUS RINGS — dostępność
   ========================================================= */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}
