/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #f1f0ea;
  --border: rgba(0,0,0,0.1);
  --border-md: rgba(0,0,0,0.18);
  --text: #1a1a18;
  --text-2: #6b6b67;
  --text-3: #a8a8a3;
  --purple-50: #EEEDFE;
  --purple-200: #AFA9EC;
  --purple-400: #7F77DD;
  --purple-600: #534AB7;
  --purple-800: #3C3489;
  --teal-50: #E1F5EE;
  --teal-400: #1D9E75;
  --teal-600: #0F6E56;
  --teal-800: #085041;
  --amber-50: #FAEEDA;
  --amber-200: #EF9F27;
  --amber-600: #854F0B;
  --amber-800: #633806;
  --coral-50: #FAECE7;
  --coral-200: #F0997B;
  --coral-600: #993C1D;
  --coral-800: #712B13;
  --radius: 8px;
  --radius-lg: 12px;
}

:root[data-theme="dark"] {
  --bg: #101115;
  --surface: #181a20;
  --surface-2: #22252d;
  --border: rgba(255,255,255,0.1);
  --border-md: rgba(255,255,255,0.18);
  --text: #f1f3f6;
  --text-2: #b5bac5;
  --text-3: #808895;
  --purple-50: #25213f;
  --purple-200: #7066c5;
  --purple-400: #8d83e7;
  --purple-600: #a69df4;
  --purple-800: #dcd8ff;
  --teal-50: #142b25;
  --teal-400: #3ad0a3;
  --teal-600: #65d9b8;
  --teal-800: #b8f4df;
  --amber-50: #332713;
  --amber-200: #d8a85e;
  --amber-600: #f3c875;
  --amber-800: #ffe2a1;
  --coral-50: #351d19;
  --coral-200: #e28a76;
  --coral-600: #ffad99;
  --coral-800: #ffd0c5;
}

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(59, 130, 246, 0.22);
}

/* ===== AUTH ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 24px;
  padding-top: max(24px, calc(50vh - 170px));
  background: var(--bg);
  box-shadow: inset 0 0 80px rgba(59, 130, 246, 0.32);
  overflow-y: auto;
}
.auth-overlay.hidden { display: none; }
.auth-panel {
  width: 440px;
  max-width: calc(100vw - 48px);
  background: var(--surface);
  border: 2px solid #3b82f6;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(59, 130, 246, 0.18), 0 0 15px rgba(59, 130, 246, 0.1);
}
.aotpp-logo {
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 6px;
  overflow: visible;
}
.aotpp-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}
.aotpp-logo-auth {
  width: min(340px, 100%);
  height: auto;
  aspect-ratio: 960 / 285;
  margin: 0 auto 18px;
}
.auth-btn { width: 100%; justify-content: center; padding: 11px 16px; margin-top: 8px; }
.admin-password-box {
  min-width: 180px;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  gap: 10px;
}
.admin-password-box.hidden { display: none; }
.admin-password-box label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-2);
}
.admin-password-box input {
  min-width: 180px;
  border: 0.5px solid var(--border-md);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
}
.admin-password-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.admin-login-version {
  margin-left: 4px;
  color: #c62828;
  font-size: 10px;
  font-weight: 800;
}
.employee-login-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 8px;
  margin: 8px 0 4px;
  text-align: left;
}
.employee-login-row.hidden { display: none; }
.employee-login-row label {
  grid-column: auto;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.employee-login-row input {
  min-width: 180px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}
.employee-login-row input:focus {
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px rgba(91, 76, 196, 0.12);
}
.employee-login-row .auth-btn {
  min-width: 180px;
  margin-top: 0;
  white-space: nowrap;
}
.auth-error {
  margin-top: 14px;
  color: #c0392b;
  font-size: 13px;
}
.notice {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}
.notice.error-notice {
  background: #fff4f4;
  border: 0.5px solid #ffc7c7;
  color: #9b1c1c;
}
.notice.warning-notice {
  background: #fff8e6;
  border: 0.5px solid #ffe0a3;
  color: #7a4a00;
}

.admin-access-overlay {
  position: absolute;
  z-index: 450;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(245, 245, 243, 0.14);
  -webkit-backdrop-filter: blur(6px) saturate(82%);
  backdrop-filter: blur(6px) saturate(82%);
}
.admin-access-overlay.hidden { display: none; }
.admin-access-message {
  max-width: 620px;
  padding: 18px 30px;
  border: 1px solid rgba(91, 76, 196, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #29263a;
  box-shadow: 0 18px 55px rgba(23, 20, 45, 0.18);
  font-size: 17px;
  font-weight: 750;
  text-align: center;
}
:root[data-theme="dark"] .admin-access-overlay {
  background: rgba(16, 18, 24, 0.16);
}
:root[data-theme="dark"] .admin-access-message {
  background: rgba(31, 34, 43, 0.95);
  color: #f4f4f6;
}

/* ===== HEADER ===== */
.header {
  height: 52px;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.logo-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.logo > span { display: none; }
.aotpp-logo-header {
  width: 130px;
  height: auto;
  aspect-ratio: 960 / 285;
  flex: 0 0 auto;
  border-radius: 0;
  box-shadow: none;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
.theme-pill {
  width: 38px;
  height: 26px;
  border-radius: 999px;
  border: 0.5px solid var(--border-md);
  background: var(--surface-2);
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.theme-pill .ti { font-size: 16px; }
.theme-pill.active {
  background: var(--purple-50);
  color: var(--purple-800);
  border-color: var(--purple-200);
}
:root[data-theme="dark"] .theme-pill.active {
  background: #2c2f39;
  color: #f7d979;
  border-color: rgba(247,217,121,0.34);
}
:root[data-theme="dark"] .theme-pill#theme-light.active {
  color: #f7d979;
}
:root[data-theme="dark"] .theme-pill#theme-dark.active {
  color: #c6d4ff;
}

.hchip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
}
.hchip .ti { font-size: 13px; }
.firebase-chip.firebase-live { background: var(--teal-50); color: var(--teal-800); border-color: rgba(15,110,86,0.24); }
.version-chip {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
  cursor: pointer;
  user-select: none;
  width: 112px;
  box-sizing: border-box;
  white-space: nowrap;
  justify-content: center;
}
.version-chip:hover {
  background: #fecaca;
}
.date-chip {
  background: var(--surface-2);
  color: var(--text);
}
.logged-user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}
@media (min-width: 1400px) {
  .logged-user-chip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
.logged-user-chip strong { font-weight: 400; }
:root[data-theme="dark"] .version-chip {
  background: #3a1717;
  color: #fecaca;
  border-color: #7f1d1d;
}

.hright { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.pulse-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--teal-600); }
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-400);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.avatar-stack { display: flex; }
.av {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  border: 2px solid var(--surface);
  margin-left: -6px;
  cursor: default;
}
.av:first-child { margin-left: 0; }
.av-purple { background: var(--purple-50); color: var(--purple-800); }
.av-teal   { background: var(--teal-50);   color: var(--teal-800); }
.av-coral  { background: var(--coral-50);  color: var(--coral-800); }

/* ===== LAYOUT ===== */
.body-wrap { display: flex; height: calc(100vh - 52px); overflow: hidden; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 200px; flex-shrink: 0;
  background: var(--surface);
  border-right: 0.5px solid var(--border);
  display: flex; flex-direction: column;
  align-items: stretch;
  padding: 10px 8px;
  gap: 4px;
  overflow-y: auto;
  max-height: 100%;
}

