/*
 * SEOHlídač.cz — Modern Design System v2
 * Profesionální, čistý design s tmavě modrou paletou,
 * vylepšenou typografií a moderními prvky.
 */

/* === CSS Variables / Design Tokens === */
:root {
    /* Primary palette */
    --blue-950: #0a1628;
    --blue-900: #0f1f3a;
    --blue-800: #152d56;
    --blue-700: #1b3d73;
    --blue-600: #214d90;
    --blue-500: #2b5fad;
    --blue-400: #4a80d4;

    /* Accent / CTA */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;

    /* Surfaces */
    --white: #ffffff;
    --bg: #f0f4f8;
    --bg-alt: #e8edf4;
    --surface: #ffffff;
    --surface-hover: #f8fafc;

    /* Text */
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Semantic colors */
    --ok: #059669;
    --ok-light: #10b981;
    --ok-bg: #ecfdf5;
    --ok-border: #a7f3d0;

    --warning: #d97706;
    --warning-light: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;

    --error: #dc2626;
    --error-light: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fecaca;

    --info: #3b82f6;
    --info-bg: #eff6ff;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

    /* Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 999px;

    /* Typography */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

    /* Transitions */
    --transition: 150ms ease;
    --transition-slow: 250ms ease;

    /* Layout */
    --topbar-height: 60px;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: var(--text);
}

h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Topbar / Navigation === */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--topbar-height);
    padding: 0 32px;
    background: linear-gradient(135deg, var(--blue-950) 0%, var(--blue-900) 100%);
    color: var(--text-inverse);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(10, 22, 40, 0.3);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    gap: 10px;
}

.brand img {
    display: block;
    width: 170px;
    height: auto;
    filter: brightness(1.05);
}

.topbar nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.topbar nav a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.topbar nav a:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

/* === Public Topbar (Homepage) === */
.public-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--topbar-height);
    padding: 0 32px;
    background: linear-gradient(135deg, var(--blue-950) 0%, var(--blue-900) 100%);
    color: var(--text-inverse);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.public-topbar .brand {
    color: var(--text-inverse);
}

.public-topbar nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.public-topbar nav a {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.public-topbar nav a:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

/* === Container === */
.container {
    width: min(1200px, calc(100% - 48px));
    margin: 40px auto;
}

.container.narrow {
    width: min(680px, calc(100% - 48px));
}

/* === Page Head === */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.page-head h1 {
    margin-bottom: 4px;
}

/* === Section Head === */
.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section-head.compact {
    align-items: center;
    margin-bottom: 16px;
}

.section-head.compact h3 { margin: 0; }

/* === Muted text === */
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.empty {
    color: var(--text-muted);
    padding: 24px 16px;
    text-align: center;
    font-style: italic;
}

/* === Buttons === */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    font-family: var(--font);
    line-height: 1.4;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    user-select: none;
}

.button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.button.primary {
    color: var(--text-inverse);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.button.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.button.secondary {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.button.secondary:hover {
    background: var(--surface-hover);
    border-color: #cbd5e1;
    box-shadow: var(--shadow);
}

.button.danger {
    color: var(--text-inverse);
    background: var(--error);
    border-color: var(--error);
}

.button.danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.button.success {
    color: var(--text-inverse);
    background: var(--ok);
    border-color: var(--ok);
}

.button.success:hover {
    background: #047857;
    border-color: #047857;
}

.small-button {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* === Actions group === */
.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* === Panels / Cards === */
.panel,
.card,
.website-card,
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), border-color var(--transition);
}

.panel {
    padding: 28px;
    margin-bottom: 24px;
}

.panel:hover {
    box-shadow: var(--shadow-md);
}

.card {
    padding: 24px;
}

.card span:first-child {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}

.card strong {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

/* === Account Grid === */
.account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.account-card {
    margin: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.account-card span {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.account-card strong {
    display: block;
    margin: 6px 0 4px;
    font-size: 1.75rem;
    font-weight: 800;
}

.account-card p {
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.account-card.highlight {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--surface) 100%);
}

.account-card .button {
    align-self: flex-start;
}

/* === Website Grid / Cards === */
.website-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.website-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    color: var(--text);
    gap: 10px;
}

.website-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.website-card h2 {
    font-size: 1.15rem;
    margin: 0;
}

.website-card p {
    color: var(--text-muted);
    overflow-wrap: anywhere;
    font-size: 0.875rem;
    flex: 1;
}

.website-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* === Issue Grid === */
.issue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.issue-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: var(--radius);
    color: var(--text);
    background: var(--surface);
    transition: all var(--transition);
}

.issue-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.issue-card.warning { border-left-color: var(--warning); }
.issue-card.error { border-left-color: var(--error); }

.issue-card strong {
    font-size: 0.95rem;
}

.issue-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    flex: 1;
}

