/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Hlavní barva — moderní indigo. Změna vzhledu = přepsat tyhle tři. */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --primary-soft: rgba(79, 70, 229, 0.10);   /* tint pro aktivní/vybrané pozadí */
    --primary-border: rgba(79, 70, 229, 0.30);

    /* Světlá „editorial" paleta — teplá bílá, bílé karty, tmavě-teplý text */
    --bg: #f7f6f3;
    --bg-card: #ffffff;
    --bg-elevated: #f2f0ec;
    --border: #e7e4de;
    --border-strong: #d7d2c9;
    --text: #201d1a;
    --text-muted: #6b6560;
    --text-dim: #9a938c;
    --hover: rgba(0, 0, 0, 0.035);              /* jemné ztmavení místo dřívějšího zesvětlení */

    --success: #15803d;
    --warning: #b45309;
    --error: #dc2626;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 2px rgba(20, 18, 16, 0.04), 0 1px 3px rgba(20, 18, 16, 0.06);
    --shadow-lg: 0 4px 20px rgba(20, 18, 16, 0.08);

    /* Písmo: patkové pro čtené texty a nadpisy, bezpatkové pro UI */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Cambria, "Sitka Text", Georgia, "Times New Roman", serif;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Patkové písmo pro nadpisy a čtené (dlouhé) texty — editorial pocit */
h1, h2, h3 {
    font-family: var(--font-serif);
    letter-spacing: -0.01em;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover { color: var(--primary-dark); }

/* ── Auth pages (login, register) ─────────────────────────── */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand {
    font-family: var(--font-serif);
    font-size: 2.2em;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.tagline {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 0.95em;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

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

.form-label > span {
    font-size: 0.85em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.form-label input,
.form-label select,
.form-label textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.form-label input:focus,
.form-label select:focus,
.form-label textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(0, 0, 0, 0.05);
}

.btn-primary {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    margin-top: 8px;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
    padding: 10px 16px;
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(0, 0, 0, 0.06); }

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.85em;
}

.auth-info {
    margin-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85em;
    max-width: 420px;
}
.auth-info p { margin-bottom: 6px; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9em;
    border: 1px solid;
}

.alert-error {
    background: #fdeceb;
    border-color: rgba(220, 38, 38, 0.3);
    color: #b91c1c;
}

.alert-success {
    background: #ecf6ef;
    border-color: rgba(21, 128, 61, 0.3);
    color: #15803d;
}

.alert-info {
    background: #eef1fd;
    border-color: var(--primary-border);
    color: var(--primary-dark);
}

/* ── App layout (přihlášení) ──────────────────────────────── */
body.app-layout {
    background: var(--bg);
    min-height: 100vh;
}

.app-header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand-small {
    font-family: var(--font-serif);
    font-size: 1.25em;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.app-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    margin-left: 20px;
}

.nav-link {
    padding: 8px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
    background: var(--bg-elevated);
    color: var(--text);
}
.nav-link.active {
    background: rgba(79, 70, 229, 0.10);
    color: var(--primary-light);
}

.app-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}
.user-name {
    font-size: 0.9em;
    color: var(--text);
}
.user-role {
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logout-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85em;
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    transition: background 0.15s;
}
.logout-link:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.app-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 24px 60px;
}

.page-container { width: 100%; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 4px;
}
.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* ── Stat cards ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stat-label {
    font-size: 0.8em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.stat-value small {
    font-size: 0.55em;
    color: var(--text-muted);
    font-weight: 400;
}
.stat-link {
    font-size: 0.85em;
    color: var(--primary-light);
    text-decoration: none;
}
.stat-progress {
    height: 5px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}
.stat-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.3s;
}

