@font-face {
  font-family: "Nunito Flex";
  src: url("/assets/nunito-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito Flex";
  src: url("/assets/nunito-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #303234;
  --muted: #74777a;
  --line: #dedfe0;
  --soft: #f1f2f2;
  --page: #f4f5f5;
  --white: #fff;
  --green: #3e4143;
  --green-dark: #292b2d;
  --green-light: #eceeef;
  --brand-orange: #f9af3f;
  --brand-orange-dark: #e79a27;
  --brand-blue: #2ea5d5;
  --amber: #bf7518;
  --amber-light: #fff1da;
  --red: #bd5739;
  --red-light: #fce8e1;
  --success: #2f795e;
  --success-light: #e0f0e9;
  --chart-valid: #3c8a6d;
  --chart-warning: #e0a13f;
  --chart-urgent: #df784c;
  --chart-expired: #b94c39;
  --chart-draft: #969b9e;
  --shadow: 0 12px 34px rgba(27, 29, 30, .07);
  font-family: "Nunito Flex", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0f1f1;
  --muted: #a8abad;
  --line: #45484a;
  --soft: #333638;
  --page: #202224;
  --white: #2b2e30;
  --green: #d7d9da;
  --green-light: #3a3d3f;
  --amber-light: #4b3b26;
  --red-light: #4c302b;
  --success: #8dd4b5;
  --success-light: #294438;
  --chart-valid: #68b994;
  --chart-warning: #ddb05e;
  --chart-urgent: #df8764;
  --chart-expired: #d76550;
  --chart-draft: #7c8285;
  --shadow: 0 14px 36px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 20px 22px; display: flex; flex-direction: column; background: linear-gradient(180deg, #2e3032 0%, #232527 100%); color: white; box-shadow: inset -1px 0 rgba(255,255,255,.04); }
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; padding: 0 8px 30px; }
.brand-logo { position: relative; width: 50px; height: 48px; overflow: hidden; flex: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.brand-logo img { position: absolute; width: 56px; max-width: none; height: auto; left: -3px; top: -10px; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-size: 19px; font-weight: 900; letter-spacing: .6px; }
.brand small { margin-top: 5px; color: #b6b9bb; font-size: 10px; font-weight: 600; letter-spacing: 1.7px; text-transform: uppercase; }
nav { display: grid; gap: 6px; }
.nav-item { width: 100%; border: 0; border-radius: 10px; padding: 12px 13px; background: transparent; color: #c7c9ca; display: flex; align-items: center; gap: 12px; text-align: left; font-weight: 700; cursor: pointer; }
.nav-item.active { background: rgba(255,255,255,.11); color: #fff; }
.nav-item.active svg { color: var(--brand-orange); }
.nav-count { min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.1); color: #c7c9ca; font-size: 9px; font-weight: 850; line-height: 1; }
.nav-item.active .nav-count { background: var(--brand-orange); color: #292b2d; }
.sidebar-spacer { flex: 1; }
.email-state { display: flex; gap: 10px; align-items: flex-start; padding: 13px; background: rgba(0,0,0,.12); border-radius: 11px; }
.state-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #d1a354; box-shadow: 0 0 0 4px rgba(209,163,84,.13); flex: none; }
.email-state.enabled .state-dot { background: #68c79e; box-shadow: 0 0 0 4px rgba(104,199,158,.13); }
.email-state strong, .email-state small { display: block; }
.email-state strong { font-size: 12px; }
.email-state small { color: #a8abad; margin-top: 4px; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.sidebar-foot { padding: 17px 10px 0; color: #777b7d; font-size: 10px; text-align: center; }

main { width: 100%; max-width: 1580px; padding: 42px clamp(28px, 4vw, 68px) 60px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 30px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.mobile-settings-button, .mobile-nav-button { display: none; }
.user-chip { min-height: 45px; display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 7px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.user-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--green-light); color: var(--green); font-size: 10px; font-weight: 800; flex: none; }
.user-chip strong, .user-chip small { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: 11px; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.user-chip button { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-left: 1px solid var(--line); background: transparent; color: #859089; cursor: pointer; }
.user-chip button:hover { color: var(--red); }
.user-chip button svg { width: 16px; height: 16px; }
.eyebrow { margin: 0 0 8px; color: #8a9994; font-size: 11px; font-weight: 750; letter-spacing: 1.3px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; letter-spacing: -1.3px; }
.subtitle { margin: 0; color: var(--muted); font-size: 15px; }
.primary-button, .secondary-button, .text-button, .icon-button { border: 0; cursor: pointer; transition: .18s ease; }
.primary-button { min-height: 45px; padding: 0 18px; border-radius: 10px; background: var(--brand-orange); color: #292b2d; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 850; box-shadow: 0 6px 16px rgba(222,145,34,.2); }
.primary-button:hover { background: var(--brand-orange-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.primary-button.compact { min-height: 40px; font-size: 13px; }
.secondary-button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; display: inline-flex; align-items: center; gap: 8px; color: #38564d; font-size: 13px; font-weight: 650; }
.secondary-button:hover { border-color: #b6cbc3; background: #f9fbfa; }

.setup-banner { display: flex; gap: 14px; align-items: center; margin: -6px 0 22px; padding: 14px 18px; border: 1px solid #ecd6a8; border-radius: 12px; background: #fff9ed; color: #654913; }
.banner-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #f6e5bd; flex: none; }
.setup-banner strong { font-size: 13px; }
.setup-banner p { margin: 3px 0 0; font-size: 12px; color: #8a6b2d; }
.setup-banner code { background: rgba(124,89,20,.08); padding: 2px 4px; border-radius: 4px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 25px; }
.stat-card { min-height: 138px; display: flex; align-items: center; gap: 19px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: #e2f2f8; color: #268db5; flex: none; }
.stat-warning .stat-icon { background: var(--amber-light); color: var(--amber); }
.stat-expired .stat-icon { background: var(--red-light); color: var(--red); }
.stat-icon svg { width: 24px; height: 24px; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card span { font-size: 12px; font-weight: 650; }
.stat-card strong { display: block; margin: 3px 0 1px; font-size: 29px; letter-spacing: -.8px; }
.stat-card small { font-size: 11px; }

.dashboard-topbar { align-items: center; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dashboard-kpi { --kpi-color: var(--chart-draft); min-height: 112px; position: relative; overflow: hidden; padding: 17px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); color: var(--ink); box-shadow: var(--shadow); text-align: left; cursor: pointer; transition: .18s ease; }
.dashboard-kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--kpi-color); }
.dashboard-kpi:hover { border-color: color-mix(in srgb, var(--kpi-color) 48%, var(--line)); transform: translateY(-2px); box-shadow: 0 15px 32px rgba(27,29,30,.11); }
.dashboard-kpi span, .dashboard-kpi small { display: block; }
.dashboard-kpi span { color: var(--muted); font-size: 10.5px; font-weight: 750; }
.dashboard-kpi strong { display: block; margin: 5px 0 2px; font-size: 27px; line-height: 1; letter-spacing: -.7px; }
.dashboard-kpi small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.kpi-total { --kpi-color: var(--brand-blue); }
.kpi-valid { --kpi-color: var(--chart-valid); }
.kpi-warning { --kpi-color: var(--chart-warning); }
.kpi-urgent { --kpi-color: var(--chart-urgent); }
.kpi-critical, .kpi-expired { --kpi-color: var(--chart-expired); }
.kpi-draft, .kpi-muted { --kpi-color: var(--chart-draft); }

.dashboard-charts { display: grid; grid-template-columns: minmax(330px, .85fr) minmax(0, 1.45fr); gap: 16px; margin-bottom: 16px; }
.dashboard-card { padding: 21px 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: var(--shadow); }
.dashboard-card-head { min-height: 45px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.dashboard-card-head .eyebrow { margin-bottom: 5px; font-size: 9px; }
.dashboard-card-head h2 { margin: 0; font-size: 16px; }
.dashboard-card-head > small { padding: 5px 8px; border-radius: 7px; background: var(--soft); color: var(--muted); font-size: 8.5px; font-weight: 750; white-space: nowrap; }
.status-chart-layout { min-height: 210px; display: grid; grid-template-columns: 190px minmax(150px, 1fr); align-items: center; gap: 24px; }
.status-donut { width: 180px; height: 180px; position: relative; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.03); }
.status-donut::after { content: ""; position: absolute; inset: 29px; border-radius: 50%; background: var(--white); box-shadow: 0 5px 18px rgba(27,29,30,.08); }
.status-donut > div { position: relative; z-index: 1; text-align: center; }
.status-donut strong, .status-donut small { display: block; }
.status-donut strong { font-size: 29px; line-height: 1; }
.status-donut small { margin-top: 4px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .7px; }
.status-legend { display: grid; gap: 9px; }
.status-legend-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 10px; }
.status-legend-row i { width: 9px; height: 9px; border-radius: 3px; }
.status-legend-row span { min-width: 0; color: var(--muted); }
.status-legend-row strong { font-size: 11px; }

.month-chart-scroll { overflow-x: auto; padding: 6px 2px 0; }
.month-chart { min-width: 620px; height: 218px; display: grid; grid-template-columns: repeat(12, minmax(34px, 1fr)); align-items: end; gap: 8px; }
.month-column { height: 100%; display: grid; grid-template-rows: 19px minmax(120px, 1fr) 18px 15px; align-items: end; text-align: center; }
.month-value { color: var(--muted); font-size: 9px; font-weight: 800; }
.month-bar-track { width: min(30px, 70%); height: 100%; position: relative; justify-self: center; overflow: hidden; border-radius: 7px 7px 3px 3px; background: var(--soft); }
.month-bar { width: 100%; position: absolute; right: 0; bottom: 0; left: 0; border-radius: inherit; background: linear-gradient(180deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%); transition: height .3s ease; }
.month-column strong { font-size: 9px; text-transform: uppercase; }
.month-column small { color: var(--muted); font-size: 8px; }

.attention-card { padding-bottom: 12px; }
.attention-list { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.attention-row { width: 100%; min-height: 62px; padding: 9px 12px; display: grid; grid-template-columns: 8px minmax(190px, 1fr) minmax(150px, .7fr) auto 54px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--white); color: var(--ink); text-align: left; cursor: pointer; }
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: color-mix(in srgb, var(--soft) 45%, var(--white)); }
.attention-marker { width: 7px; height: 34px; border-radius: 99px; background: var(--chart-warning); }
.attention-marker.urgent { background: var(--chart-urgent); }
.attention-marker.expired { background: var(--chart-expired); }
.attention-marker.draft { background: var(--chart-draft); }
.attention-main { min-width: 0; }
.attention-main strong, .attention-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-main strong { font-size: 11px; }
.attention-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.attention-date { color: var(--muted); font-size: 9.5px; line-height: 1.35; }
.attention-action { color: var(--green); font-size: 9px; font-weight: 850; text-align: right; }
.dashboard-empty { min-height: 105px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; }
.dashboard-empty strong { color: var(--success); font-size: 12px; }
.dashboard-empty span { font-size: 10px; }

.revision-panel { border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { padding: 21px 24px 17px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-head h2 { margin-bottom: 5px; font-size: 19px; letter-spacing: -.35px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.filters { padding: 0 24px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--soft); }
.tab { border: 0; border-radius: 7px; padding: 7px 12px; color: #70817b; background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.tab.active { color: #292b2d; background: #fff; box-shadow: inset 0 -2px var(--brand-orange), 0 2px 7px rgba(38,40,41,.08); }
.filter-actions { min-width: min(100%, 560px); margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1; }
.filter-button { min-height: 37px; padding: 0 12px; border-radius: 9px; box-shadow: none; font-size: 11px; white-space: nowrap; }
.filter-button svg { width: 16px; height: 16px; }
.filter-actions .search-field { width: min(315px, 100%); flex: 0 1 315px; }
.search-field { width: min(315px, 35%); position: relative; }
.search-field svg { position: absolute; left: 11px; top: 9px; width: 18px; height: 18px; color: #8da099; }
.search-field input { width: 100%; height: 37px; padding: 0 12px 0 37px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: #fff; font-size: 12px; }
.search-field input:focus { border-color: #7fa99a; box-shadow: 0 0 0 3px rgba(42,104,83,.09); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 16px; color: #8c9a95; background: #fbfcfb; text-align: left; text-transform: uppercase; font-size: 10px; letter-spacing: .65px; font-weight: 750; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; text-align: right; }
td { padding: 15px 16px; border-top: 1px solid #edf1ef; font-size: 12px; vertical-align: middle; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fbfdfc; }
.customer-cell { display: flex; gap: 11px; align-items: center; min-width: 190px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: #e5f2f7; color: #278db4; font-weight: 900; font-size: 12px; flex: none; }
.customer-cell strong, .customer-cell small, .revision-cell strong, .revision-cell small, .date-cell strong, .date-cell small { display: block; }
.customer-cell strong, .revision-cell strong, .date-cell strong { color: #28443b; font-size: 12px; }
.customer-cell small, .revision-cell small, .date-cell small { margin-top: 3px; color: #84938e; font-size: 10.5px; }
.revision-cell { min-width: 160px; }
.revision-cell a { color: var(--green); text-decoration: none; }
.revision-cell a:hover { text-decoration: underline; }
.revision-cell .created-by { margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 750; }
.date-cell { min-width: 115px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: var(--success-light); color: var(--success); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.warning { background: var(--amber-light); color: #a76712; }
.status-pill.urgent, .status-pill.expired { background: var(--red-light); color: var(--red); }
.reminder-list { min-width: 110px; color: #647871; line-height: 1.4; }
.action-wrap { position: relative; display: inline-flex; gap: 5px; }
.row-button { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #6d8079; cursor: pointer; text-decoration: none; }
.row-button:hover { color: var(--green); border-color: #b9cbc5; }
.row-button.preview:hover { color: var(--brand-blue); border-color: #9ecddd; background: #f2f9fb; }
.row-button.notification-toggle.enabled { border-color: #a9d2c0; color: var(--success); background: var(--success-light); }
.row-button.notification-toggle.enabled:hover { border-color: var(--success); }
.row-button.notification-toggle.disabled { color: #9a9ea0; background: var(--soft); }
.row-button.notification-toggle.disabled:hover { border-color: #c3978a; color: var(--red); background: var(--red-light); }
.row-button.manual-notification { color: #9b6418; background: var(--amber-light); }
.row-button.manual-notification:hover { border-color: var(--brand-orange); color: #754708; background: #fff2d8; }
.row-button:disabled { opacity: .55; cursor: wait; }
.row-button.archive:hover { color: var(--red); }
.row-button.delete { color: #9a9ea0; }
.row-button.delete:hover { border-color: #d5a99c; color: var(--red); background: var(--red-light); }
.row-button svg { width: 16px; height: 16px; }
.empty-state { padding: 55px 20px 60px; text-align: center; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 17px; background: var(--green-light); color: var(--green); }
.empty-icon svg { width: 28px; height: 28px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { margin-bottom: 18px; color: var(--muted); font-size: 13px; }

.directory-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.directory-summary-card { min-height: 88px; display: flex; align-items: center; gap: 14px; padding: 16px 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: var(--shadow); }
.summary-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--green-light); color: var(--green); flex: none; }
.summary-icon svg { width: 20px; height: 20px; }
.directory-summary-card strong, .directory-summary-card small { display: block; }
.directory-summary-card strong { font-size: 23px; line-height: 1; }
.directory-summary-card small { margin-top: 5px; color: var(--muted); font-size: 10.5px; }
.directory-panel-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.directory-search { width: min(390px, 45%); }
.company-table { min-width: 790px; }
.company-table td { padding-block: 14px; }
.company-avatar { background: rgba(249,175,63,.16); color: #a76412; }
.archive-panel-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.archive-search { width: min(390px, 45%); }
.archive-table { min-width: 850px; }
.archive-avatar { background: var(--soft); color: #6d6f71; }
.row-button.restore { border-color: #a9d2c0; color: var(--success); background: var(--success-light); }
.row-button.restore:hover { border-color: var(--success); color: var(--green); background: #eaf7f0; }
.company-contact { min-width: 190px; display: grid; gap: 4px; }
.contact-link { width: fit-content; max-width: 240px; overflow: hidden; color: var(--ink); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.contact-link:hover { color: var(--brand-orange-dark); text-decoration: underline; }
.contact-link.secondary, .muted-line, .address-line { color: var(--muted); font-size: 10.5px; }
.address-line { display: block; max-width: 270px; line-height: 1.4; }
.revision-count-badge { min-width: 30px; height: 27px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 8px; color: var(--green); background: var(--green-light); font-size: 11px; font-weight: 850; }
.linked-customer { display: inline-block; margin-top: 5px; padding: 2px 6px; border-radius: 5px; background: rgba(249,175,63,.14); color: #a96513; font-size: 8.5px; font-style: normal; font-weight: 800; }

.notification-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.notification-status-card { min-height: 86px; display: flex; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: var(--shadow); }
.notification-status-icon { width: 39px; height: 39px; display: grid; place-items: center; flex: none; border-radius: 10px; color: #5d6568; background: var(--soft); }
.notification-status-icon svg { width: 19px; height: 19px; }
.notification-status-card small, .notification-status-card strong { display: block; }
.notification-status-card small { margin-bottom: 4px; color: var(--muted); font-size: 9.5px; }
.notification-status-card strong { font-size: 11.5px; line-height: 1.3; }
.notification-status-card strong.status-on { color: var(--success); }
.notification-status-card strong.status-off { color: var(--amber); }
.notification-settings-form { margin-bottom: 22px; }
.notification-settings-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 15px; align-items: start; }
.notification-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.notification-card-head { min-height: 42px; margin-bottom: 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.notification-card-head .eyebrow { margin-bottom: 5px; font-size: 9px; }
.notification-card-head h2 { margin-bottom: 14px; font-size: 17px; letter-spacing: -.25px; }
.notification-master-row { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 11px; }
.notification-rule-fields { display: grid; gap: 18px; padding: 1px 0 18px; border-bottom: 1px solid var(--line); }
.notification-reminders { margin-bottom: 0; }
.notification-recipient-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.recipient-option { cursor: pointer; }
.recipient-option input { position: absolute; opacity: 0; pointer-events: none; }
.recipient-option > span { min-height: 82px; display: grid; grid-template-columns: 27px minmax(0, 1fr); align-content: center; column-gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); transition: .18s ease; }
.recipient-option svg { width: 20px; height: 20px; grid-row: 1 / 3; align-self: center; color: var(--muted); }
.recipient-option strong, .recipient-option small { display: block; }
.recipient-option strong { font-size: 11px; }
.recipient-option small { margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 8.5px; line-height: 1.3; }
.recipient-option input:checked + span { border-color: #88b7a5; background: var(--success-light); box-shadow: inset 0 0 0 1px rgba(47,121,94,.08); }
.recipient-option input:checked + span svg { color: var(--success); }
.recipient-option input:focus-visible + span { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.message-audience { padding: 5px 8px; border-radius: 99px; color: #176f91; background: #e4f4fa; font-size: 8.5px; font-weight: 850; text-transform: uppercase; letter-spacing: .6px; }
.message-audience.internal { color: #9c6318; background: var(--amber-light); }
.notification-message-card .field + .field { margin-top: 14px; }
.template-help { margin: 13px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.template-help code { padding: 2px 5px; border-radius: 5px; color: var(--ink); background: var(--soft); white-space: nowrap; }
.notification-form-actions { min-height: 67px; margin-top: 14px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.notification-form-actions p { margin: 0; color: var(--muted); font-size: 10.5px; }
.notification-form-actions > div { display: flex; gap: 9px; }
.notification-history-panel { margin-top: 0; }
.notification-history-head { align-items: flex-end; }
.notification-history-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 1; }
.notification-history-count { color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.notification-history-search { width: min(340px, 100%); }
.notification-history-table { min-width: 980px; }
.notification-history-table td { padding-block: 13px; }
.history-date strong, .history-date small, .history-email { display: block; }
.history-date strong { font-size: 11px; }
.history-date small, .history-email { margin-top: 3px; color: var(--muted); font-size: 9px; }
.history-audience { display: inline-block; padding: 4px 7px; border-radius: 99px; color: var(--success); background: var(--success-light); font-size: 8.5px; font-weight: 850; }
.history-audience.customer { color: #176f91; background: #e4f4fa; }
.history-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; color: var(--success); background: var(--success-light); font-size: 9px; font-weight: 850; white-space: nowrap; }
.history-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.history-status.failed { color: var(--red); background: var(--red-light); }
.history-detail-button { color: var(--brand-blue); }
.history-delete-button { color: #9a9ea0; }
.history-delete-button:hover { border-color: #d5a99c; color: var(--red); background: var(--red-light); }
.notification-history-empty { padding-block: 38px 44px; }
.notification-detail-dialog { width: min(820px, calc(100vw - 28px)); }
.notification-detail-body { padding: 22px 26px 28px; }
.notification-detail-lead { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.notification-detail-lead > div { min-width: 0; }
.notification-detail-lead strong, .notification-detail-lead small { display: block; }
.notification-detail-lead strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.notification-detail-lead small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.notification-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.notification-detail-grid > div { min-height: 68px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.notification-detail-grid > div:nth-child(2n) { border-right: 0; }
.notification-detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.notification-detail-grid small, .notification-detail-grid strong { display: block; }
.notification-detail-grid small, .notification-email-copy small { margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .45px; }
.notification-detail-grid strong { overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
.history-message-id { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px !important; }
.notification-email-copy { display: grid; gap: 12px; margin-top: 18px; }
.notification-email-copy > div { padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.notification-email-copy strong { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.notification-email-copy pre { max-height: 330px; margin: 0; overflow: auto; color: var(--ink); font: 11px/1.65 Arial, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.notification-detail-error { margin-top: 16px; padding: 13px 15px; border: 1px solid #e8b9aa; border-radius: 10px; color: var(--red); background: var(--red-light); }
.notification-detail-error strong { font-size: 11px; }
.notification-detail-error p { margin: 5px 0 0; font-size: 10px; line-height: 1.5; }

dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 17px; color: var(--ink); box-shadow: 0 28px 90px rgba(14,39,31,.28); overflow: hidden; }
dialog::backdrop { background: rgba(15,34,28,.58); backdrop-filter: blur(3px); }
#revision-form, #company-form { max-height: calc(100vh - 28px); display: flex; flex-direction: column; }
.company-dialog { width: min(700px, calc(100vw - 28px)); }
.dialog-head { padding: 22px 26px 18px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 22px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--soft); color: #6f827b; }
.icon-button:hover { background: #e9efec; color: var(--ink); }
.dialog-body { overflow-y: auto; padding: 5px 26px 8px; }
.form-section { padding: 19px 0 20px; border-bottom: 1px solid #e8eeeb; }
.form-section:last-of-type { border-bottom: 0; }
.form-section h3 { margin-bottom: 14px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; color: #496159; font-size: 11.5px; font-weight: 650; }
.field.full { grid-column: 1 / -1; }
.field b { color: var(--red); }
.field small { color: #8b9994; font-size: 10px; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d7e1dd; border-radius: 8px; background: #fff; color: var(--ink); padding: 10px 11px; outline: none; font-size: 12px; font-weight: 450; }
.field input, .field select { height: 40px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #6d9c8d; box-shadow: 0 0 0 3px rgba(42,104,83,.08); }
.field input[readonly] { color: var(--muted); background: var(--soft); cursor: default; }
.field .linked-note { color: var(--success); font-weight: 700; }
.linked-field > span::after { content: " · z adresáře"; color: var(--success); font-size: 9px; font-weight: 750; }
.reminders { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 15px; padding: 0; border: 0; }
.reminders legend { width: 100%; margin-bottom: 7px; color: #496159; font-size: 11.5px; font-weight: 650; }
.reminders label { cursor: pointer; }
.reminders input { position: absolute; opacity: 0; pointer-events: none; }
.reminders span { display: block; padding: 8px 13px; border: 1px solid #d8e2de; border-radius: 8px; color: #6b7d77; background: #fff; font-size: 11px; font-weight: 650; }
.reminders input:checked + span { border-color: #7fa596; color: var(--green); background: #eaf3ef; }
.upload-field { min-height: 68px; display: flex; align-items: center; gap: 13px; margin-bottom: 15px; padding: 11px 14px; border: 1px dashed #b7cbc3; border-radius: 10px; background: #f9fbfa; cursor: pointer; }
.upload-field:hover { border-color: #71998b; }
.upload-field input { position: absolute; opacity: 0; pointer-events: none; }
.upload-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 9px; background: var(--green-light); color: var(--green); flex: none; }
.upload-field strong, .upload-field small { display: block; }
.upload-field strong { font-size: 11.5px; }
.upload-field small { margin-top: 4px; color: #8a9994; font-size: 10px; }
.form-error { margin: 5px 0 14px; padding: 11px 13px; border-radius: 8px; background: var(--red-light); color: #96442d; font-size: 12px; }
.dialog-actions { padding: 15px 26px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fbfcfb; }
.text-button { padding: 0 14px; background: transparent; color: #667a73; font-size: 12px; font-weight: 650; }

.bulk-upload-dialog { width: min(760px, calc(100vw - 28px)); }
.bulk-upload-dialog[open] { display: flex; flex-direction: column; }
.bulk-upload-body { min-height: 0; padding-top: 20px; flex: 1; }
.bulk-upload-intro { margin-bottom: 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.bulk-dropzone { min-height: 104px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; border: 2px dashed #b7cbc3; border-radius: 12px; background: #f9fbfa; text-align: left; cursor: pointer; transition: .18s ease; }
.bulk-dropzone:hover, .bulk-dropzone.dragging { border-color: var(--green); background: var(--green-light); }
.bulk-dropzone.disabled { opacity: .65; pointer-events: none; }
.bulk-dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.bulk-dropzone strong, .bulk-dropzone small { display: block; }
.bulk-dropzone strong { font-size: 13px; }
.bulk-dropzone small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.bulk-summary { margin-top: 17px; }
.bulk-summary-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 8px; }
.bulk-summary-line strong { font-size: 12px; }
.bulk-summary-line span { color: var(--muted); font-size: 10px; font-weight: 750; }
.bulk-progress { height: 7px; overflow: hidden; border-radius: 99px; background: var(--soft); }
.bulk-progress span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--brand-orange); transition: width .2s ease; }
.bulk-file-list { max-height: 280px; margin-top: 12px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.bulk-file-row { min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; align-items: center; gap: 12px; padding: 8px 11px; border-bottom: 1px solid var(--line); }
.bulk-file-row:last-child { border-bottom: 0; }
.bulk-file-name { min-width: 0; overflow: hidden; font-size: 10.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.bulk-file-size { color: var(--muted); font-size: 9px; white-space: nowrap; }
.bulk-file-status { justify-self: end; padding: 4px 7px; border-radius: 99px; color: var(--muted); background: var(--soft); font-size: 8.5px; font-weight: 800; white-space: nowrap; }
.bulk-file-status.uploading { color: #176f91; background: #e4f4fa; }
.bulk-file-status.success { color: var(--success); background: var(--success-light); }
.bulk-file-status.duplicate { color: var(--amber); background: var(--amber-light); }
.bulk-file-status.error { color: var(--red); background: var(--red-light); }
.bulk-upload-actions { flex-wrap: wrap; }
.bulk-upload-actions .text-button { margin-right: auto; }
.status-pill.draft { color: #9a6418; background: var(--amber-light); }

.toast { position: fixed; z-index: 20; right: 25px; bottom: 25px; max-width: min(380px, calc(100vw - 30px)); padding: 13px 17px; border-radius: 10px; background: #173f35; color: #fff; box-shadow: 0 12px 35px rgba(14,39,31,.26); font-size: 12px; line-height: 1.45; transform: translateY(25px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #93462f; }

.small-dialog { width: min(560px, calc(100vw - 28px)); }
.users-body { padding-top: 20px; padding-bottom: 24px; }
.users-list { display: grid; gap: 8px; margin-bottom: 24px; }
.user-row { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.user-row > div { min-width: 0; flex: 1; }
.user-row strong, .user-row small { display: block; }
.user-row strong { font-size: 12px; }
.user-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-pill { padding: 5px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: 9px; font-weight: 750; }
.role-control { display: flex; align-items: center; gap: 6px; }
.role-select { height: 32px; max-width: 145px; padding: 0 28px 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 10px; font-weight: 750; outline: none; cursor: pointer; }
.role-select:focus { border-color: var(--brand-orange-dark); box-shadow: 0 0 0 3px rgba(249,175,63,.13); }
.role-select:disabled { opacity: .72; cursor: not-allowed; }
.role-help { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 10px; font-weight: 900; cursor: help; }
.role-field { margin: 0; padding: 0; border: 0; }
.role-field legend { margin-bottom: 7px; color: #496159; font-size: 11.5px; font-weight: 650; }
.role-field legend b { color: var(--red); }
.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.role-choice { position: relative; min-width: 0; min-height: 62px; padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); cursor: pointer; transition: .18s ease; }
.role-choice:has(input:checked) { border-color: var(--brand-orange-dark); background: rgba(249,175,63,.08); box-shadow: 0 0 0 2px rgba(249,175,63,.1); }
.role-choice input { position: absolute; opacity: 0; pointer-events: none; }
.role-choice strong, .role-choice small { display: block; }
.role-choice strong { font-size: 10.5px; }
.role-choice small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.role-choice i { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 9px; font-style: normal; font-weight: 900; }
[data-tooltip] { position: relative; }
.floating-tooltip { position: fixed; inset: auto; z-index: 2147483647; width: max-content; max-width: min(270px, calc(100vw - 20px)); margin: 0; padding: 9px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: #1f2123; color: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.28); font-family: "Nunito Flex", ui-sans-serif, sans-serif; font-size: 9.5px; font-weight: 550; line-height: 1.45; text-align: left; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(3px); transition: opacity .14s ease, transform .14s ease, visibility .14s ease; }
.floating-tooltip.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.floating-tooltip::backdrop { display: none; }
.view-only-label { color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.account-role { color: var(--brand-orange-dark) !important; font-weight: 800; }
.new-user-form { padding: 18px; border-radius: 12px; background: var(--soft); }
.new-user-form h3 { margin-bottom: 14px; font-size: 13px; }
.new-user-form .primary-button { margin-top: 15px; }

.settings-dialog { width: min(760px, calc(100vw - 28px)); }
.settings-body { padding: 2px 28px 26px; }
.settings-section { padding: 23px 0; border-bottom: 1px solid var(--line); }
.settings-section:last-child { padding-bottom: 2px; border-bottom: 0; }
.settings-section-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.settings-section-head h3 { margin-bottom: 4px; font-size: 13px; }
.settings-section-head p { margin: 0; color: var(--muted); font-size: 10.5px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-option { position: relative; min-width: 0; padding: 10px; display: grid; grid-template-columns: 54px minmax(0, 1fr) 18px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; transition: .18s ease; }
.theme-option:hover { border-color: #aeb1b3; transform: translateY(-1px); }
.theme-option.selected { border-color: var(--brand-orange-dark); box-shadow: 0 0 0 2px rgba(249,175,63,.15); }
.theme-option > span:nth-child(2) { min-width: 0; }
.theme-option strong, .theme-option small { display: block; }
.theme-option strong { font-size: 11px; }
.theme-option small { margin-top: 3px; color: var(--muted); font-size: 8.5px; line-height: 1.25; }
.theme-check { width: 17px; height: 17px; color: var(--brand-orange-dark); opacity: 0; }
.theme-option.selected .theme-check { opacity: 1; }
.theme-preview { position: relative; width: 54px; height: 39px; overflow: hidden; display: block; border: 1px solid #cfd1d2; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.theme-preview::before { content: ""; position: absolute; inset: 5px 5px auto 17px; height: 5px; border-radius: 2px; background: currentColor; opacity: .35; }
.theme-preview i:first-child { position: absolute; inset: 0 auto 0 0; width: 12px; background: #3a3c3e; }
.theme-preview i:last-child { position: absolute; left: 17px; right: 5px; bottom: 6px; height: 15px; border-radius: 3px; background: currentColor; opacity: .16; }
.theme-light { color: #4a4c4e; background: #f4f5f5; }
.theme-dark { color: #e2e4e5; background: #252729; border-color: #55585a; }
.theme-system { color: #4a4c4e; background: linear-gradient(90deg, #f4f5f5 0 50%, #252729 50%); }
.theme-system i:first-child { background: linear-gradient(90deg, #3a3c3e 0 50%, #181a1b 50%); }
.setting-rows { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.setting-row { min-height: 64px; padding: 11px 13px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); background: var(--white); cursor: pointer; }
.setting-row:last-child { border-bottom: 0; }
.setting-row-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #65696b; background: var(--soft); }
.setting-row-icon svg { width: 17px; height: 17px; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 11px; }
.setting-row small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.switch-input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #c8cbcc; transition: .18s ease; }
.switch::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: .18s ease; }
.switch-input:checked + .switch { background: var(--brand-orange); }
.switch-input:checked + .switch::after { transform: translateX(16px); }
.switch-input:focus-visible + .switch { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.notification-summary { min-height: 69px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.summary-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(191,117,24,.12); }
.summary-status-dot.enabled { background: var(--success); box-shadow: 0 0 0 4px rgba(47,121,94,.13); }
.notification-summary strong, .notification-summary small { display: block; }
.notification-summary strong { font-size: 11px; }
.notification-summary small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.summary-time { padding: 6px 9px; border-radius: 7px; background: var(--soft); color: var(--muted); font-size: 9.5px; font-weight: 750; }
.settings-account-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.settings-account-row .user-avatar { width: 38px; height: 38px; }
.settings-account-row strong, .settings-account-row small { display: block; }
.settings-account-row strong { font-size: 11px; }
.settings-account-row small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }

html[data-density="compact"] .stat-card { min-height: 105px; padding-block: 16px; }
html[data-density="compact"] .panel-head { padding-block: 15px 12px; }
html[data-density="compact"] td { padding-top: 9px; padding-bottom: 9px; }
html[data-density="compact"] .customer-cell .avatar { width: 30px; height: 30px; }
html[data-density="compact"] .status-pill { padding-block: 4px; }

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .directory-summary-card,
html[data-theme="dark"] .revision-panel,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .user-chip,
html[data-theme="dark"] dialog,
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .reminders span,
html[data-theme="dark"] .row-button { background: var(--white); color: var(--ink); }
html[data-theme="dark"] .row-button.notification-toggle.enabled { color: var(--success); background: var(--success-light); }
html[data-theme="dark"] .row-button.notification-toggle.disabled { color: var(--muted); background: var(--soft); }
html[data-theme="dark"] .message-audience { color: #80cce9; background: #23444f; }
html[data-theme="dark"] .history-audience.customer { color: #80cce9; background: #23444f; }
html[data-theme="dark"] .role-field legend { color: var(--ink); }
html[data-theme="dark"] th,
html[data-theme="dark"] .dialog-actions { background: #26292b; }
html[data-theme="dark"] td { border-color: var(--line); }
html[data-theme="dark"] tbody tr:hover { background: #303335; }
html[data-theme="dark"] .customer-cell strong,
html[data-theme="dark"] .revision-cell strong,
html[data-theme="dark"] .date-cell strong { color: var(--ink); }
html[data-theme="dark"] .setup-banner { border-color: #5b4a2b; background: #373126; color: #f3d69f; }
html[data-theme="dark"] .setup-banner p { color: #c5a977; }
html[data-theme="dark"] .upload-field { border-color: #5b5e60; background: #272a2c; }
html[data-theme="dark"] .bulk-dropzone { border-color: #5b5e60; background: #272a2c; }
html[data-theme="dark"] .bulk-dropzone:hover,
html[data-theme="dark"] .bulk-dropzone.dragging { border-color: #79a898; background: #283832; }
html[data-theme="dark"] .login-panel { background: #202224; }
html[data-theme="dark"] .login-card { color: var(--ink); }
html[data-theme="dark"] .form-error { background: #4c302b; color: #f2b09e; }
html[data-theme="dark"] .theme-option:hover { border-color: #727678; }
html[data-theme="dark"] .switch { background: #5c6062; }

.login-page { min-height: 100vh; background: #fff; }
.login-layout { min-height: 100vh; max-width: none; padding: 0; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
.login-visual { position: relative; min-height: 100vh; padding: clamp(28px, 4vw, 58px); display: flex; flex-direction: column; overflow: hidden; color: #fff; background: linear-gradient(145deg, #252729 0%, #3c3f42 100%); }
.login-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 18%, rgba(249,175,63,.2), transparent 30%), linear-gradient(120deg, transparent 55%, rgba(255,255,255,.035) 55%); }
.login-brand { position: relative; z-index: 2; padding: 0; width: max-content; }
.visual-copy { position: relative; z-index: 2; margin: auto 0; max-width: 570px; }
.visual-badge { display: inline-block; margin-bottom: 24px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; color: #dbe0e9; background: rgba(255,255,255,.07); font-size: 10px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; }
.visual-copy h1 { margin-bottom: 22px; font-size: clamp(45px, 5vw, 72px); line-height: .98; letter-spacing: -3px; }
.visual-copy p { max-width: 500px; color: #c8cbcd; font-size: 16px; line-height: 1.7; }
.visual-foot { position: relative; z-index: 2; margin: 0; color: #939799; font-size: 11px; }
.visual-orbit { position: absolute; right: -180px; bottom: -220px; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.visual-orbit span { position: absolute; inset: 50px; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; }
.visual-orbit span:nth-child(2) { inset: 115px; }
.visual-orbit span:nth-child(3) { inset: 178px; background: rgba(237,177,79,.12); border-color: rgba(237,177,79,.24); }
.login-logo-watermark { position: absolute; z-index: 1; right: -15px; bottom: 35px; width: 310px; height: 235px; overflow: hidden; opacity: .075; transform: rotate(-5deg); }
.login-logo-watermark img { position: absolute; width: 330px; max-width: none; left: -10px; top: -62px; }
.login-panel { display: grid; place-items: center; padding: 35px; background: #fbfbfc; }
.login-card { width: min(390px, 100%); }
.login-card h2 { margin-bottom: 9px; font-size: 28px; letter-spacing: -.8px; }
.login-subtitle { margin-bottom: 27px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 16px; }
.login-button { width: 100%; margin-top: 4px; }
.login-security { display: flex; align-items: center; gap: 9px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: #8a93a2; font-size: 10px; line-height: 1.4; }
.login-security svg { width: 17px; height: 17px; flex: none; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 82px minmax(0,1fr); }
  .sidebar { padding: 25px 13px; }
  .brand { padding: 0 6px 29px; justify-content: center; }
  .brand > span:last-child, .nav-item:not(.active), .nav-item.active { font-size: 0; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item svg { width: 21px; height: 21px; }
  .nav-count { display: none; }
  .email-state, .sidebar-foot { display: none; }
  main { padding-inline: 28px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat-card { padding: 18px; }
  .stat-icon { display: none; }
  .directory-overview { gap: 10px; }
  .notification-overview { grid-template-columns: repeat(2, 1fr); }
  .notification-settings-grid { grid-template-columns: 1fr; }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-charts { grid-template-columns: 1fr; }
  .status-chart-layout { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .revision-panel .table-wrap { overflow-x: hidden; }
  .notification-history-head { display: grid; align-items: start; }
  .notification-history-tools { width: 100%; justify-content: space-between; }
  .notification-history-search { flex: 1; }
  .mobile-card-table,
  .company-table.mobile-card-table,
  .notification-history-table.mobile-card-table { min-width: 0; display: block; padding: 0 14px 14px; }
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody { display: grid; gap: 12px; }
  .mobile-card-table tbody tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
  .mobile-card-table tbody tr:hover { background: var(--white); }
  .mobile-card-table td,
  .mobile-card-table td:first-child,
  .mobile-card-table td:last-child {
    min-height: 50px;
    padding: 11px 13px;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--line);
    text-align: left;
  }
  .mobile-card-table td:first-child { padding-top: 14px; border-top: 0; }
  .mobile-card-table td:last-child { padding-bottom: 14px; }
  .mobile-card-table td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .45px; text-transform: uppercase; }
  .mobile-card-table .customer-cell,
  .mobile-card-table .revision-cell,
  .mobile-card-table .date-cell,
  .mobile-card-table .reminder-list,
  .mobile-card-table .company-contact { min-width: 0; }
  .mobile-card-table .contact-link,
  .mobile-card-table .address-line { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
  .mobile-card-table .action-wrap { flex-wrap: wrap; }
  .mobile-card-table .row-button { width: 40px; height: 40px; }
  .mobile-card-table .row-button svg { width: 18px; height: 18px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px 18px; flex-direction: row; align-items: center; }
  .brand { padding: 0; justify-content: flex-start; }
  .brand-logo { width: 46px; height: 42px; }
  .brand-logo img { width: 51px; top: -10px; }
  .brand > span:last-child { display: block; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 10px; }
  .notification-history-tools { display: grid; justify-content: stretch; }
  .notification-history-count { order: 2; }
  .notification-history-search { width: 100%; }
  .notification-detail-body { padding: 18px; }
  .notification-detail-grid { grid-template-columns: 1fr; }
  .notification-detail-grid > div,
  .notification-detail-grid > div:nth-child(2n),
  .notification-detail-grid > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .notification-detail-grid > div:last-child { border-bottom: 0; }
  .sidebar-spacer { display: none; }
  .sidebar nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 3px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.1);
    background: rgba(35,37,39,.97);
    box-shadow: 0 -8px 28px rgba(20,22,23,.2);
    backdrop-filter: blur(12px);
  }
  .sidebar nav .nav-item { min-width: 0; min-height: 52px; padding: 6px 2px 5px; flex-direction: column; justify-content: center; gap: 4px; border-radius: 8px; overflow: hidden; font-size: 0; }
  .sidebar nav .nav-item::after { content: attr(data-mobile-label); max-width: 100%; overflow: hidden; font-size: 8.5px; font-weight: 750; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar nav .nav-item svg { width: 20px; height: 20px; }
  main { padding: 26px 16px calc(92px + env(safe-area-inset-bottom)); }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; margin-bottom: 22px; }
  .header-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .topbar .subtitle { display: none; }
  h1 { font-size: 28px; }
  .topbar .primary-button { width: 44px; min-width: 44px; padding: 0; font-size: 0; }
  .mobile-settings-button, .mobile-nav-button { display: none; }
  .user-chip > span:nth-child(2) { display: none; }
  .stats { grid-template-columns: 1fr; gap: 9px; }
  .stat-card { min-height: 88px; padding: 14px 18px; }
  .stat-icon { display: grid; width: 42px; height: 42px; }
  .stat-card strong { font-size: 24px; }
  .dashboard-kpis { gap: 9px; }
  .dashboard-kpi { min-height: 102px; padding: 15px; }
  .dashboard-kpi strong { font-size: 24px; }
  .dashboard-card { padding: 18px; }
  .status-chart-layout { grid-template-columns: 1fr; justify-items: center; gap: 17px; }
  .status-donut { width: 164px; height: 164px; }
  .status-legend { width: 100%; }
  .month-chart { min-width: 580px; height: 205px; }
  .attention-row { grid-template-columns: 7px minmax(0, 1fr) auto; gap: 9px; }
  .attention-marker { grid-column: 1; grid-row: 1 / 3; }
  .attention-main { grid-column: 2; grid-row: 1; }
  .attention-row .status-pill { grid-column: 3; grid-row: 1; }
  .attention-date { grid-column: 2 / 4; grid-row: 2; }
  .attention-action { display: none; }
  .panel-head { align-items: flex-start; padding: 18px; }
  .secondary-button { width: 40px; padding: 0; font-size: 0; justify-content: center; }
  .filters { padding: 0 18px 14px; display: grid; }
  .tabs { max-width: 100%; overflow-x: auto; }
  .tab { white-space: nowrap; }
  .filter-actions { min-width: 0; width: 100%; margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .filter-actions .filter-button,
  .filter-actions .secondary-button { width: 100%; min-width: 0; padding: 0 9px; justify-content: center; font-size: 10.5px; }
  .filter-actions .search-field { grid-column: 1 / -1; width: 100%; max-width: none; }
  .search-field { width: 100%; }
  .directory-overview { grid-template-columns: 1fr; gap: 8px; }
  .notification-overview { grid-template-columns: 1fr; gap: 8px; }
  .notification-status-card { min-height: 70px; padding: 12px 15px; }
  .notification-card { padding: 18px; }
  .notification-recipient-options { grid-template-columns: 1fr; }
  .notification-form-actions { align-items: stretch; flex-direction: column; }
  .notification-form-actions > div { display: grid; grid-template-columns: 1fr; }
  .notification-form-actions .secondary-button, .notification-form-actions .primary-button { width: 100%; }
  .directory-summary-card { min-height: 70px; padding: 12px 15px; }
  .directory-panel-head { display: grid; }
  .directory-search { width: 100%; }
  .archive-panel-head { display: grid; }
  .archive-search { width: 100%; }
  th:first-child, td:first-child { padding-left: 18px; }
  th:last-child, td:last-child { padding-right: 18px; }
  .setup-banner { align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .dialog-head, .dialog-body, .dialog-actions { padding-left: 20px; padding-right: 20px; }
  .theme-options { grid-template-columns: 1fr; }
  .theme-option { grid-template-columns: 54px minmax(0, 1fr) 18px; }
  .settings-body { padding-left: 20px; padding-right: 20px; }
  .summary-time { display: none; }
  .settings-account-row { grid-template-columns: 38px minmax(0, 1fr); }
  .settings-account-row .secondary-button { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .role-picker { grid-template-columns: 1fr; }
  .role-choice { min-height: 52px; }
  .user-row { align-items: flex-start; flex-wrap: wrap; }
  .role-control { width: 100%; padding-left: 43px; }
  .settings-dialog[open], .small-dialog[open] { max-height: calc(100dvh - 18px); display: flex; flex-direction: column; }
  .settings-dialog .dialog-body, .small-dialog .dialog-body { min-height: 0; max-height: none; flex: 1; overflow-y: auto; }
  .bulk-upload-dialog[open] { max-height: calc(100dvh - 18px); }
  .bulk-file-row { grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }
  .bulk-file-size { display: none; }
  .bulk-upload-actions .text-button { width: auto; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { min-height: 230px; padding: 25px; }
  .visual-copy { margin: 35px 0 18px; }
  .visual-copy h1 { margin-bottom: 10px; font-size: 38px; letter-spacing: -1.5px; }
  .visual-copy p { display: none; }
  .visual-foot { display: none; }
  .login-panel { padding: 38px 22px; }
}

@media (max-width: 430px) {
  .dashboard-kpis { grid-template-columns: 1fr 1fr; gap: 7px; }
  .dashboard-kpi { min-height: 98px; padding: 14px 12px; }
  .dashboard-kpi span { font-size: 9.5px; }
  .dashboard-kpi small { font-size: 8px; }
  .dashboard-card-head { display: block; }
  .dashboard-card-head > small { width: fit-content; display: block; margin-top: 8px; }
  .attention-row .status-pill { padding: 5px 7px; font-size: 9px; }
  .mobile-card-table td,
  .mobile-card-table td:first-child,
  .mobile-card-table td:last-child { grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
  .mobile-card-table td[data-label="Akce"] { grid-template-columns: 1fr; align-items: start; }
  .mobile-card-table td[data-label="Akce"]::before { margin-bottom: 2px; }
  .mobile-card-table .action-wrap { width: 100%; justify-content: flex-start; }
  .setup-banner { padding: 13px; }
  .setup-banner .banner-icon { display: none; }
  .user-chip { margin-right: auto; }
}