.issue-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* === Tables === */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

thead th {
    padding: 12px 14px;
    border-bottom: 2px solid var(--border);
    text-align: left;
    vertical-align: middle;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-hover);
}

tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    font-size: 0.9rem;
}

tbody tr:hover {
    background: var(--surface-hover);
}

tbody td.empty {
    padding: 32px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.6;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge.ok {
    color: var(--ok);
    background: var(--ok-bg);
}
.badge.ok::before { background: var(--ok); }

.badge.warning {
    color: var(--warning);
    background: var(--warning-bg);
}
.badge.warning::before { background: var(--warning); }

.badge.error {
    color: var(--error);
    background: var(--error-bg);
}
.badge.error::before { background: var(--error); }

/* === Forms === */
.form {
    display: grid;
    gap: 20px;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid .wide {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="search"],
textarea,
select {
    width: 100%;
    min-height: 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--surface);
    transition: all var(--transition);
}

textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input:disabled,
textarea:disabled,
select:disabled {
    background: var(--bg-alt);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* === Alerts === */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
    border: 1px solid;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert::before {
    content: "";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.alert.error {
    color: #991b1b;
    background: var(--error-bg);
    border-color: var(--error-border);
}

.alert.warning {
    color: #92400e;
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

.alert.resolved,
.alert.success {
    color: #065f46;
    background: var(--ok-bg);
    border-color: var(--ok-border);
}

/* === Locked Box === */
.locked-box {
    padding: 18px 20px;
    margin: 16px 0 24px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-light);
}

.locked-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    color: var(--text);
}

.locked-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.locked-box .button {
    margin-top: 6px;
}

/* === URL List === */
.url-list {
    margin: 0;
    padding-left: 22px;
}

.url-list li {
    margin: 8px 0;
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

/* === Auth Pages === */
.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--blue-950) 0%, var(--blue-800) 50%, var(--blue-700) 100%);
}

.auth-card {
    width: min(440px, 100%);
    padding: 36px 32px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 6px;
}

.auth-card .muted {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card .form {
    gap: 16px;
}

.auth-card .button {
    width: 100%;
}

.auth-card .actions {
    justify-content: center;
    margin-top: 12px;
}

/* === Guide List / Cards === */
.guide-list {
    display: grid;
    gap: 16px;
}

.guide-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: box-shadow var(--transition);
}

.guide-card:hover {
    box-shadow: var(--shadow-md);
}

.guide-card.locked {
    background: var(--bg-alt);
    border-style: dashed;
}

.guide-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.guide-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.guide-card ol {
    margin: 0;
    padding-left: 22px;
}

.guide-card li {
    margin: 6px 0;
    font-size: 0.9rem;
}

/* === Locked Guide Copy === */
.locked-guide-copy {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.locked-guide-copy p {
    margin: 0;
    font-size: 0.9rem;
}

.locked-guide-copy .button {
    width: fit-content;
}

/* === Alert List === */
.alert-list {
    display: grid;
    gap: 12px;
}

.alert-list p {
    margin: 4px 0;
    font-size: 0.9rem;
}

/* === Inline Form === */
.inline-form {
    margin-top: 12px;
}

/* === Danger Zone === */
.danger-zone {
    border-color: var(--error-border);
    border-width: 1.5px;
}

/* === Audit Page === */
.audit-stats .card strong {
    font-size: 1.75rem;
}

.audit-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 20px;
}

