:root {
  --bg: #f4f7ff;
  --panel: #ffffff;
  --primary: #0f4aa3;
  --primary-dark: #083176;
  --gold: #d4a63a;
  --gold-soft: #f8e7be;
  --text: #1c1f2a;
  --muted: #697387;
  --border: #dbe2f1;
  --danger: #b52d2d;
  --ok: #1f8b45;
  --body-gradient: linear-gradient(160deg, #e9f0ff 0%, #f7f9ff 45%, #fff6de 100%);
  --surface-1: #ffffff;
  --surface-2: #f9fbff;
  --surface-3: #fafbff;
  --surface-muted: #f6f8fc;
  --panel-shadow: 0 8px 24px rgba(24, 48, 95, 0.08);
  --primary-gradient: linear-gradient(140deg, #114ca5 0%, #093779 100%);
  --card-gradient: linear-gradient(140deg, #0f4aa3 0%, #235ec5 100%);
  --card-subtitle: #d4e3ff;
  --chat-thread-bg: #f9fbff;
  --chat-msg-bg: #ffffff;
  --chat-msg-own-bg: #eaf2ff;
  --icon-btn-bg: #f6f8fc;
  --auth-panel-bg: rgba(255, 255, 255, 0.5);
  --auth-panel-border: rgba(255, 255, 255, 0.45);
  --notification-bubble-bg: #ffffff;
  --notification-bubble-border: rgba(15, 74, 163, 0.22);
  --notification-bubble-shadow: 0 8px 20px rgba(10, 45, 106, 0.18);
  --topbar-avatar-border: rgba(15, 74, 163, 0.16);
  --table-header-bg: #f9fbff;
  --mini-dashboard-item-bg: #ffffff;
  --mini-dashboard-admin-bg: #fafbff;
  --release-note-card-bg: #fafbff;
  --cal-weekdays-bg: #eef2fb;
  --cal-cell-bg: #ffffff;
  --cal-cell-empty: #f6f7fa;
  --cal-cell-today: #f0f6ff;
  --cal-filter-off: #f0f2f6;
  --btn-outline-bg: #ffffff;
  --gold-badge-text: #614100;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c1220;
  --panel: #151d2e;
  --primary: #60a5fa;
  --primary-dark: #93c5fd;
  --gold: #e8bc5a;
  --gold-soft: #3d3420;
  --text: #e8ecf4;
  --muted: #94a3b8;
  --border: #2a3548;
  --danger: #f87171;
  --ok: #4ade80;
  --body-gradient: linear-gradient(160deg, #0a0f18 0%, #121a2e 50%, #1a1528 100%);
  --surface-1: #1a2336;
  --surface-2: #141c2c;
  --surface-3: #182030;
  --surface-muted: #1e293b;
  --panel-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  --primary-gradient: linear-gradient(140deg, #2563eb 0%, #1d4ed8 100%);
  --card-gradient: linear-gradient(140deg, #1d4ed8 0%, #2563eb 100%);
  --card-subtitle: #bfdbfe;
  --chat-thread-bg: #121a28;
  --chat-msg-bg: #1a2336;
  --chat-msg-own-bg: #1e3a5f;
  --icon-btn-bg: #1e293b;
  --auth-panel-bg: rgba(21, 29, 46, 0.75);
  --auth-panel-border: rgba(255, 255, 255, 0.1);
  --notification-bubble-bg: #1a2336;
  --notification-bubble-border: rgba(96, 165, 250, 0.35);
  --notification-bubble-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --topbar-avatar-border: rgba(96, 165, 250, 0.4);
  --table-header-bg: #1a2336;
  --mini-dashboard-item-bg: #151d2e;
  --mini-dashboard-admin-bg: #1a2336;
  --release-note-card-bg: #182030;
  --cal-weekdays-bg: #1e293b;
  --cal-cell-bg: #151d2e;
  --cal-cell-empty: #0f141c;
  --cal-cell-today: #1e3a5f;
  --cal-filter-off: #252f42;
  --btn-outline-bg: #1a2336;
  --gold-badge-text: #fde68a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text);
  background: var(--body-gradient);
  color-scheme: light dark;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 2;
}

.app-footer {
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--panel-shadow);
  min-width: 0;
  overflow-x: clip;
}

/* Izračun prevoza: široka tabela seštevka ne sme biti obrezana (globalni table { min-width: 720px }) */
#transportQuotePanel.panel {
  overflow-x: visible;
}

.auth-panel {
  max-width: 560px;
  margin: 8vh auto 0;
  background: var(--auth-panel-bg);
  border-color: var(--auth-panel-border);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.auth-panel .brand {
  justify-content: center;
}

.login-bg-video {
  display: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.login-bg-video iframe {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 128vw;
  height: 72vw;
  min-width: 235vh;
  min-height: 132vh;
  transform: translate(-50%, -50%);
}

.login-view .login-bg-video {
  display: block;
}

.login-view::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, rgba(6, 20, 46, 0.42), rgba(7, 34, 83, 0.28));
  z-index: 1;
  pointer-events: none;
}

.auth-panel #loginForm {
  grid-template-columns: 1fr;
}

.auth-panel #loginForm .btn-primary {
  width: min(100%, 360px);
  justify-self: center;
}

.remember-me {
  grid-column: 1 / -1;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  justify-self: center;
  font-weight: 400;
}

.auth-panel .link-btn {
  display: block;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  color: var(--gold);
  font-size: 32px;
}

.brand-logo {
  display: block;
  object-fit: contain;
}

.brand-logo-login {
  width: 150px;
  height: 150px;
}

.brand-logo-topbar {
  width: 78px;
  height: 78px;
}

.welcome-user-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.welcome-user-text {
  text-align: left;
}

.welcome-user-text h2 {
  margin: 0;
}

.welcome-user-text p {
  margin: 4px 0 0;
}

.topbar-avatar {
  width: 52px;
  height: 68px;
  border-radius: 8px;
  border: 2px solid var(--topbar-avatar-border);
  background: var(--surface-1);
  object-fit: cover;
  flex: 0 0 52px;
}

.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-avatar-preview {
  width: 36px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface-1);
  flex: 0 0 36px;
}

.subtitle {
  color: var(--muted);
  margin-top: 4px;
}

h1,
h2,
h3 {
  margin: 0;
}

h3 {
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.client-th-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.client-sort-toggle {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.88;
}

.client-sort-toggle:hover,
.client-sort-toggle:focus-visible {
  opacity: 1;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  position: relative;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: absolute;
  right: 16px;
  top: 16px;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  gap: 6px;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
  background: var(--surface-1);
}

.datetime-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
  background: var(--surface-1);
  color: var(--muted);
}

.header-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-settings-btn .material-icons-round {
  font-size: 18px;
}

.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-icon-btn .material-icons-round {
  font-size: 18px;
}

.notification-bubble {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 52px;
  height: 52px;
  border: 1px solid var(--notification-bubble-border);
  border-radius: 999px;
  background: var(--notification-bubble-bg);
  color: var(--primary);
  box-shadow: var(--notification-bubble-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
}

.notification-bubble .material-icons-round {
  font-size: 24px;
}

.notification-bubble-count {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  padding: 0 6px;
}

.notification-preview-bubble {
  position: fixed;
  top: 74px;
  right: 14px;
  max-width: min(360px, 70vw);
  border: 1px solid var(--notification-bubble-border);
  border-radius: 14px;
  background: var(--notification-bubble-bg);
  color: var(--primary-dark);
  box-shadow: var(--notification-bubble-shadow);
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  z-index: 24;
  padding: 10px 12px;
  text-align: left;
}

.notification-preview-bubble .material-icons-round {
  font-size: 18px;
  margin-top: 1px;
}

#chatBubble.chat-bubble {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 56px;
  height: 56px;
  border: 1px solid var(--notification-bubble-border);
  border-radius: 999px;
  background: var(--notification-bubble-bg);
  color: var(--primary);
  box-shadow: var(--notification-bubble-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
}

.chat-bubble .material-icons-round {
  font-size: 24px;
}

.chat-bubble-count {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  padding: 0 6px;
}

.chat-bubble-unread {
  animation: chatPulse 1.2s infinite;
}

@keyframes chatPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(181, 45, 45, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(181, 45, 45, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(181, 45, 45, 0);
  }
}

.chat-widget-panel {
  position: fixed;
  right: 14px;
  bottom: 80px;
  width: min(360px, calc(100vw - 24px));
  height: min(500px, calc(100vh - 120px));
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--panel-shadow);
  z-index: 29;
  display: none;
  overflow: hidden;
}

.chat-widget-panel.open {
  display: flex;
  flex-direction: column;
}

.chat-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.chat-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
  padding: 10px 12px;
}

