:root {
    --bg: #090908;
    --bg-soft: #11100e;
    --surface: #171512;
    --surface-2: #201c17;
    --ink: #f8f1e4;
    --muted: #aaa096;
    --gold: #d8a04a;
    --gold-light: #f5d794;
    --gold-dark: #8c5a20;
    --line: rgba(232, 190, 111, .2);
    --danger: #ff7a72;
    --header-height: 106px;
    --radius: 18px;
    --shadow: 0 30px 80px rgba(0,0,0,.38);
}

/* Mobile-only elements are hidden before the responsive stylesheet loads. */
.mobile-app-nav, .mobile-brand-name, .mobile-admin-tabs { display: none; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .18;
    background-image: radial-gradient(rgba(255,255,255,.09) .6px, transparent .6px);
    background-size: 6px 6px;
    z-index: -1;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
.container { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
main { padding-top: var(--header-height); min-height: 70vh; }

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid transparent;
    background: linear-gradient(to bottom, rgba(7,7,6,.96), rgba(7,7,6,.78), transparent);
    transition: height .3s ease, background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled {
    height: 78px;
    background: rgba(8,8,7,.88);
    border-color: var(--line);
    backdrop-filter: blur(18px);
}
.header-inner { height: 100%; display: grid; grid-template-columns: 170px 1fr 110px; align-items: center; gap: 24px; }
.brand { height: 92px; width: 146px; display: grid; place-items: center; overflow: visible; transition: height .3s ease; }
.brand-logo { height: 92px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 20px rgba(0,0,0,.48)); transition: height .3s ease; }
.scrolled .brand, .scrolled .brand-logo { height: 68px; }
.primary-nav { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 2.5vw, 38px); }
.primary-nav a { color: #cfc6b9; font-size: .91rem; font-weight: 650; letter-spacing: .025em; position: relative; padding: 10px 0; }
.primary-nav a::after { content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-light), transparent); transform: scaleX(0); transition: transform .2s ease; }
.primary-nav a:hover, .primary-nav a.active { color: var(--gold-light); }
.primary-nav a:hover::after, .primary-nav a.active::after { transform: scaleX(1); }
.login-button { justify-self: end; border: 1px solid rgba(245,215,148,.55); color: var(--gold-light); border-radius: 999px; padding: 9px 17px; font-size: .88rem; font-weight: 700; transition: .2s ease; }
.login-button:hover { background: var(--gold-light); color: #181108; transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; }
.nav-toggle span { display: block; width: 25px; height: 2px; background: var(--ink); margin: 5px 0; }

.hero {
    min-height: 680px;
    display: grid;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(8,8,7,.98) 0%, rgba(8,8,7,.87) 48%, rgba(8,8,7,.38) 100%),
        radial-gradient(circle at 75% 42%, rgba(216,160,74,.2), transparent 27%),
        linear-gradient(135deg, #090908, #1a130d 60%, #050505);
}
.hero::after { content: "RM"; position: absolute; right: -2vw; top: 4%; font-family: Georgia, serif; font-style: italic; font-size: clamp(240px, 32vw, 570px); line-height: .8; color: rgba(245,215,148,.035); letter-spacing: -.15em; pointer-events: none; }
.hero-glow { position: absolute; width: 480px; height: 480px; right: 12%; top: 13%; border: 1px solid rgba(216,160,74,.14); border-radius: 50%; box-shadow: inset 0 0 100px rgba(216,160,74,.07), 0 0 100px rgba(216,160,74,.05); }
.hero-content { position: relative; z-index: 1; padding: 80px 0 90px; }
.eyebrow { color: var(--gold); letter-spacing: .22em; font-size: .75rem; font-weight: 800; margin: 0 0 16px; text-transform: uppercase; }
.hero h1, .page-hero h1, .watch-info h1, .auth-card h1, .admin-hero h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; line-height: .98; margin: 0; }
.hero h1 { font-size: clamp(3.4rem, 7.2vw, 7rem); max-width: 970px; }
.hero h1 em { color: var(--gold-light); font-weight: 400; }
.hero-copy { max-width: 660px; color: #bfb5a7; font-size: 1.1rem; margin: 28px 0 0; }
.hero-actions, .form-actions, .admin-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-actions { margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px; border-radius: 999px; font-weight: 750; letter-spacing: .015em; border: 1px solid transparent; cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1005; box-shadow: 0 12px 35px rgba(216,160,74,.2); }
.button-ghost { background: transparent; color: var(--ink); border-color: rgba(255,255,255,.25); }
.button-ghost:hover { border-color: var(--gold-light); color: var(--gold-light); }
.button-dark { background: #25221e; color: #ddd3c5; border-color: rgba(255,255,255,.08); }

.section { padding: 92px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 36px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.7rem); line-height: 1; }
.section-note { color: var(--muted); max-width: 470px; margin: 0; text-align: right; }
.production-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 26px; }
.production-card { background: linear-gradient(150deg, rgba(255,255,255,.025), rgba(255,255,255,.01)); border: 1px solid rgba(255,255,255,.075); border-radius: var(--radius); overflow: hidden; transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.production-card:hover { transform: translateY(-7px); border-color: rgba(245,215,148,.42); box-shadow: var(--shadow); }
.thumbnail-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #171512; }
.thumbnail-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62), transparent 55%); }
.thumbnail-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .4s ease; }
.production-card:hover img { transform: scale(1.045); filter: saturate(1.08); }
.category-badge { position: absolute; z-index: 2; left: 14px; bottom: 14px; background: rgba(10,9,8,.78); backdrop-filter: blur(8px); border: 1px solid rgba(245,215,148,.35); color: var(--gold-light); border-radius: 999px; padding: 5px 10px; font-size: .69rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.play-icon { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255,255,255,.64); background: rgba(0,0,0,.35); backdrop-filter: blur(5px); opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.play-icon::after { content: ""; position: absolute; left: 22px; top: 17px; border-left: 16px solid white; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.production-card:hover .play-icon { opacity: 1; transform: translate(-50%,-50%) scale(1.04); }
.production-card-body { padding: 20px 20px 22px; }
.production-card h3 { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; line-height: 1.18; margin: 0 0 14px; }
.production-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .79rem; }

.services-strip { border-block: 1px solid var(--line); background: #0d0c0a; }
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.services-grid a { padding: 42px 34px; border-right: 1px solid var(--line); display: grid; grid-template-columns: 42px 1fr; column-gap: 18px; transition: background .2s ease; }
.services-grid a:last-child { border-right: 0; }
.services-grid a:hover { background: rgba(216,160,74,.055); }
.services-grid span { color: var(--gold); font-family: Georgia, serif; }
.services-grid strong { font-family: Georgia, serif; font-size: 1.75rem; font-weight: 500; line-height: 1; }
.services-grid small { grid-column: 2; color: var(--muted); margin-top: 8px; }

.page-hero { border-bottom: 1px solid var(--line); background: radial-gradient(circle at 75% 30%, rgba(216,160,74,.13), transparent 25%), linear-gradient(135deg, #090908, #15100b); }
.compact-hero { padding: 95px 0 72px; }
.compact-hero h1 { font-size: clamp(3.5rem, 7vw, 6rem); }
.compact-hero p:last-child { color: var(--muted); max-width: 680px; font-size: 1.05rem; }

.watch-page { padding-top: 55px; }
.watch-player { aspect-ratio: 16/9; background: #000; border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); box-shadow: var(--shadow); }
.watch-player iframe { width: 100%; height: 100%; border: 0; }
.watch-info { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 34px 0 22px; border-bottom: 1px solid var(--line); }
.watch-info h1 { font-size: clamp(2.3rem, 4.8vw, 4.4rem); max-width: 850px; }
.watch-stats { color: var(--muted); text-align: right; display: grid; gap: 7px; white-space: nowrap; }
.watch-stats strong { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; }
.tags span { border: 1px solid rgba(245,215,148,.25); background: rgba(216,160,74,.06); color: var(--gold-light); border-radius: 999px; padding: 6px 11px; font-size: .8rem; }
.production-description { color: #c0b6a8; max-width: 900px; padding-top: 26px; white-space: normal; }
.related-section { padding-top: 70px; }
.related-grid { grid-template-columns: repeat(4,1fr); }
.related-grid .production-card h3 { font-size: 1.15rem; }
.related-grid .production-meta { display: grid; }

.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; }
.contact-copy h2 { font-family: Georgia, serif; font-size: clamp(2.4rem, 4.2vw, 4rem); line-height: 1; font-weight: 500; margin-top: 0; }
.contact-copy p { color: var(--muted); }
.contact-copy a { color: var(--gold-light); font-weight: 700; }
.panel-form { display: grid; gap: 17px; }
.panel-form label { color: #d9d0c3; font-size: .84rem; font-weight: 700; display: grid; gap: 7px; }
.panel-form input, .panel-form textarea, .panel-form select { width: 100%; background: #0e0d0b; color: var(--ink); border: 1px solid rgba(255,255,255,.13); border-radius: 12px; padding: 13px 14px; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.panel-form input:focus, .panel-form textarea:focus, .panel-form select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,160,74,.12); }
.panel-form textarea { resize: vertical; }
.contact-form, .auth-card { background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.09); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.form-errors { background: rgba(178,51,46,.15); border: 1px solid rgba(255,122,114,.35); color: #ffc4bf; border-radius: 12px; padding: 10px 14px; }
.form-errors p { margin: 4px 0; }
.form-hint { color: var(--muted); margin-bottom: 22px; }

.auth-section { padding: 70px 0 110px; display: grid; place-items: center; }
.auth-card { width: min(480px, 100%); }
.auth-card > img { width: 140px; margin: -10px auto 8px; }
.auth-card .eyebrow, .auth-card h1 { text-align: center; }
.auth-card h1 { font-size: 2.7rem; margin-bottom: 28px; }
.wide-auth { display: block; }
.wide-card { width: min(760px,100%); margin: auto; }
.wide-card .eyebrow, .wide-card h1 { text-align: left; }

.admin-hero { padding: 70px 0 45px; display: flex; justify-content: space-between; align-items: end; gap: 30px; border-bottom: 1px solid var(--line); }
.admin-hero h1 { font-size: clamp(2.7rem, 5vw, 4.5rem); }
.admin-actions form { display: contents; }
.admin-section { padding-top: 50px; padding-bottom: 30px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.admin-table th, .admin-table td { text-align: left; padding: 15px; border-bottom: 1px solid rgba(255,255,255,.075); }
.admin-table th { color: var(--gold-light); background: rgba(216,160,74,.045); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.admin-production { display: flex; align-items: center; gap: 12px; min-width: 300px; }
.admin-production img { width: 78px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.admin-production a:hover { color: var(--gold-light); }
.text-button { background: none; border: 0; padding: 0; color: var(--gold-light); cursor: pointer; font-weight: 700; }
.text-button.danger { color: var(--danger); }
.message-list { display: grid; gap: 14px; }
.message-card { display: grid; grid-template-columns: 1fr auto; gap: 12px 30px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.08); border-radius: 15px; padding: 20px; }
.message-card div span { display: block; color: var(--muted); font-size: .83rem; }
.message-card time { color: var(--muted); font-size: .8rem; }
.message-card p { grid-column: 1/-1; margin: 0; color: #c5bcaf; }

.flash { margin-top: 18px; padding: 12px 16px; border-radius: 10px; border: 1px solid; position: relative; z-index: 5; }
.flash-success { background: rgba(53,132,82,.18); color: #b8f5c8; border-color: rgba(99,205,129,.35); }
.flash-error { background: rgba(178,51,46,.15); color: #ffc4bf; border-color: rgba(255,122,114,.35); }
.flash-info { background: rgba(82,112,168,.17); color: #cbd9ff; border-color: rgba(130,158,212,.35); }
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed rgba(245,215,148,.22); border-radius: 20px; color: var(--muted); }
.empty-state img { width: 170px; opacity: .25; margin: 0 auto 18px; }
.empty-state h3 { color: var(--ink); font-family: Georgia, serif; font-size: 2rem; margin: 0 0 8px; font-weight: 500; }

.site-footer { border-top: 1px solid var(--line); background: #070706; margin-top: 70px; }
.footer-grid { min-height: 190px; display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: center; gap: 30px; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 70px; height: 55px; object-fit: contain; opacity: .55; }
.footer-brand strong { font-family: Georgia, serif; color: var(--gold-light); font-size: 1.25rem; }
.footer-brand p, .copyright { color: var(--muted); margin: 3px 0 0; font-size: .82rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; color: #bfb6aa; font-size: .85rem; }
.footer-links a:hover { color: var(--gold-light); }

@media (max-width: 980px) {
    :root { --header-height: 82px; }
    .site-header, .site-header.scrolled { height: 82px; background: rgba(8,8,7,.94); backdrop-filter: blur(16px); }
    .header-inner { grid-template-columns: 95px 1fr auto auto; }
    .brand, .brand-logo, .scrolled .brand, .scrolled .brand-logo { height: 72px; width: auto; }
    .nav-toggle { display: block; order: 3; }
    .login-button { order: 2; }
    .primary-nav { display: none; position: fixed; top: 82px; left: 0; right: 0; background: rgba(8,8,7,.98); border-bottom: 1px solid var(--line); padding: 26px 20px 35px; flex-direction: column; align-items: stretch; gap: 2px; }
    .primary-nav.open { display: flex; }
    .primary-nav a { padding: 13px 10px; font-size: 1rem; }
    .hero { min-height: 620px; }
    .production-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .related-grid { grid-template-columns: repeat(2,1fr); }
    .services-grid { grid-template-columns: 1fr; }
    .services-grid a { border-right: 0; border-bottom: 1px solid var(--line); }
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr; padding: 45px 0; text-align: center; }
    .footer-brand { justify-content: center; }
    .copyright { justify-self: center; }
}

@media (max-width: 680px) {
    .container { width: min(100% - 26px, 1200px); }
    .header-inner { grid-template-columns: 80px 1fr auto; gap: 8px; }
    .login-button { font-size: .77rem; padding: 8px 12px; }
    .nav-toggle { order: initial; }
    .brand, .brand-logo, .scrolled .brand, .scrolled .brand-logo { height: 64px; }
    .hero { min-height: 590px; }
    .hero-content { padding: 60px 0 70px; }
    .hero h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
    .hero-copy { font-size: .98rem; }
    .hero-glow { width: 310px; height: 310px; right: -20%; }
    .section { padding: 70px 0; }
    .section-heading { display: block; }
    .section-note { text-align: left; margin-top: 14px; }
    .production-grid, .related-grid { grid-template-columns: 1fr; }
    .production-meta { font-size: .77rem; }
    .watch-page { padding-top: 24px; }
    .watch-player { border-radius: 10px; }
    .watch-info { display: block; }
    .watch-stats { text-align: left; margin-top: 18px; white-space: normal; }
    .compact-hero { padding: 70px 0 55px; }
    .contact-form, .auth-card { padding: 25px 20px; }
    .admin-hero { display: block; padding-top: 45px; }
    .admin-actions { margin-top: 24px; }
    .message-card { grid-template-columns: 1fr; }
    .message-card p { grid-column: 1; }
    .footer-brand { display: block; }
    .footer-brand img { margin: auto auto 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Sortowanie produkcji */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin: 0 0 30px;
    padding: 18px 20px;
    border: 1px solid rgba(245,215,148,.18);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(216,160,74,.065), rgba(255,255,255,.018));
}
.sort-bar-copy { display: grid; gap: 2px; }
.sort-bar-copy strong { color: #ddd3c5; font-size: .92rem; font-weight: 650; }
.sort-kicker { color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sort-form { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sort-form > label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.sort-select-wrap { position: relative; }
.sort-select-wrap::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1px solid var(--gold-light);
    border-bottom: 1px solid var(--gold-light);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.sort-form select {
    min-width: 310px;
    appearance: none;
    color: var(--ink);
    background: #0e0d0b;
    border: 1px solid rgba(245,215,148,.28);
    border-radius: 999px;
    padding: 11px 42px 11px 16px;
    outline: none;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.sort-form select:hover,
.sort-form select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,160,74,.1); }
.sort-submit { min-height: 42px; padding-block: 7px; }

@media (max-width: 760px) {
    .sort-bar { align-items: stretch; flex-direction: column; gap: 14px; }
    .sort-form { align-items: stretch; flex-direction: column; gap: 7px; }
    .sort-form select { width: 100%; min-width: 0; }
}

/* Kontakt + Discord */
.label-optional { color: var(--muted); font-weight: 500; }
.contact-note { margin-top: 24px; padding: 15px 17px; border-left: 2px solid var(--gold); background: rgba(216,160,74,.055); border-radius: 0 10px 10px 0; font-size: .9rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.message-card-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.message-card-head > div:first-child > span { display: block; color: var(--muted); font-size: .83rem; margin-top: 3px; }
.message-delivery { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; }
.discord-status { display: inline-flex; align-items: center; border: 1px solid; border-radius: 999px; padding: 5px 9px; font-size: .7rem; line-height: 1; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.discord-status-ok { color: #b8f5c8; border-color: rgba(99,205,129,.35); background: rgba(53,132,82,.18); }
.discord-status-error { color: #ffc4bf; border-color: rgba(255,122,114,.35); background: rgba(178,51,46,.15); }
.discord-status-off { color: #c4c8d3; border-color: rgba(166,175,197,.25); background: rgba(100,108,129,.14); }
.discord-status-pending { color: #f7ddb0; border-color: rgba(216,160,74,.32); background: rgba(216,160,74,.09); }

@media (max-width: 720px) {
    .message-card-head { flex-direction: column; }
    .message-delivery { align-items: flex-start; }
}

/* Anty-spam kontaktu */
.message-filter-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 20px; }
.message-filter-tabs a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 8px 13px; color: var(--muted); font-size: .84rem; font-weight: 750; background: rgba(255,255,255,.025); transition: .2s ease; }
.message-filter-tabs a:hover { color: var(--gold-light); border-color: rgba(216,160,74,.35); }
.message-filter-tabs a.active { color: #1a1005; background: linear-gradient(135deg, var(--gold-light), var(--gold)); border-color: transparent; }
.message-filter-tabs a span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.2); font-size: .72rem; }
.message-card-spam { border-color: rgba(255,122,114,.2); background: rgba(130,38,34,.08); }
.spam-status { display: inline-flex; align-items: center; border: 1px solid rgba(255,122,114,.4); border-radius: 999px; padding: 5px 9px; color: #ffc4bf; background: rgba(178,51,46,.18); font-size: .7rem; line-height: 1; font-weight: 850; letter-spacing: .05em; }
.message-card-head > div:first-child > .spam-reason { margin-top: 8px; color: #dca7a2; max-width: 760px; }
.message-actions-inline { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.message-actions-inline form { margin: 0; }

@media (max-width: 720px) {
    .message-actions-inline { justify-content: flex-start; }
}


/* Strona główna: najnowsza produkcja */
.hero-latest { background: #080807; isolation: isolate; }
.hero-latest::after { display: none; }
.hero-latest-media { position: absolute; inset: 0; z-index: 0; }
.hero-latest-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.9) contrast(1.04); }
.hero-latest-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(6,6,5,.98) 0%, rgba(6,6,5,.91) 34%, rgba(6,6,5,.62) 62%, rgba(6,6,5,.32) 100%),
        linear-gradient(0deg, rgba(6,6,5,.76) 0%, transparent 42%),
        radial-gradient(circle at 72% 45%, rgba(216,160,74,.11), transparent 30%);
}
.hero-latest-content { max-width: 1200px; z-index: 2; }
.hero-latest h1 { max-width: 900px; text-shadow: 0 5px 34px rgba(0,0,0,.55); }
.hero-latest-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; color: #c7beb1; font-size: .95rem; }
.hero-latest-meta span { display: inline-flex; gap: 5px; align-items: baseline; }
.hero-latest-meta strong { color: var(--ink); font-weight: 750; }

@media (max-width: 980px) {
    .hero-latest-shade {
        background:
            linear-gradient(90deg, rgba(6,6,5,.96) 0%, rgba(6,6,5,.84) 55%, rgba(6,6,5,.58) 100%),
            linear-gradient(0deg, rgba(6,6,5,.82) 0%, transparent 50%);
    }
}

@media (max-width: 680px) {
    .hero-latest-media img { object-position: 62% center; }
    .hero-latest-shade {
        background:
            linear-gradient(90deg, rgba(6,6,5,.91), rgba(6,6,5,.68)),
            linear-gradient(0deg, rgba(6,6,5,.96) 0%, rgba(6,6,5,.64) 60%, rgba(6,6,5,.45) 100%);
    }
    .hero-latest-meta { display: grid; gap: 5px; margin-top: 22px; font-size: .88rem; }
}

/* Zarządzanie administratorami */
.admin-subline { color: var(--muted); margin: 10px 0 0; }
.admin-hero-compact { padding-top: 54px; }
.button-small { min-height: 38px; padding: 8px 15px; font-size: .82rem; }
.panel-form label small { color: var(--muted); font-weight: 500; }
.panel-form input:disabled { opacity: .62; cursor: not-allowed; }
.invite-expiry { color: var(--muted); text-align: center; margin: -10px 0 24px; font-size: .88rem; }
.invite-invalid-card { text-align: center; }
.invite-invalid-card .button { margin-top: 8px; }

.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; align-items: start; }
.settings-card { background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.09); border-radius: 20px; padding: 28px; }
.settings-card h2 { font-family: Georgia, serif; font-size: 2rem; font-weight: 500; margin: 0 0 24px; }

.invite-once-section { padding-top: 42px; padding-bottom: 10px; }
.invite-once-card { border: 1px solid rgba(245,215,148,.34); background: linear-gradient(135deg, rgba(216,160,74,.11), rgba(255,255,255,.025)); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.invite-once-card h2 { font-family: Georgia, serif; font-weight: 500; margin: 0 0 8px; font-size: 2rem; }
.invite-once-card p { color: #c9c0b3; max-width: 850px; }
.invite-once-card small { color: var(--muted); display: block; margin-top: 10px; }
.copy-link-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 18px; }
.copy-link-row input { min-width: 0; background: #0d0c0a; border: 1px solid rgba(255,255,255,.14); color: var(--gold-light); border-radius: 12px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.users-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.user-card { border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.025); border-radius: 18px; padding: 22px; }
.user-card-top { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.user-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #1a1005; background: linear-gradient(135deg, var(--gold-light), var(--gold)); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; }
.user-card h3 { margin: 0; font-size: 1.05rem; }
.user-card-top p { margin: 1px 0 0; color: var(--muted); font-size: .82rem; }
.role-badge { justify-self: end; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 5px 9px; color: #c8beb1; font-size: .69rem; font-weight: 800; white-space: nowrap; }
.role-badge.role-super { color: var(--gold-light); border-color: rgba(245,215,148,.35); background: rgba(216,160,74,.07); }
.user-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0; }
.user-meta div { border-top: 1px solid rgba(255,255,255,.07); padding-top: 10px; }
.user-meta dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.user-meta dd { margin: 3px 0 0; font-size: .84rem; color: #d4cabd; }
.user-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 38px; }
.user-card-actions form { display: contents; }

.invite-table { min-width: 720px; }
.compact-empty { padding: 35px 20px; }
.compact-empty h3 { font-size: 1.6rem; }

.audit-list { border: 1px solid rgba(255,255,255,.08); border-radius: 18px; overflow: hidden; }
.audit-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.065); color: #cfc5b8; font-size: .88rem; }
.audit-row:last-child { border-bottom: 0; }
.audit-row strong { color: var(--ink); }
.audit-row span { color: var(--gold-light); }
.audit-row time { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.audit-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(216,160,74,.09); }
.flash-warning { background: rgba(177,122,38,.16); color: #f5d794; border-color: rgba(216,160,74,.38); }

@media (max-width: 900px) {
    .users-grid, .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .copy-link-row { grid-template-columns: 1fr; }
    .user-card-top { grid-template-columns: auto 1fr; }
    .role-badge { grid-column: 1 / -1; justify-self: start; }
    .user-meta { grid-template-columns: 1fr; }
    .audit-row { grid-template-columns: 10px 1fr; }
    .audit-row time { grid-column: 2; }
}
.account-errors { margin-top: 28px; }


/* Availability and contextual production enquiries. */
.order-status { display:flex; align-items:center; gap:9px; font-size:14px; line-height:1.5; font-weight:600; margin:16px 0; color:#e4cf9f; }
.order-status-dot { width:8px; height:8px; border-radius:50%; background:currentColor; flex:none; }
.order-status-open { color:#a4dfb5; }
.order-status-limited { color:#f0cc84; }
.order-status-paused { color:#e6b3ac; }
.production-inquiry { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px; margin:24px 0; border:1px solid rgba(212,175,95,.25); border-radius:20px; background:rgba(212,175,95,.045); }
.production-inquiry h2, .order-settings h2 { font-size:22px; margin:0 0 8px; }
.production-inquiry p { line-height:1.6; }
.production-inquiry .button { flex-shrink:0; white-space:normal; text-align:center; }
.production-inquiry .order-status { margin-bottom:0; }
.order-settings { border:1px solid rgba(212,175,95,.25); border-radius:20px; padding:24px; scroll-margin-top:110px; }
.order-settings > p { line-height:1.6; margin-bottom:18px; }
.order-settings .panel-form { max-width:560px; }
.order-settings .button { justify-self:start; }
.inquiry-context { padding:16px; background:rgba(212,175,95,.06); border-left:2px solid #d4af5f; line-height:1.6; overflow-wrap:anywhere; }
.inquiry-context a { color:#e4cf9f; text-decoration:underline; }
@media (max-width:680px) {
    .production-inquiry { flex-direction:column; align-items:stretch; padding:18px; gap:16px; }
    .production-inquiry h2, .order-settings h2 { font-size:20px; }
    .production-inquiry .button { width:100%; min-height:48px; }
    .order-settings { padding:18px; margin-top:20px; }
    .order-settings .panel-form select { font-size:16px; min-height:48px; }
    .order-settings .button { width:100%; }
}

/* Make availability immediately visible on the contact page. */
.page-kontakt .order-status {
    --status-color: #e4cf9f;
    --status-background: rgba(228,207,159,.10);
    color: var(--status-color);
    background: var(--status-background);
    border: 1px solid currentColor;
    border-left-width: 5px;
    border-radius: 14px;
    padding: 18px 22px;
    margin: 24px 0;
    width: fit-content;
    max-width: 100%;
    font-size: clamp(17px, 2vw, 21px);
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
    gap: 14px;
}
.page-kontakt .order-status-open { --status-color: #a4dfb5; --status-background: rgba(74,180,110,.14); }
.page-kontakt .order-status-limited { --status-color: #f0cc84; --status-background: rgba(220,165,60,.14); }
.page-kontakt .order-status-paused { --status-color: #e6b3ac; --status-background: rgba(210,88,74,.14); }
.page-kontakt .order-status-dot { width: 12px; height: 12px; box-shadow: 0 0 0 5px var(--status-background); }
@media (max-width: 680px) {
    .page-kontakt .order-status { width: 100%; padding: 16px; margin: 20px 0; font-size: 17px; }
}


.community-links { display:flex; flex-wrap:wrap; gap:12px 24px; }
.footer-community { grid-column:1 / -1; border-top:1px solid rgba(212,175,95,.18); padding-top:20px; }
.footer-community a { color:var(--gold-light); font-size:14px; padding:10px 0; }
.community-links a:hover { text-decoration:underline; }
.contact-community { margin-top:24px; flex-direction:column; align-items:flex-start; }
.contact-community h3 { margin:0 0 4px; font-size:18px; }
.contact-community .button { white-space:normal; gap:10px; text-align:left; min-height:48px; }
@media (max-width:680px) {
    .contact-community { align-items:stretch; }
    .contact-community .button { justify-content:space-between; }
    .footer-community { flex-direction:column; gap:4px; }
}

/* Explicit placement keeps the community links from creating orphan rows. */
.site-footer .footer-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand links" "community copyright";
    min-height: 0;
    padding-top: 32px;
    padding-bottom: 32px;
    gap: 20px 32px;
}
.site-footer .footer-brand { grid-area: brand; min-width: 0; }
.site-footer .footer-links { grid-area: links; justify-content: flex-end; }
.site-footer .footer-community { grid-area: community; border-top: 0; padding-top: 0; align-items: center; }
.site-footer .copyright { grid-area: copyright; justify-self: end; margin: 0; }
@media (max-width: 980px) {
    .site-footer .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "brand" "links" "community" "copyright";
        gap: 16px;
        text-align: center;
        padding-top: 28px;
        padding-bottom: 28px;
    }
    .site-footer .footer-links, .site-footer .footer-community { justify-content: center; }
    .site-footer .copyright { justify-self: center; }
}