.audit-meta span {
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

.audit-sections {
    display: grid;
    gap: 20px;
}

.audit-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: var(--surface);
}

.audit-check-list {
    display: grid;
    gap: 12px;
}

.audit-check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: var(--radius);
    background: var(--surface);
    transition: box-shadow var(--transition);
}

.audit-check:hover {
    box-shadow: var(--shadow-sm);
}

.audit-check.ok { border-left-color: var(--ok); }
.audit-check.warning { border-left-color: var(--warning); }
.audit-check.error { border-left-color: var(--error); }
.audit-check.locked {
    background: var(--bg-alt);
    border-style: dashed;
}

.audit-check h4 {
    font-size: 1rem;
    margin: 0 0 4px;
}

.audit-check p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.audit-value {
    color: var(--blue-700);
    overflow-wrap: anywhere;
    font-size: 0.9rem;
    font-weight: 500;
}

.audit-points {
    color: var(--text-muted);
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
}

/* === Audit Full Page === */
.audit-page {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: calc(100vh - var(--topbar-height));
    background: var(--bg);
}

.audit-sidebar {
    position: sticky;
    top: var(--topbar-height);
    align-self: start;
    max-height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    padding: 28px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.audit-run-button,
.audit-sidebar-button {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}

.audit-run-button {
    color: var(--text-inverse);
    background: var(--ok);
    box-shadow: var(--shadow-sm);
}

.audit-run-button:hover {
    background: #047857;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.audit-sidebar-button {
    margin-top: 12px;
    color: var(--text);
    background: var(--bg-alt);
}

.audit-sidebar-button:hover {
    background: var(--border);
}

.audit-nav,
.audit-history-card {
    margin-top: 28px;
}

.audit-nav strong,
.audit-history-card strong {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.audit-nav a,
.audit-history-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 8px 24px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.audit-nav a::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: -24px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    flex-shrink: 0;
}

.audit-nav a:hover,
.audit-history-card a:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.audit-nav small,
.audit-history-card span {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.audit-history-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === Audit Report === */
.audit-report {
    width: min(1080px, calc(100% - 56px));
    margin: 0 auto;
    padding: 48px 0 80px;
}

.audit-report-head {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding: 0 48px 32px;
    border-bottom: 2px solid var(--border);
}

.audit-kicker {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.audit-report-head h1 {
    font-size: 2.25rem;
    margin: 0;
}

.audit-report-head p {
    margin-top: 10px;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    font-size: 0.95rem;
}

/* === Score Circle === */
.audit-score-circle {
    display: grid;
    place-items: center;
    flex: 0 0 128px;
    width: 128px;
    height: 128px;
    border: 8px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    transition: all var(--transition);
}

.audit-score-circle.ok { border-color: var(--ok-light); }
.audit-score-circle.warning { border-color: var(--warning-light); }
.audit-score-circle.error { border-color: var(--error-light); }

.audit-score-circle strong {
    margin-top: 6px;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.audit-score-circle span {
    margin-top: -14px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

/* === Audit Summary Strip === */
.audit-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 28px 48px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--border);
    overflow: hidden;
}

.audit-summary-strip span {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    background: var(--surface);
}

.audit-summary-strip strong {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.audit-summary-strip em {
    color: var(--text);
    font-style: normal;
    font-weight: 700;
    font-size: 0.95rem;
}

/* === Audit Report Sections === */
.audit-report .locked-box,
.audit-report .alert {
    margin: 24px 48px;
}

.audit-report-section {
    padding: 36px 48px 28px;
}

.audit-report-section + .audit-report-section {
    border-top: 1px solid var(--border);
}

.audit-report-section header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.audit-report-section h2 {
    font-size: 1.75rem;
}

.audit-report-section header strong {
    color: var(--ok);
    font-size: 1.3rem;
    font-weight: 700;
}

.audit-report-checks {
    display: grid;
    gap: 22px;
}

.audit-report-check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 24px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: background var(--transition);
}

.audit-report-check:hover {
    background: var(--surface-hover);
}

.audit-check-copy h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.audit-check-copy h3 span {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.audit-check-message {
    margin: 6px 0;
    font-size: 0.9rem;
}

.audit-check-message.ok {
    color: var(--ok);
}

.audit-check-message.warning {
    color: var(--warning);
}

.audit-check-message.error {
    color: var(--error);
}

.audit-check-fix {
    margin: 6px 0;
    font-size: 0.9rem;
    color: var(--ok);
}

.audit-check-fix.locked {
    color: var(--warning);
}

.audit-report-points {
    color: var(--ok);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.audit-report-points.warning { color: var(--warning); }
.audit-report-points.error { color: var(--error); }

.audit-empty-state {
    margin: 40px 48px;
    padding: 40px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.audit-empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === Public Homepage === */
.public-home {
    background: var(--bg);
}

.public-hero {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 64px 0 80px;
}

.public-hero-copy {
    max-width: 800px;
    margin-bottom: 48px;
}

.public-hero-copy h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    line-height: 1.15;
}

.public-hero-copy > p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

/* === Public Test Form === */
.public-test-form {
    display: flex;
    gap: 12px;
    margin: 28px 0 20px;
    max-width: 600px;
}

.public-test-form input[type="text"] {
    flex: 1;
    min-height: 52px;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 18px;
}

.public-test-form input[type="text"]:focus {
    border-color: var(--accent);
}

.public-test-form button {
    min-height: 52px;
    padding: 12px 32px;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--accent);
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.public-test-form button:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* === Public Links === */
.public-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.public-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.public-links a:hover {
    color: var(--accent);
}

/* === Public Hero Panel === */
.public-hero-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-lg);
}

.public-hero-panel strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--text);
}

.public-hero-panel ul {
    display: grid;
    gap: 10px;
    padding-left: 22px;
}

.public-hero-panel li {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* === Public Content Section === */
.public-content-section {
    margin-bottom: 48px;
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.public-content-section h2 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.public-content-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.public-content-section p:last-child {
    margin-bottom: 0;
}

/* === Profile / Account Form === */
.account-form h2 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

/* === Payment / Pricing Section === */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.pricing-card {
    padding: 28px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition);
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.pricing-card.featured::before {
    content: "NEJLEPŠÍ VOLBA";
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--accent);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.pricing-card h2, .pricing-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 12px 0 4px;
}

.pricing-card .price-period {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
}

.pricing-card li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
}

.pricing-card li::before {
    content: "✓";
    color: var(--ok);
    font-weight: 700;
    margin-right: 8px;
}

.pricing-card .button {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
}

/* === Partner Links (Homepage) === */
.partner-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.partner-links a {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 600;
    transition: all var(--transition);
}

.partner-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* === Invoice Status === */
.invoice-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === Tooltip / Info === */
.info-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--info-bg);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--blue-700);
}