.ni {
  min-width: 180px; min-height: 38px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px;
  padding: 0 9px;
  font-size: 18px;
  color: #2b2b2b;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.ni .ti {
  flex: 0 0 18px;
  text-align: center;
  color: #7c8aa6;
}
.ni span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
  white-space: nowrap;
}
.ni.allowed span {
  color: var(--teal-600) !important;
}
.ni.denied span {
  color: var(--coral-600) !important;
}
.ni[disabled] {
  cursor: not-allowed;
  opacity: 0.72;
}
.ni[disabled]:hover {
  background: transparent;
}
.ni.denied[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.72;
}
.ni.denied[aria-disabled="true"]:hover {
  background: rgba(244, 63, 94, 0.08);
}
.ni:hover { background: var(--surface-2); color: var(--text); }
.ni:hover span { color: var(--text); }
.ni.active { background: var(--purple-50); color: var(--text); }
.ni.active span { color: var(--text); }
.ni[title="Zamestnanci"] .ti { color: #7aa7d9; }
.ni[title="Agenda"] .ti { color: #8fbf9f; }
.ni[title="ISSZ kontrola"] .ti { color: #d39b73; }
.ni[title="Losovanie"] .ti { color: #a99bd8; }
.ni[title="ISSZ oprava"] .ti { color: #d2ad72; }
.ni[title="Úlohy na dnes"] .ti { color: #d78383; }
.ni[title="Ulohy"] .ti { color: #88b9aa; }
.ni[title="Zoznamy"] .ti { color: #88b9aa; }
.ni[title="Vykazy"] .ti { color: #90a8d0; }
.ni[title="Dokumenty"] .ti { color: #9ab59b; }
.ni[title="Nastavenia"] .ti { color: #9b9b9b; }
.ni[title="Služobné auto"] .ti { color: #73a9cf; }
.ni[title="Správa SMV"] .ti { color: #2563eb; }
.ni[title="Služby oddelenia"] .ti { color: #d09090; }
.ni[title="Kalendár"] .ti { color: #70b8b1; }
.ni[title="Telefónne zoznamy"] .ti { color: #a4cc82; }
.ni[title="Logs"] .ti { color: #b48ab6; }
.ni[title="Logout"] .ti { color: #c08c8c; }
body.admin-nav-pastel .sidebar .ni:not(.denied[aria-disabled="true"]) span {
  color: #64748b !important;
}
body.admin-nav-pastel .sidebar .ni[data-page="employees"] .ti { color: #7aa7d9 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="agenda"] .ti { color: #8fbf9f !important; }
body.admin-nav-pastel .sidebar .ni[data-page="receivedFiles"] .ti { color: #c9a8d8 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="dms"] .ti { color: #d9b985 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="isszbj"] .ti { color: #d7a78d !important; }
body.admin-nav-pastel .sidebar .ni[data-page="todayTasks"] .ti,
body.admin-nav-pastel .sidebar #calendar-chip .ti { color: #70b8b1 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="lottery"] .ti { color: #aaa0d8 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="additionalLists"] .ti { color: #8dbfae !important; }
body.admin-nav-pastel .sidebar .ni[data-page="serviceCar"] .ti { color: #73a9cf !important; }
body.admin-nav-pastel .sidebar .ni[data-page="smv"] .ti { color: #90a8d0 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="deptServices"] .ti { color: #d09090 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="rewards"] .ti { color: #d6a94f !important; }
body.admin-nav-pastel .sidebar .ni[data-page="meetings"] .ti { color: #c8a0d8 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="phoneLists"] .ti { color: #a4cc82 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="notes"] .ti { color: #e2a661 !important; }
body.admin-nav-pastel .sidebar .ni[data-page="settings"] .ti { color: #a7a7b2 !important; }.nav-sep { height: 0.5px; background: var(--border); margin: 4px 8px; }
.nav-bottom { margin-top: auto; }
.logout-hint {
  margin: 4px 2px 2px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #fff1f2;
  border: 0.5px solid #fecdd3;
  color: #9f1239;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 10px 22px rgba(159,18,57,0.12);
}
.logout-hint.hidden { display: none; }
:root[data-theme="dark"] .logout-hint {
  background: #3b1620;
  border-color: #7f1d1d;
  color: #fecdd3;
}

.dms-copy {
  display: block;
}
.dms-toolbar {
  justify-content: space-between;
}

/* ===== MAIN CONTENT ===== */
.content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; position: relative; }

.page-top {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px 0;
  gap: 12px;
  flex-wrap: wrap;
}
.page-title { font-size: 18px; font-weight: 600; color: var(--text); }
.page-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex; align-items: center;
  gap: 8px;
  margin: 12px 22px 0;
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  padding: 0 12px;
}
.search-bar.hidden { display: none; }
.search-icon { color: var(--text-3); font-size: 16px; }
.search-bar input {
  flex: 1; border: none; outline: none;
  background: transparent; font-size: 14px;
  color: var(--text); padding: 9px 0;
}
.search-bar input::placeholder { color: var(--text-3); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: 0.5px solid var(--border-md);
  background: var(--surface);
  color: var(--text);
  transition: background 0.1s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.98); }
.btn .ti { font-size: 15px; }

.btn-primary { background: var(--purple-600); color: #fff; border-color: var(--purple-600); }
.btn-primary:hover { background: var(--purple-800); }

.btn-danger { background: transparent; color: #c0392b; border-color: #c0392b; }
.btn-danger:hover { background: #fdf0f0; }

.btn-success { background: #10b981; color: #fff; border-color: #10b981; }
.btn-success:hover { background: #059669; }

.btn-teal { background: var(--teal-600) !important; color: #fff !important; border-color: var(--teal-600) !important; }
.btn-teal:hover { background: var(--teal-800) !important; border-color: var(--teal-800) !important; }

/* ===== STAT CARDS ===== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 22px;
}
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.card-label { font-size: 12px; color: var(--text-3); display: flex; align-items: center; }
.card-value { font-size: 26px; font-weight: 600; color: var(--text); margin-top: 2px; }
.card-mini { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.card-value.green  { color: var(--teal-600); }
.card-value.amber  { color: var(--amber-600); }
.card-value.purple { color: var(--purple-600); }

.cdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.cdot-green  { background: var(--teal-400); }
.cdot-amber  { background: var(--amber-200); }
.cdot-purple { background: var(--purple-400); }

/* ===== WHO BAR ===== */
.who-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 22px 10px;
  flex-wrap: wrap;
}
.who-label { font-size: 12px; color: var(--text-3); }
.who-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 5px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 99px;
  font-size: 12px; color: var(--text-2);
}
.who-av {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
}

/* ===== TABLE ===== */
.table-wrap { padding: 0 22px 24px; overflow-x: auto; overflow-y: visible; flex: 1; }

table {
  min-width: 180px;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  table-layout: auto;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 6px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 0.5px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
  white-space: nowrap;
}
.col-num { width: 50px; text-align: center; }
.col-name { min-width: 160px; }
.col-actions { width: 44px; }

tbody tr { border-bottom: 0.5px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(odd) { background-color: var(--purple-50); }
tbody tr:hover { background: var(--surface-2) !important; }

tbody td { padding: 6px 10px; vertical-align: middle; color: var(--text); }
td.col-num { text-align: center; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* live editing states */
tr.editing-row { background: var(--amber-50) !important; }
tr.editing-row:hover { background: #fde8c8 !important; }
td.editing-cell {
  outline: 2px solid var(--amber-200);
  border-radius: 4px;
  padding: 3px 8px !important;
  background: #fdeac5;
  color: var(--amber-800);
  font-weight: 500;
}

tr.sync-row { background: var(--purple-50) !important; }
tr.sync-row:hover { background: #e6e4fd !important; }
td.sync-cell {
  outline: 2px solid var(--purple-200);
  border-radius: 4px;
  padding: 3px 8px !important;
  background: var(--purple-50);
  color: var(--purple-800);
  font-weight: 500;
}
td.sync-cell .ti { font-size: 12px; margin-right: 3px; }
td.editing-cell .ti { font-size: 12px; margin-right: 3px; }
td.note-cell { color: var(--text-3); font-size: 12px; }

/* ===== AGENDA ===== */
.agenda-view {
  padding: 0 22px 24px;
  flex: 1;
}
.agenda-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.agenda-search {
  flex: 1;
  margin: 0;
}
.agenda-count {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 10px;
}
.agenda-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.agenda-actions .btn.active {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}
.agenda-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.agenda-card-aotp {
  background: var(--surface);
}
.agenda-card-svidnik {
  background: #f3f4f6;
}
.agenda-card-giraltovce {
  background: #f8f2ea;
}
.agenda-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.agenda-name {
  font-size: 15px;
  font-weight: 700;
}
.agenda-dept {
  font-size: 11px;
  color: var(--purple-800);
  background: var(--purple-50);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.agenda-pill {
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px 8px;
}
.agenda-edit-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.agenda-cell-value {
  overflow-wrap: anywhere;
}
.agenda-cell-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  cursor: pointer;
  flex: 0 0 auto;
}
.agenda-cell-edit-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.agenda-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}
.agenda-mail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--teal-600);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.agenda-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-2);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
}
.rewards-view {
  flex: 1;
  min-height: calc(100vh - 96px);
  padding: 0;
}
.rewards-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 96px);
  border: 0;
  background: #f3f6f4;
}

/* ===== LOGS ===== */
.logs-view,
.notes-view,
.received-files-view {
  padding: 0 22px 24px;
  flex: 1;
}

.notes-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 14px;
}
.sticky-notes-board {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: start;
}
.sticky-notes-empty {
  padding: 28px;
  color: var(--text-2);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
}
.sticky-note-card {
  width: 260px;
  height: 240px;
  min-height: 210px;
  min-width: 220px;
  max-width: min(620px, 100%);
  max-height: 620px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  resize: both;
  overflow: auto;
  cursor: grab;
}
.sticky-note-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
}
.sticky-note-card.drag-over {
  outline: 3px solid rgba(34, 197, 94, 0.45);
  transform: translateY(-2px);
}
.sticky-note-card[data-color="yellow"] { background: #fff3b0; }
.sticky-note-card[data-color="green"] { background: #c8f7dc; }
.sticky-note-card[data-color="blue"] { background: #cfe8ff; }
.sticky-note-card[data-color="pink"] { background: #ffd6e7; }
.sticky-note-card[data-color="purple"] { background: #e4d7ff; }
.sticky-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  cursor: grab;
}
.sticky-note-drag-label {
  color: rgba(31, 41, 55, 0.72);
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  padding: 2px 4px;
}
.sticky-note-actions .icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sticky-note-actions .icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.sticky-note-actions .icon-btn.danger {
  color: #be123c;
}
.sticky-note-card textarea {
  width: 100%;
  flex: 1 1 auto;
  min-height: 90px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: #1f2937;
  font: 600 15px/1.45 inherit;
  cursor: text;
}
.sticky-note-colors {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.sticky-note-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16);
  cursor: pointer;
}
.sticky-note-swatch.active {
  box-shadow: 0 0 0 2px #111827;
}
.sticky-note-swatch[data-color="yellow"] { background: #fff3b0; }
.sticky-note-swatch[data-color="green"] { background: #c8f7dc; }
.sticky-note-swatch[data-color="blue"] { background: #cfe8ff; }
.sticky-note-swatch[data-color="pink"] { background: #ffd6e7; }
.sticky-note-swatch[data-color="purple"] { background: #e4d7ff; }

.settings-view {
  padding: 0 22px 24px;
  flex: 1;
}
.settings-card {
  width: min(720px, 100%);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.settings-card h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* Access Toggles in Settings */
.access-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.access-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  user-select: none;
  position: relative;
}

/* Green state (Allowed) */
.access-toggle-btn.allowed {
  background-color: var(--teal-50);
  border-color: var(--teal-400);
  color: var(--teal-800);
}
.access-toggle-btn.allowed:hover {
  background-color: var(--teal-50);
  opacity: 0.85;
  border-color: var(--teal-600);
}

/* Red state (Denied / Admin-only) */
.access-toggle-btn.denied {
  background-color: var(--coral-50);
  border-color: var(--coral-200);
  color: var(--coral-800);
}
.access-toggle-btn.denied:hover {
  background-color: var(--coral-50);
  opacity: 0.85;
  border-color: var(--coral-600);
}

/* Disabled state (Settings) */
.access-toggle-btn.disabled {
  background-color: var(--surface-2);
  border-color: var(--border);
  color: var(--text-3);
  cursor: not-allowed;
  opacity: 0.65;
}

/* Access Feedback Bubbles */
.access-feedback-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  animation: access-bubble-bounce-fade 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.access-feedback-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(30, 41, 59, 0.95) transparent transparent transparent;
}

.access-feedback-bubble.error-bubble {
  background: rgba(225, 29, 72, 0.95);
  border-color: rgba(255, 255, 255, 0.15);
}

.access-feedback-bubble.error-bubble::after {
  border-color: rgba(225, 29, 72, 0.95) transparent transparent transparent;
}

@keyframes access-bubble-bounce-fade {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -6px);
  }
}

.access-toggle-btn i {
  font-size: 16px;
}

.logs-summary {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.logs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.log-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.log-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.log-device {
  font-size: 15px;
  font-weight: 700;
}
.log-user {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}
.log-status {
  align-self: flex-start;
  color: var(--teal-800);
  background: var(--teal-50);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}
.log-table {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.log-table div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.log-table strong {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}
.log-agent {
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-word;
}
.log-history {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.log-history h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.log-history-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 0.5px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
}
.log-history-row strong {
  color: var(--text);
}


/* ===== RECEIVED FILES ===== */
.received-files-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.received-files-head h2 { margin: 0; font-size: 22px; color: var(--text); }
.received-files-head p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.received-files-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.received-file-card { display: grid; gap: 12px; padding: 15px; border: 0.5px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07); }
.received-file-top { display: flex; justify-content: space-between; gap: 10px; }
.received-file-title { display: grid; gap: 4px; min-width: 0; }
.received-file-title strong { font-size: 15px; color: var(--text); word-break: break-word; }
.received-file-title span, .received-file-meta { color: var(--text-2); font-size: 12px; }
.received-file-status { height: fit-content; white-space: nowrap; padding: 4px 9px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 900; }
.received-file-status.saved { background: #dcfce7; color: #166534; }
.received-file-note { min-height: 38px; padding: 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.72); color: var(--text-2); font-size: 13px; }
.received-file-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.received-files-empty { grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--text-2); background: var(--surface); border: 0.5px dashed var(--border-md); border-radius: var(--radius-lg); }
@media (max-width: 720px) { .received-files-head { align-items: stretch; flex-direction: column; } .received-files-list { grid-template-columns: 1fr; } }

/* ===== WELCOME ===== */
.welcome-view {
  flex: 1;
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  position: relative;
}
.welcome-logo {
  width: min(520px, 78vw);
  aspect-ratio: 960 / 285;
  animation: welcomeSpin 4.5s linear infinite;
  transform-style: preserve-3d;
  will-change: transform;
}
.welcome-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.welcome-text {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
}
.welcome-access-note {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  margin-top: -6px;
}
.welcome-view.admin-dashboard {
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 14px;
}

.welcome-view.employee-logo-only .welcome-text,
.welcome-view.employee-logo-only .welcome-access-note {
  display: none;
}


.welcome-view.admin-dashboard .welcome-text,
.welcome-view.admin-dashboard .welcome-access-note {
  display: none;
}

.welcome-task-board {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.3fr) minmax(220px, 0.85fr);
  gap: 16px;
  width: min(1180px, 100%);
  align-items: start;
  position: absolute;
  top: 10px;
  z-index: 2;
}

.welcome-task-board.hidden { display: none; }

.welcome-task-column {
  display: grid;
  gap: 10px;
  min-height: 260px;
  padding: 16px;
  border: 1px solid var(--border-md);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.welcome-task-column h2 {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  text-align: center;
}

.welcome-task-column.previous {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.welcome-task-column.today {
  min-height: 330px;
  border-color: #5eead4;
  background: linear-gradient(180deg, #ecfeff 0%, #f0fdf4 100%);
  box-shadow: 0 24px 70px rgba(20, 184, 166, 0.18);
}

.welcome-task-column.today h2 {
  font-size: 22px;
  color: #1d4ed8;
}

.welcome-task-column.future {
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 100%);
}

.welcome-task-list {
  display: grid;
  gap: 8px;
}

.welcome-task-date-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.welcome-task-date {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.welcome-task-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--border-sm);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
}

button.welcome-task-item {
  cursor: pointer;
}

.welcome-task-item span {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
}

.welcome-task-item strong {
  font-size: 13px;
  line-height: 1.35;
}

.welcome-task-column.today .welcome-task-item {
  padding: 14px;
  border-color: #99f6e4;
  background: rgba(255, 255, 255, 0.86);
}

.welcome-task-column.today .welcome-task-item strong {
  font-size: 17px;
}

.welcome-task-repeat {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.welcome-task-urgent {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 900;
}

.welcome-task-empty {
  padding: 18px 12px;
  color: var(--text-3);
  border: 1px dashed var(--border-md);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.42);
}

@media (max-width: 980px) {
  .welcome-task-board {
    grid-template-columns: 1fr;
    position: relative;
    top: auto;
  }
}

@keyframes welcomeSpin {
  0% { transform: perspective(900px) rotateY(0deg); }
  100% { transform: perspective(900px) rotateY(360deg); }
}

/* ===== CALENDAR ===== */
.calendar-chip {
  cursor: pointer;
  font: inherit;
}
.calendar-panel {
  position: fixed;
  top: 62px;
  right: 18px;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 86px);
  overflow-y: auto;
  z-index: 180;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.16);
  padding: 14px;
}
.calendar-panel.expanded {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 76px);
  overflow: auto;
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.calendar-side-actions {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-tasks-toggle {
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
  font-weight: 800;
}

.calendar-tasks-panel {
  display: grid;
  gap: 8px;
  width: 100%;
  max-height: min(280px, calc(100vh - 360px));
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.calendar-tasks-panel.hidden { display: none; }

.calendar-tasks-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.calendar-tasks-filters .btn {
  justify-content: center;
  min-height: 32px;
  font-size: 12px;
  padding-inline: 6px;
}

.calendar-tasks-filters .btn.active {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
  font-weight: 800;
}

.calendar-tasks-list {
  display: grid;
  gap: 6px;
}

.calendar-task-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--border-sm);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.calendar-task-item span {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
}

.calendar-task-item strong {
  font-size: 12px;
  line-height: 1.3;
}

.calendar-task-item em {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.calendar-tasks-empty {
  padding: 10px;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 820px) {
  .calendar-tasks-filters {
    grid-template-columns: 1fr;
  }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.calendar-weekday {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  padding: 4px 0;
}
.calendar-day {
  position: relative;
  min-height: 54px;
  border: 0.5px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 5px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.calendar-day.today {
  background: #ecfdf5;
  border-color: rgba(34, 197, 94, 0.55);
}

.calendar-day.today strong {
  color: #166534;
  font-weight: 900;
}

:root[data-theme="dark"] .calendar-day.today {
  background: rgba(22, 101, 52, 0.34);
  border-color: rgba(74, 222, 128, 0.62);
}

:root[data-theme="dark"] .calendar-day.today strong {
  color: #bbf7d0;
}
.calendar-day:hover,
.calendar-day.active {
  border-color: var(--purple-400);
  background: var(--purple-50);
}
.calendar-day.has-note {
  box-shadow: none;
}
.calendar-day.has-service-car {
  border: 2px solid #2563eb;
}
:root[data-theme="dark"] .calendar-day.has-service-car {
  border: 2px solid #60a5fa;
}
.calendar-day strong {
  display: block;
  font-size: 12px;
}
.calendar-dot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 9px;
  max-height: 26px;
  overflow: hidden;
}
.calendar-entry-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
}
.calendar-entry-dot.normal { background: #8b5cf6; }

.calendar-entry-dot.service-car { background: #dc2626; }
.calendar-entry-dot.google { background: #8b5cf6; border-radius: 999px; }
:root[data-theme="dark"] .calendar-entry-dot.service-car { background: #f87171; }
.calendar-panel.expanded .calendar-dot-list { display: none; }

.calendar-expanded-toggle.active {
  border-color: #1d4ed8;
  background: #ccfbf1;
  color: #1d4ed8;
  font-weight: 900;
}
.calendar-panel.expanded .calendar-grid {
  gap: 10px;
}
.calendar-panel.expanded .calendar-day {
  min-height: 156px;
  padding: 10px;
  border-radius: 10px;
}
.calendar-panel.expanded .calendar-day strong {
  font-size: 16px;
}
.calendar-day-task-list {
  display: none;
}
.calendar-panel.expanded .calendar-day-task-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.calendar-day-task-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 5px;
  min-width: 0;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}
.calendar-day-task-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-day-task-item.done {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.calendar-day-task-done-icon {
  color: #16a34a;
  font-size: 13px;
  line-height: 1;
}
.calendar-panel.expanded .calendar-day-task-item span:last-child {
  white-space: normal;
  overflow-wrap: anywhere;
}

.calendar-panel.expanded .calendar-day.expanded-focus {
  grid-column: span 2;
  min-height: 230px;
  border: 2px solid #0f766e;
  background: #f0fdfa;
  box-shadow: 0 18px 44px rgba(15, 118, 110, 0.18);
  z-index: 2;
}
.calendar-panel.expanded .calendar-day.expanded-focus .calendar-day-task-item {
  font-size: 12px;
  padding: 5px 7px;
}
@media (max-width: 760px) {
  .calendar-panel.expanded .calendar-day.expanded-focus {
    grid-column: span 1;
  }
}
.calendar-legend {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.calendar-entry-drivers {
  margin-top: 12px;
  padding: 12px;
  background: #f0f7ff;
  border: 1px solid #cce3fd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
:root[data-theme="dark"] .calendar-entry-drivers {
  background: #122238;
  border-color: #244166;
}
.calendar-entry-drivers.hidden {
  display: none;
}
.calendar-entry-drivers-label {
  font-size: 11px;
  font-weight: 750;
  color: var(--text-2);
}
.calendar-entry-drivers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calendar-entry-driver-item {
  font-size: 14px;
  font-weight: 600;
  color: #174a70;
}
:root[data-theme="dark"] .calendar-entry-driver-item {
  color: #b9dcf4;
}
.calendar-entry-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 70px 452px 16px 18px;
  background: transparent;
  pointer-events: none;
}
.calendar-entry-modal.hidden { display: none; }
.calendar-entry-card {
  width: calc(100vw - 922px);
  min-width: 360px;
  max-width: 620px;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 90px rgba(0,0,0,0.22);
  padding: 12px;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}
.calendar-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.calendar-entry-head strong {
  color: var(--text);
  font-size: 15px;
}
.calendar-entry-lines {
  display: grid;
  gap: 5px;
}
.calendar-entry-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto minmax(132px, auto) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0.5px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  background: #f8fbff;
}
.calendar-entry-line:nth-child(2) { background: #f8fff9; }
.calendar-entry-line:nth-child(3) { background: #fffaf3; }
.calendar-entry-line:nth-child(4) { background: #fbf8ff; }
.calendar-entry-line:nth-child(5) { background: #f8ffff; }
.calendar-entry-line:nth-child(6) { background: #fbfcf4; }
.calendar-entry-line:nth-child(7) { background: #f7fbff; }
.calendar-entry-line:nth-child(8) { background: #fff8fb; }
.calendar-entry-line:nth-child(9) { background: #f8fff9; }
.calendar-line-number {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
}
.calendar-entry-line input[type="text"],
.calendar-entry-line textarea {
  min-width: 180px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  padding: 5px 8px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}
.calendar-entry-line-more {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  min-height: 92px;
  margin-top: 14px;
  border-top: 2px solid rgba(83, 74, 183, 0.22);
  background: linear-gradient(180deg, rgba(238,237,254,0.55), #f8fff9);
}
.calendar-entry-line-more textarea {
  min-height: 84px;
  resize: vertical;
}
.calendar-repeat-btn {
  align-self: start;
  white-space: nowrap;
}
#calendar-repeat-modal {
  z-index: 290;
}

.calendar-repeat-card {
  width: min(420px, calc(100vw - 32px));
}
.calendar-repeat-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}
.calendar-repeat-body label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--text-2);
}
.calendar-repeat-body select,
.calendar-repeat-body input {
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.calendar-repeat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
}
.calendar-entry-move-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid rgba(79, 70, 229, 0.28);
  background: #eef2ff;
  color: #3730a3;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.calendar-entry-move-date:hover:not(:disabled) { background: #e0e7ff; border-color: #6366f1; }
.calendar-entry-move-date:disabled { opacity: 0.45; cursor: not-allowed; }
.calendar-entry-move-date-input {
  min-height: 30px;
  border: 0.5px solid var(--border-md);
  border-radius: 8px;
  padding: 5px 8px;
  font: inherit;
  background: var(--surface);
}
.calendar-entry-move-date-input.hidden { display: none; }
.calendar-entry-delete-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 8px;
  padding: 5px 8px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.calendar-entry-delete-line:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #ef4444;
}
.calendar-entry-delete-line:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.calendar-entry-done-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid rgba(22, 163, 74, 0.28);
  border-radius: 8px;
  padding: 5px 8px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.calendar-entry-done-line.active {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}
.calendar-entry-done-line:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.calendar-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== SLUŽOBNÉ AUTO ===== */
.smv-view {
  padding: 14px 22px 28px;
  min-height: 0;
  overflow-y: auto;
}
.smv-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto 12px;
}
.smv-head.hidden {
  display: none;
}
.smv-head strong {
  text-align: center;
  font-size: 18px;
}
.smv-view.smv-subview-active .smv-head {
  grid-template-columns: auto auto;
  justify-content: center;
}
.smv-view.smv-subview-active .smv-head strong {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}
.smv-back-btn {
  min-height: 38px;
  padding: 8px 13px;
  font-weight: 800;
}
.service-car-view {
  padding: 12px 22px 28px;
  min-height: 0;
  overflow-y: auto;
}
.service-car-head {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) 42px;
  align-items: center;
  gap: 10px;
  max-width: 920px;
  margin: 0 auto 12px;
}
.service-car-head strong { text-align: center; text-transform: capitalize; font-size: 18px; }
.service-car-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 920px;
  margin: -2px auto 14px;
}
.service-car-phm-btn,
.service-car-saved-phm-btn,
.service-car-trip-log-btn {
  min-height: 38px;
  padding: 9px 16px;
  font-weight: 800;
}
.service-car-saved-phm-btn {
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-color: #16a34a;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18);
}
.smv-view .service-car-phm-btn:hover,
.smv-view .service-car-saved-phm-btn:hover {
  background: #eef6ff;
  border-color: rgba(37, 99, 235, 0.28);
  color: #1e3a8a;
  filter: none;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}
.service-car-trip-log-btn {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-color: #2563eb;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}
.service-car-trip-log-btn:hover {
  background: #eef6ff;
  border-color: rgba(37, 99, 235, 0.28);
  color: #1e3a8a;
  filter: none;
}
.trip-log-section-tabs .service-car-trip-log-btn.trip-log-section-tab-active {
  background: linear-gradient(135deg, #15803d, #22c55e);
  border-color: #15803d;
  color: #fff;
  box-shadow: 0 10px 22px rgba(21, 128, 61, 0.24);
}
.trip-log-section-tabs .service-car-trip-log-btn.trip-log-section-tab-active:hover,
.trip-log-section-tabs .service-car-trip-log-btn.trip-log-section-tab-active:focus-visible {
  background: linear-gradient(135deg, #166534, #16a34a);
  border-color: #166534;
  color: #fff;
}
.service-car-trip-log-panel {
  max-width: 1180px;
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.service-car-trip-log-panel.hidden {
  display: none;
}
.service-car-trip-log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.service-car-trip-log-head strong {
  font-size: 16px;
}
.service-car-trip-log-head span {
  color: var(--muted);
  font-size: 12px;
}
.service-car-trip-log-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.service-car-trip-log-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  padding: 7px 12px;
  font-weight: 800;
  cursor: pointer;
}
.service-car-trip-log-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.service-car-trip-log-content {
  min-height: 120px;
}
.service-car-trip-log-empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.service-car-trip-log-empty.error {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(254, 226, 226, 0.65);
}
.service-car-trip-log-frame {
  max-height: calc(100vh - 265px);
  overflow: auto;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}
.service-car-trip-log-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #111827;
  background: #fff;
  font-size: 12px;
}
.service-car-trip-log-table th,
.service-car-trip-log-table td {
  border: 1px solid #d9d9d9;
  padding: 2px 5px;
  line-height: 1.25;
  min-height: 22px;
  overflow-wrap: anywhere;
}
.service-car-trip-log-table thead th,
.service-car-trip-log-table .row-head,
.service-car-trip-log-table .corner {
  position: sticky;
  z-index: 2;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  text-align: center;
}
.service-car-trip-log-table thead th {
  top: 0;
}
.service-car-trip-log-table .row-head,
.service-car-trip-log-table .corner {
  left: 0;
}
.service-car-trip-log-table .corner {
  z-index: 3;
}
.service-car-trip-log-row-head-col {
  width: 42px;
  min-width: 42px;
}
.service-car-trip-log-table td[contenteditable="true"]:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
  background: #eff6ff !important;
}
.driving-log-shell {
  display: grid;
  gap: 12px;
}
.driving-log-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(240, 253, 250, 0.95));
}
.driving-log-title strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: 0;
}
.driving-log-title span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}
.trip-log-saving-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(3px);
  pointer-events: all;
}
.trip-log-saving-overlay.hidden {
  display: none;
}
.trip-log-saving-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}
.trip-log-saving-card i {
  color: #2563eb;
  font-size: 28px;
  animation: spin 1s linear infinite;
}
.trip-log-saving-card strong {
  font-size: 15px;
  font-weight: 900;
}
.driving-log-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.driving-log-meta label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.driving-log-meta label > span {
  white-space: nowrap;
}
.driving-log-meta .driving-log-cell {
  min-height: 20px;
  padding: 2px 4px;
  font-size: clamp(10px, 0.72vw, 12px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.driving-log-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.driving-log-controls label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.driving-log-controls input,
.driving-log-controls select {
  min-width: 92px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #0f172a;
  padding: 5px 8px;
  font-weight: 800;
}
.driving-log-bottom-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}
.driving-log-bottom-actions button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
.driving-log-table-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  max-height: clamp(280px, calc(100vh - 360px), 640px);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.driving-log-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: separate;
  border-spacing: 0;
  display: block;
  table-layout: fixed;
  color: #111827;
  background: #fff;
  font-size: 12px;
}
.driving-log-table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
  position: relative;
  z-index: 30;
}
.driving-log-table tbody {
  display: block;
  max-height: clamp(220px, calc(100vh - 430px), 560px);
  overflow-y: auto;
  overflow-x: hidden;
}
.driving-log-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.driving-log-col-number { width: 92px; }
.driving-log-col-date { width: 108px; }
.driving-log-col-person { width: 132px; }
.driving-log-col-route { width: 190px; }
.driving-log-col-passengers { width: 120px; }
.driving-log-col-purpose { width: 250px; }
.driving-log-table th,
.driving-log-table td {
  border: 1px solid #d9d9d9;
  padding: 4px;
  vertical-align: top;
}
.driving-log-table th {
  position: relative;
  z-index: 31;
  background: #e0f2fe;
  color: #0f172a;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 1px 0 #cbd5e1;
}
.driving-log-table tbody tr:nth-child(odd) td {
  background: #f5f3ff;
}
.driving-log-table tbody tr:nth-child(even) td {
  background: #fff;
}
.driving-log-table tbody tr[data-trip-log-entry-row] {
  cursor: pointer;
}
.driving-log-table tbody tr.driving-log-row-selected td {
  background: #dcfce7 !important;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.28);
}
.driving-log-cell {
  min-height: 22px;
  padding: 4px 5px;
  border-radius: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.driving-log-cell:focus {
  outline: 2px solid #2563eb;
  outline-offset: -1px;
  background: #eff6ff;
}
.driving-log-cell.driving-log-invalid-date {
  background: #fee2e2 !important;
  color: #b91c1c;
  box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.45);
}
.driving-log-number-cell {
  position: relative;
  min-height: 48px;
  padding-bottom: 24px;
}
.driving-log-delete-entry {
  position: absolute;
  left: 2px;
  bottom: 2px;
  z-index: 8;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: #fee2e2;
  color: #b91c1c;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(127, 29, 29, 0.2);
}
.driving-log-row-selected .driving-log-delete-entry,
.driving-log-row-editing .driving-log-delete-entry {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.driving-log-delete-entry:hover,
.driving-log-delete-entry:focus-visible {
  opacity: 1;
  background: #fecaca;
  outline: 2px solid rgba(185, 28, 28, 0.25);
}
.driving-log-invalid-date-action {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #991b1b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-weight: 700;
}
.driving-log-invalid-date-action .btn {
  white-space: nowrap;
}
.driving-log-picker-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 2px;
}
.driving-log-picker-button {
  width: 22px;
  min-width: 22px;
  height: 24px;
  align-self: center;
  border: 0;
  border-radius: 5px;
  background: #eef2ff;
  color: #475569;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.driving-log-row-editing .driving-log-picker-button,
.driving-log-picker-cell:focus-within .driving-log-picker-button {
  opacity: 1;
  pointer-events: auto;
}
.driving-log-picker-button:hover,
.driving-log-picker-button:focus-visible {
  background: #dbeafe;
  color: #1d4ed8;
  outline: 2px solid rgba(37, 99, 235, 0.35);
}
.driving-log-short,
.driving-log-date {
  text-align: center;
}
.driving-log-route,
.driving-log-purpose {
  min-height: 24px;
}
.driving-log-note {
  color: #475569;
  font-style: italic;
}
.driving-log-sort-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #0f172a;
}
.driving-log-sort-preview strong,
.driving-log-auxiliary-title {
  display: block;
  font-weight: 900;
}
.driving-log-sort-preview span,
.driving-log-sort-preview p {
  color: #475569;
  font-size: 12px;
  margin: 0;
}
.driving-log-sort-preview table,
.driving-log-auxiliary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}
.driving-log-sort-preview th,
.driving-log-sort-preview td,
.driving-log-auxiliary-table th,
.driving-log-auxiliary-table td {
  border: 1px solid #cbd5e1;
  padding: 6px;
  vertical-align: top;
}
.driving-log-sort-preview th,
.driving-log-auxiliary-table th {
  background: #e0f2fe;
  color: #0f172a;
  font-weight: 900;
  text-align: center;
}
.driving-log-auxiliary-table th:nth-child(1),
.driving-log-auxiliary-table td:nth-child(1),
.driving-log-auxiliary-table th:nth-child(2),
.driving-log-auxiliary-table td:nth-child(2) {
  width: 120px;
}
.driving-log-auxiliary-table th:nth-child(3),
.driving-log-auxiliary-table td:nth-child(3),
.driving-log-auxiliary-table th:nth-child(4),
.driving-log-auxiliary-table td:nth-child(4) {
  width: 110px;
}
.driving-log-auxiliary-table th:nth-child(5),
.driving-log-auxiliary-table td:nth-child(5) {
  width: 72px;
}
.driving-log-auxiliary-table th:nth-child(6),
.driving-log-auxiliary-table td:nth-child(6) {
  width: 118px;
}
.driving-log-auxiliary-table th:nth-child(7),
.driving-log-auxiliary-table td:nth-child(7),
.driving-log-auxiliary-table th:nth-child(8),
.driving-log-auxiliary-table td:nth-child(8) {
  width: 82px;
}
.driving-log-auxiliary-table th:nth-child(9),
.driving-log-auxiliary-table td:nth-child(9) {
  width: auto;
}
.driving-log-auxiliary-table tbody tr[data-trip-log-aux-row] {
  cursor: pointer;
}
.driving-log-auxiliary-table tbody tr.driving-log-auxiliary-row-selected td {
  background: #dcfce7 !important;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.28);
}
.driving-log-sort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.driving-log-auxiliary {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.driving-log-auxiliary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.driving-log-auxiliary-table input {
  width: 100%;
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  padding: 5px 7px;
  font: inherit;
}
.driving-log-auxiliary-table input.driving-log-auxiliary-bold-value {
  font-weight: 900;
}
.driving-log-auxiliary-table input.driving-log-auxiliary-empty-value {
  color: #b91c1c;
  font-weight: 400;
}
.driving-log-auxiliary-table input.driving-log-auxiliary-empty-value::placeholder {
  color: #b91c1c;
  opacity: 1;
  font-weight: 400;
}
.driving-log-auxiliary-table span {
  display: block;
  min-height: 22px;
  padding: 5px 7px;
  text-align: center;
  font-weight: 900;
}
.trip-log-suggestion-menu {
  position: fixed;
  z-index: 10000;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow: auto;
  padding: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}
.trip-log-suggestion-menu.hidden {
  display: none;
}
.trip-log-suggestion-item {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  padding: 7px 9px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trip-log-suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 2px;
  border-radius: 6px;
}
.trip-log-suggestion-row:hover,
.trip-log-suggestion-row.active {
  background: #e0f2fe;
}
.trip-log-suggestion-delete {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
}
.trip-log-suggestion-delete:hover {
  background: #fee2e2;
}
.trip-log-native-date-picker {
  position: fixed;
  z-index: 10050;
  width: 1px;
  height: 1px;
  opacity: 0.01;
}
.trip-log-native-date-picker.hidden {
  display: none;
}
@media (max-width: 900px) {
  .driving-log-meta {
    grid-template-columns: 1fr;
  }
  .driving-log-table {
    min-width: 1060px;
  }
}
.trip-operation-shell {
  display: grid;
  gap: 14px;
}
.trip-operation-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(240, 253, 250, 0.95));
}
.trip-operation-title span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.trip-operation-title strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 20px;
}
.trip-operation-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}
.trip-operation-meta-compact {
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
}
.trip-operation-meta-compact .trip-operation-input {
  min-height: 32px;
}
.trip-operation-meta label,
.trip-operation-transfer,
.trip-operation-summary label {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}
.trip-operation-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 7px;
  padding: 7px 9px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
}
.trip-operation-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: #2563eb;
  background: #fff;
}
.trip-operation-input:focus::placeholder {
  color: transparent;
}
.trip-operation-input.trip-operation-empty-value {
  color: #b91c1c;
  -webkit-text-fill-color: #b91c1c;
  font-weight: 400;
}
.trip-operation-input.trip-operation-filled-value {
  color: #111827;
  -webkit-text-fill-color: #111827;
  font-weight: 900;
}
.trip-operation-input.trip-operation-empty-value::placeholder {
  color: #b91c1c;
  opacity: 1;
  font-weight: 400;
}
.trip-operation-time-select {
  min-width: 86px;
  padding-left: 7px;
  padding-right: 7px;
  text-align: center;
}
.trip-operation-time-select.trip-operation-time-filled {
  border-color: rgba(148, 163, 184, 0.45);
  background: #f8fafc;
}
.trip-operation-time-picker {
  position: relative;
  display: block;
}
.trip-operation-date-picker {
  position: relative;
  display: block;
}
.trip-operation-date-picker .trip-operation-input {
  padding-right: 32px;
}
.trip-operation-date-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}
.trip-operation-date-native {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  opacity: 0;
  cursor: pointer;
}
.trip-operation-time-picker details {
  position: absolute;
  right: 4px;
  top: 50%;
  margin-top: -11px;
}
.trip-operation-time-picker summary {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  list-style: none;
}
.trip-operation-time-picker summary::-webkit-details-marker {
  display: none;
}
.trip-operation-time-picker .trip-operation-input {
  padding-right: 30px;
}
.trip-operation-time-menu {
  position: fixed;
  left: var(--trip-picker-left, 0);
  top: var(--trip-picker-top, 0);
  z-index: 20000;
  display: grid;
  grid-template-columns: repeat(5, minmax(58px, 1fr));
  gap: 4px;
  width: 360px;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.2);
}
.trip-operation-time-menu button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
  background: transparent;
  color: #0f172a;
  font-weight: 800;
  text-align: center;
}
.trip-operation-time-menu button:hover {
  background: #e0f2fe;
}
.trip-operation-transfer-warning {
  justify-self: start;
  padding: 8px 10px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 7px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 900;
}
.trip-operation-transfer {
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 220px);
  align-items: center;
}
.trip-operation-transfer span {
  color: #334155;
}
.trip-operation-table-wrap {
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #fff;
}
.trip-operation-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.trip-operation-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 8px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  text-align: left;
}
.trip-operation-transfer-row th {
  top: 0;
  background: #f8fafc;
  color: #334155;
  vertical-align: top;
}
.trip-operation-transfer-row th span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}
.trip-operation-transfer-row .trip-operation-input {
  min-width: 130px;
}
.trip-operation-col-date { width: 11%; }
.trip-operation-col-place { width: 14%; }
.trip-operation-col-time { width: 8%; }
.trip-operation-col-odometer { width: 8.5%; }
.trip-operation-col-small { width: 7.5%; }
.trip-operation-col-person { width: 13%; }
.trip-operation-col-note { width: 9%; }
.trip-operation-table td:first-child .trip-operation-input { min-width: 108px; }
.trip-operation-table td:nth-child(6) .trip-operation-input,
.trip-operation-transfer-row th:nth-child(2) .trip-operation-input {
  max-width: 86px;
  min-width: 86px;
  text-align: right;
}
.trip-operation-input[readonly] {
  background: #eef2f7;
  color: #334155;
  cursor: default;
}
.trip-operation-input.trip-operation-required-empty {
  border-color: rgba(220, 38, 38, 0.7);
  background: #fef2f2;
  color: #b91c1c;
}
.trip-operation-place-picker {
  position: relative;
  display: block;
}
.trip-operation-place-picker details {
  position: absolute;
  right: 4px;
  top: 50%;
  margin-top: -11px;
}
.trip-operation-place-picker details[open],
.trip-operation-time-picker details[open] {
  z-index: 20000;
}
.trip-operation-place-picker summary {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  list-style: none;
}
.trip-operation-place-picker summary::-webkit-details-marker {
  display: none;
}
.trip-operation-place-menu {
  position: fixed;
  left: var(--trip-picker-left, 0);
  top: var(--trip-picker-top, 0);
  z-index: 20000;
  min-width: 220px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.16);
}
.trip-operation-place-picker .trip-operation-input {
  padding-right: 30px;
}
.trip-operation-place-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 4px;
}
.trip-operation-place-option button,
.trip-operation-place-empty {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 5px 7px;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
  text-align: left;
}
.trip-operation-place-option button:hover {
  background: #e0f2fe;
}
.trip-operation-place-option .trip-operation-place-delete {
  display: grid;
  place-items: center;
  color: #b91c1c;
  text-align: center;
}
.trip-operation-table td {
  position: relative;
  padding: 7px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}
.trip-operation-table td:has(.trip-operation-place-picker details[open]),
.trip-operation-table td:has(.trip-operation-time-picker details[open]) {
  z-index: 15000;
}
.trip-operation-table th:nth-child(6),
.trip-operation-table td:nth-child(6) {
  border-right: 1px solid rgba(148, 163, 184, 0.32);
}
.trip-operation-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.trip-operation-summary {
  display: flex;
  justify-content: flex-end;
}
.trip-operation-add-row {
  justify-self: start;
}
.trip-operation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trip-operation-server-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #f8fafc;
}
.trip-operation-server-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 7px;
  background: #fff;
}
.trip-operation-server-item span {
  display: grid;
  gap: 2px;
}
.trip-operation-server-item small {
  color: #64748b;
  font-weight: 700;
}
.trip-operation-summary label {
  min-width: 220px;
}
@media (max-width: 760px) {
  .trip-operation-meta {
    grid-template-columns: 1fr;
  }
  .trip-operation-transfer {
    grid-template-columns: 1fr;
  }
}
@media print {
  body.trip-operation-print-mode > *:not(.app-shell),
  body.trip-operation-print-mode .sidebar,
  body.trip-operation-print-mode .topbar,
  body.trip-operation-print-mode .service-car-trip-log-head,
  body.trip-operation-print-mode .trip-operation-actions,
  body.trip-operation-print-mode .trip-operation-server-list,
  body.trip-operation-print-mode .trip-operation-add-row {
    display: none !important;
  }
  body.trip-operation-print-mode .content,
  body.trip-operation-print-mode .main,
  body.trip-operation-print-mode .service-car-trip-log-content,
  body.trip-operation-print-mode .trip-operation-table-wrap {
    display: block !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: none !important;
  }
  body.trip-operation-print-mode .trip-operation-table {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 10px;
  }
}
.trip-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.trip-request-actions-main {
  min-height: 120px;
}
.trip-request-form-frame {
  max-width: 954px;
  margin: 0 auto;
  overflow: visible;
  border: 2px solid #111827;
  background: #fff;
}
.trip-request-form-table {
  width: 100%;
  min-width: 828px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #111827;
  background: #fff;
  font-size: 10.8px;
}
.trip-request-col-b { width: 17.04%; }
.trip-request-col-c { width: 17.16%; }
.trip-request-col-d { width: 9.11%; }
.trip-request-col-e { width: 9.35%; }
.trip-request-col-f { width: 9.82%; }
.trip-request-col-g { width: 15.86%; }
.trip-request-col-h { width: 21.66%; }
.trip-request-form-table td {
  border: 1px solid #111827;
  padding: 2.7px 4.5px;
  vertical-align: middle;
}
.trip-request-header-row td {
  border-bottom-width: 2px;
}
.trip-request-office {
  height: 67px;
  text-align: center;
  line-height: 1.7;
}
.trip-request-office strong {
  font-size: 14.4px;
}
.trip-request-title {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21.6px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.trip-request-label {
  font-weight: 500;
}
.trip-request-fixed {
  text-align: center;
}
.trip-request-value {
  text-align: center;
}
.trip-request-duration-value {
  text-align: right;
  padding-right: 2px;
}
.trip-request-duration-value select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-left: auto;
  text-align: right;
  text-align-last: right;
  padding-left: 0;
  padding-right: 2px;
}
.trip-request-red-cell,
.trip-request-red,
.trip-request-journal-picker summary,
.trip-request-people-select summary {
  color: #ff0000;
  font-weight: 800;
}
.trip-request-red,
.trip-request-form-table select {
  width: auto;
  max-width: 100%;
  min-height: 26px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 5px;
  padding: 3px 7px;
  background: #fff;
  font: inherit;
}
.trip-request-form-table select[data-trip-request-journal-number] {
  text-align: right;
  text-align-last: right;
}
.trip-request-confirmed,
.trip-request-red.trip-request-confirmed,
.trip-request-form-table select.trip-request-confirmed {
  color: #15803d !important;
  border-color: rgba(22, 163, 74, 0.45) !important;
  background: #f0fdf4 !important;
  font-weight: 900;
}
.trip-request-command-title {
  text-align: center;
  font-weight: 900;
}
.trip-request-person-add-label {
  color: #374151;
  font-size: 12px;
  font-weight: 900;
}
.trip-request-people-select.trip-request-confirmed summary,
.trip-request-driver-select.trip-request-confirmed summary,
.trip-request-journal-picker.trip-request-confirmed summary {
  color: #15803d !important;
}
.trip-request-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}
.trip-request-bottom-actions .btn {
  min-height: 36px;
  font-weight: 850;
}
.trip-request-save-menu {
  position: relative;
}
.trip-request-save-menu summary {
  list-style: none;
  cursor: pointer;
}
.trip-request-save-menu summary::-webkit-details-marker {
  display: none;
}
.trip-request-save-menu > div {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 6px;
  min-width: 170px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.trip-request-server-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.service-car-trip-log-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.service-car-trip-log-card {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 2fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #fff;
}
.service-car-trip-log-card span {
  color: #64748b;
}
@media print {
  @page { size: A4 portrait; margin: 19mm 3mm 19mm 8mm; }
  body.trip-request-print-claude {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  html, body {
    width: 210mm !important;
    min-height: 297mm !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  main.content,
  .smv-view {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  body * { visibility: hidden !important; }
  .trip-request-form-frame,
  .trip-request-form-frame * { visibility: visible !important; }
  .trip-request-form-frame,
  .trip-request-form-frame * {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    text-shadow: none !important;
  }
  .service-car-trip-log-panel {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 181mm;
    min-height: 0 !important;
    max-height: 270mm !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
    overflow: visible !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    break-before: avoid !important;
    break-after: avoid !important;
  }
  .service-car-trip-log-panel > *:not(.trip-request-form-frame) {
    display: none !important;
  }
  .service-car-trip-log-head,
  .trip-request-bottom-actions { display: none !important; }
  .trip-request-form-frame {
    width: 181mm !important;
    max-width: 181mm !important;
    height: auto !important;
    border: 2px solid #000 !important;
    border-bottom: 2.4px solid #000 !important;
    overflow: visible !important;
    background: #fff !important;
    margin-left: 0 !important;
    transform: scale(0.944) !important;
    transform-origin: top left !important;
    box-shadow: inset 0 0 0 1px #000 !important;
    outline: 1px solid #000 !important;
    outline-offset: -1px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .trip-request-form-table {
    width: 181mm !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 7.4pt !important;
    line-height: 1 !important;
  }
  .trip-request-form-table col:nth-child(1) { width: 17.04% !important; }
  .trip-request-form-table col:nth-child(2) { width: 17.16% !important; }
  .trip-request-form-table col:nth-child(3) { width: 9.11% !important; }
  .trip-request-form-table col:nth-child(4) { width: 9.35% !important; }
  .trip-request-form-table col:nth-child(5) { width: 9.82% !important; }
  .trip-request-form-table col:nth-child(6) { width: 15.86% !important; }
  .trip-request-form-table col:nth-child(7) { width: 21.66% !important; }
  .trip-request-form-table td { padding: 0.5px 3px 0.5px 4px !important; }
  .trip-request-form-table input,
  .trip-request-form-table select,
  .trip-request-people-select summary,
  .trip-request-journal-picker summary {
    text-align: left !important;
    padding-left: 2px !important;
    color: #000 !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }
  .trip-request-empty-route .trip-request-red,
  .trip-request-empty-route input,
  .trip-request-empty-route select {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
  }
  .trip-request-office { height: 20mm !important; line-height: 1.35 !important; }
  .trip-request-office strong { font-size: 9.5pt !important; }
  .trip-request-title { font-size: 16pt !important; }
  .trip-request-red,
  .trip-request-form-table select {
    min-height: 12px !important;
    padding: 0 2px !important;
    border: 0 !important;
    background: transparent !important;
    color: #000 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
  }
  .trip-request-form-table select::-ms-expand {
    display: none !important;
  }
  .trip-request-journal-picker summary::after,
  .trip-request-people-select summary::after {
    content: "" !important;
    display: none !important;
  }
  .trip-request-form-table input[type="date"]::-webkit-calendar-picker-indicator,
  .trip-request-form-table input[type="time"]::-webkit-calendar-picker-indicator,
  .trip-request-form-table input[type="date"]::-webkit-inner-spin-button,
  .trip-request-form-table input[type="time"]::-webkit-inner-spin-button {
    display: none !important;
    opacity: 0 !important;
  }
  .trip-request-form-table input[type="date"],
  .trip-request-form-table input[type="time"] {
    appearance: none !important;
    -webkit-appearance: none !important;
  }
  .trip-request-confirmed,
  .trip-request-red.trip-request-confirmed,
  .trip-request-form-table select.trip-request-confirmed {
    color: #000 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .trip-request-red-cell,
  .trip-request-driver-select summary,
  .trip-request-people-select summary,
  .trip-request-journal-picker summary {
    color: #000 !important;
  }
  .trip-request-spacer td { height: 3.5mm !important; }
  body.trip-request-print-claude .service-car-trip-log-panel {
    width: 181mm !important;
    min-height: 0 !important;
    transform: none !important;
    overflow: visible !important;
  }
  body.trip-request-print-claude .trip-request-form-frame {
    width: 181mm !important;
    max-width: 181mm !important;
    margin-left: 0 !important;
    border: 2px solid #000 !important;
    border-bottom: 2px solid #000 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  body.trip-request-print-claude .trip-request-form-table {
    width: 181mm !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9pt !important;
    line-height: 1 !important;
  }
  body.trip-request-print-claude .trip-request-form-table col:nth-child(1) { width: 17.04% !important; }
  body.trip-request-print-claude .trip-request-form-table col:nth-child(2) { width: 17.16% !important; }
  body.trip-request-print-claude .trip-request-form-table col:nth-child(3) { width: 9.11% !important; }
  body.trip-request-print-claude .trip-request-form-table col:nth-child(4) { width: 9.35% !important; }
  body.trip-request-print-claude .trip-request-form-table col:nth-child(5) { width: 9.82% !important; }
  body.trip-request-print-claude .trip-request-form-table col:nth-child(6) { width: 15.86% !important; }
  body.trip-request-print-claude .trip-request-form-table col:nth-child(7) { width: 21.66% !important; }
  body.trip-request-print-claude .trip-request-form-table td {
    height: 15pt !important;
    min-height: 15pt !important;
    padding: 0 3px !important;
    border: 0.65px solid #000 !important;
    color: #000 !important;
  }
  body.trip-request-print-claude .trip-request-header-row td {
    height: 20.25pt !important;
    border-top-width: 2px !important;
  }
  body.trip-request-print-claude .trip-request-office {
    height: 46pt !important;
    line-height: 1.25 !important;
  }
  body.trip-request-print-claude .trip-request-office strong {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11pt !important;
    font-weight: 700 !important;
  }
  body.trip-request-print-claude .trip-request-title {
    font-family: "Bookman Old Style", "Book Antiqua", Georgia, serif !important;
    font-size: 16pt !important;
    font-weight: 700 !important;
  }
  body.trip-request-print-claude .trip-request-form-table input,
  body.trip-request-print-claude .trip-request-form-table select,
  body.trip-request-print-claude .trip-request-people-select summary,
  body.trip-request-print-claude .trip-request-journal-picker summary {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9pt !important;
    font-weight: 700 !important;
    color: #000 !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
  }
  body.trip-request-print-claude .trip-request-red-cell,
  body.trip-request-print-claude .trip-request-red,
  body.trip-request-print-claude .trip-request-confirmed {
    color: #000 !important;
    background: transparent !important;
  }
}
.trip-request-driver-select summary {
  color: #ff0000;
}
body.trip-request-pdf-capture .trip-request-form-frame,
body.trip-request-pdf-capture .trip-request-form-frame * {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  text-shadow: none !important;
}
body.trip-request-pdf-capture .trip-request-form-table input,
body.trip-request-pdf-capture .trip-request-form-table select,
body.trip-request-pdf-capture .trip-request-people-select summary,
body.trip-request-pdf-capture .trip-request-journal-picker summary {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}
body.trip-request-pdf-capture .trip-request-journal-picker summary::after,
body.trip-request-pdf-capture .trip-request-people-select summary::after {
  content: "" !important;
  display: none !important;
}
.trip-request-red[type="text"] {
  width: 100%;
  text-align: center;
}
.trip-request-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 120px;
}
.trip-request-time-select {
  min-width: 54px;
  text-align: center;
}
.trip-request-spacer td {
  height: 22px;
}
.trip-request-journal-picker,
.trip-request-people-select {
  display: inline-block;
  margin-left: 8px;
  position: relative;
}
.trip-request-journal-picker summary,
.trip-request-people-select summary {
  cursor: pointer;
  list-style: none;
}
.trip-request-journal-picker summary::-webkit-details-marker,
.trip-request-people-select summary::-webkit-details-marker {
  display: none;
}
.trip-request-journal-picker summary::after,
.trip-request-people-select summary::after {
  content: " ▾";
  color: #b91c1c;
}
.trip-request-picker-grid,
.trip-request-people-menu {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  padding: 10px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  color: #111827;
  text-align: left;
}
.trip-request-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.trip-request-picker-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
}
.trip-request-people-menu {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: grid;
  gap: 8px;
  width: min(560px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 80px));
  overflow: auto;
}
.trip-request-driver-select .trip-request-people-menu {
  left: 50%;
  right: auto;
}
.trip-request-person-row,
.trip-request-person-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.trip-request-person-row button,
.trip-request-person-option,
.trip-request-person-add button {
  min-height: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
}
.trip-request-person-row > button:first-child,
.trip-request-person-option {
  text-align: left;
  padding: 5px 8px;
}
.trip-request-person-delete {
  padding: 5px 8px;
  color: #b91c1c !important;
}
.trip-request-person-add input {
  min-height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 5px 8px;
}
.trip-request-person-empty {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}
.service-car-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 7px;
  max-width: 920px;
  margin: 0 auto;
}
.service-car-day {
  min-height: 92px;
  padding: 8px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.service-car-day:hover { border-color: #7db5e2; background: var(--surface-2); }
.service-car-day.today {
  background: var(--purple-50) !important;
  border-color: var(--purple-400) !important;
}
.service-car-day.reserved {
  background: #fff1f2 !important;
  border: 2px solid #fca5a5 !important;
}
.service-car-day.today.reserved {
  background: linear-gradient(135deg, #fff1f2 0%, #f5f3ff 100%) !important;
  border: 2px solid #f87171 !important;
}

:root[data-theme="dark"] .service-car-day.today {
  background: var(--purple-50) !important;
  border-color: var(--purple-400) !important;
}
:root[data-theme="dark"] .service-car-day.reserved {
  background: rgba(127, 29, 29, 0.32) !important;
  border: 2px solid #f87171 !important;
}
:root[data-theme="dark"] .service-car-day.today.reserved {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.36) 0%, rgba(91, 33, 182, 0.28) 100%) !important;
  border: 2px solid #f87171 !important;
}
.service-car-day strong { display: block; margin-bottom: 7px; }
.service-car-day span { color: #174a70; font-size: 11px; line-height: 1.35; font-weight: 900; }
:root[data-theme="dark"] .service-car-day span { color: #b9dcf4; }
.service-car-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 24, 32, 0.28);
}
.service-car-modal.hidden { display: none; }
.service-car-card {
  width: min(520px, 100%);
  padding: 18px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}
.service-car-drivers { display: grid; gap: 10px; margin: 16px 0; }
.service-car-drivers label { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 750; }
.service-car-drivers input { width: 100%; padding: 10px 12px; border: 0.5px solid var(--border-md); border-radius: 7px; background: var(--surface); color: var(--text); }

.today-tasks-view {
  padding: 0 452px 24px 22px;
}
.today-tasks-head {
  display: none;
  margin-bottom: 0;
}
.today-tasks-head h2 {
  margin: 0;
  font-size: 20px;
}
.today-tasks-head p {
  margin: 4px 0 0;
  color: var(--text-2);
}
.today-tasks-list {
  display: grid;
  gap: 8px;
}

.today-tasks-related {
  display: grid;
  gap: 18px;
  margin-top: 42px;
}

.today-task-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border-md);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.today-task-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}


.today-task-section-current {
  border-color: rgba(34, 197, 94, 0.62);
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
}

.today-task-section-current .today-tasks-title-block {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.today-task-section-current .today-tasks-title-block h2 {
  color: #166534;
}

.today-task-section-current .today-tasks-title-block p {
  color: #166534;
}

.today-task-section-current .today-tasks-list {
  display: inline-grid;
  width: auto;
  max-width: 100%;
  justify-self: center;
  justify-items: stretch;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.today-task-section-current .today-task {
  width: 100%;
  font-weight: 900;
}

.today-task-section-future {
  border-color: rgba(96, 165, 250, 0.62);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.today-task-section-future h3 {
  color: #1d4ed8;
}

.today-task-section-previous {
  border-color: rgba(248, 113, 113, 0.62);
  background: linear-gradient(180deg, #fff1f2 0%, #fef2f2 100%);
}

.today-task-section-previous h3 {
  color: #b91c1c;
}

.today-task-timeline {
  display: grid;
  gap: 9px;
}

.today-task-date-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.today-task-date-label {
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
}

.today-task-timeline-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.today-task-timeline-item:hover {
  border-color: var(--purple-400);
  box-shadow: 0 8px 18px rgba(83, 74, 183, 0.12);
}

.today-task-section-previous .today-task-timeline-item:hover {
  border-color: #f87171;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.12);
}

.today-task-timeline-item strong {
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.today-task-repeat,
.calendar-task-item .today-task-repeat {
  justify-self: end;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.today-task-timeline-item em {
  justify-self: end;
  color: #b42318;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.today-task-related-empty {
  padding: 14px;
  border: 1px dashed var(--border-md);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--text-3);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.repeat-task-expansion {
  display: grid;
  gap: 6px;
  margin: -2px 0 8px 24px;
  padding-left: 10px;
  border-left: 3px solid rgba(96, 165, 250, 0.45);
}

.repeat-task-expansion button {
  display: grid;
  grid-template-columns: minmax(92px, auto) 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.repeat-task-expansion span {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
}

.repeat-task-expansion strong {
  font-size: 12px;
  font-weight: 600;
}
/* ===== DALSIE ZOZNAMY ===== */
.additional-lists-view {
  padding: 8px 22px 28px;
  min-width: 0;
}
.additional-list-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
}
.additional-list-picker.admin { grid-template-columns: repeat(3, minmax(210px, 1fr)); }
.additional-list-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 24, 36, 0.06);
}
.additional-list-folder {
  min-width: 180px;
  min-height: 100px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  box-shadow: none;
}
.additional-list-folder:hover { background: var(--surface-2); border-color: var(--purple-600); }
.additional-list-folder .ti { font-size: 28px; color: #7c8fd0; }
.additional-list-folder span { font-size: 14px; font-weight: 750; }
.additional-list-folder small { color: var(--text-3); font-size: 11px; }
.additional-list-card-settings {
  display: grid;
  gap: 7px;
  padding: 9px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.additional-list-card-settings input[type="text"] {
  min-width: 180px; min-width: 0; height: 32px; padding: 5px 7px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text);
}
.additional-list-card-settings label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.additional-list-toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.additional-list-toolbar strong { font-size: 16px; }
.additional-list-status { margin-left: auto; color: #15803d; font-size: 12px; font-weight: 700; }
.additional-list-status.error { color: #b42318; }
.additional-list-main-settings {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
}
.additional-list-main-settings label { display: grid; gap: 4px; color: var(--text-2); font-size: 11px; font-weight: 700; }
.additional-list-main-settings input[type="text"],
.additional-list-main-settings input[type="number"] {
  min-width: 180px; height: 34px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text);
}
.additional-list-main-settings .additional-visible-toggle { display: flex; align-items: center; gap: 7px; min-height: 34px; white-space: nowrap; }
.additional-list-main-settings .btn { min-height: 34px; align-self: end; }
.additional-column-settings {
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
}
.additional-settings-title { font-size: 12px; font-weight: 750; white-space: nowrap; }
.additional-column-name-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.additional-column-config {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}
.additional-column-config > label { display: grid; gap: 3px; color: var(--text-3); font-size: 10px; font-weight: 700; }
.additional-column-config .additional-column-show {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 11px;
}
.additional-column-name-grid input[type="text"],
.additional-column-name-grid input[type="number"] {
  min-width: 180px; min-width: 0; height: 34px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text);
}
.additional-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 175px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.additional-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.additional-table th,
.additional-table td { height: 42px; padding: 0 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; }
.additional-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-size: 12px; }
.additional-table tbody th { min-width: 0; background: var(--surface); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.additional-workplace { color: var(--text-2); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.additional-cell { width: 100%; min-width: 0; height: 32px; padding: 5px 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text); }
.additional-cell:hover:not([readonly]), .additional-cell:focus { border-color: var(--purple-600); background: var(--surface); outline: none; }
.additional-cell[readonly] { color: var(--text-2); cursor: default; }
.today-task {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(34, 197, 94, 0.42);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
  color: #14532d;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}
.today-task.normal {
  border-color: rgba(22, 163, 74, 0.28);
}

.lottery-view {
  padding: 0 22px 24px;
  flex: 1;
  min-height: 0;
}
.lottery-frame {
  width: 100%;
  display: block;
  min-width: 0;
  height: calc(100vh - 132px);
  min-height: 680px;
  border: 0;
  border-radius: var(--radius-lg);
  background: #1e1b4b;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 0.5px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
.sort-control select {
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

/* ===== DMS CHYBOVOST ===== */
.dms-view {
  padding: 0 22px 24px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dms-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dms-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dms-toolbar h2 {
  font-size: 17px;
  margin: 0;
}
.dms-toolbar p {
  color: var(--text-2);
  margin: 2px 0 0;
  font-size: 12px;
}
.dms-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dms-uploadbar {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}
.dms-uploadbar .btn {
  min-width: 120px;
  justify-content: center;
}
.dms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.dms-loading-card {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: #f8fafc;
  color: #64748b;
  padding: 18px;
  font-weight: 800;
}
.dms-folder-item {
  position: relative;
  display: grid;
  min-width: 0;
}
.dms-folder-item .dms-folder-card { width: 100%; padding-bottom: 50px; }
.dms-folder-admin-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dms-folder-delete,
.dms-folder-readonly {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a12a2a;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.dms-folder-delete input,
.dms-folder-readonly input { width: 15px; height: 15px; accent-color: #475569; }
.dms-folder-delete { color: #a12a2a; }
.dms-folder-delete input { accent-color: #c62828; }
.dms-folder-readonly { color: #475569; }
.dms-folder-card,
.dms-file-card {
  min-height: 96px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  padding: 14px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 10px;
  align-items: start;
}

.dms-folder-card-readonly {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}
.dms-folder-card-readonly:hover {
  background: #e5e7eb;
}
.dms-folder-card-readonly .ti {
  color: #64748b;
}
.dms-folder-readonly-badge {
  grid-column: 2;
  align-self: end;
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.dms-folder-card:hover,
.dms-file-card:hover {
  background: var(--surface-2);
}
.dms-folder-card .ti,
.dms-file-card .ti {
  grid-row: span 2;
  color: var(--purple-600);
  font-size: 26px;
  margin-top: 2px;
}
.dms-folder-card span,
.dms-file-card span {
  font-weight: 700;
  word-break: break-word;
}
.dms-folder-card strong,
.dms-file-card strong {
  color: var(--text-2);
  font-size: 12px;
  margin-top: 6px;
}
.dms-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.dms-sheet-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  overflow-x: auto;
  background: var(--surface-2);
  border-bottom: 0.5px solid var(--border);
}
.dms-sheet-tab {
  border: 0.5px solid var(--border-md);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.dms-sheet-tab.active {
  color: #fff;
  background: var(--purple-600);
  border-color: var(--purple-600);
}
.dms-table-wrap {
  flex: 1;
  min-height: 0;
  height: calc(100vh - 222px);
  max-height: none;
  overflow: auto;
  background: #f8fafc;
  scrollbar-gutter: stable both-edges;
}
.dms-table {
  border-collapse: collapse;
  table-layout: auto;
  width: max-content;
  min-width: auto;
  background: #fff;
  color: #111827;
  font-size: 12px;
}
.dms-table th,
.dms-table td {
  border: 1px solid #d1d5db;
  padding: 5px 7px;
  min-width: 92px;
  max-width: 420px;
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
}
.dms-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #e5e7eb;
  color: #111827;
  text-align: center;
}
.dms-corner,
.dms-row-head {
  position: sticky;
  left: 0;
  z-index: 6;
  min-width: 46px !important;
  width: 46px;
  background: #e5e7eb !important;
  color: #374151;
  text-align: right;
}
.dms-corner {
  z-index: 8;
}

.dms-column-head-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 104px;
}
.dms-column-head-control strong {
  font-size: 12px;
  line-height: 1;
}
.dms-hide-column-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
}
.dms-hide-column-toggle input {
  width: 13px;
  height: 13px;
  accent-color: #475569;
  cursor: pointer;
}
.dms-row-head-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.dms-row-head-control input {
  width: 13px;
  height: 13px;
  accent-color: #475569;
  cursor: pointer;
}
.dms-hidden-column-admin,
.dms-hidden-row-admin {
  background: #f1f5f9 !important;
  color: #64748b !important;
}

.dms-table td:focus {
  outline: 2px solid var(--purple-400);
  outline-offset: -2px;
  background: #fff;
}
.dms-edited-cell {
  color: #065f46;
  font-weight: 800;
  background: #dcfce7 !important;
}
.dms-saving-cell {
  background: #fef3c7 !important;
}
.dms-live-cell {
  box-shadow: inset 0 0 0 2px #22c55e;
}

.saved-phm-body {
  min-height: 0;
}
.saved-phm-status {
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
}
.saved-phm-status.error,
.saved-phm-empty.error {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 226, 226, 0.65);
}
.saved-phm-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}
.saved-phm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(90vh - 190px);
  overflow: auto;
}
.saved-phm-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.saved-phm-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.saved-phm-item-main strong,
.saved-phm-item-main span {
  overflow-wrap: anywhere;
}
.saved-phm-item-main span {
  color: var(--muted);
  font-size: 12px;
}
.saved-phm-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.saved-phm-preview {
  min-width: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.saved-phm-empty {
  padding: 16px;
  border: 0.5px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
}
.saved-phm-table-wrap {
  height: calc(90vh - 236px);
  max-height: none;
  border: 0.5px solid var(--border);
  border-radius: 8px;
}
.saved-phm-excel-frame {
  height: calc(90vh - 236px);
  max-height: none;
  overflow: auto;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.saved-phm-excel-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  color: #111827;
  font-family: Calibri, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.25;
}
.saved-phm-excel-table th,
.saved-phm-excel-table td {
  min-width: 0;
  max-width: none;
  height: 22px;
  padding: 2px 4px;
  border: 1px solid #d0d7de;
  white-space: pre-wrap;
  overflow: hidden;
  vertical-align: middle;
}
.saved-phm-excel-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e5e7eb;
  color: #374151;
  text-align: center;
  font-weight: 700;
}
.saved-phm-excel-table .row-head {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 44px;
  background: #e5e7eb;
  color: #374151;
  text-align: right;
  font-weight: 700;
}
.saved-phm-excel-table .corner {
  left: 0;
  z-index: 3;
  min-width: 44px;
}
.saved-phm-row-head-col {
  width: 44px;
  min-width: 44px;
}

/* ===== DMS kontrola chyb ===== */
.isszbj-view {
  padding: 0 22px 24px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.isszbj-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-size: 12px;
}
.isszbj-frame-wrap {
  flex: 1;
  min-height: calc(100vh - 150px);
  overflow: hidden;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.isszbj-frame {
  min-width: 180px;
  height: calc(100vh - 150px);
  display: block;
  border: 0;
  background: var(--surface);
}

/* name cell */
.name-cell { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.employee-contact-link {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.employee-contact-link:hover {
  color: var(--purple-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-green  { background: var(--teal-400); }
.dot-amber  { background: var(--amber-200); }
.dot-purple { background: var(--purple-400); }

/* secondary text in table */
td.muted { color: var(--text-2); }

/* status badges */
.sb {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.sb-a { background: var(--teal-50);   color: var(--teal-800); }
.sb-d { background: var(--amber-50);  color: var(--amber-800); }
.sb-n { background: var(--purple-50); color: var(--purple-800); }

/* action buttons */
.act-btns { display: flex; gap: 4px; justify-content: flex-end; }
.act-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 0.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: background 0.1s, color 0.1s;
}
.act-btn:hover { background: var(--surface-2); color: var(--text); }
.act-btn.danger:hover { background: #fdf0f0; color: #c0392b; }

/* ===== PAGINATION ===== */
.pagination {
  display: none; align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 2px;
}
.page-info { font-size: 12px; color: var(--text-3); }
.page-btns { display: flex; gap: 4px; }
.page-btn { padding: 5px 11px; font-size: 12px; }
.active-page { background: var(--surface-2) !important; font-weight: 600; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 0.5px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 30px; height: 30px; border-radius: 6px;
  border: none; background: transparent;
  cursor: pointer; color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.modal-close:hover { background: var(--surface-2); }

.modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-group input,
.form-group select {
  padding: 8px 10px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.1s;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--purple-400); }

.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px 18px;
  border-top: 0.5px solid var(--border);
}

.employee-contact-card {
  width: min(560px, 94vw);
}
.employee-contact-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 8px;
}
.employee-contact-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d8ecff, #e7ddff);
  color: var(--purple-700);
  font-weight: 800;
}
.employee-contact-name {
  font-weight: 700;
  color: var(--text);
}
.employee-contact-meta {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-2);
}
.employee-contact-grid {
  display: grid;
  gap: 8px;
}
.employee-contact-row {
  display: grid;
  grid-template-columns: 24px minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
}
.employee-contact-row i {
  color: var(--purple-600);
  font-size: 18px;
}
.employee-contact-row span {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}
.employee-contact-row strong {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--text);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius);
    font-size: 15px;
    text-align: center;
    max-width: min(520px, calc(100vw - 32px));
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
    z-index: 3000;
    transition: opacity 0.3s;
  }
.toast.hidden { display: none; }

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== SEED PAGE ===== */
.seed-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.seed-panel {
  width: min(680px, 100%);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.seed-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.seed-log {
  min-height: 180px;
  white-space: pre-wrap;
  background: var(--surface-2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text-2);
  font-size: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hchip { display: none; }
}
@media (max-width: 900px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  html, body {
    height: auto;
    min-height: 100%;
  }
  .auth-overlay {
    align-items: start;
    padding: 18px;
    overflow-y: auto;
  }
  .auth-panel {
    min-width: 180px;
    padding: 18px;
  }
  .autodoprava-phm-grid,
  .autodoprava-phm-results {
    grid-template-columns: 1fr;
  }
  .autodoprava-phm-head {
    display: grid;
  }
  .aotpp-logo-auth {
    width: min(260px, 100%);
    margin-bottom: 12px;
  }
  .employee-login-row {
    grid-template-columns: 1fr;
  }
  .employee-login-row .auth-btn {
    min-width: 180px;
  }
  .admin-access-overlay {
    top: 56px;
    left: 0;
    padding: 18px;
  }
  .admin-access-message {
    border-radius: 22px;
    padding: 18px 20px;
    font-size: 15px;
  }
  .additional-list-picker, .additional-list-picker.admin { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .additional-list-main-settings, .additional-column-name-grid { grid-template-columns: 1fr; }
  .additional-lists-view { padding: 8px 12px 24px; }
  .header {
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .logged-user-chip {
    position: static;
    transform: none;
    order: 5;
    min-width: 180px;
    justify-content: center;
  }
  .service-car-calendar { grid-template-columns: repeat(7, minmax(66px, 1fr)); overflow-x: auto; }
  .service-car-day { min-height: 72px; }
  .aotpp-logo-header {
    width: 104px;
  }
  .hright {
    min-width: 180px;
    margin-left: 0;
    justify-content: space-between;
    gap: 8px;
  }
  .avatar-stack {
    display: none;
  }
  .body-wrap {
    height: auto;
    min-height: calc(100vh - 96px);
    flex-direction: column;
    overflow: visible;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 90;
    min-width: 180px;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    border-right: none;
    border-bottom: 0.5px solid var(--border);
    gap: 6px;
    scrollbar-gutter: stable;
  }
  .ni {
    width: auto;
    min-width: 92px;
    height: 38px;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0 10px;
  }
  .ni span {
    font-size: 11px;
  }
  .nav-sep {
    display: none;
  }
  .nav-bottom {
    margin-top: 0;
  }
  .content {
    overflow: visible;
  }
  .page-top,
  .search-bar,
  .stat-cards,
  .who-bar,
  .agenda-view,
  .logs-view,
  .today-tasks-view,
  .dms-view,
  .isszbj-view,
  .lottery-view,
  .table-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
  .page-actions {
    min-width: 180px;
  }
  .page-actions .btn,
  .sort-control {
    flex: 1 1 auto;
  }
  .table-wrap {
    max-height: calc(100vh - 260px);
    overflow: auto;
  }
  table {
    min-width: 760px;
  }
  .calendar-panel {
    top: 84px;
    left: 10px;
    right: 10px;
    width: auto;
  }
  .calendar-entry-modal {
    align-items: start;
    justify-content: center;
    padding: 12px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.24);
    pointer-events: auto;
  }
  .calendar-entry-card {
    min-width: 180px;
    min-width: 0;
    max-width: none;
    max-height: none;
    overflow-y: visible;
    padding: 12px;
  }
  .calendar-entry-line {
    grid-template-columns: 26px minmax(0, 1fr);
  }
  .calendar-editor-actions {
    flex-wrap: wrap;
  }
  .calendar-editor-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .dms-grid {
    grid-template-columns: 1fr;
  }
  .dms-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .dms-table-wrap {
    height: calc(100vh - 260px);
    min-height: 360px;
  }
  .lottery-frame {
    height: calc(100vh - 170px);
    min-height: 620px;
  }
}
@media (max-width: 640px) {
  .page-top { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== ADMIN TOGGLE ===== */
.btn-admin-toggle {
  background: var(--surface-2);
  color: var(--text-2);
  border-color: var(--border-md);
  font-weight: 700;
  padding: 10px 18px;
  font-size: 14px;
  transition: all 0.2s ease;
}
.btn-admin-toggle:hover {
  background: var(--border-md);
  color: var(--text);
}
.btn-admin-toggle.active {
  background: var(--teal-600) !important;
  color: #ffffff !important;
  border-color: var(--teal-600) !important;
  box-shadow: 0 4px 12px rgba(15, 110, 86, 0.24);
}
.btn-admin-toggle.active:hover {
  background: var(--teal-800) !important;
  border-color: var(--teal-800) !important;
}

/* ===== LOGO LETTER O ANIMATION ===== */
.logo-letter-o {
  display: inline-block;
  transform-origin: center center;
}
.logo-letter-o.animating {
  animation: spin360 3s linear;
}
@keyframes spin360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== SHARE VIEW ===== */
body.share-view .sidebar { display: none !important; }
body.share-view .admin-access-overlay { inset: 0 !important; }
body.share-view .header button,
body.share-view .header a,
body.share-view .header .theme-toggle {
  pointer-events: none !important;
  cursor: default !important;
}

.blinking-user {
  animation: blinker-pulse 1.2s ease-in-out infinite alternate;
  font-weight: 700;
  color: var(--text-2);
}
@keyframes blinker-pulse {
  from { opacity: 1; }
  to { opacity: 0.35; }
}

/* ===== DEPT SERVICES TABLE STYLE & HIGHLIGHT ===== */
#dept-services-table {
  max-width: 600px;
  min-width: 0 !important;
  min-width: 180px;
}
#dept-services-table th:nth-child(1),
#dept-services-table td:nth-child(1) {
  width: 60px;
  text-align: center;
}
#dept-services-table th:nth-child(2),
#dept-services-table td:nth-child(2) {
  width: 280px;
}
#dept-services-table th:nth-child(3),
#dept-services-table td:nth-child(3) {
  width: 180px;
}
tr.highlighted-service-row {
  background: var(--purple-50) !important;
  border-left: 4px solid #3b82f6;
}
tr.highlighted-service-row td {
  font-weight: 700;
  color: var(--purple-800) !important;
}
:root[data-theme="dark"] tr.highlighted-service-row {
  background: rgba(59, 130, 246, 0.25) !important;
  border-left: 4px solid #60a5fa;
}
:root[data-theme="dark"] tr.highlighted-service-row td {
  color: #c6d4ff !important;
}
}


.dept-services-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  padding-right: 18px;
}

.dept-services-main { min-width: 0; }

.dept-services-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
}

.dept-services-current-btn,
.dept-services-action-btn,
.dept-services-archive-btn,
.dept-services-upload-btn {
  justify-content: center;
  min-width: 180px;
  border-width: 1px;
  font-weight: 800;
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dept-services-current-btn {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.dept-services-action-btn {
  background: #f5f0ff;
  color: #5b21b6;
  border-color: #ddd6fe;
}

.dept-services-action-btn:hover {
  background: #ede9fe;
  color: #4c1d95;
  border-color: #c4b5fd;
}

.dept-services-archive-btn {
  background: #eef6ff;
  color: #174a70;
  border-color: #bfdbfe;
}

.dept-services-archive-btn:hover {
  background: #dbeafe;
  color: #123a5a;
  border-color: #93c5fd;
}

.dept-services-upload-btn {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.dept-services-upload-btn:hover {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
}

.dept-services-current-btn.active,
.dept-services-action-btn.active,
.dept-services-archive-btn.active {
  color: #052e2b;
  background: linear-gradient(135deg, #ccfbf1 0%, #dbeafe 100%);
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.24), 0 10px 22px rgba(15, 118, 110, 0.18);
  transform: translateY(-1px);
}

.dept-services-empty {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--border-md);
  border-radius: 8px;
  color: var(--text-2);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 700;
}

.dept-services-current-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 12px;
}

.dept-services-current-archive-btn {
  justify-content: center;
  min-width: 180px;
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
  position: relative;
}

.dept-services-current-archive-btn:hover {
  background: #ffedd5;
  color: #7c2d12;
  border-color: #fdba74;
}

.dept-services-admin-locked {
  cursor: not-allowed !important;
  opacity: 0.86;
}

.dept-services-admin-locked:hover {
  background: #e5e7eb !important;
  color: #6b7280 !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(0.35);
}

.dept-services-admin-locked:hover i,
.dept-services-admin-locked:hover span {
  color: #6b7280 !important;
}

.dept-service-swap-panel,
.dept-service-archive-panel {
  display: grid;
  flex-basis: 100%;
  max-width: 520px;
  margin-left: 0;
  margin-right: auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.dept-service-swap-panel.hidden,
.dept-service-archive-panel.hidden { display: none; }

.dept-service-swap-panel label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-2);
}

.dept-service-swap-panel select {
  min-width: 180px;
  min-height: 38px;
  border: 1px solid var(--border-md);
  border-radius: 7px;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--text);
}

.dept-service-archive-panel h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.dept-service-archive-list { display: grid; gap: 8px; }

.dept-service-archive-item {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border-sm);
  font-size: 12px;
}


.dept-service-archive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dept-service-archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dept-service-archive-item button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.dept-service-archive-delete {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff1f2;
}

.dept-service-archive-restore {
  color: #14532d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.dept-service-archive-item span,
.dept-service-archive-item small,
.dept-service-archive-empty { color: var(--text-3); }

@media (max-width: 980px) {
  .dept-services-layout { grid-template-columns: 1fr; padding-right: 0; }
  .dept-services-side { position: static; }
}
/* Department Services Status Icons */
.service-status-icon {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.service-status-icon i {
  font-size: 1.15em;
}
.service-status-icon.done i {
  color: var(--teal-400);
}
.service-status-icon.pending i {
  color: #f97316;
  animation: pulse-clock 2s ease-in-out infinite;
}

.service-status-icon.writing i {
  color: #16a34a;
}

@keyframes pulse-clock {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.15); }
}

/* Past service rows – grayed out */
.past-service-row td {
  color: var(--text-3) !important;
  opacity: 0.55;
}

/* Next upcoming service row – orange highlight */
.highlighted-service-row {
  background: rgba(249, 115, 22, 0.08) !important;
  box-shadow: inset 3px 0 0 #f97316;
}

:root[data-theme="dark"] .highlighted-service-row {
  background: rgba(249, 115, 22, 0.14) !important;
  box-shadow: inset 3px 0 0 #f97316;
}

/* Today service row - green with writing icon */
.today-service-row {
  background: rgba(34, 197, 94, 0.12) !important;
  box-shadow: inset 3px 0 0 #22c55e;
}

.today-service-row td:nth-child(2) {
  color: #15803d !important;
  font-weight: 800;
}

:root[data-theme="dark"] .today-service-row {
  background: rgba(34, 197, 94, 0.16) !important;
  box-shadow: inset 3px 0 0 #22c55e;
}

:root[data-theme="dark"] .today-service-row td:nth-child(2),
:root[data-theme="dark"] .service-status-icon.writing i {
  color: #4ade80 !important;
}

/* ===== MEETINGS (PORADY) MODULE ===== */
.meetings-view {
  padding: 0 22px 24px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meetings-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.meetings-dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}
.meetings-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meetings-card-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-width: 180px;
  transition: background 0.15s, border-color 0.15s;
}
.meetings-card-btn:hover:not(.disabled) {
  background: var(--surface-2);
  border-color: var(--purple-400);
}
.meetings-card-btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.meetings-card-btn .ti {
  font-size: 28px;
  color: var(--purple-600);
  flex-shrink: 0;
}
.meetings-card-btn.disabled .ti {
  color: var(--text-3);
}
.meetings-card-text {
  display: flex;
  flex-direction: column;
}
.meetings-card-text strong {
  font-size: 14px;
  font-weight: 700;
}
.meetings-card-text span {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 4px;
}

.meetings-saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 4px;
}
.meetings-saved-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.meetings-saved-item:hover {
  background: var(--surface-2);
  border-color: var(--purple-400);
}
.meetings-saved-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  flex: 1;
}
.meetings-saved-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.meetings-saved-meta {
  font-size: 11px;
  color: var(--text-2);
}
.meetings-saved-actions {
  display: flex;
  gap: 4px;
}
.meetings-empty-placeholder {
  padding: 30px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  border: 0.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* Form Card */
.meetings-form-container {
  display: flex;
  justify-content: flex-end;
  min-width: 180px;
}
.meetings-form-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  width: 650px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}
.meetings-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--border);
}
.meetings-form-header h2 {
  font-size: 16px;
  font-weight: 700;
}
.meetings-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.meetings-form-body textarea {
  min-width: 180px;
  padding: 8px 10px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  font-family: inherit;
  resize: vertical;
}
.meetings-form-body textarea:focus {
  border-color: var(--purple-400);
}

.meetings-agenda-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
  padding: 12px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border-md);
  max-height: 320px;
  overflow-y: auto;
}
.meetings-agenda-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meetings-agenda-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  width: 24px;
  text-align: right;
}
.meetings-agenda-input {
  flex: 1;
  padding: 6px 10px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  font-family: inherit;
}
.meetings-agenda-input:focus {
  border-color: var(--purple-400);
}
.meetings-agenda-input[readonly] {
  background: var(--surface-3);
  color: var(--text-3);
  cursor: not-allowed;
  border-color: var(--border);
}
.meetings-agenda-delete {
  background: transparent;
  border: none;
  color: var(--danger-500);
  cursor: pointer;
  padding: 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.meetings-agenda-delete:hover {
  background: var(--danger-50);
  color: var(--danger-700);
}
.meetings-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border);
}
.meetings-template-box {
  background: var(--surface-2);
  border: 1px dashed var(--purple-400);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 4px;
}
.meetings-template-box strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple-600);
  margin-bottom: 6px;
}
.meetings-template-box code {
  background: var(--surface);
  padding: 2px 5px;
  border-radius: 4px;
  border: 0.5px solid var(--border);
  font-family: monospace;
  font-size: 12px;
  color: var(--text);
}

/* Document Sheet CSS (A4) */
.meetings-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 180px;
}
.meetings-preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 180px;
  max-width: 800px;
  padding: 10px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.meetings-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meeting-signature-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  max-width: 800px;
  padding: 10px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.meeting-signature-controls.hidden {
  display: none;
}
.meeting-signature-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-2);
}
.meeting-signature-controls input[type="range"] {
  width: 150px;
}
.meeting-signature-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 12px;
}
.meeting-signature-choice {
  min-height: 110px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 10px;
}
.meeting-signature-choice:hover {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(91, 76, 196, 0.12);
}
.meeting-signature-choice img {
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
}

