:root {
    color-scheme: light;
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-soft: #fbfbfd;
    --surface-2: #f0f1f6;
    --text: #33343d;
    --text-strong: #202129;
    --muted: #6f7180;
    --border: #dedfe8;
    --brand: #ef302b;
    --brand-dark: #d92723;
    --green: #18a058;
    --shadow: 0 18px 55px rgba(30, 31, 39, .11);
    --shadow-soft: 0 10px 28px rgba(30, 31, 39, .07);
    --header-h: 70px;
    --radius: 14px;
    --font: Arial, Helvetica, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #050507;
    --surface: #111114;
    --surface-soft: #15161a;
    --surface-2: #1a1b21;
    --text: #e8e8ee;
    --text-strong: #ffffff;
    --muted: #a9abb8;
    --border: #292a33;
    --brand: #ff3b36;
    --brand-dark: #e82d29;
    --shadow: 0 22px 70px rgba(0,0,0,.45);
    --shadow-soft: 0 12px 30px rgba(0,0,0,.24);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 0 0, rgba(239,48,43,.055), transparent 32rem), radial-gradient(circle at 100% 0, rgba(239,48,43,.05), transparent 34rem), var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; font-weight: 400; line-height: 1.48; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.site-header { position: sticky; top: 0; z-index: 60; height: var(--header-h); border-bottom: 1px solid color-mix(in srgb, var(--border) 86%, transparent); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(18px); }
.header-shell { max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: clamp(18px, 2.6vw, 34px); }
.brand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 176px; }
.brand-mark { width: 32px; height: 32px; }
.brand-text { color: var(--text-strong); letter-spacing: -.035em; font-size: clamp(23px, 1.75vw, 31px); font-weight: 500; line-height: 1; white-space: nowrap; }
.brand-text span { color: var(--brand); font-weight: 500; }
.main-nav { display: flex; align-items: center; gap: clamp(17px, 2.1vw, 31px); height: 100%; flex: 1 1 auto; }
.nav-link { display: inline-flex; align-items: center; height: 100%; color: var(--text-strong); font-size: 14.5px; font-weight: 500; letter-spacing: -.006em; white-space: nowrap; border: 0; background: transparent; padding: 0; }
.nav-link:hover, .nav-link.is-active, .nav-dropdown:hover > .nav-link { color: var(--brand); }
.chevron { margin-left: 7px; font-size: 16px; font-weight: 400; }
.nav-dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.mega-menu { position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px); display: grid; grid-template-columns: repeat(2, minmax(245px, 1fr)); gap: 42px; width: 610px; min-width: 610px; padding: 34px 36px 30px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
.nav-dropdown:hover .mega-menu, .nav-dropdown.is-open .mega-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.all-tools-menu { width: min(1120px, calc(100vw - 48px)); min-width: min(1120px, calc(100vw - 48px)); left: auto; right: -240px; transform: translateY(8px); grid-template-columns: 1fr; padding: 28px; }
.nav-dropdown:hover .all-tools-menu, .nav-dropdown.is-open .all-tools-menu { transform: translateY(0); }
.mega-grid-menu { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 20px 26px; }
.mega-col h3 { margin: 0 0 16px; color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.mega-item { display: flex; align-items: center; gap: 13px; min-height: 34px; margin: 0 0 14px; font-size: 14.5px; font-weight: 400; }
.mega-item.compact { margin-bottom: 10px; font-size: 14px; }
.mega-item strong { color: var(--text-strong); font-weight: 500; }
.mega-item:hover strong { color: var(--brand); }
.tool-mini, .tool-icon { display: inline-grid; place-items: center; flex: 0 0 auto; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.tool-mini { width: 27px; height: 27px; border-radius: 7px; }
.tool-mini svg { width: 19px; height: 19px; }
.tool-icon { width: 52px; height: 52px; border-radius: 14px; }
.tool-icon svg { width: 30px; height: 30px; }
.tool-icon.huge { width: 70px; height: 70px; border-radius: 19px; }
.tool-icon.huge svg { width: 40px; height: 40px; }
.header-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.login { color: var(--text-strong); font-size: 14.5px; font-weight: 500; }
.register, .primary-cta, .secondary-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; border-radius: 9px; font-size: 15px; font-weight: 500; border: 0; }
.register, .primary-cta { background: var(--brand); color: #fff; box-shadow: 0 11px 24px rgba(239,48,43,.18); }
.register:hover, .primary-cta:hover { background: var(--brand-dark); }
.secondary-cta { background: var(--surface); border: 1px solid var(--border); color: var(--text-strong); }
.theme-switch, .mobile-toggle { border: 0; background: transparent; color: var(--text-strong); }
.theme-switch { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; background: var(--surface-2); }
.theme-switch .moon { font-size: 11px; }
.mobile-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); }
.mobile-toggle span { display: block; width: 19px; height: 2px; margin: 4px auto; border-radius: 4px; background: currentColor; }
.mobile-backdrop { position: fixed; inset: var(--header-h) 0 0; z-index: 45; background: rgba(0,0,0,.38); }