/* ── Quick actions ───────────────────────────────────────── */
.quick-actions h2 {
    font-size: 1.1em;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.action-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, transform 0.05s;
}
.action-card:hover {
    border-color: var(--primary-light);
    color: var(--text);
    transform: translateY(-2px);
}
.action-icon { font-size: 2em; margin-bottom: 10px; }
.action-title { font-weight: 600; margin-bottom: 4px; }
.action-desc {
    font-size: 0.85em;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── Cards & forms ───────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.card h2 {
    font-size: 1.1em;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.form-hint {
    font-size: 0.78em;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Tables ──────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.025);
}

.data-table code {
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.actions-cell { white-space: nowrap; }

.role-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(79, 70, 229, 0.10);
    color: var(--primary-light);
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-active {
    color: var(--success);
    font-size: 0.85em;
}
.status-inactive {
    color: var(--text-muted);
    font-size: 0.85em;
}

/* ── Mini buttons ────────────────────────────────────────── */
.btn-mini {
    padding: 4px 10px;
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-mini:hover { background: rgba(0, 0, 0, 0.06); }

.btn-mini-danger {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
    color: #b91c1c;
}
.btn-mini-danger:hover {
    background: rgba(244, 67, 54, 0.2);
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85em;
    text-decoration: underline;
}
.btn-link:hover { color: var(--primary-light); }

/* ── Credentials box ─────────────────────────────────────── */
.credentials-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 14px;
    margin-top: 10px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.9em;
}
.credentials-box code {
    background: #fff;
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.95em;
    color: var(--primary-dark);
}

/* ── Wizard ──────────────────────────────────────────────── */
.wizard-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wizard-card {
    width: 100%;
    max-width: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(10px);
}
.wizard-header {
    text-align: center;
    margin-bottom: 30px;
}
.wizard-header h1 {
    font-size: 1.6em;
    margin-bottom: 6px;
}
.wizard-subtitle {
    color: var(--text-muted);
    font-size: 0.9em;
}
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}
.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-strong);
}
.step-dot.active {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
.step-line {
    width: 40px;
    height: 2px;
    background: var(--border-strong);
}
.wizard-body h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
}
.wizard-intro {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 16px;
}
.wizard-help {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 0.85em;
    color: var(--text-muted);
}
.wizard-help summary {
    cursor: pointer;
    color: var(--primary-light);
    font-weight: 500;
}
.wizard-help ol {
    margin-top: 10px;
    padding-left: 20px;
    line-height: 1.7;
}

/* ── Multi-select checkbox grid ──────────────────────────── */
.form-label-text {
    font-size: 0.85em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.checkbox-card:hover {
    border-color: var(--primary-light);
    background: rgba(0, 0, 0, 0.05);
}
.checkbox-card input[type=checkbox] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.checkbox-card input[type=checkbox]:checked + .checkbox-label strong {
    color: var(--primary-light);
}
.checkbox-card:has(input[type=checkbox]:checked) {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.07);
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    flex: 1;
    line-height: 1.3;
}
.checkbox-label strong { font-size: 0.9em; }
.checkbox-label small {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Website tags ─────────────────────────────────────────── */
.website-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-size: 0.78em;
    color: var(--text);
    margin-right: 4px;
    margin-bottom: 2px;
}

.websites-cell {
    max-width: 300px;
}

/* ── Sources / RSS ────────────────────────────────────────── */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.source-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.source-category-header h3 {
    font-size: 1.1em;
    font-weight: 600;
}

.cat-count {
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 8px;
}

.type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.type-rss {
    background: rgba(255, 152, 0, 0.15);
    color: #b45309;
    border: 1px solid rgba(255, 152, 0, 0.3);
}
.type-wire {
    background: rgba(79, 70, 229, 0.10);
    color: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.30);
}
.type-scrape {
    background: rgba(100, 149, 237, 0.15);
    color: #2563eb;
    border: 1px solid rgba(100, 149, 237, 0.3);
}