.chat-target-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.chat-thread {
  flex: 1;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--chat-thread-bg);
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-empty {
  color: var(--muted);
  font-size: 13px;
}

.chat-msg {
  max-width: 88%;
  border-radius: 10px;
  padding: 8px;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid var(--border);
  background: var(--chat-msg-bg);
}

.chat-msg-own {
  align-self: flex-end;
  background: var(--chat-msg-own-bg);
  border-color: rgba(15, 74, 163, 0.25);
}

.chat-msg-in {
  align-self: flex-start;
}

.chat-msg-meta {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
}

#notificationPreviewText {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  line-clamp: 3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sync-status-ok {
  color: var(--ok);
  border-color: rgba(31, 139, 69, 0.35);
}

.sync-status-error {
  color: var(--danger);
  border-color: rgba(181, 45, 45, 0.35);
}

.sync-status-idle {
  color: var(--muted);
}

.welcome {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.welcome .brand {
  justify-content: flex-start;
}

.module-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: auto;
  gap: 10px;
  width: 100%;
}

.module-nav .nav-btn {
  text-align: center;
  width: 100%;
}

.payout-toolbar {
  margin-bottom: 8px;
}

.payout-title-with-suggest {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.payout-title-with-suggest-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.payout-title-input-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.payout-title-input-row input {
  flex: 1;
  min-width: 0;
}

.payout-suggest-title-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.payout-bottom-pdf-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.company-logo-preview-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.company-logo-preview {
  object-fit: contain;
  max-width: 180px;
  max-height: 72px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-bg, rgba(0, 0, 0, 0.03));
}