main { min-height: 60vh; }
.hero { position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(58px, 8vw, 98px) 22px 38px; text-align: center; }
.hero.slim { max-width: 850px; padding-top: 58px; }
.hero-content { margin: 0 auto; max-width: 900px; }
.eyebrow { margin: 0 0 12px; color: var(--brand); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
h1, h2, h3 { color: var(--text-strong); letter-spacing: -.032em; line-height: 1.12; }
h1 { margin: 0; font-size: clamp(36px, 5.2vw, 58px); font-weight: 500; }
h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); font-weight: 500; }
h3 { font-weight: 500; }
.lead { max-width: 760px; margin: 18px auto 0; color: var(--muted); font-size: clamp(17px, 2vw, 22px); font-weight: 400; }
.hero-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.quick-tools { max-width: 1160px; margin: 0 auto 34px; padding: 0 22px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.quick-tool { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text-strong); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-soft); }
.quick-tool:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-1px); }
.tools-section, .seo-section, .home-faq, .feature-strip { max-width: 1180px; margin: 0 auto; padding: 28px 22px; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 18px; }
.section-head p { max-width: 570px; margin: 0; color: var(--muted); }
.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 18px; scrollbar-width: thin; }
.tab { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-strong); font-size: 14px; font-weight: 500; }
.tab.is-active, .tab:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand); }
.tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tool-card { display: flex; align-items: flex-start; gap: 14px; min-height: 124px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.tool-copy strong { display: block; margin-bottom: 6px; color: var(--text-strong); font-size: 17px; font-weight: 500; }
.tool-copy small { color: var(--muted); font-size: 14px; line-height: 1.38; }
.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-strip article { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft); }
.feature-strip strong { display: block; color: var(--text-strong); font-size: 17px; font-weight: 500; }
.feature-strip span { display: block; margin-top: 8px; color: var(--muted); }