.meetings-a4-sheet {
  min-width: 180px;
  max-width: 800px;
  aspect-ratio: 1 / 1.414;
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 60px 80px;
  font-family: "Georgia", "Times New Roman", serif !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.15);
}
.meetings-pdf-header {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 180px;
}
.meetings-pdf-emblem {
  flex: 0 0 108px;
  display: flex;
  align-items: center;
}
.meetings-pdf-header-text {
  flex: 1;
  text-align: center;
  color: #000000 !important;
}
.meetings-pdf-header-text h1 {
  font-size: 13pt;
  font-weight: bold;
  margin: 0;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-family: "Georgia", "Times New Roman", serif !important;
  line-height: 1.3;
}
.meetings-pdf-header-text h2 {
  font-size: 11.5pt;
  font-weight: bold;
  margin: 4px 0 0 0;
  font-family: "Georgia", "Times New Roman", serif !important;
  line-height: 1.2;
}
.meetings-pdf-header-text h3 {
  font-size: 10pt;
  font-weight: normal;
  margin: 2px 0 0 0;
  font-family: "Georgia", "Times New Roman", serif !important;
}
.meetings-pdf-divider {
  height: 2px;
  background-color: #000000 !important;
  margin-top: 10px;
  margin-bottom: 8px;
  min-width: 180px;
}
.meetings-pdf-date-row {
  text-align: right;
  font-size: 11pt;
  margin-bottom: 40px;
  font-family: "Georgia", "Times New Roman", serif !important;
  color: #000000 !important;
}
.meetings-pdf-title {
  text-align: center;
  font-size: 18pt;
  font-weight: bold;
  margin-bottom: 30px;
  letter-spacing: 2px;
  font-family: "Georgia", "Times New Roman", serif !important;
  color: #000000 !important;
}
.meetings-pdf-body-paragraph {
  font-size: 12pt;
  text-align: justify;
  line-height: 1.7;
  margin-bottom: 24px;
  font-family: "Georgia", "Times New Roman", serif !important;
  color: #000000 !important;
}
.meetings-underlined {
  border-bottom: 1px dashed #000000 !important;
  padding: 0 4px;
  font-weight: bold;
}
.meetings-pdf-agenda-title {
  font-size: 12pt;
  font-weight: bold;
  margin-bottom: 12px;
  font-family: "Georgia", "Times New Roman", serif !important;
  color: #000000 !important;
}
.meetings-pdf-agenda-list {
  font-size: 12pt;
  margin-left: 24px;
  margin-bottom: 40px;
  line-height: 1.7;
  font-family: "Georgia", "Times New Roman", serif !important;
  padding: 0;
  color: #000000 !important;
}
.meetings-pdf-agenda-list li {
  margin-bottom: 6px;
  list-style-type: decimal;
}