/* === Loading / Skeleton === */
.skeleton {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-alt) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

    .audit-page {
        grid-template-columns: 1fr;
    }

    .audit-sidebar {
        position: static;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 20px;
    }

    .audit-nav,
    .audit-history-card {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .topbar,
    .public-topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 10px;
    }

    .topbar nav,
    .public-topbar nav {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .container {
        width: calc(100% - 32px);
        margin: 24px auto;
    }

    .page-head {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid.two,
    .form-grid.three {
        grid-template-columns: 1fr;
    }

    .public-test-form {
        flex-direction: column;
    }

    .public-test-form button {
        width: 100%;
    }

    .public-hero-copy h1 {
        font-size: 2rem;
    }

    .audit-report-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 24px 24px;
    }

    .audit-report {
        width: 100%;
        padding: 24px 0 48px;
    }

    .audit-report-section {
        padding: 24px;
    }

    .audit-report .locked-box,
    .audit-report .alert {
        margin: 16px 24px;
    }

    .audit-summary-strip {
        margin: 16px 24px 8px;
    }

    .audit-report-check {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .audit-report-points {
        text-align: left;
    }

    .website-grid,
    .issue-grid {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .panel { padding: 20px; }
    .public-content-section { padding: 24px; }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card strong {
        font-size: 1.75rem;
    }

    .public-hero {
        padding: 32px 0 48px;
    }

    .public-hero-copy h1 {
        font-size: 1.6rem;
    }
}

/* === Print Styles === */
@media print {
    .topbar,
    .public-topbar,
    .audit-sidebar,
    .button {
        display: none !important;
    }

    body {
        background: white;
    }

    .audit-page {
        grid-template-columns: 1fr;
    }

    .audit-report {
        width: 100%;
        box-shadow: none;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--text-inverse);
}

/* === Footer === */
.app-footer {
    margin-top: 80px;
    background: var(--blue-950);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0 0;
}

.footer-inner {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    /* Sloupec s odkazy nese nově i identifikaci provozovatele (IČO, sídlo, telefon),
       potřebuje proto víc místa než původní 1fr. */
    grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
    gap: 40px;
    padding-bottom: 32px;
}

.footer-brand strong {
    display: block;
    color: var(--text-inverse);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.footer-brand p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

/* Identifikace provozovatele (IČO, sídlo, telefon) v patičce všech vnitřních stránek. */
.footer-address {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-style: normal;
    line-height: 1.8;
}

.footer-address a {
    display: inline;
    padding: 0;
}

/* Otevření lišty souhlasu je akce, ne odkaz — <button> místo href="#". */
.footer-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.footer-linkbtn:hover {
    color: var(--text-inverse);
}

.footer-links strong {
    display: block;
    color: var(--text-inverse);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--text-inverse);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .app-footer {
        margin-top: 48px;
        padding: 32px 0 0;
    }
}

/* Lišta souhlasu s cookies (dřív vložený <style> v těle stránky — W3C ho hlásí jako chybu) */
.sh-consent { position:fixed; left:0; right:0; bottom:0; z-index:9999; background:#0a1628; color:#e2e8f0; border-top:3px solid #2563eb; box-shadow:0 -8px 30px rgba(0,0,0,.25); }
.sh-consent[hidden] { display:none; }
.sh-consent__in { max-width:1140px; margin:0 auto; padding:16px 20px; display:flex; gap:18px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.sh-consent__txt { margin:0; font-size:14px; line-height:1.55; max-width:64ch; }
.sh-consent__txt a { color:#93c5fd; text-decoration:underline; }
.sh-consent__btns { display:flex; gap:10px; flex-wrap:wrap; }
.sh-consent__btn { font:inherit; font-size:15px; font-weight:700; padding:11px 22px; border-radius:10px; cursor:pointer; border:2px solid transparent; }
.sh-consent__btn--main { background:#2563eb; color:#fff; }
.sh-consent__btn--main:hover { background:#1d4ed8; }
.sh-consent__btn--ghost { background:transparent; color:#e2e8f0; border-color:#64748b; }
.sh-consent__btn--ghost:hover { border-color:#e2e8f0; }
@media (max-width:640px){ .sh-consent__in { flex-direction:column; align-items:stretch; } .sh-consent__btns .sh-consent__btn { flex:1; } }

/* Právní stránky (obchodní podmínky, zásady OOÚ): zvýraznění v textu je běžné tučné písmo,
   ne velké číslo z metrických karet (.card strong). */
.card.legal-content strong {
    display: inline;
    font-size: inherit;
    font-weight: 700;
    letter-spacing: normal;
    line-height: inherit;
}
.card.legal-content li + li {
    margin-top: 6px;
}
.card.legal-content h2 {
    margin: 1.6em 0 0.4em;
}
.card.legal-content h2:first-child {
    margin-top: 0;
}