.company-logo-hint {
  margin-top: -4px;
}

.settings-hub-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.settings-hub-actions .home-nav-btn {
  width: 100%;
  min-height: 56px;
}

@media (max-width: 600px) {
  .settings-hub-actions {
    grid-template-columns: 1fr;
  }
}

.payment-saldo-cell {
  font-weight: 600;
}

.payment-saldo-cell.negative {
  color: var(--danger);
}

.payment-saldo-cell.muted {
  color: var(--muted, #666);
  font-weight: 500;
}

.payments-chain-heading {
  margin: 20px 0 10px;
  font-size: 1.05rem;
}

.user-payment-client-panel {
  margin-top: 8px;
}

.user-payment-client-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 6px;
}

.user-payment-client-title {
  margin: 0;
}

.user-payment-client-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.user-payment-client-sort {
  min-width: 200px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  font: inherit;
  font-size: 14px;
}

.user-payment-client-hint {
  margin: 0 0 10px;
}

.user-payment-client-table-wrap table.user-payment-client-table {
  min-width: 0;
  width: 100%;
}

.user-payment-client-table .payment-client-amount-head,
.user-payment-client-table .payment-client-amount {
  text-align: right;
  white-space: nowrap;
}

.payment-actions-cell {
  white-space: normal;
  vertical-align: middle;
  min-width: 120px;
}

.payment-act-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-act-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.payment-act-client {
  font-size: 12px;
  color: var(--muted);
  flex: 1 1 100px;
  min-width: 0;
  line-height: 1.3;
}

.report-pdf-actions {
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.archive-nav-unread {
  animation: archiveNavPulse 1.3s infinite;
  border-color: rgba(181, 45, 45, 0.65) !important;
  color: var(--danger) !important;
}

@keyframes archiveNavPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(181, 45, 45, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(181, 45, 45, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(181, 45, 45, 0);
  }
}

.home-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
}

.stats-toggle-btn .material-icons-round {
  font-size: 18px;
}