.meetings-pdf-signature-block {
  align-self: flex-end;
  width: 200px;
  text-align: center;
  margin-top: auto;
  font-family: "Georgia", "Times New Roman", serif !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #000000 !important;
}
.meetings-pdf-signature-image {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
#preview-meeting-emblem {
  width: 108px;
  height: auto;
  display: block;
}
.meeting-draggable-signature {
  position: absolute;
  z-index: 12;
  cursor: move;
  touch-action: none;
  user-select: none;
  transform-origin: center center;
}
.meeting-draggable-signature.hidden {
  display: none;
}
.meeting-draggable-signature img {
  min-width: 180px;
  height: auto;
  display: block;
  pointer-events: none;
}
.meeting-draggable-signature::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px dashed rgba(83, 74, 183, 0.55);
  border-radius: 6px;
  opacity: 0;
}
.meeting-draggable-signature:hover::after,
.meeting-draggable-signature.is-dragging::after {
  opacity: 1;
}
#preview-meeting-stamp {
  position: absolute;
  left: 43%;
  top: 71%;
  width: 22%;
  height: auto;
  pointer-events: none;
  display: block;
  z-index: 10;
}
.meetings-pdf-signature-name {
  font-size: 12pt;
  font-weight: bold;
  margin: 0;
}
.meetings-pdf-signature-title {
  font-size: 10pt;
  color: #555555 !important;
  margin: 2px 0 0 0;
}


