* { box-sizing: border-box; }
:root {
    --surface: #ffffff; --surface-soft: #f6f8fc; --line: #e6ebf5; --text: #172033; --muted: #69758c;
    --primary: #2554ff; --primary-dark: #173bc2; --danger: #dc2626; --shadow: 0 18px 50px rgba(12,20,36,.08); --radius: 18px;
}
html, body { margin:0; padding:0; font-family: Inter, Arial, Helvetica, sans-serif; color:var(--text); background:#f3f6fb; }
a { color: inherit; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:280px 1fr; }
.sidebar { background: linear-gradient(180deg, #0d152b 0%, #111b35 100%); color:#fff; padding:28px 22px; display:flex; flex-direction:column; gap:26px; }
.brand { display:flex; align-items:center; gap:14px; padding:8px 6px; }
.brand-badge { width:46px; height:46px; border-radius:14px; background: linear-gradient(135deg, #3f70ff, #7c99ff); display:grid; place-items:center; font-weight:800; }
.brand-title { font-size:1.1rem; font-weight:800; } .brand-subtitle { font-size:.85rem; color:rgba(255,255,255,.72); }
.nav { display:flex; flex-direction:column; gap:8px; }
.nav-link { color:rgba(255,255,255,.8); text-decoration:none; padding:13px 15px; border-radius:14px; transition:.2s ease; font-weight:600; }
.nav-link:hover, .nav-link.active { background:rgba(255,255,255,.1); color:#fff; }
.sidebar-footer { margin-top:auto; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:16px; }
.user-label { font-size:.8rem; color:rgba(255,255,255,.65); } .user-name { margin-top:6px; font-weight:700; }
.main { padding:28px; display:flex; flex-direction:column; gap:22px; }
.page-heading { margin:0; font-size:2rem; line-height:1.1; } .page-subtitle { margin:8px 0 0; color:var(--muted); }
.footer { display:flex; justify-content:space-between; color:var(--muted); font-size:.9rem; padding:6px 4px 24px; }
.alert { border-radius:14px; padding:14px 16px; font-weight:600; border:1px solid transparent; }
.alert-success { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.alert-error { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.stats-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:18px; }
.stats-grid.six { grid-template-columns:repeat(6, minmax(0, 1fr)); }
.stat-card, .panel { background:var(--surface); border-radius:var(--radius); box-shadow:var(--shadow); }
.stat-card { padding:22px; border:1px solid rgba(18,36,75,.04); }
.stat-label { color:var(--muted); font-weight:700; margin-bottom:12px; } .stat-value { font-size:2rem; font-weight:800; letter-spacing:-0.02em; }
.stat-meta { margin-top:8px; color:var(--muted); font-size:.95rem; }
.panel { padding:22px; } .panel.narrow { max-width:980px; }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.panel-head h2 { margin:0; font-size:1.2rem; } .panel-head p { margin:8px 0 0; color:var(--muted); }
.btn-row { display:flex; gap:12px; flex-wrap:wrap; }
.btn { appearance:none; border:0; border-radius:14px; padding:12px 16px; cursor:pointer; text-decoration:none; font-weight:700; display:inline-flex; align-items:center; justify-content:center; transition:.2s ease; }
.btn-primary { background:var(--primary); color:#fff; } .btn-primary:hover { background:var(--primary-dark); }
.btn-secondary { background:#eef3ff; color:#1f3fa8; } .btn-secondary:hover { background:#e3ebff; } .btn-block { width:100%; }
.empty-state { padding:40px 18px; border:1px dashed var(--line); border-radius:18px; text-align:center; background:var(--surface-soft); }
.empty-state h3 { margin:0 0 10px; } .empty-state p { margin:0 0 18px; color:var(--muted); }
.table-wrap { overflow-x:auto; } .data-table { width:100%; border-collapse:collapse; min-width:880px; }
.data-table th, .data-table td { text-align:left; padding:15px 14px; border-bottom:1px solid var(--line); vertical-align:middle; }
.data-table th { font-size:.88rem; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); }
.table-link { color:var(--primary); text-decoration:none; font-weight:700; background:none; border:0; padding:0; cursor:pointer; }
.table-link.danger { color:var(--danger); } .table-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.status { display:inline-flex; align-items:center; border-radius:999px; padding:8px 12px; font-size:.82rem; font-weight:800; }
.status-offen { background:#eff6ff; color:#1d4ed8; } .status-in_verhandlung { background:#fff7ed; color:#c2410c; } .status-ratenzahlung { background:#eef2ff; color:#4338ca; } .status-erledigt { background:#ecfdf5; color:#047857; } .status-verjaehrt { background:#f3f4f6; color:#4b5563; }
.mini-badge { display:inline-block; padding:7px 11px; border-radius:999px; font-size:.82rem; font-weight:800; }
.mini-badge.info { background:#eff6ff; color:#1d4ed8; }
.mini-badge.warning { background:#fff7ed; color:#c2410c; }
.mini-badge.danger { background:#fef2f2; color:#b91c1c; }
.mini-badge.done { background:#ecfdf5; color:#047857; }
.form-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px; }
.field { display:flex; flex-direction:column; gap:8px; } .field-span-2 { grid-column:span 2; }
.field label { font-weight:700; color:#2a3550; }
.field input, .field select, .field textarea { width:100%; border:1px solid var(--line); background:#fff; border-radius:14px; padding:13px 14px; font:inherit; color:var(--text); outline:none; transition:.15s ease; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:#9bb0ff; box-shadow:0 0 0 4px rgba(37,84,255,.08); }
.form-actions { grid-column:span 2; display:flex; justify-content:flex-end; gap:12px; padding-top:6px; }
.message-preview-row td { padding-top:0; } .message-preview { color:var(--muted); font-size:.95rem; line-height:1.5; padding-bottom:8px; }
.checkbox-row label { font-weight:700; display:flex; align-items:center; gap:8px; }
.print-note { margin:0 0 16px; color:var(--muted); }
.auth-body { min-height:100vh; background: radial-gradient(circle at top left, rgba(89,127,255,.24), transparent 32%), radial-gradient(circle at bottom right, rgba(37,84,255,.18), transparent 30%), linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%); }
.auth-wrap { min-height:100vh; display:grid; grid-template-columns:1.15fr .85fr; }
.auth-panel { padding:42px; display:flex; align-items:center; justify-content:center; } .auth-panel-brand { color:#0f1b35; }
.brand-stack { max-width:560px; } .hero-badge { display:inline-flex; align-items:center; padding:10px 14px; border-radius:999px; background:rgba(37,84,255,.1); color:var(--primary); font-weight:800; margin-bottom:20px; }
.brand-stack h1 { font-size:3rem; line-height:1.05; margin:0 0 18px; letter-spacing:-0.03em; } .brand-stack p { color:#44506a; font-size:1.08rem; line-height:1.6; margin:0 0 20px; }
.auth-panel-form { background:rgba(255,255,255,.55); backdrop-filter:blur(12px); border-left:1px solid rgba(255,255,255,.5); }
.auth-card { width:min(460px,100%); background:rgba(255,255,255,.9); box-shadow:0 30px 70px rgba(16,33,70,.12); border-radius:24px; padding:32px; border:1px solid rgba(255,255,255,.9); }
.auth-title { font-size:1.75rem; font-weight:800; } .auth-subtitle { margin:8px 0 24px; color:var(--muted); }
.auth-link-text { margin:20px 0 0; color:var(--muted); } .auth-link-text a { color:var(--primary); font-weight:700; text-decoration:none; }
.stack-md { display:grid; gap:16px; }
@media print {
  .sidebar, .footer, .btn, .topbar, .page-subtitle, .print-note { display:none !important; }
  .app-shell { display:block; }
  .main { padding:0; }
  body { background:#fff; }
  .panel { box-shadow:none; border:1px solid #ddd; }
}
@media (max-width: 1500px) { .stats-grid.six { grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width: 1200px) { .stats-grid { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width: 980px) {
  .app-shell { grid-template-columns:1fr; } .sidebar { gap:14px; } .main { padding:18px; }
  .auth-wrap { grid-template-columns:1fr; } .auth-panel-brand { padding-bottom:0; } .brand-stack h1 { font-size:2.2rem; }
}
@media (max-width: 720px) {
  .stats-grid, .stats-grid.six, .form-grid { grid-template-columns:1fr; }
  .field-span-2, .form-actions { grid-column:span 1; }
  .panel-head, .footer { flex-direction:column; align-items:flex-start; }
  .auth-panel { padding:20px; } .auth-card { padding:22px; border-radius:18px; }
}


.template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.template-card {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
}
.template-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}
.template-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.letter-output {
    white-space: pre-wrap;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    line-height: 1.7;
    font-family: Arial, Helvetica, sans-serif;
}
@media (max-width: 980px) {
  .template-grid { grid-template-columns: 1fr; }
}


.print-letter {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
}
.letter-output {
    max-width: 820px;
    margin: 0 auto;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
@media print {
  .print-letter {
    background: #fff !important;
    border: 0 !important;
    padding: 0 !important;
  }
  .letter-output {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    font-size: 12pt !important;
    line-height: 1.65 !important;
  }
}


.neon-header {
    background: #00ff00;
    height: 8px;
    width: 100%;
}
.neon-footer {
    background: #00ff00;
    height: 8px;
    width: 100%;
    margin-top: 20px;
}
.letter-output {
    border-top: 8px solid #00ff00;
    border-bottom: 8px solid #00ff00;
}


.neon-header, .neon-footer {
    box-shadow: 0 0 15px #00ff00, 0 0 30px #00ff00;
}

.neon-glow-text {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00;
}


.theme-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}
.theme-label {
    font-weight: 700;
    color: var(--muted);
}
.theme-switcher select {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    font: inherit;
}

body.theme-neon .letter-output {
    border-top: 8px solid #00ff00;
    border-bottom: 8px solid #00ff00;
}
body.theme-neon .neon-header,
body.theme-neon .neon-footer {
    background: #00ff00;
    box-shadow: 0 0 15px #00ff00, 0 0 30px #00ff00;
}
body.theme-neon .neon-glow-text {
    color: #0b0f0b;
    text-shadow: 0 0 2px rgba(0,255,0,.15);
}

body.theme-business .letter-output {
    border-top: 8px solid #1d4ed8;
    border-bottom: 8px solid #1d4ed8;
}
body.theme-business .neon-header,
body.theme-business .neon-footer {
    background: #1d4ed8;
    box-shadow: none;
}
body.theme-business .neon-glow-text {
    color: #172033;
    text-shadow: none;
}

body.theme-minimal .letter-output {
    border-top: 3px solid #111827;
    border-bottom: 3px solid #111827;
}
body.theme-minimal .neon-header,
body.theme-minimal .neon-footer {
    background: #111827;
    height: 3px;
    box-shadow: none;
}
body.theme-minimal .neon-glow-text {
    color: #111827;
    text-shadow: none;
}

body.theme-dark {
    background: #0b1020;
    color: #e5ecff;
}
body.theme-dark .main,
body.theme-dark .page-subtitle,
body.theme-dark .theme-label,
body.theme-dark .message-preview,
body.theme-dark .print-note,
body.theme-dark .stat-meta,
body.theme-dark .panel-head p {
    color: #b9c4df;
}
body.theme-dark .panel,
body.theme-dark .stat-card,
body.theme-dark .auth-card,
body.theme-dark .template-card,
body.theme-dark .print-letter {
    background: #111933;
    color: #e5ecff;
    border-color: #24304f;
}
body.theme-dark .data-table th,
body.theme-dark .data-table td,
body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .field textarea,
body.theme-dark .theme-switcher select {
    border-color: #24304f;
}
body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .field textarea,
body.theme-dark .theme-switcher select,
body.theme-dark .table-wrap,
body.theme-dark .letter-output {
    background: #0f172a;
    color: #e5ecff;
}
body.theme-dark .empty-state {
    background: #0f172a;
    border-color: #24304f;
}
body.theme-dark .table-link {
    color: #7ab8ff;
}
body.theme-dark .btn-secondary {
    background: #1b2744;
    color: #dbeafe;
}
body.theme-dark .letter-output {
    border-top: 8px solid #38bdf8;
    border-bottom: 8px solid #38bdf8;
}
body.theme-dark .neon-header,
body.theme-dark .neon-footer {
    background: #38bdf8;
    box-shadow: 0 0 12px rgba(56,189,248,.45);
}
body.theme-dark .neon-glow-text {
    color: #e5ecff;
    text-shadow: none;
}


.logo-preview-box {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
}
.logo-preview-image {
    max-width: 240px;
    max-height: 90px;
    display: block;
}
.letterhead-demo {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 8px 0;
}
.letterhead-demo-left {
    display: flex;
    gap: 16px;
    align-items: center;
}
.letterhead-demo-right {
    text-align: right;
    color: var(--muted);
    line-height: 1.6;
}
.letterhead-logo,
.styled-letter-logo {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}
.letterhead-title,
.styled-letter-company {
    font-size: 1.4rem;
    font-weight: 800;
}
.letterhead-subtitle,
.styled-letter-company-sub {
    color: var(--muted);
    margin-top: 4px;
}
.styled-letter {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.styled-letter-topbar {
    height: 12px;
    background: #00ff00;
}
.styled-letter-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px 12px;
    align-items: flex-start;
}
.styled-letter-brand {
    display: flex;
    gap: 16px;
    align-items: center;
}
.styled-letter-contact {
    text-align: right;
    color: #334155;
    line-height: 1.6;
    font-size: .95rem;
}
.styled-letter .letter-output {
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    padding-top: 12px !important;
}
.styled-letter-footer-text {
    padding: 0 28px 18px;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.6;
}
body.theme-business .styled-letter-topbar { background: #1d4ed8; }
body.theme-minimal .styled-letter-topbar { background: #111827; }
body.theme-dark .styled-letter {
    background: #111933;
    border-color: #24304f;
}
body.theme-dark .styled-letter-contact,
body.theme-dark .styled-letter-footer-text { color: #c7d2e8; }
body.theme-dark .styled-letter-topbar { background: #38bdf8; }

@media (max-width: 900px) {
    .letterhead-demo,
    .styled-letter-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .letterhead-demo-right,
    .styled-letter-contact {
        text-align: left;
    }
}


.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}
.search-row input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    background: #fff;
}
@media (max-width: 720px) {
  .search-row {
    flex-direction: column;
  }
}


.search-summary {
    color: var(--muted);
    margin-top: 6px;
}
.stats-grid.seven {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
@media (max-width: 1700px) {
  .stats-grid.seven {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .stats-grid.seven {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .stats-grid.seven {
    grid-template-columns: 1fr;
  }
}


.case-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(37,84,255,.08), rgba(0,255,0,.05));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 22px;
}
.case-hero-main h2 {
    margin: 8px 0 10px;
    font-size: 2rem;
}
.case-hero-label {
    color: var(--muted);
    font-weight: 700;
}
.case-hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
}
.case-hero-side {
    min-width: 280px;
    text-align: right;
}
.case-money {
    font-size: 2rem;
    font-weight: 800;
}
.case-money-sub {
    color: var(--muted);
    margin: 6px 0 16px;
}
.case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 22px;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.info-item {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
}
.info-item span {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
}
.case-note-block {
    margin-top: 18px;
}
.stack-list {
    display: grid;
    gap: 14px;
}
.stack-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: var(--surface-soft);
}
.stack-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.timeline {
    display: grid;
    gap: 18px;
}
.timeline-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    align-items: start;
}
.timeline-date {
    color: var(--muted);
    font-weight: 700;
    padding-top: 2px;
}
.timeline-content {
    border-left: 3px solid var(--line);
    padding-left: 16px;
}
.empty-state.compact {
    padding: 20px 16px;
}
@media (max-width: 980px) {
  .case-grid {
    grid-template-columns: 1fr;
  }
  .case-hero {
    flex-direction: column;
  }
  .case-hero-side {
    min-width: 0;
    text-align: left;
  }
}
@media (max-width: 720px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  .timeline-item {
    grid-template-columns: 1fr;
  }
}


.landing-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(89,127,255,.18), transparent 25%),
        radial-gradient(circle at bottom right, rgba(0,255,0,.10), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}
.landing-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 22px 60px;
}
.landing-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 40px;
}
.landing-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.landing-logo {
    max-width: 72px;
    max-height: 72px;
    object-fit: contain;
}
.landing-title {
    font-size: 1.4rem;
    font-weight: 800;
}
.landing-subtitle {
    color: var(--muted);
    margin-top: 4px;
}
.landing-hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}
.landing-hero h1 {
    font-size: 3.2rem;
    line-height: 1.02;
    margin: 10px 0 16px;
    letter-spacing: -0.03em;
}
.landing-hero p {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 760px;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(37,84,255,.1);
    color: var(--primary);
    font-weight: 800;
}
.landing-card {
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: var(--shadow);
    border-radius: 24px;
    padding: 24px;
}
.landing-card h2 {
    margin: 0 0 14px;
}
.landing-list {
    margin: 0;
    padding-left: 18px;
    line-height: 1.9;
    color: var(--muted);
}
.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.quick-link-card {
    display: block;
    text-decoration: none;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    transition: .2s ease;
}
.quick-link-card:hover {
    transform: translateY(-2px);
    border-color: #cbd8ff;
}
.quick-link-card strong {
    display: block;
    margin-bottom: 8px;
}
.quick-link-card span {
    color: var(--muted);
    line-height: 1.55;
}
body.theme-dark .landing-body,
body.theme-dark.landing-body {
    background: linear-gradient(180deg, #0b1020 0%, #0f172a 100%);
}
body.theme-dark .landing-card,
body.theme-dark .quick-link-card {
    background: #111933;
    border-color: #24304f;
}
@media (max-width: 1100px) {
  .landing-hero,
  .landing-features,
  .quick-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .landing-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .landing-hero h1 {
    font-size: 2.3rem;
  }
}


.role-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.role-pill {
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.role-pill span {
    color: var(--muted);
}
.role-pill.active {
    border-color: #9bb0ff;
    background: #eef3ff;
}
body.theme-dark .role-pill {
    background: #111933;
    border-color: #24304f;
    color: #e5ecff;
}
body.theme-dark .role-pill.active {
    background: #1b2744;
}


.import-help {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 18px;
}
.import-help h3 {
    margin: 0 0 10px;
}
.import-help p {
    margin: 8px 0;
    color: var(--muted);
}


body.theme-dark .quick-link-card strong,
body.theme-dark .quick-link-card span {
    color: inherit;
}


.merge-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    padding: 14px 16px;
    color: #9a3412;
}
.duplicate-list {
    display: grid;
    gap: 10px;
}
.duplicate-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,.5);
}
body.theme-dark .merge-warning {
    background: #3b1f10;
    border-color: #7c2d12;
    color: #fdba74;
}
body.theme-dark .duplicate-item {
    background: #0f172a;
    border-color: #24304f;
}


.notification-list {
    display: grid;
    gap: 14px;
}
.notification-list.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.notification-card {
    display: block;
    text-decoration: none;
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}
.notification-card.info {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.notification-card.warning {
    border-color: #fed7aa;
    background: #fff7ed;
}
.notification-card.danger {
    border-color: #fecaca;
    background: #fef2f2;
}
.notification-title {
    font-weight: 800;
    margin-bottom: 6px;
}
.notification-text {
    color: var(--muted);
    line-height: 1.55;
}
.notification-link {
    margin-top: 10px;
    font-weight: 700;
}
body.theme-dark .notification-card {
    background: #111933;
    border-color: #24304f;
}
body.theme-dark .notification-card.info {
    background: #0f1d36;
    border-color: #1d4ed8;
}
body.theme-dark .notification-card.warning {
    background: #2d1d11;
    border-color: #c2410c;
}
body.theme-dark .notification-card.danger {
    background: #311616;
    border-color: #b91c1c;
}
@media (max-width: 980px) {
  .notification-list.compact {
    grid-template-columns: 1fr;
  }
}


/* Phase 21: Mobile + UI polish */
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.main {
    min-width: 0;
}
.table-wrap {
    scrollbar-width: thin;
}
.table-wrap::-webkit-scrollbar {
    height: 10px;
}
.table-wrap::-webkit-scrollbar-thumb {
    background: rgba(120, 130, 150, .35);
    border-radius: 999px;
}
.btn, .nav-link, .quick-link-card, .role-pill, .notification-card, .table-link {
    transition: all .18s ease;
}
.btn:hover, .quick-link-card:hover, .role-pill:hover, .notification-card:hover {
    transform: translateY(-1px);
}
.field input::placeholder,
.field textarea::placeholder,
.search-row input::placeholder {
    color: #98a2b3;
}
.panel {
    overflow: hidden;
}
.data-table td strong {
    word-break: break-word;
}
.form-actions {
    flex-wrap: wrap;
}
.page-heading {
    word-break: break-word;
}
.auth-card,
.panel,
.stat-card,
.template-card,
.stack-card,
.quick-link-card,
.notification-card {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
body.theme-dark .auth-card,
body.theme-dark .panel,
body.theme-dark .stat-card,
body.theme-dark .template-card,
body.theme-dark .stack-card,
body.theme-dark .quick-link-card,
body.theme-dark .notification-card {
    box-shadow: none;
}

@media (max-width: 1200px) {
  .sidebar {
    position: relative;
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 980px) {
  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .sidebar-footer {
    margin-top: 0;
  }
  .table-wrap {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }
}

@media (max-width: 720px) {
  .nav {
    grid-template-columns: 1fr;
  }
  .page-heading {
    font-size: 1.6rem;
  }
  .panel {
    padding: 16px;
    border-radius: 18px;
  }
  .stat-card {
    padding: 16px;
    border-radius: 18px;
  }
  .auth-card {
    padding: 18px;
  }
  .data-table {
    min-width: 680px;
  }
  .btn {
    width: 100%;
  }
  .btn-row,
  .table-actions {
    width: 100%;
  }
  .table-actions form {
    width: 100%;
  }
  .table-link.danger,
  .table-link {
    display: inline-block;
    padding: 6px 0;
  }
  .notification-card,
  .quick-link-card,
  .stack-card {
    padding: 14px;
  }
  .case-hero {
    padding: 18px;
    border-radius: 18px;
  }
  .case-hero-main h2 {
    font-size: 1.5rem;
  }
  .landing-wrap {
    padding: 20px 16px 40px;
  }
  .landing-hero h1 {
    font-size: 2rem;
  }
  .landing-card {
    padding: 18px;
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .brand {
    align-items: flex-start;
  }
  .brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .sidebar {
    padding: 16px;
  }
  .main {
    padding: 14px;
  }
  .field input,
  .field select,
  .field textarea,
  .theme-switcher select,
  .search-row input {
    padding: 12px;
    border-radius: 12px;
  }
  .role-pill {
    width: 100%;
    justify-content: space-between;
  }
  .stack-card-head,
  .panel-head,
  .landing-header,
  .letterhead-demo {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mail center */
.message-preview-row td {
    background: rgba(0,0,0,0.02);
}