.home-actions {
  min-height: 180px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.home-nav-btn {
  min-height: 64px;
  font-size: 16px;
  padding: 14px 16px;
  width: 100%;
}

.stats-menu {
  margin-top: 8px;
}

.compact-cards {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.compact-cards .card {
  border-radius: 10px;
  padding: 8px 10px;
}

.compact-cards .card small {
  margin-bottom: 3px;
  font-size: 12px;
}

.compact-cards .card strong {
  font-size: 16px;
}

.nav-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
}

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

.card {
  background: var(--card-gradient);
  color: #fff;
  border-radius: 12px;
  padding: 12px;
}

.card small {
  display: block;
  color: var(--card-subtitle);
  margin-bottom: 6px;
}

.finance-kpi-card {
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.finance-result-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
}

.finance-result-pill.result-positive {
  background: rgba(31, 139, 69, 0.2);
  border-color: rgba(31, 139, 69, 0.55);
}

.finance-result-pill.result-negative {
  background: rgba(181, 45, 45, 0.2);
  border-color: rgba(181, 45, 45, 0.5);
}

.finance-result-pill.result-neutral {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
}

.annual-result-text.result-positive {
  color: var(--ok);
  font-weight: 700;
}

.annual-result-text.result-negative {
  color: var(--danger);
  font-weight: 700;
}

.annual-result-text.result-neutral {
  color: var(--muted);
  font-weight: 600;
}

.annual-finance-balance-display {
  border: 1px solid transparent !important;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  padding-left: 10px;
  padding-right: 10px;
  box-shadow: none;
}

.annual-finance-balance-display:focus {
  outline: none !important;
}

.annual-finance-balance-display.balance-positive {
  background: rgba(31, 139, 69, 0.2) !important;
  border-color: rgba(31, 139, 69, 0.5) !important;
  color: var(--ok) !important;
}

.annual-finance-balance-display.balance-negative {
  background: rgba(181, 45, 45, 0.2) !important;
  border-color: rgba(181, 45, 45, 0.5) !important;
  color: var(--danger) !important;
}

.annual-finance-balance-display.balance-neutral {
  background: rgba(105, 115, 135, 0.12) !important;
  border-color: rgba(105, 115, 135, 0.28) !important;
  color: var(--text) !important;
}

.annual-finance-inline-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.annual-finance-inline-item {
  min-width: 0;
}

@media (max-width: 980px) {
  .annual-finance-inline-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .annual-finance-inline-row {
    grid-template-columns: 1fr;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.company-contact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .company-contact-row {
    grid-template-columns: 1fr;
  }
}

.transport-route-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.transport-route-row label {
  min-width: 0;
}

.nested-panel {
  margin-top: 12px;
}

/* Izračun prevoza: glavni »oblak« (1–6) + desno cena */
.transport-quote-intro {
  margin: 0 0 12px;
  max-width: 70ch;
}

.transport-quote-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.transport-quote-main-cloud {
  flex: 1 1 22rem;
  min-width: 0;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: var(--panel-shadow);
}

.transport-quote-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transport-quote-aside {
  flex: 0 1 320px;
  min-width: min(320px, 100%);
  max-width: min(380px, 100%);
  position: sticky;
  top: 8px;
  align-self: flex-start;
}

.transport-quote-aside-card {
  margin-top: 0;
  padding: 12px 14px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--panel-shadow);
  min-width: 0;
  max-width: 100%;
}

/* Ožji stolpec: brez globalne 720px širine tabele */
#transportQuoteSummary.table-wrap {
  overflow-x: visible;
}

table.transport-quote-summary-table {
  min-width: 0 !important;
  width: 100%;
  table-layout: fixed;
}

.transport-quote-summary-table td {
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.transport-quote-summary-table td:first-child {
  width: 56%;
  padding-right: 8px;
}

.transport-quote-summary-table td:last-child {
  width: 44%;
  text-align: right;
}

.transport-quote-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 14px;
}

.transport-quote-card > h5 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.01em;
}

.transport-quote-card .form-grid {
  margin-bottom: 0;
  grid-template-columns: 1fr;
  gap: 10px;
}

.transport-quote-card .form-grid .full {
  grid-column: 1;
}

.transport-quote-card select,
.transport-quote-card input[type="text"],
.transport-quote-card input[type="number"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
}

.transport-quote-card select {
  appearance: auto;
  -webkit-appearance: menulist-button;
  line-height: normal;
  opacity: 1;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.transport-quote-card select:disabled {
  opacity: 1;
  cursor: default;
  color: var(--text);
  background: var(--surface-muted);
}

/* Namesto onemogočenega <select>: vedno viden tekst (iOS/Safari ne »pojeda« prikaza). */
.transport-quote-vehicle-readout {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  line-height: 1.35;
  display: flex;
  align-items: center;
  user-select: text;
  -webkit-user-select: text;
}

.transport-quote-maps {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 14px;
}

.transport-quote-maps-head {
  margin: 0 0 10px;
  font-weight: 700;
}

.transport-quote-map-img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-1);
}