/* Print CSS */
@media print {
  body::after {
    display: none !important;
  }
  #meetings-invitation-sheet {
    box-shadow: none !important;
    padding: 60px 80px !important;
    margin: 0 !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    position: relative !important;
  }
  #meetings-attendance-sheet {
    box-shadow: none !important;
    padding: 60px 80px !important;
    margin: 0 !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    position: relative !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .header, .sidebar, .page-top, .page-actions, .stat-cards, .who-bar, .table-wrap, .welcome-view,
  .meetings-dashboard, .meetings-form-container, .meetings-preview-actions, .meeting-signature-controls, .toast, .admin-access-overlay,
  .nav-sep, .sidebar-logout, main.content > .page-top {
    display: none !important;
  }
  .meeting-draggable-signature::after {
    display: none !important;
  }
  main.content {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .body-wrap {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .meetings-view {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .meetings-preview-container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .meetings-attendance-table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border: 1px solid #000000 !important;
    margin-top: 14px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  .meetings-attendance-table th,
  .meetings-attendance-table td {
    border: 1px solid #000000 !important;
    padding: 8px 10px !important;
    font-size: 10.5pt !important;
    vertical-align: middle !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-sizing: border-box !important;
  }
  .meetings-attendance-table th {
    font-weight: bold !important;
    background-color: #f2f2f2 !important;
  }
  .meetings-attendance-table colgroup col:nth-child(1),
  .meetings-attendance-table th:nth-child(1),
  .meetings-attendance-table td:nth-child(1) {
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
    text-align: center !important;
  }
  .meetings-attendance-table colgroup col:nth-child(2),
  .meetings-attendance-table th:nth-child(2),
  .meetings-attendance-table td:nth-child(2) {
    width: auto !important;
  }
  .meetings-attendance-table colgroup col:nth-child(3),
  .meetings-attendance-table th:nth-child(3),
  .meetings-attendance-table td:nth-child(3) {
    width: 28% !important;
    min-width: 28% !important;
    max-width: 28% !important;
  }
  .meetings-attendance-table colgroup col:nth-child(4),
  .meetings-attendance-table th:nth-child(4),
  .meetings-attendance-table td:nth-child(4) {
    width: 22% !important;
    min-width: 22% !important;
    max-width: 22% !important;
  }
}

/* Responsive for Dashboard */
@media (max-width: 900px) {
  .meetings-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .meetings-a4-sheet {
    padding: 30px 40px;
  }
}
@media (max-width: 760px) {
  .meetings-view {
    padding: 0 12px 24px;
  }
  .meetings-form-card {
    min-width: 180px;
  }
}

/* Prevent flashing of dashboard/login in share mode */
html.share-loading .auth-overlay,
html.share-loading .sidebar {
  display: none !important;
}

/* Position share status directly above the share button */
.share-button-wrapper .additional-list-status {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  margin-left: 0;
  z-index: 10;
  background: var(--surface);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Custom inputs with native picker triggers */
.input-with-picker {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 180px;
}
.input-with-picker input[type="text"] {
  min-width: 180px;
  padding-right: 36px !important;
}
.input-with-picker .picker-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 16px;
  transition: color 0.15s;
  z-index: 2;
}
.input-with-picker .picker-btn:hover {
  color: var(--purple-600);
}
.input-with-picker .hidden-picker {
  position: absolute;
  right: 8px;
  opacity: 0;
  width: 24px;
  height: 24px;
  pointer-events: none;
  border: none;
  z-index: 1;
}

/* Attendance Sheet and Tabs Styling */
.meetings-preview-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
}
.meetings-preview-tabs .btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
  color: var(--text-2);
  min-height: 28px;
  box-shadow: none !important;
}
.meetings-preview-tabs .btn.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