.tool-hero { max-width: 1120px; margin: 0 auto; padding: 44px 22px 22px; }
.tool-hero-inner { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface)); box-shadow: var(--shadow-soft); }
.tool-hero h1 { font-size: clamp(34px, 4.4vw, 50px); }
.tool-hero .lead { margin: 14px 0 0; max-width: 830px; font-size: clamp(16px, 1.8vw, 20px); }
.breadcrumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 13.5px; }
.breadcrumbs a:hover { color: var(--brand); }
.tool-meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.tool-meta-row > span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.status-chip { color: var(--text-strong)!important; }
.status-active { border-color: color-mix(in srgb, var(--green) 42%, var(--border))!important; color: var(--green)!important; }
.status-missing_engine, .status-disabled { border-color: color-mix(in srgb, var(--brand) 42%, var(--border))!important; color: var(--brand)!important; }
.workspace { max-width: 1120px; margin: 0 auto; padding: 18px 22px 32px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.upload-card, .tips-card, .auth-card, .admin-card { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.upload-card { padding: 20px; }
.upload-card-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.upload-card-head h2 { font-size: 24px; }
.upload-card-head p { margin: 6px 0 0; color: var(--muted); }
.mini-badge { align-self: start; padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 500; }
.dropzone { position: relative; min-height: 245px; display: grid; place-items: center; border: 2px dashed color-mix(in srgb, var(--brand) 42%, var(--border)); border-radius: 18px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); transition: background .15s ease, transform .15s ease; }
.dropzone.is-dragover { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); transform: scale(.995); }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-inner { text-align: center; padding: 24px; }
.upload-badge { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 999px; margin-bottom: 14px; background: var(--brand); color: #fff; font-size: 36px; line-height: 1; }
.dropzone h2 { font-size: 26px; margin: 0; }
.dropzone p { margin: 8px auto 0; max-width: 430px; color: var(--muted); }
.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.options-grid label { display: grid; gap: 7px; color: var(--text-strong); font-size: 14px; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--text-strong); padding: 0 12px; outline: none; }
textarea { padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 11%, transparent); }
.small-help, .muted { color: var(--muted); }
.file-list { display: grid; gap: 8px; margin-top: 14px; }
.file-pill { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.file-pill strong { color: var(--text-strong); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pill span { color: var(--muted); flex: 0 0 auto; }
.progress { height: 10px; margin-top: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.progress span { display: block; width: 0; height: 100%; background: var(--brand); transition: width .12s ease; }
.primary-cta.full { width: 100%; margin-top: 14px; min-height: 50px; }
.result-box { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-strong); }
.result-box.success { border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border)); background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.result-box.error { border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border)); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.result-box a { color: var(--brand); font-weight: 500; }
.tips-card { padding: 20px; position: sticky; top: calc(var(--header-h) + 18px); }
.tips-card h2 { font-size: 24px; }
.tips-card ol { padding-left: 21px; color: var(--muted); }
.tips-card li { margin: 0 0 10px; }
.safety-note { margin-top: 18px; padding: 14px; border-radius: 13px; background: var(--surface-2); }
.safety-note strong { color: var(--text-strong); font-weight: 500; }
.safety-note p { margin: 6px 0 0; color: var(--muted); }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.faq-item summary { list-style: none; padding: 16px 18px; color: var(--text-strong); font-weight: 500; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0; padding: 0 18px 17px; color: var(--muted); }
.related-block { margin-top: 24px; }
.related-block h3 { margin: 0 0 12px; font-size: 22px; }
.related-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.related-tools a { padding: 10px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-strong); font-size: 14px; font-weight: 500; }
.related-tools a:hover { border-color: var(--brand); color: var(--brand); }
.auth-card { max-width: 460px; margin: 48px auto; padding: 22px; }
.auth-card h1 { font-size: 32px; }
.auth-card form { display: grid; gap: 13px; margin-top: 16px; }
.flash { max-width: 1120px; margin: 16px auto 0; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-strong); }
.flash.success { border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.flash.error { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 30px 22px; display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 24px; align-items: start; }
.footer-brand strong { color: var(--text-strong); font-size: 21px; font-weight: 500; }
.footer-brand p { margin: 8px 0 0; color: var(--muted); }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }
.newsletter-mini label { display: block; margin-bottom: 8px; color: var(--text-strong); font-weight: 500; }
.newsletter-mini div { display: flex; gap: 8px; }
.newsletter-mini button { flex: 0 0 auto; border: 0; border-radius: 10px; background: var(--brand); color: #fff; padding: 0 14px; font-weight: 500; }

.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - var(--header-h)); }
.admin-sidebar { border-right: 1px solid var(--border); background: var(--surface); padding: 20px; }
.admin-main { padding: 24px; }
.admin-card { padding: 18px; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 11px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { color: var(--text-strong); font-weight: 500; }

@media (max-width: 1180px) { .main-nav { gap: 18px; } .header-actions .login, .header-actions .register { display: none; } .quick-tools { grid-template-columns: repeat(4, 1fr); } .tools-grid { grid-template-columns: repeat(3, 1fr); } .all-tools-menu { right: -170px; } }
@media (max-width: 920px) {
    :root { --header-h: 64px; }
    .header-shell { padding: 0 16px; }
    .mobile-toggle { display: block; }
    .main-nav { position: fixed; top: var(--header-h); right: 0; bottom: 0; z-index: 70; width: min(390px, 92vw); height: auto; display: block; padding: 18px; overflow-y: auto; border-left: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); transform: translateX(105%); transition: transform .18s ease; }
    .main-nav.is-open { transform: translateX(0); }
    .nav-link { width: 100%; height: 44px; justify-content: space-between; }
    .nav-dropdown { display: block; height: auto; }
    .mega-menu, .all-tools-menu { position: static; transform: none!important; width: 100%; min-width: 0; opacity: 1; visibility: visible; pointer-events: auto; display: none; grid-template-columns: 1fr; box-shadow: none; border-radius: 12px; padding: 14px; margin: 4px 0 12px; }
    .nav-dropdown.is-open .mega-menu { display: grid; }
    .mega-grid-menu { grid-template-columns: 1fr; }
    .quick-tools { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .workspace { grid-template-columns: 1fr; }
    .tips-card { position: static; }
    .feature-strip, .footer-inner { grid-template-columns: 1fr; }
    .section-head { display: block; }
    .section-head p { margin-top: 8px; }
}
@media (max-width: 620px) {
    body { font-size: 15px; }
    .brand { min-width: 0; }
    .brand-text { font-size: 23px; }
    .theme-switch { display: none; }
    .hero { padding-top: 42px; text-align: left; }
    .hero-content { max-width: none; }
    h1 { font-size: 34px; }
    .lead { margin-left: 0; margin-right: 0; font-size: 17px; }
    .hero-actions { justify-content: flex-start; }
    .quick-tools { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .tool-card { min-height: 104px; }
    .tool-hero-inner { grid-template-columns: 1fr; padding: 20px; }
    .workspace, .tool-hero, .tools-section, .seo-section, .home-faq, .feature-strip { padding-left: 14px; padding-right: 14px; }
    .options-grid { grid-template-columns: 1fr; }
    .dropzone { min-height: 210px; }
    .newsletter-mini div { flex-direction: column; }
    .newsletter-mini button { min-height: 42px; }
}

/* v5.0.2 - poprawka checkboxa w rejestracji */
.auth-intro {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14.5px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 500;
}

.check-row,
.auth-form .check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 2px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    cursor: pointer;
}

.check-row input[type="checkbox"],
.auth-form .check-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    padding: 0;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: var(--surface-soft);
    box-shadow: none;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.check-row input[type="checkbox"]:hover,
.auth-form .check-row input[type="checkbox"]:hover {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
}

.check-row input[type="checkbox"]:focus,
.auth-form .check-row input[type="checkbox"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}

.check-row input[type="checkbox"]:checked,
.auth-form .check-row input[type="checkbox"]:checked {
    border-color: var(--brand);
    background: var(--brand);
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.2 3.7 5.8 9.1 3.2 6.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

.auth-terms span {
    display: block;
    padding-top: 0;
}

.auth-terms a {
    color: var(--brand);
    font-weight: 500;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

@media (max-width: 620px) {
    .auth-card {
        margin: 26px 14px;
        padding: 18px;
    }

    .auth-card h1 {
        font-size: 28px;
    }
}

/* v5.0.3 - stabilizacja UI, formularze, mobile, konto i pricing */
:root {
    --focus: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
    --container: 1180px;
}
.skip-link {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 999;
    transform: translateY(-160%);
    background: var(--brand);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
}
.skip-link:focus { transform: translateY(0); }
.site-header { background: color-mix(in srgb, var(--surface) 96%, transparent); }
.header-shell { max-width: 1500px; }
.brand-text { font-weight: 500; letter-spacing: -.045em; }
.nav-button { appearance: none; }
.mobile-nav-actions { display: none; }
.full { width: 100%; }
.primary-cta:focus-visible,
.secondary-cta:focus-visible,
.register:focus-visible,
.login:focus-visible,
.nav-link:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}
input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--text-strong);
    padding: 10px 12px;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
textarea { min-height: 105px; resize: vertical; }
input:hover,
select:hover,
textarea:hover { border-color: color-mix(in srgb, var(--brand) 28%, var(--border)); }
input:focus,
select:focus,
textarea:focus { border-color: var(--brand); box-shadow: var(--focus); }
input[type="checkbox"] { min-height: 0; }
.muted { color: var(--muted); }
.muted a { color: var(--brand); font-weight: 500; }
.small-help { font-size: 13px; }
.home-hero { padding-top: clamp(52px, 7vw, 84px); }
h1 { font-size: clamp(34px, 4.4vw, 54px); font-weight: 500; }
.hero .lead { max-width: 820px; }
.hero-actions .primary-cta,
.hero-actions .secondary-cta { min-width: 172px; }
.quick-tools { margin-bottom: 26px; }
.quick-tool { box-shadow: none; }
.quick-tool:hover { box-shadow: var(--shadow-soft); }
.tool-card { position: relative; overflow: hidden; }
.tool-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 84px;
    height: 2px;
    background: color-mix(in srgb, var(--accent) 35%, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .16s ease;
}
.tool-card:hover::after { transform: scaleX(1); }
.tool-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
}
.tool-meta-row > span,
.status-chip,
.status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    padding: 5px 10px;
}
.status.completed,
.status.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.status.failed,
.status.deleted { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.status.processing,
.status.queued,
.status.uploaded { color: #d97706; border-color: color-mix(in srgb, #f59e0b 35%, var(--border)); }
.dropzone { cursor: pointer; }
.dropzone.is-dragover {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    box-shadow: var(--focus);
}
.file-list { display: grid; gap: 8px; margin-top: 12px; }
.file-pill {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 11px;
    padding: 10px 12px;
    color: var(--text-strong);
}
.file-pill strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pill span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.progress {
    height: 9px;
    margin: 12px 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-2);
}
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .16s ease; }
.result-box { border: 1px solid var(--border); }
.auth-section,
.content-page,
.page-shell {
    max-width: var(--container);
    margin: 0 auto;
    padding: 44px 22px;
}
.auth-card {
    max-width: 470px;
    padding: 26px;
    border-radius: 20px;
}
.auth-card h1 { margin-bottom: 6px; font-size: 31px; }
.auth-form { gap: 14px; }
.auth-form label { color: var(--text-strong); }
.auth-form .check-row {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}
.auth-form .check-row input[type="checkbox"] { margin-top: 2px; }
.account-head,
.page-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 20px;
}
.account-head h1,
.page-hero h1 { margin: 0; }
.account-card,
.page-card,
.table-card,
.pricing-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 20px;
}
.table-wrap { width: 100%; overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); }
.table-wrap .admin-table { min-width: 720px; }
.pricing-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 22px 44px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.pricing-card h2 { margin: 0 0 8px; font-size: 24px; }
.price { margin: 18px 0; }
.price strong { color: var(--text-strong); font-size: 30px; letter-spacing: -.03em; }
.pricing-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.pricing-list li::before { content: "✓"; margin-right: 8px; color: var(--green); }
.site-footer { border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.newsletter-mini input { min-width: 0; }
@media (max-width: 1180px) {
    .header-actions .login,
    .header-actions .register { display: none; }
}
@media (max-width: 920px) {
    body.has-mobile-menu { overflow: hidden; }
    .mobile-nav-actions { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
    .main-nav { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
    .mega-col h3 { margin-top: 4px; }
    .all-tools-menu .mega-grid-menu { gap: 10px; }
    .account-head,
    .page-hero { display: block; }
    .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .header-shell { gap: 10px; }
    .brand-mark { width: 28px; height: 28px; }
    .brand-text { font-size: 21px; }
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    .auth-section,
    .content-page,
    .page-shell { padding: 28px 14px; }
    .auth-card { margin: 0 auto; padding: 20px; }
    .auth-card h1 { font-size: 28px; }
    .file-pill { align-items: flex-start; flex-direction: column; gap: 4px; }
    .footer-links { grid-template-columns: 1fr; }
}

/* v5.0.4 - panel admina */
.admin-body {
    background: var(--bg);
}
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(18px);
}
.admin-topbar .brand { min-width: 0; }
.admin-topbar .brand-text { font-size: 24px; }
.admin-topbar-actions { display: flex; align-items: center; gap: 10px; }
.admin-user { color: var(--muted); font-size: 13px; }
.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: calc(100vh - 68px);
}
.admin-sidebar {
    position: sticky;
    top: 68px;
    align-self: start;
    height: calc(100vh - 68px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--surface);
    padding: 18px;
}
.admin-nav-group { display: grid; gap: 6px; margin-bottom: 18px; }
.admin-nav-group span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 0 10px 4px;
}
.admin-sidebar a {
    display: flex;
    align-items: center;
    min-height: 40px;
    border-radius: 11px;
    padding: 0 12px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 500;
}
.admin-sidebar a:hover,
.admin-sidebar a.is-active {
    background: color-mix(in srgb, var(--brand) 9%, var(--surface));
    color: var(--brand);
}
.admin-content { min-width: 0; padding: 24px; }
.admin-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.admin-page-head h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.admin-stats div,
.admin-panel,
.admin-card {
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.admin-stats div { padding: 18px; }
.admin-stats strong {
    display: block;
    color: var(--text-strong);
    font-size: 30px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: -.04em;
}
.admin-stats span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.admin-panel { padding: 18px; margin-bottom: 16px; overflow: hidden; }
.admin-panel h2 { margin: 0 0 14px; font-size: 22px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.admin-table { min-width: 760px; }
.admin-table th {
    background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.admin-table td { vertical-align: top; }
.admin-table small { color: var(--muted); }
.admin-form,
.admin-form-grid {
    display: grid;
    gap: 14px;
}
.admin-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-form label,
.admin-form-grid label,
.admin-table label {
    display: grid;
    gap: 7px;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 500;
}
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.admin-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 3px 9px;
    border: 1px solid var(--border);
    color: var(--text-strong);
    font-size: 12px;
    background: var(--surface-soft);
}
.badge.green { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.badge.red { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.badge.yellow { color: #d97706; border-color: color-mix(in srgb, #f59e0b 35%, var(--border)); }
.log-box {
    overflow: auto;
    max-height: 420px;
    background: #08090d;
    color: #e8e8ee;
    border-radius: 14px;
    padding: 14px;
    font-size: 12px;
    line-height: 1.55;
}
.tool-edit-row textarea { min-width: 260px; }
@media (max-width: 1100px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: static;
        height: auto;
        display: flex;
        gap: 12px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .admin-nav-group { min-width: 180px; margin-bottom: 0; }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
    .admin-topbar { padding: 0 14px; }
    .admin-topbar .secondary-cta,
    .admin-topbar .admin-user { display: none; }
    .admin-content { padding: 16px 14px; }
    .admin-stats { grid-template-columns: 1fr; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .admin-filter { align-items: stretch; flex-direction: column; }
}