.transport-quote-summary-table tr.transport-quote-subtotal-row td {
  background: linear-gradient(90deg, rgba(15, 74, 163, 0.1), rgba(15, 74, 163, 0.04));
  font-weight: 700;
  color: var(--text);
  border-bottom-color: var(--primary) !important;
}

html[data-theme="dark"] .transport-quote-summary-table tr.transport-quote-subtotal-row td {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.18), rgba(96, 165, 250, 0.06));
  border-bottom-color: var(--primary) !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .dashboard-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-grid--three {
    grid-template-columns: 1fr;
  }
}

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

.report-period-fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}

.report-period-fieldset legend {
  padding: 0 6px;
  font-weight: 600;
}

.report-period-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.report-period-btn {
  min-width: 120px;
}

.report-period-btn.is-active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
}

.dashboard-grid canvas {
  width: 100% !important;
  height: 220px !important;
  max-height: 220px;
}

.active-task-panel {
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.active-task-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.active-task-text {
  flex: 1;
  min-width: 0;
}

.active-task-meta-line {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.active-task-description {
  margin: 8px 0 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.active-task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.active-task-status-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.active-task-status-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.active-task-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.active-task-st.active-task-st--current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.active-task-st.active-task-st--current:hover {
  filter: brightness(1.05);
}

.mini-dashboard {
  margin-bottom: 16px;
}

.mini-dashboard-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mini-dashboard-item {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--mini-dashboard-item-bg);
}

.mini-dashboard-grid--year-stats {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mini-dashboard-value {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.mini-dashboard-value.result-positive {
  color: var(--ok);
}

.mini-dashboard-value.result-negative {
  color: var(--danger);
}

.mini-dashboard-value.result-neutral {
  color: var(--muted);
}

.mini-dashboard-label {
  font-size: 12px;
  color: var(--muted);
}

.mini-dashboard-admin-own {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--mini-dashboard-admin-bg);
}

.mini-dashboard-admin-own .mini-dashboard-label {
  margin: 0;
  font-weight: 600;
  color: var(--primary-dark);
}

.mini-dashboard-admin-own-value {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-dark);
}

.welcome-card-earnings {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.release-notes-panel {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.release-notes-panel h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.release-notes-intro {
  margin: 0 0 14px;
  max-width: 52rem;
}

.release-notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.release-note-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--release-note-card-bg);
}

.release-note-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.release-note-date {
  font-size: 13px;
  color: var(--muted);
}

.release-note-bullets {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.release-note-bullets li {
  margin-bottom: 4px;
}

.release-note-bullets li:last-child {
  margin-bottom: 0;
}

.release-notes-empty {
  margin: 0;
}

.permission-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.permissions-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.permissions-box legend {
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0 6px;
  width: 100%;
  margin-bottom: 4px;
}

.permission-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface-1);
  min-width: 220px;
}

.permission-item input {
  width: 16px;
  height: 16px;
}

.permissions-hint {
  margin: 0;
  width: 100%;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  /* Grid/flex: omogoči skrčitev, da select z dolgim besedilom ne “štrli” čez rob */
  min-width: 0;
  max-width: 100%;
}

.form-grid > label {
  min-width: 0;
}

/* Checkbox/radio pustimo na privzeti širini (npr. v gridu dovoljenj). */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--surface-1);
  color: var(--text) !important;
  -webkit-appearance: menulist;
  appearance: auto;
}

/* Samo input/textarea: -webkit-text-fill-color na native <select> v Safari/WebKit pogosto skrije izbrano vrednost (prazen prikaz). */
input,
textarea {
  -webkit-text-fill-color: var(--text) !important;
}

textarea {
  -webkit-appearance: none;
  appearance: none;
}

option {
  color: var(--text) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 74, 163, 0.2);
  border-color: var(--primary);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  outline-color: rgba(96, 165, 250, 0.35);
}

.password-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.password-wrap input {
  border: 0;
  border-radius: 0;
  flex: 1;
}