#meetings-attendance-sheet {
  background: #ffffff !important;
  color: #000000 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  padding: 60px 80px;
}
.meetings-attendance-header {
  text-align: center;
  margin-bottom: 28px;
  color: #000000 !important;
}
.meetings-attendance-header h1 {
  font-size: 18pt;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 8px;
  color: #000000 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
}
.meetings-attendance-subtitle {
  font-size: 11pt;
  font-style: italic;
  color: #000000 !important;
  padding: 4px 8px;
  border: 1px dashed transparent;
  border-radius: 4px;
  display: inline-block;
  min-width: 340px;
  transition: border-color 0.15s, background-color 0.15s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
}
.meetings-attendance-subtitle:hover {
  border-color: #bbbbbb;
  background-color: #f7f9fa;
}
.meetings-attendance-subtitle:focus {
  border-color: var(--purple-400);
  background-color: #ffffff;
  outline: none;
}
.meetings-attendance-table {
  width: calc(100% - 2px);
  margin-left: 1px;
  margin-right: 1px;
  table-layout: fixed;
  border-collapse: collapse;
  color: #000000 !important;
  margin-top: 14px;
  border: 1px solid #000000 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.meetings-attendance-table th,
.meetings-attendance-table td {
  border: 1px solid #000000 !important;
  padding: 9px 12px;
  font-size: 10.5pt;
  vertical-align: middle;
  background: #ffffff !important;
  color: #000000 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
}
.meetings-attendance-table th {
  font-weight: bold;
  text-align: left;
  background-color: #f2f2f2 !important;
}
.meetings-attendance-table td.attendance-signature-cell {
  height: 48px;
}

/* ===== TELEFÓNNE ZOZNAMY ===== */
.phone-lists-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--background);
}
.phone-lists-layout {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
}
.phone-lists-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 12px;
}
.phone-lists-sidebar-header h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-2);
  letter-spacing: 0.05em;
  margin: 0;
}
.phone-lists-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phone-list-btn {
  min-width: 180px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.phone-list-btn .ti {
  font-size: 16px;
  color: var(--text-2);
}
.phone-list-btn:hover {
  background: var(--surface-2);
}
.phone-list-btn.active {
  background: var(--purple-50);
  border-color: var(--purple-100);
  color: var(--purple-700);
}
.phone-list-btn.active .ti {
  color: var(--purple-600);
}

.phone-lists-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  background: var(--background);
}
.phone-lists-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.phone-list-file-info h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.phone-list-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
  max-width: 100%;
}
.phone-list-search-box .ti {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  font-size: 16px;
  pointer-events: none;
}
.phone-list-search-box input {
  min-width: 180px;
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.phone-list-search-box input:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px var(--purple-50);
}