/* ── Agency card grid ─────────────────────────────────────── */
.agency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.agency-card {
    display: block;
    cursor: pointer;
    position: relative;
}
.agency-card input[type=radio] {
    position: absolute;
    opacity: 0;
}
.agency-card-body {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.15s, background 0.15s;
}
.agency-card:hover .agency-card-body {
    border-color: var(--primary-light);
}
.agency-card input[type=radio]:checked + .agency-card-body {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.07);
}
.agency-name {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.agency-label {
    font-size: 0.85em;
    color: var(--primary-light);
    margin-bottom: 8px;
}
.agency-desc {
    font-size: 0.78em;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ── Select dropdowns ─────────────────────────────────────── */
select, .form-label select {
    background-color: var(--bg-elevated) !important;
    color: var(--text) !important;
    border: 1px solid var(--border-strong);
    padding: 11px 14px;
    border-radius: var(--radius);
    font-size: 0.95em;
    font-family: inherit;
    width: 100%;
    cursor: pointer;
    /* Custom arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
}

select:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Položky v rozbaleném menu — některé prohlížeče ignorují stylování */
select option {
    background-color: #ffffff;
    color: var(--text);
    padding: 8px;
}

/* ── Priority badges (1-10) ──────────────────────────────── */
.priority-badge {
    display: inline-block;
    width: 26px;
    text-align: center;
    padding: 3px 0;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85em;
    border: 1px solid;
}
/* 9-10 — top (wire) */
.priority-10, .priority-9 {
    background: rgba(79, 70, 229, 0.10);
    color: var(--primary-light);
    border-color: rgba(79, 70, 229, 0.35);
}
/* 7-8 — high */
.priority-8, .priority-7 {
    background: rgba(255, 152, 0, 0.15);
    color: #b45309;
    border-color: rgba(255, 152, 0, 0.3);
}
/* 5-6 — standard */
.priority-6, .priority-5 {
    background: rgba(100, 149, 237, 0.15);
    color: #2563eb;
    border-color: rgba(100, 149, 237, 0.3);
}
/* 1-4 — low */
.priority-4, .priority-3, .priority-2, .priority-1 {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border-color: var(--border-strong);
}

/* ── Fáze 3b.2: tonalita + user sources ─────────────────────── */

/* Tabs (paste vs upload v tonalitě) */
.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.92em;
    font-weight: 500;
    transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.tab-active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}
.tab-pane { padding-top: 8px; }

/* Modal dialog (edit vzoru) */
.modal-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}
.modal-dialog[open] {
    animation: modalIn .18s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Grid for compact source rows in /sources */
.source-grid {
    display: grid;
    gap: 8px;
}
.source-row {
    transition: border-color .15s;
}
.source-row:hover {
    border-color: var(--primary-light) !important;
}

/* btn-mini variant for "connected/success" state */
.btn-mini-success {
    background: var(--success, #10b981);
    color: white;
    border-color: var(--success, #10b981);
}
.btn-mini-success:hover {
    background: var(--success-dark, #059669);
}

/* Template list spacing */
.template-list li:last-child {
    border-bottom: none !important;
}

/* Form hint */
.form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.78em;
    margin-top: 4px;
    line-height: 1.4;
}

/* Btn link (subtle, no border) */
.btn-link {
    background: transparent;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 0.9em;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background .15s, color .15s;
}
.btn-link:hover {
    color: var(--primary);
    background: rgba(0, 0, 0, 0.035);
}


/* ── Fáze 3c.1.5: News feed ─────────────────────────────────────── */

.feed-section {
    margin-bottom: 28px;
}
.feed-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.feed-section-wire .feed-section-header {
    border-bottom-color: var(--primary);
}

.wire-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 0.78em;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.wire-badge-mini {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 4px;
}

/* Individual feed item */
.feed-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 10px;
    transition: border-color 0.15s, background 0.15s;
}
.feed-item-unread {
    border-left: 3px solid var(--primary-light);
}
.feed-item-read {
    opacity: 0.75;
}
.feed-item:hover {
    border-color: var(--primary-light);
}

.feed-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.82em;
    margin-bottom: 8px;
}

.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-light);
    flex-shrink: 0;
}

.feed-item-title {
    font-size: 1.05em;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.4;
}
.feed-item-read .feed-item-title {
    font-weight: 500;
}

.feed-item-summary {
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0 0 12px;
}

.feed-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Bell badge in nav */
.nav-badge-bell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 4px;
    line-height: 1.4;
}
.nav-badge-bell-empty {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   Světlý redesign — refinements
   Vrstva nad původními pravidly: stíny karet, bílá pole, patky pro
   čtené texty, focus ring. Hlavní barva žije v :root (--primary).
   ═══════════════════════════════════════════════════════════════ */

/* Karty se jemným stínem se zvednou z teplého pozadí */
.card, .stat-card, .action-card, .feed-item,
.auth-card, .wizard-card {
    box-shadow: var(--shadow);
}
.action-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-border);
}
.feed-item:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow);
}

/* Vstupní pole bílá s čitelným focus ringem v hlavní barvě */
.form-label input,
.form-label textarea,
select, .form-label select {
    background-color: #fff !important;
}
.form-label input:focus,
.form-label textarea:focus,
select:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Patkové písmo pro čtené a psané (dlouhé) texty — editorial pocit.
   Čtené texty o něco větší (pohodlnější čtení). */
.feed-item-summary,
.wizard-intro,
.reading {
    font-family: var(--font-serif);
    font-size: 1.08em;
    line-height: 1.72;
}
.feed-item-title { font-family: var(--font-serif); }

/* Psací pole (podklad redaktora, přepis, tonalita) — pohodlně velký text */
textarea {
    font-family: var(--font-serif);
    font-size: 1.18em;
    line-height: 1.7;
}
/* Jednořádková pole (název článku apod.) o něco větší než default */
.form-label input {
    font-size: 1.02em;
}

/* Dlouhý čtený obsah (vygenerovaný článek, přepis) — ještě vzdušnější */
.reading {
    font-size: 1.14em;
    color: var(--text);
}
.reading p { margin-bottom: 1em; }

/* Tlačítka: bezpatkové kapitálky s prostrkáním — moderní, věcné */
.btn-primary,
.btn-secondary {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}
.btn-primary {
    font-size: 0.82em;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover { box-shadow: 0 2px 6px rgba(79, 70, 229, 0.30); }
.btn-secondary { font-size: 0.8em; }