.icon-btn {
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--icon-btn-bg);
  color: var(--primary);
  padding: 9px 10px;
  cursor: pointer;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 500;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(8, 49, 118, 0.18);
  filter: drop-shadow(0 0 10px rgba(60, 132, 255, 0.35));
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(8, 49, 118, 0.14);
  filter: drop-shadow(0 0 6px rgba(60, 132, 255, 0.2));
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--btn-outline-bg);
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--primary-dark);
  background: var(--table-header-bg);
}

.mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-btn {
  border: 1px solid var(--border);
  background: var(--surface-1);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px 8px;
  font-size: 12px;
}

.mini-btn.icon-only {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-btn.icon-only .material-icons-round {
  font-size: 16px;
}

.mini-btn.delete {
  border-color: #f0c9c9;
  color: var(--danger);
}

.mini-btn.accept {
  border-color: #bfe8cd;
  background: #eafff0;
  color: #1f7a2f;
}

.mini-btn.reject {
  border-color: #f0c9c9;
  background: #fff0f0;
  color: var(--danger);
}

.doc-mini-actions .mini-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.doc-mini-actions .mini-btn .material-icons-round {
  font-size: 16px;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}

.employee-doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.employee-doc-review-list {
  max-height: 52vh;
  overflow: auto;
}

#employeeDocumentReviewDialog {
  width: min(860px, 96vw);
}

.hidden {
  display: none !important;
}

.message {
  min-height: 20px;
  margin-top: 6px;
  font-size: 14px;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--ok);
}

.locked-month {
  border-color: rgba(181, 45, 45, 0.65) !important;
  background: #fff3f3 !important;
}

.month-locked-hint {
  color: var(--danger);
  font-weight: 600;
}

.settings-sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(480px, 92vw);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--panel-shadow);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
}

html[data-theme="dark"] dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-form {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.month-lock-reject-btn {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--btn-outline-bg);
}

#monthLockChecklistDialog .form-actions {
  justify-content: center;
}

.two-factor-box {
  display: grid;
  gap: 10px;
}

.two-factor-qr-wrap {
  display: flex;
  justify-content: center;
}

.two-factor-qr {
  width: 220px;
  height: 220px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  padding: 8px;
}

#twoFactorSecret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