.phone-list-table-wrap {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}
.phone-list-table {
  border-collapse: collapse;
  width: auto;
  max-width: 100%;
  text-align: left;
  font-size: 12px;
}
.phone-list-table th,
.phone-list-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}
.phone-cell-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.4;
  max-height: 4.2em;
  max-width: 280px;
}
.phone-list-table th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 1;
}
.phone-list-table tbody tr:nth-child(odd) {
  background-color: var(--purple-50);
}
.phone-list-table tbody tr:hover {
  background: var(--surface-2) !important;
}
.phone-list-table tbody tr:last-child td {
  border-bottom: none;
}
.phone-highlight {
  background-color: #fef08a; /* Soft yellow highlight */
  color: #1e1b4b;
  padding: 0 2px;
  border-radius: 2px;
}
.phone-list-empty {
  padding: 48px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--purple-100);
  border-top-color: var(--purple-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== MEETING FOLDERS & MANAGEMENT ===== */
.meeting-folder {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(20, 24, 36, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.meeting-folder:hover {
  border-color: var(--purple-200);
  box-shadow: 0 6px 16px rgba(20, 24, 36, 0.07);
}
.meeting-folder-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--surface);
  user-select: none;
}
.meeting-folder-header .ti-folder {
  font-size: 22px;
  color: var(--purple-600);
}
.meeting-folder-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.meeting-folder-toggle {
  font-size: 16px;
  color: var(--text-2);
  transition: transform 0.2s ease, color 0.2s ease;
}
.meeting-folder-header:hover .meeting-folder-toggle {
  color: var(--purple-600);
}

.meeting-folder-content {
  padding: 8px 18px 16px;
  border-top: 0.5px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meeting-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.1s ease;
}
.meeting-file-row:hover {
  border-color: var(--purple-200);
}
.meeting-file-row i {
  font-size: 18px;
  color: var(--purple-400);
}
.meeting-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meeting-file-name.placeholder {
  color: var(--text-3);
  font-weight: 500;
}
.meeting-file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.meeting-file-actions a.act-btn {
  text-decoration: none;
}

/* Upload minutes row styling */
.meeting-file-row.upload-row {
  background: transparent;
  border: 1px dashed var(--border-md);
}
.meeting-file-row.upload-row i {
  color: var(--text-3);
}

/* ===== MINUTES PREVIEW FORMATTING ===== */
#minutes-preview-body h1 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 18px;
  color: var(--text);
}
#minutes-preview-body h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 16px;
  color: var(--text);
}
#minutes-preview-body h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 14px;
  color: var(--text);
}
#minutes-preview-body p {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text);
}
#minutes-preview-body ul, #minutes-preview-body ol {
  margin-left: 20px;
  margin-bottom: 12px;
  font-size: 13px;
}
#minutes-preview-body li {
  margin-bottom: 4px;
}
#minutes-preview-body table {
  min-width: 180px;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  margin-top: 12px;
}
#minutes-preview-body th, #minutes-preview-body td {
  padding: 8px 10px;
  border-bottom: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
  text-align: left;
}
#minutes-preview-body th {
  background: var(--surface-2);
  font-weight: 700;
}

.minutes-editor-modal {
  width: min(920px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.minutes-editor-body {
  display: grid;
  gap: 10px;
  padding: 16px 20px;
  overflow: hidden;
}
.minutes-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.minutes-editor-toolbar select {
  min-height: 34px;
  border: 0.5px solid var(--border-md);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  font-weight: 700;
}
.minutes-editor-area {
  min-height: 360px;
  max-height: 56vh;
  overflow-y: auto;
  border: 0.5px solid var(--border-md);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 2cm;
  line-height: 1.55;
  outline: none;
}
.minutes-editor-area:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(91, 76, 196, 0.14);
}
.minutes-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 0.5px solid var(--border);
}
.minutes-pdf-source {
  width: 170mm;
  min-height: 257mm;
  background: #fff;
  color: #111827;
  font-family: Arial, sans-serif;
  font-size: 12pt;
  line-height: 1.55;
}
.minutes-pdf-render-host {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
}
.minutes-pdf-source p {
  margin: 0 0 10px;
}
.minutes-pdf-source ul,
.minutes-pdf-source ol {
  margin-top: 6px;
}
#minutes-preview-body tr:nth-child(odd) td {
  background-color: var(--purple-50);
}

/* ===== ONLINE EMPLOYEES LIST IN SETTINGS ===== */
.online-employees-section {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.online-employees-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.online-employee-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.online-employee-item:hover {
  border-color: var(--purple-200);
  background-color: var(--surface-1);
}

.online-employee-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.online-employee-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.online-employee-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.online-employee-sub {
  font-size: 11px;
  color: var(--text-3);
}

.online-employee-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background-color: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--teal-200);
  display: flex;
  align-items: center;
  gap: 6px;
}

.online-employee-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--teal-500);
  display: inline-block;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Disabled Recycle Bin Buttons */
#btn-trash-employees.disabled,
#btn-trash-meetings.disabled,
#btn-trash-dms.disabled,
#btn-trash-calendar.disabled,
#btn-trash-employees[disabled],
#btn-trash-meetings[disabled],
#btn-trash-dms[disabled],
#btn-trash-calendar[disabled] {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  filter: grayscale(100%);
  background-color: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text-3) !important;
}

.meetings-card-btn.disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(100%);
  border-color: var(--border) !important;
  background: var(--surface-2) !important;
}

/* Trash Modal & Items */
.trash-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}
.trash-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.trash-item:hover {
  border-color: var(--purple-400);
  background: var(--bg);
}
.trash-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trash-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.trash-item-meta {
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  gap: 8px;
  align-items: center;
}
.trash-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.trash-item-actions {
  display: flex;
  gap: 8px;
}
.trash-item-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* Autodoprava custom cell styles */
.autodoprava-phm-panel {
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}
.autodoprava-section-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.autodoprava-section-switch button,
.autodoprava-project-code-btn {
  border: 0.5px solid var(--border-md);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  padding: 8px 13px;
}
.autodoprava-section-switch button.active,
.autodoprava-project-code-btn.active {
  border-color: var(--purple-600);
  background: var(--purple-600);
  color: #fff;
}
.autodoprava-project-code-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.autodoprava-projects-entry-table input {
  min-width: 180px;
  border: 0.5px solid var(--border-md);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}
.autodoprava-phm-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.autodoprava-phm-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.autodoprava-phm-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
}
.autodoprava-phm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}
.autodoprava-phm-field {
  display: grid;
  gap: 5px;
}
.autodoprava-phm-field label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-2);
}
.autodoprava-phm-field input {
  min-width: 180px;
  border: 0.5px solid var(--border-md);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}
.autodoprava-phm-field input.phm-required-missing,
.autodoprava-project-table input.phm-required-missing {
  border: 2px solid #d11f1f;
  background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(209, 31, 31, 0.12);
}
.autodoprava-phm-field input.phm-required-filled,
.autodoprava-project-table input.phm-required-filled {
  border: 2px solid #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
:root[data-theme="dark"] .autodoprava-phm-field input.phm-required-missing,
:root[data-theme="dark"] .autodoprava-project-table input.phm-required-missing {
  background: rgba(209, 31, 31, 0.12);
}
:root[data-theme="dark"] .autodoprava-phm-field input.phm-required-filled,
:root[data-theme="dark"] .autodoprava-project-table input.phm-required-filled {
  background: rgba(22, 163, 74, 0.12);
}
.autodoprava-current-km {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 9px 12px;
}
.autodoprava-current-km span {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-2);
}
.autodoprava-current-km strong {
  font-size: 16px;
}
.autodoprava-current-km .phm-question {
  color: #d11f1f;
  font-size: 22px;
  line-height: 1;
}
.autodoprava-phm-section {
  margin-top: 14px;
}
.autodoprava-phm-section-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}
.autodoprava-project-table {
  min-width: 180px;
  border-collapse: separate;
  border-spacing: 0;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.autodoprava-project-table th,
.autodoprava-project-table td {
  padding: 7px;
  border-bottom: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
  font-size: 12px;
}
.autodoprava-project-table th {
  background: var(--surface-2);
  text-align: left;
  color: var(--text-2);
}
.autodoprava-project-table tr:last-child td { border-bottom: 0; }
.autodoprava-project-table th:last-child,
.autodoprava-project-table td:last-child { border-right: 0; }
.autodoprava-project-table input {
  min-width: 180px;
  border: 0.5px solid var(--border-md);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 8px;
  font: inherit;
}
.autodoprava-phm-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}
.autodoprava-result-card {
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
}
.autodoprava-result-card span {
  display: block;
  font-size: 11px;
  color: var(--text-2);
  font-weight: 800;
}
.autodoprava-result-card strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}
.autodoprava-month-previous,
.autodoprava-month-previous * {
  font-weight: 400 !important;
}
.autodoprava-month-current,
.autodoprava-month-current * {
  font-weight: 800 !important;
}
.autodoprava-preview-note {
  margin: 2px 0 -6px;
  color: var(--text-2);
  font-size: 12px;
}
.autodoprava-preview {
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}
.autodoprava-preview summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
}
.autodoprava-preview[open] summary {
  margin-bottom: 10px;
}
.autodoprava-excel-preview-table {
  table-layout: fixed;
  width: max-content;
  min-width: 0;
  font-family: Calibri, Arial, sans-serif !important;
  font-size: 12px !important;
}
.autodoprava-excel-preview-table th,
.autodoprava-excel-preview-table td {
  min-width: 0;
  max-width: none;
  padding: 2px 4px;
  overflow: hidden;
  vertical-align: middle;
}
.autodoprava-excel-preview-table .dms-row-head-col {
  width: 46px;
  min-width: 46px;
}
.autodoprava-disabled-cell {
  background: var(--surface-2) !important;
  color: var(--text-3) !important;
  text-align: center !important;
}

/* Today's Tasks Head - navigation above centered title */
.today-tasks-head {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 0;
  margin-bottom: 24px;
}

.today-tasks-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  z-index: 1;
}

.today-tasks-title-block {
  position: static;
  transform: none;
  width: min(520px, 100%);
  padding: 14px 18px;
  border: 1px solid rgba(34, 197, 94, 0.42);
  border-radius: 10px;
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
  color: #14532d;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.today-tasks-title-block h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #166534;
}

.today-tasks-title-block p {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #166534;
  font-weight: 700;
}

/* Nav day buttons – výrazné */
.btn-nav-day {
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 9px 18px !important;
  border: 2px solid var(--purple-400) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  color: var(--purple-600) !important;
  box-shadow: 0 4px 14px rgba(83, 74, 183, 0.18) !important;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease !important;
  cursor: pointer;
}

.btn-nav-day:hover {
  background: var(--purple-50) !important;
  border-color: var(--purple-600) !important;
  color: var(--purple-700) !important;
  box-shadow: 0 6px 18px rgba(83, 74, 183, 0.28) !important;
  transform: translateY(-2px);
}

.btn-nav-day:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(83, 74, 183, 0.15) !important;
}

:root[data-theme="dark"] .btn-nav-day {
  background: rgba(166, 157, 244, 0.08) !important;
  border-color: var(--purple-500) !important;
  color: var(--purple-300) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

:root[data-theme="dark"] .btn-nav-day:hover {
  background: rgba(166, 157, 244, 0.18) !important;
  border-color: var(--purple-400) !important;
  color: var(--purple-200) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45) !important;
}

/* Dnes button – subtílnejší, neutrálny štýl */
.btn-nav-today {
  background: var(--surface-2) !important;
  border-color: var(--text-3) !important;
  color: var(--text) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  font-size: 13px !important;
  padding: 9px 14px !important;
}

.btn-nav-today:hover {
  background: var(--surface) !important;
  border-color: var(--text-2) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14) !important;
  transform: translateY(-1px);
}

:root[data-theme="dark"] .btn-nav-today {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: var(--text-2) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

:root[data-theme="dark"] .btn-nav-today:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: var(--text) !important;
}

/* ===== LOGOUT SCREEN-FADE OVERLAY ===== */
@keyframes logoutFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes logoutIconPulse {
  0%   { transform: scale(1)    rotate(0deg);  opacity: 0.7; }
  30%  { transform: scale(1.18) rotate(-8deg); opacity: 1;   }
  60%  { transform: scale(0.95) rotate(4deg);  opacity: 0.8; }
  100% { transform: scale(1)    rotate(0deg);  opacity: 0.7; }
}

@keyframes logoutScanLine {
  0%   { top: 0; }
  100% { top: 100%; }
}

@keyframes logoutTextBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.logout-fade-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 6, 22, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: background 0s;
  overflow: hidden;
}

.logout-fade-overlay.active {
  pointer-events: all;
  cursor: pointer;
  animation: logoutFadeIn 0.25s ease forwards;
}

.logout-fade-overlay.active .logout-scan-line {
  display: block;
}

.logout-scan-line {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.7) 30%, rgba(167, 139, 250, 1) 50%, rgba(139, 92, 246, 0.7) 70%, transparent 100%);
  box-shadow: 0 0 18px 6px rgba(139, 92, 246, 0.4);
  animation: logoutScanLine 2.5s linear infinite;
  pointer-events: none;
}

.logout-fade-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.45s ease 0.15s, transform 0.45s ease 0.15s;
  text-align: center;
  padding: 36px 48px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 60px rgba(139, 92, 246, 0.18),
    0 24px 64px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.logout-fade-overlay.active .logout-fade-inner {
  opacity: 1;
  transform: scale(1);
}

.logout-fade-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(91, 76, 196, 0.15) 100%);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.35), 0 0 60px rgba(139, 92, 246, 0.12);
  animation: logoutIconPulse 2.2s ease-in-out infinite;
}

.logout-fade-icon .ti {
  font-size: 32px;
  color: rgba(196, 181, 253, 0.95);
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.8));
}

.logout-fade-label {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.logout-fade-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.04em;
  animation: logoutTextBlink 2s ease-in-out infinite;
}

/* Progress bar */
.logout-fade-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--purple-600), var(--purple-400), #a78bfa);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
  transition: width linear;
  border-radius: 0 2px 2px 0;
}

.logout-fade-overlay.active::after {
  min-width: 180px;
}
.settings-actions-under-card {
  margin-top: 12px;
  margin-bottom: 16px;
}

.settings-version-changes-btn {
  width: fit-content;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.settings-version-changes-btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #115e59, #1d4ed8);
  filter: none;
  transform: translateY(-1px);
}

.settings-version-changes-btn:hover i {
  color: #ffffff;
}

.settings-actions-under-card { display: flex; flex-wrap: wrap; gap: 10px; }
.settings-cloud-monitoring-btn { background: linear-gradient(135deg, #eef6ff 0%, #e8fff4 100%) !important; border: 1px solid #8fc7ff !important; color: #0f5f8f !important; font-weight: 900 !important; }
.settings-cloud-monitoring-btn:hover { background: linear-gradient(135deg, #dff0ff 0%, #d7fbe9 100%) !important; color: #083c5c !important; }
.cloud-monitoring-modal { width: min(920px, 94vw); max-height: 86vh; display: flex; flex-direction: column; }
.cloud-monitoring-body { overflow-y: auto; display: grid; gap: 14px; }
.cloud-monitoring-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.cloud-monitoring-card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 14px; display: grid; gap: 8px; }
.cloud-monitoring-card strong { color: var(--text); font-size: 13px; }
.cloud-monitoring-value { font-size: 24px; font-weight: 950; color: var(--primary); }
.cloud-monitoring-note { color: var(--text-2); font-size: 12px; line-height: 1.45; }
.cloud-monitoring-unavailable { border-color: #fed7aa; background: #fff7ed; }
:root[data-theme="dark"] .cloud-monitoring-unavailable { background: rgba(124, 45, 18, 0.22); }
.cloud-monitoring-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 8px; border: 1px solid var(--border); }
.cloud-monitoring-table th, .cloud-monitoring-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; vertical-align: top; }
.cloud-monitoring-table th { background: var(--surface-2); color: var(--text); }
.cloud-monitoring-loading { color: var(--text-2); font-weight: 800; padding: 16px; }

.version-changes-modal {
  width: min(860px, 95vw);
}

.version-changes-body {
  display: block;
  max-height: 70vh;
  overflow-y: auto;
  line-height: 1.55;
}

.version-changes-body h1 {
  font-size: 20px;
  margin: 0 0 14px;
}

.version-changes-body h2 {
  font-size: 16px;
  margin: 22px 0 8px;
}

.version-changes-body h3 {
  font-size: 14px;
  margin: 18px 0 6px;
  color: var(--text);
}

.version-changes-body p {
  margin: 8px 0;
  color: var(--text-2);
}

.version-changes-body ul {
  margin: 8px 0 14px 18px;
  padding: 0;
}

.version-changes-body li {
  margin: 5px 0;
}

.version-changes-error {
  color: #b42318;
  font-weight: 600;
}

.meeting-folder-delete {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  color: var(--danger, #dc2626);
  background: rgba(220, 38, 38, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.meeting-folder-delete:hover {
  background: rgba(220, 38, 38, 0.16);
}
.dms-admin-locked { opacity: 0.48 !important; cursor: not-allowed !important; filter: grayscale(100%); }
.dms-admin-locked:hover { background: var(--surface-2) !important; color: var(--text-3) !important; }
.dms-readonly-cell { cursor: default !important; background: #f8fafc; }
.dms-readonly-cell:focus { outline: none !important; background: #f8fafc !important; }

.dms-supervisor-edited-row {
  color: #047857 !important;
  font-weight: 900 !important;
}

.dms-supervisor-empty-check {
  color: #047857 !important;
  font-weight: 950 !important;
  text-align: center;
  font-size: 18px;
}

.settings-google-calendar-btn { background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%) !important; border: 1px solid #86efac !important; color: #065f46 !important; font-weight: 900 !important; }
.settings-google-calendar-btn:hover { background: linear-gradient(135deg, #d1fae5 0%, #dbeafe 100%) !important; color: #064e3b !important; }
.settings-google-calendar-sync-btn { background: linear-gradient(135deg, #f0f9ff 0%, #fef3c7 100%) !important; border: 1px solid #93c5fd !important; color: #075985 !important; font-weight: 900 !important; }
.settings-google-calendar-sync-btn:hover { background: linear-gradient(135deg, #dbeafe 0%, #fde68a 100%) !important; color: #0c4a6e !important; }

/* Calendar sync button and task color alignment */
.calendar-google-sync-btn {
  border-color: #93c5fd !important;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%) !important;
  color: #075985 !important;
  font-weight: 900 !important;
}
.calendar-google-sync-btn:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%) !important;
  color: #0c4a6e !important;
}
.calendar-google-sync-btn.syncing {
  animation: googleSyncPulse 1s ease-in-out infinite;
  cursor: progress;
}
.calendar-google-sync-btn.syncing i {
  animation: googleSyncSpin .85s linear infinite;
}
.calendar-google-sync-btn.synced {
  border-color: rgba(34, 197, 94, 0.5) !important;
  background: linear-gradient(135deg, #dcfce7 0%, #ecfdf5 100%) !important;
  color: #166534 !important;
}
@keyframes googleSyncSpin { to { transform: rotate(360deg); } }
@keyframes googleSyncPulse { 0%, 100% { opacity: 1; } 50% { opacity: .66; } }

button.today-task {
  width: 100%;
  font: inherit;
  cursor: pointer;
}
button.today-task:hover {
  border-color: #22c55e;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.14);
}

.welcome-task-column.previous {
  border-color: rgba(248, 113, 113, 0.62);
  background: linear-gradient(180deg, #fff1f2 0%, #fef2f2 100%);
}
.welcome-task-column.previous h2 { color: #b91c1c; }
.welcome-task-column.today {
  border-color: rgba(34, 197, 94, 0.42);
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
  box-shadow: 0 24px 70px rgba(22, 163, 74, 0.14);
}
.welcome-task-column.today h2 { color: #166534; }
.welcome-task-column.future {
  border-color: rgba(96, 165, 250, 0.62);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}
.welcome-task-column.future h2 { color: #1d4ed8; }


/* Mobile hamburger sidebar */
.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.mobile-menu-toggle .ti { font-size: 24px; }
.mobile-menu-backdrop { display: none; }
body.mobile-menu-open { overflow: hidden; }

@media (max-width: 760px) {
  .mobile-menu-toggle { display: inline-flex; }
  .header {
    flex-wrap: nowrap;
    align-items: center;
  }
  .theme-toggle { margin-left: 0; }
  .body-wrap {
    flex-direction: row;
    min-height: calc(100vh - 56px);
    overflow: hidden;
  }
  .sidebar {
    position: fixed !important;
    top: 56px !important;
    left: 0;
    bottom: 0;
    z-index: 320;
    width: min(82vw, 280px);
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    flex-direction: column !important;
    align-items: stretch;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 12px 10px 18px !important;
    border-right: 1px solid var(--border) !important;
    border-bottom: 0 !important;
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.18);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  body.mobile-menu-open .sidebar { transform: translateX(0); }
  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 56px 0 0 0;
    z-index: 300;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  body.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar .ni {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px;
    height: 42px;
    justify-content: flex-start !important;
    padding: 0 12px !important;
  }
  .sidebar .ni span { font-size: 13px !important; }
  .sidebar .nav-sep { display: block; width: 100%; height: 1px; margin: 6px 0; background: var(--border); }
  .sidebar .nav-bottom { margin-top: 0 !important; }
  .content { width: 100%; min-width: 0; }
}

/* Calendar entry mobile anti-overlap */
@media (max-width: 760px) {
  .calendar-entry-line {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: stretch;
  }
  .calendar-entry-line input[type="text"] {
    min-width: 0;
    width: 100%;
  }
  .calendar-entry-delete-line,
  .calendar-entry-done-line {
    grid-column: 2;
    width: 100%;
    justify-content: center;
  }
  .calendar-entry-line-more {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .calendar-repeat-btn {
    grid-column: 2;
    width: 100%;
    justify-content: center;
  }
}


.calendar-entry-preview {
  display: grid;
  gap: 12px;
  padding: 4px 0 10px;
}
.calendar-entry-preview.hidden { display: none; }
.calendar-entry-lines.hidden,
.calendar-editor-actions .hidden { display: none !important; }
.calendar-preview-list {
  display: grid;
  gap: 8px;
}
.calendar-preview-item {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff 0%, #f4f0ff 100%);
  color: var(--text);
}
.calendar-preview-item.done {
  background: #f1f5f9;
  color: #64748b;
}
.calendar-preview-item.done strong {
  text-decoration: line-through;
}
.calendar-preview-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
}
.calendar-preview-item strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.calendar-preview-item em {
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  color: #15803d;
}
.calendar-preview-empty {
  padding: 18px;
  border: 1px dashed var(--border-md);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-2);
  text-align: center;
  font-weight: 750;
}
.calendar-preview-drivers {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fff1f2;
}
.calendar-preview-drivers span {
  font-size: 12px;
  font-weight: 850;
  color: #991b1b;
}
.calendar-preview-drivers strong {
  color: #7f1d1d;
  font-size: 13px;
}
@media (max-width: 760px) {
  .calendar-preview-item {
    grid-template-columns: 24px auto minmax(0, 1fr);
  }
  .calendar-preview-item em {
    grid-column: 3;
  }
}
.calendar-repeat-icon {
  margin-left: 6px;
  color: #7c3aed;
  font-size: 1em;
  vertical-align: -1px;
}
:root[data-theme="dark"] .calendar-repeat-icon { color: #c4b5fd; }
.calendar-repeat-note-inline,
.welcome-task-repeat-inline,
.today-task-repeat-inline {
  margin-left: 6px;
  color: var(--text-3);
  font-size: 0.9em;
  font-weight: 750;
  white-space: normal;
}
/* calendar-entry-mobile-width-fix */
@media (max-width: 760px) {
  .calendar-entry-modal {
    inset: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    padding: 12px max(10px, env(safe-area-inset-right)) 12px max(10px, env(safe-area-inset-left)) !important;
    justify-content: center !important;
    align-items: flex-start !important;
    background: rgba(15, 23, 42, 0.28) !important;
    box-sizing: border-box;
  }
  .calendar-entry-card {
    width: min(96vw, 620px) !important;
    min-width: 0 !important;
    max-width: 96vw !important;
    max-height: calc(100vh - 24px) !important;
    overflow-y: auto !important;
    box-sizing: border-box;
  }
}
/* welcome-mobile-task-order */
@media (max-width: 760px) {
  .welcome-task-board {
    display: flex;
    flex-direction: column;
  }
  .welcome-task-column.today { order: 1; }
  .welcome-task-column.previous { order: 2; }
  .welcome-task-column.future { order: 3; }
}
/* calendar-expanded-mobile-square-days */
@media (max-width: 760px) {
  .calendar-panel.expanded .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .calendar-panel.expanded .calendar-weekday {
    display: none;
  }
  .calendar-panel.expanded .calendar-day {
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 9px;
    border-radius: 10px;
    overflow: hidden;
  }
  .calendar-panel.expanded .calendar-day.expanded-focus {
    grid-column: span 2;
    min-height: 0;
    aspect-ratio: 1 / 1;
    overflow-y: auto;
  }
}
/* calendar-mobile-sync-visible */
@media (max-width: 760px) {
  .today-tasks-nav {
    position: sticky;
    top: 56px;
    z-index: 230;
    background: var(--background);
    padding: 8px 6px;
    border-bottom: 1px solid var(--border);
  }
  .calendar-panel {
    top: 152px !important;
    max-height: calc(100vh - 164px) !important;
    overflow-y: auto !important;
    z-index: 180;
  }
  .calendar-panel.expanded {
    top: 152px !important;
    max-height: calc(100vh - 164px) !important;
  }
}

.calendar-google-open-btn {
  border-color: #c4b5fd !important;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%) !important;
  color: #4c1d95 !important;
  font-weight: 900 !important;
  padding: 9px 18px !important;
}
.calendar-google-open-btn:hover,
.calendar-google-open-btn.active {
  background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%) !important;
  color: #312e81 !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.22) !important;
}
:root[data-theme="dark"] .calendar-google-open-btn {
  background: rgba(124, 58, 237, 0.14) !important;
  border-color: rgba(196, 181, 253, 0.65) !important;
  color: #ddd6fe !important;
}
:root[data-theme="dark"] .calendar-google-open-btn:hover,
:root[data-theme="dark"] .calendar-google-open-btn.active {
  background: rgba(124, 58, 237, 0.24) !important;
  color: #f5f3ff !important;
}
.google-calendar-embed {
  width: 100%;
  height: min(760px, calc(100vh - 210px));
  min-height: 560px;
  margin: 16px 0 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.google-calendar-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}
@media (max-width: 760px) {
  .google-calendar-embed {
    height: calc(100vh - 170px);
    min-height: 520px;
    margin-top: 10px;
    border-radius: 8px;
  }
}
/* Center previous and future task lists under their section titles */
.welcome-task-column.previous .welcome-task-list,
.welcome-task-column.future .welcome-task-list,
.today-task-section-previous .today-task-timeline,
.today-task-section-future .today-task-timeline,
.today-task-section-previous .today-task-date-group,
.today-task-section-future .today-task-date-group {
  justify-items: center;
  text-align: center;
}
.welcome-task-column.previous .welcome-task-item,
.welcome-task-column.future .welcome-task-item,
.today-task-section-previous .today-task-timeline-item,
.today-task-section-future .today-task-timeline-item {
  max-width: 760px;
  justify-self: center;
  text-align: center;
}
.today-task-section-previous .today-task-timeline-item,
.today-task-section-future .today-task-timeline-item {
  grid-template-columns: minmax(84px, auto) minmax(0, 1fr) minmax(52px, auto);
}
.today-task-section-previous .today-task-timeline-item strong,
.today-task-section-future .today-task-timeline-item strong {
  text-align: center;
}
.today-task-section-previous .today-task-timeline-item em,
.today-task-section-future .today-task-timeline-item em {
  justify-self: center;
}
.calendar-date-change {
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  background: #f5f3ff;
}
.calendar-date-change label {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
}
.calendar-date-change span {
  font-size: 13px;
  font-weight: 850;
  color: #4c1d95;
}
.calendar-date-change input {
  min-height: 34px;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 6px 9px;
  font: inherit;
}
.calendar-date-change.hidden { display: none; }
@media (max-width: 760px) {
  .calendar-date-change label { grid-template-columns: 1fr; }
}