code {
  background: var(--gold-soft);
  color: var(--gold-badge-text);
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 840px) {
  /* iOS: prepreči zoom in “prazne” opcije pri select pickerju */
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .permission-item {
    min-width: 0;
    width: 100%;
  }

  .permissions-box {
    align-items: stretch;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .transport-route-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .welcome-user-row {
    flex-direction: column;
  }

  .welcome-user-text {
    text-align: center;
  }

  .topbar-actions,
  .module-nav {
    width: 100%;
    justify-content: center;
  }

  .topbar-actions {
    position: static;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .topbar-actions .action-item {
    display: none;
    width: 100%;
    justify-content: center;
  }

  .topbar-actions.expanded .action-item {
    display: inline-flex;
  }

  .module-nav {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .notification-bubble {
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
  }

  .notification-preview-bubble {
    top: 64px;
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  #chatBubble.chat-bubble {
    right: 10px;
    bottom: 10px;
    width: 52px;
    height: 52px;
  }

  .chat-widget-panel {
    right: 10px;
    bottom: 72px;
    width: calc(100vw - 20px);
    height: min(70vh, 520px);
  }

  .module-nav .nav-btn {
    white-space: normal;
  }

  .home-head {
    flex-direction: column;
    align-items: center;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .home-actions {
    grid-template-columns: 1fr;
  }

  .home-nav-btn {
    width: 100%;
    min-width: 0;
  }

  .panel {
    padding: 12px;
  }

  .app-footer {
    justify-content: center;
    text-align: center;
  }

  .home-cal-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .home-cal-cell {
    min-height: 72px;
  }

  /* Aktivna naloga: varen rob + prostor za fiksni gumb obvestil; drsi skupaj z vsebino (brez sticky). */
  .active-task-panel {
    margin-bottom: 12px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(58px, calc(12px + env(safe-area-inset-right, 0px)));
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
}

/* Koledar (začetna stran) */
.home-calendar-panel {
  margin-top: 8px;
}

.home-calendar-intro {
  margin-bottom: 10px;
}

.home-cal-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.home-cal-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.home-cal-filter--on {
  opacity: 1;
}

.home-cal-filter--off {
  opacity: 0.45;
  text-decoration: line-through;
  background: var(--cal-filter-off);
}

.home-cal-filter:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.home-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.home-cal-dot--work {
  background: #1f5cbc;
}

.home-cal-dot--task {
  background: #c45c12;
}

.home-cal-dot--transport {
  background: #2e7d4a;
}

.home-cal-dot--notification {
  background: #6b4fba;
}

.home-cal-dot--holiday {
  background: #b71c1c;
}

.home-cal-dot--note {
  background: #eab308;
}

.home-cal-dot--birthday {
  background: #db2777;
}

.home-cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.home-cal-today-btn {
  flex-shrink: 0;
  font-size: 0.9rem;
  padding: 6px 12px;
}

.home-cal-nav-btn {
  min-width: 40px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
}

.home-cal-month-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.home-cal-grid-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}

.home-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  background: var(--cal-weekdays-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
}

.home-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

.home-cal-cell {
  min-height: 92px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px 5px 6px;
  vertical-align: top;
  background: var(--cal-cell-bg);
}

.home-cal-cell:nth-child(7n) {
  border-right: none;
}

.home-cal-cell--empty {
  background: var(--cal-cell-empty);
  min-height: 92px;
}

.home-cal-cell--today {
  background: var(--cal-cell-today);
  box-shadow: inset 0 0 0 2px rgba(31, 92, 188, 0.35);
}

html[data-theme="dark"] .home-cal-cell--today {
  box-shadow: inset 0 0 0 2px rgba(96, 165, 250, 0.45);
}

.home-cal-cell--day {
  cursor: pointer;
}

.home-cal-daynum {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.home-cal-cell--today .home-cal-daynum {
  color: var(--primary-dark);
}

.home-cal-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 120px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.home-cal-item {
  font-size: 10px;
  line-height: 1.25;
  padding: 3px 4px;
  border-radius: 4px;
  border: 1px solid transparent;
  word-break: break-word;
}

.home-cal-item-k {
  font-weight: 700;
  margin-right: 2px;
}

.home-cal-item-sub {
  font-weight: 500;
  opacity: 0.95;
}

.home-cal-item--work {
  background: #e8f0ff;
  border-color: #c5d8f5;
  color: #0f2a5c;
}

.home-cal-item--task {
  background: #fff3e6;
  border-color: #f0d0b2;
  color: #5c2e0a;
}

.home-cal-item--task.home-cal-item--done {
  opacity: 0.65;
  text-decoration: line-through;
}

.home-cal-item--transport {
  background: #e8f5ec;
  border-color: #c5e0cd;
  color: #1b4d2e;
}

.home-cal-item--notification {
  background: #f1ecf9;
  border-color: #d6c8ea;
  color: #3d2a5c;
}

.home-cal-item--holiday {
  background: #ffebee;
  border-color: #ef9a9a;
  color: #7f1d1d;
}

.home-cal-item--note {
  background: #fefce8;
  border-color: #facc15;
  color: #713f12;
}

.home-cal-item--birthday {
  background: #fce7f3;
  border-color: #f9a8d4;
  color: #831843;
}

.mail-envelope-stage {
  overflow-x: auto;
  padding: 8px 0;
  display: flex;
  justify-content: center;
}

.mail-envelope-size-actions {
  justify-content: flex-end;
  gap: 8px;
}

.mail-envelope-size-actions .btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.mail-envelope-preview {
  width: 22cm;
  height: 11cm;
  min-width: 22cm;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.mail-envelope-watermark {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background: center / cover no-repeat url("posta/odzadje.png");
  transform: rotate(-35deg) scale(1.25);
  transform-origin: center;
}

.mail-envelope-recipient {
  position: absolute;
  right: 2.2cm;
  bottom: 1.8cm;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  z-index: 2;
  text-align: left;
}

.mail-envelope-sender {
  position: absolute;
  left: 0.4cm;
  top: 0.7cm;
  max-width: 11.6cm;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4mm;
}

.mail-envelope-sender-logo {
  width: 40mm;
  height: auto;
  max-height: 18mm;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.mail-envelope-sender-text {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  max-width: 74mm;
}

.mail-envelope-sender-text > div:first-child {
  font-weight: 700;
}

@media print {
  .mail-envelope-preview {
    border: none;
    border-radius: 0;
  }
}
