:root {
  --md-sys-color-primary: #2563eb;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #dbeafe;
  --md-sys-color-on-primary-container: #1e3a8a;
  --md-sys-color-secondary: #475569;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #f1f5f9;
  --md-sys-color-on-secondary-container: #0f172a;
  --md-sys-color-error: #dc2626;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-background: #f8fafc;
  --md-sys-color-on-background: #0f172a;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: #334155;
  --md-sys-color-on-support: #8996a8;
  --md-sys-color-surface-container: #ffffff;
  --md-sys-color-surface-container-high: #f1f5f9;
  --md-sys-color-outline: #e2e8f0;
  --md-sys-color-success: #16a34a;
  --md-sys-color-success-container: #dcfce7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: 'Roboto', sans-serif;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  overflow: hidden;
}
body.login {
  justify-content: center;
  align-items: center;
  padding: 0 10%;
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
.spin {
  animation: spin 2s linear infinite;
}
.app-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  flex-direction: column;
}
@media (min-width: 769px) {
  .app-layout {
    flex-direction: row;
  }
}
.right-content {
  overflow-y: auto;
  height: 100%;
  width: 100%;
  padding-bottom: 100px;
}
.right-content .tabs {
  display: flex;
  width: calc(100% + 50px);
  margin-left: -25px;
  padding: 0;
  background: white;
  border-radius: 50px;
}
.right-content .tab {
  flex: 1 1 0;
  height: 65px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 35px;
  background: transparent;
  color: #1D1B20;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s, color 0.2s;
}
.right-content .tab .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.right-content .tab:hover {
  background: rgba(32, 100, 241, 0.08);
}
.right-content .tab.active {
  background: #dfe7fa;
  color: #2563eb;
}
.right-content .tab.active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}
.main-content {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 100px;
}
.main-content .bank-results {
  border-radius: 12px;
  margin-top: 20px;
  margin-bottom: 80px;
  display: none;
}
.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  flex-grow: 1;
  overflow-y: auto;
  background: var(--md-sys-color-background);
  height: calc(100vh - 80px - env(safe-area-inset-bottom, 0));
  padding-bottom: 50px;
}
@media (min-width: 769px) {
  .main-container {
    height: calc(100vh - 70px - env(safe-area-inset-bottom, 0));
  }
}
.main-container .left-panel {
  width: 40%;
  padding: 24px;
  overflow-y: auto;
  background-color: var(--md-sys-color-background);
  border-right: 1px solid var(--md-sys-color-surface-container-high);
}
@media (min-width: 769px) and (max-width: 1680px) {
  .main-container .left-panel {
    width: 50%;
  }
}
.main-container .right-panel {
  flex: 1;
  background-color: var(--md-sys-color-surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.main-container .right-panel md-icon {
  width: 64px;
  height: 64px;
  color: var(--md-sys-color-outline) !important;
}
.main-container .right-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
.tab-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}
.action-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 12px 12px;
}
.header-link {
  color: inherit;
  text-decoration: none;
}
.badge-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
}
.badge-locked md-icon {
  font-size: 16px;
  vertical-align: -3px;
}
.hours-tooltip-trigger {
  position: relative;
  cursor: help;
  white-space: nowrap;
}
.hours-tooltip-trigger[title]:hover::after {
  content: attr(title);
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #1e293b;
  color: #f8fafc;
  font-size: 12px;
  font-family: monospace;
  white-space: pre;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  line-height: 1.7;
  min-width: 200px;
  text-align: left;
}
.ta-right {
  text-align: right;
}
.clickable {
  cursor: pointer;
}
.text-success {
  color: var(--md-sys-color-success);
}
.print-only {
  display: none;
}
.attendance-manager-top {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tabs--mb {
  margin-bottom: 24px;
}
.tab-header-row .section-title {
  margin: 0;
}
.tab-header-row--tight {
  margin-bottom: 12px;
}
.tab-header-actions {
  display: flex;
  gap: 12px;
}
.th-info-icon {
  font-size: 13px;
  vertical-align: -2px;
  color: #94a3b8;
}
.hint-icon {
  font-size: 14px;
  vertical-align: -2px;
  color: #94a3b8;
  cursor: help;
}
.account-mono {
  font-family: monospace;
  font-size: 12px;
  color: #475569;
}
.abo-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.abo-check input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--md-sys-color-primary);
  flex: 0 0 auto;
}
.abo-check--na {
  cursor: default;
  padding-left: 24px;
}
.tfoot-total-row {
  font-weight: bold;
  background-color: #f8f9fa;
  border-top: 2px solid #dee2e6;
}
.tfoot-prediction-row {
  font-weight: bold;
  background-color: #e2f0d9;
  color: #385723;
}
.prediction-note {
  font-weight: normal;
  font-size: 0.85em;
  color: #555;
}
.af-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.af-right {
  display: flex;
  gap: 10px;
}
.footer-note {
  font-size: 13px;
  color: #64748b;
}
.logs-summary-card .logs-summary-grid.logs-summary-grid--reports {
  grid-template-columns: repeat(3, 1fr) 1.4fr;
}
.user-card .user-details.user-details--outline {
  border-top: 1px solid var(--md-sys-color-outline);
}
.user-actions--mt {
  margin-top: 12px;
}
.vacation-remaining-row {
  margin-top: 8px;
  border-top: 1px dashed var(--md-sys-color-outline);
  padding-top: 8px;
}
.attendance-section-card--mb {
  margin-bottom: 28px;
}
.td-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
#vacation-dialog,
#add-shift-dialog {
  max-width: 460px;
}
#edit-shift-dialog {
  max-width: 420px;
}
#vacation-detail-dialog {
  max-width: 500px;
}
#vacation-dialog h2,
#add-shift-dialog h2 {
  margin-bottom: 20px;
}
#edit-shift-dialog h2 {
  margin-bottom: 8px;
}
#vacation-dialog .modal-actions-row,
#add-shift-dialog .modal-actions-row,
#edit-shift-dialog .modal-actions-row {
  margin-top: 8px;
}
.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
#vacation_hours_wrapper {
  display: none;
}
.vacation-hint-box {
  font-size: 13px;
  color: var(--md-sys-color-secondary);
  line-height: 1.4;
  font-style: italic;
  background: var(--md-sys-color-secondary-container);
  padding: 12px;
  border-radius: 8px;
}
.vdetail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
#vdetail-pop-title {
  margin: 0;
  font-size: 18px;
}
.vdetail-table-wrap {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 16px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
}
.vdetail-table-wrap .m3-table {
  margin-top: 0;
}
.dialog-subtitle {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--md-sys-color-on-surface-variant);
}
.dialog-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.dialog-hint md-icon {
  font-size: 18px;
  flex: none;
  margin-top: 1px;
}
.dialog-hint strong {
  font-weight: 600;
}
.dialog-hint[hidden] {
  display: none;
}
.bonus-cell {
  white-space: nowrap;
}
.bonus-add-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0 2px;
  margin-left: 6px;
  color: var(--md-sys-color-primary);
  vertical-align: -4px;
}
.bonus-add-btn md-icon {
  font-size: 18px;
}
.bonus-add-btn:hover {
  opacity: 0.75;
}
#bonus-dialog .modal-actions-row {
  margin-top: 8px;
}
.bonus-dialog-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 4px 0 8px;
}
.bonus-list {
  margin-bottom: 14px;
}
.bonus-list-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 6px 0;
}
.bonus-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}
.bonus-list-item:last-child {
  border-bottom: 0;
}
.bonus-list-note {
  flex: 1;
  color: #0f172a;
}
.bonus-list-amount {
  font-weight: 600;
  color: var(--md-sys-color-success);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bonus-list-del {
  border: none;
  background: none;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 1.2rem;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 6px;
}
.bonus-list-del:hover {
  color: var(--md-sys-color-error);
  background: #fef2f2;
}
.m3-top-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  border-bottom: 1px solid var(--md-sys-color-surface-container-high);
}
.m3-top-app-bar h1 {
  font-size: 22px;
  font-weight: 400;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.m3-top-app-bar a {
  text-decoration: none;
  transition: color 0.3s;
  color: var(--md-sys-color-on-surface);
}
.m3-top-app-bar a:hover {
  color: var(--md-sys-color-primary);
}
.m3-top-app-bar a .small {
  font-size: 60%;
}
@media (max-width: 900px) {
  .m3-top-app-bar a .small {
    display: none;
  }
}
.company-switcher {
  position: relative;
}
.company-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 10px;
  background: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.company-switcher-btn .material-symbols-outlined {
  font-size: 18px;
}
.company-switcher-btn:hover {
  background: var(--md-sys-color-primary-container);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary-container);
}
.company-switcher-chevron {
  transition: transform 0.2s;
}
.company-switcher-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 200;
}
.company-switcher-dropdown.open {
  display: block;
}
.company-switcher-dropdown form {
  margin: 0;
  padding: 4px;
}
.company-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.company-switcher-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--md-sys-color-on-support);
}
.company-switcher-item:hover {
  background: var(--md-sys-color-surface-container-high);
}
.company-switcher-item.active {
  font-weight: 600;
  color: var(--md-sys-color-primary);
}
.company-switcher-item.active .material-symbols-outlined {
  color: var(--md-sys-color-primary);
}
.company-switcher-btn[aria-expanded="true"] .company-switcher-chevron {
  transform: rotate(180deg);
}
.company-switcher-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
}
.company-switcher-backdrop.open {
  display: block;
}
@media (max-width: 480px) {
  .company-switcher-name {
    display: none;
  }
  .company-switcher-btn {
    padding: 7px 8px;
    gap: 2px;
  }
}
.nav-rail {
  background: #fff;
  display: flex;
  z-index: 10;
  transition: all 0.3s ease;
  width: 100%;
  height: 80px;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  border-top: 1px solid var(--md-sys-color-outline-variant, #cac4d0);
}
@media (min-width: 769px) {
  .nav-rail {
    width: 80px;
    height: calc(100vh - 59px);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 24px;
    border-top: none;
    border-right: 1px solid var(--md-sys-color-surface-container-high);
    gap: 16px;
  }
}
.nav-rail .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  gap: 4px;
  cursor: pointer;
  flex: 1;
}
@media (min-width: 769px) {
  .nav-rail .nav-item {
    width: 100%;
    flex: none;
  }
}
.nav-rail .nav-item .icon-container {
  width: 56px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  transition: background-color 0.2s, color 0.2s;
  color: #b8c1cc !important;
  position: relative;
}
.nav-rail .nav-item .icon-container .nav-badge {
  position: absolute;
  top: -3px;
  right: 8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #dc2626;
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--md-sys-color-surface, #f7f9fc);
}
.nav-rail .nav-item span {
  font-size: 12px;
  font-family: system-ui, sans-serif;
  text-align: center;
  font-weight: 600;
}
.nav-rail .nav-item:hover .icon-container {
  background-color: var(--md-sys-color-surface-variant, rgba(0, 0, 0, 0.08));
}
.nav-rail .nav-item.active {
  color: var(--md-sys-color-on-surface, #1d1b20);
}
.nav-rail .nav-item.active .icon-container {
  background-color: #dfe7fa;
  color: var(--md-sys-color-primary) !important;
}
.nav-rail .nav-item.active span {
  color: var(--md-sys-color-primary);
}
.nav-rail .nav-extra {
  display: flex;
  flex-direction: row;
  gap: 16px;
}
.nav-rail .nav-extra .nav-extra-module {
  display: none;
}
@media (min-width: 769px) {
  .nav-rail .nav-extra {
    flex-direction: column;
    width: 100%;
    gap: 16px;
    margin-top: auto;
    margin-bottom: 50px;
  }
}
.nav-rail .nav-more-trigger {
  display: none;
}
.nav-extra-backdrop {
  display: none;
}
.mobile-preview-btn {
  display: none !important;
}
.m3-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
}
.m3-table th {
  text-align: left;
  padding: 12px 6px;
  border-bottom: 2px solid var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
}
.m3-table th.ta-right {
  text-align: right;
}
.m3-table td {
  padding: 12px;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}
.m3-table .status-row-vacation {
  background-color: #e1f5fe;
}
.m3-table .status-row-vacation:hover {
  background-color: #b3e5fc;
}
.m3-table .vacation-type {
  background: #0288d1;
  color: #fff;
}
.m3-table .btn-fix-shift {
  --md-text-button-label-text-size: 12px;
  height: 28px;
}
.m3-table .text-disabled {
  color: #b0bec5;
  font-size: 12px;
  font-style: italic;
}
.attendance-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 24px;
}
.attendance-section-card .m3-table {
  margin-top: 0 !important;
  color: #334155;
}
.attendance-section-card .m3-table thead {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.attendance-section-card .m3-table thead th {
  padding: 14px 8px;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  letter-spacing: 0.01em;
  text-align: left;
}
.attendance-section-card .m3-table thead th.col-date {
  padding-right: 0;
}
.attendance-section-card .m3-table thead th.col-bonus,
.attendance-section-card .m3-table thead th.col-tips,
.attendance-section-card .m3-table thead th.col-tips-cash {
  max-width: 70px;
}
.attendance-section-card .m3-table thead th.col-workers {
  max-width: 45px;
}
.attendance-section-card .m3-table thead th.ta-right {
  text-align: right;
}
.attendance-section-card .m3-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}
.attendance-section-card .m3-table tbody tr:last-child {
  border-bottom: none;
}
.attendance-section-card .m3-table tbody tr:hover {
  background-color: #f8fafc;
}
.attendance-section-card .m3-table tbody tr.status-row-active {
  background-color: rgba(37, 99, 235, 0.01);
}
.attendance-section-card .m3-table tbody tr.status-row-active:hover {
  background-color: rgba(37, 99, 235, 0.03);
}
.attendance-section-card .m3-table tbody tr.status-row-error {
  background-color: rgba(239, 68, 68, 0.01);
}
.attendance-section-card .m3-table tbody tr.status-row-error:hover {
  background-color: rgba(239, 68, 68, 0.03);
}
.attendance-section-card .m3-table tbody tr.status-row-vacation {
  background-color: rgba(14, 165, 233, 0.01);
}
.attendance-section-card .m3-table tbody tr.status-row-vacation:hover {
  background-color: rgba(14, 165, 233, 0.03);
}
.attendance-section-card .m3-table tbody td {
  padding: 14px 8px;
  vertical-align: middle;
  line-height: 1.5;
}
.attendance-section-card .m3-table tbody td strong {
  color: #0f172a;
  font-weight: 500;
}
.attendance-section-card .m3-table tbody td .account-code {
  background-color: #f1f5f9;
  color: #334155;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}
.attendance-section-card .m3-table tbody td .badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.attendance-section-card .m3-table tbody td .badge.active {
  background-color: #dbeafe;
  color: #1e40af;
}
.attendance-section-card .m3-table tbody td .badge.error {
  background-color: #fee2e2;
  color: #991b1b;
}
.attendance-section-card .m3-table tbody td.col-date {
  padding-right: 0;
}
.attendance-section-card .m3-table tbody td.col-workers {
  text-align: center;
}
.attendance-section-card .m3-table tbody td.col-bonus {
  color: var(--md-sys-color-primary);
}
.attendance-section-card .m3-table tbody td.col-tips,
.attendance-section-card .m3-table tbody td.col-tips-cash {
  color: #16a34a;
}
.attendance-section-card .m3-table tbody td.col-vacation {
  text-align: center;
  color: var(--md-sys-color-secondary);
  font-weight: 500;
}
.attendance-section-card .m3-table tbody td .text-disabled {
  color: #94a3b8;
  font-size: 13px;
}
#m3-snackbar {
  visibility: hidden;
  min-width: 250px;
  background-color: #322f2c;
  color: #f4eae4;
  text-align: left;
  border-radius: 8px;
  padding: 14px 24px;
  position: fixed;
  z-index: 9999;
  left: 24px;
  bottom: 24px;
  font-size: 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s, bottom 0.3s;
}
#m3-snackbar.show {
  visibility: visible;
  opacity: 1;
  bottom: 32px;
}
.adjusted-badge {
  background: #fff3e0;
  color: #e65100;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ffe0b2;
  margin-left: 8px;
  display: inline-block;
}
.holiday-rate-icon {
  font-size: 18px;
  vertical-align: middle;
  margin-left: 4px;
  color: #c62828;
  cursor: help;
}
.request-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 10px;
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
  font-size: 12px;
  font-weight: 700;
}
.pending-badge {
  margin-left: 4px;
  cursor: default;
}
.off-floor-badge {
  background: #e8eaf6;
  color: #3949ab;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #c5cae9;
  margin-left: 8px;
  display: inline-block;
  cursor: help;
}
.col-actions-inner {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.history-badge {
  cursor: pointer;
  font-size: 21px;
  color: var(--md-sys-color-on-support, #8996a8);
  transition: color 0.15s ease;
}
.history-badge:hover {
  color: var(--md-sys-color-primary);
}
.shift-history-box {
  margin-top: 4px;
}
.shift-history-box .shift-history-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
  margin-bottom: 6px;
}
.shift-history-box .shift-history-entry {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 6px;
}
.shift-history-box .shift-history-entry .shift-history-line {
  display: block;
}
.shift-history-box .shift-history-entry .shift-history-meta {
  color: #64748b;
  font-size: 12px;
}
.shift-history-box .shift-history-entry--rejected {
  background: #fef2f2;
  border-color: #fecaca;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.btn-icon .material-symbols-outlined {
  font-size: 20px;
}
.btn-icon:hover {
  background: #f1f5f9;
  color: #334155;
}
.btn-icon--disabled {
  opacity: 0.35;
  pointer-events: none;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0;
}
.section-title md-icon {
  color: var(--md-sys-color-primary, #2563eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.saas-select {
  background-color: #ffffff;
  color: #0f172a;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 36px 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  height: 40px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.saas-select:hover {
  border-color: #94a3b8;
}
.saas-select:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.m3-dialog {
  border: none;
  border-radius: 28px;
  padding: 24px;
  background: #fff;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
.m3-dialog h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--md-sys-color-primary);
}
.m3-dialog .form-row-vertical {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m3-dialog .form-row-vertical label {
  font-size: 13px;
  font-weight: 700;
  color: #444;
}
.m3-dialog .m3-date-input {
  height: 48px;
  border: 1px solid #79747e;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 16px;
  outline: none;
}
.m3-dialog .modal-actions-row {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.m3-dialog .input-fullwidth {
  width: 100%;
}
.dash-task__who {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--md-sys-color-on-surface, #334155);
}
.dash-task__who .material-symbols-outlined {
  font-size: 14px;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dash-task__badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.dash-task__badge.is-asap {
  background: var(--md-sys-color-error-container, #fee2e2);
  color: var(--md-sys-color-error, #dc2626);
}
.dash-task__badge.is-week {
  background: #fef3c7;
  color: #b45309;
}
.dash-task__badge.is-no_rush {
  background: var(--md-sys-color-surface-container-high, #f1f5f9);
  color: #64748b;
}
.dash-task__badge.is-date {
  background: var(--md-sys-color-primary-container, #dbeafe);
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
}
.dash-task__badge.is-overdue {
  background: var(--md-sys-color-error, #dc2626);
  color: #fff;
}
.m3-dialog--task-detail {
  max-width: 460px;
}
.m3-dialog--task-detail .task-detail__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--md-sys-color-on-background, #0f172a);
  word-break: break-word;
}
.m3-dialog--task-detail .task-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.m3-dialog--task-detail .task-detail__note {
  font-size: 13.5px;
  line-height: 1.55;
  white-space: normal;
  color: var(--md-sys-color-on-surface, #334155);
  background: var(--md-sys-color-surface-container, #f7f9fc);
  border-radius: 10px;
  padding: 12px 14px;
}
.m3-dialog--task-detail .task-detail__note--empty {
  color: var(--md-sys-color-on-support, #8996a8);
  font-style: italic;
}
.m3-dialog--task-detail .task-detail__hist {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--md-sys-color-on-support, #8996a8);
}
.m3-dialog--task-detail .task-detail__hist b {
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #334155);
}
.m3-dialog--task-detail .task-detail__hist--done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--md-sys-color-success, #16a34a);
}
.m3-dialog--task-detail .task-detail__hist--done .material-symbols-outlined {
  font-size: 14px;
}
.m3-dialog--task-detail .task-detail__actions {
  margin-top: 16px;
}
.m3-dialog--task-detail .task-detail__btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--md-sys-color-primary, #2563eb);
  color: var(--md-sys-color-on-primary, #fff);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}
.m3-dialog--task-detail .task-detail__btn .material-symbols-outlined {
  font-size: 18px;
}
.m3-dialog--task-detail .task-detail__btn:hover:not(:disabled) {
  filter: brightness(1.08);
}
.m3-dialog--task-detail .task-detail__btn:disabled {
  opacity: 0.65;
  cursor: default;
}
.m3-dialog--task {
  max-width: 520px;
}
.m3-dialog--task .task-seg {
  display: flex;
  gap: 6px;
}
.m3-dialog--task .task-seg label {
  flex: 1;
  min-width: 0;
}
.m3-dialog--task .task-seg input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.m3-dialog--task .task-seg span {
  display: block;
  text-align: center;
  cursor: pointer;
  padding: 9px 8px;
  border-radius: 999px;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  font-size: 13px;
  color: var(--md-sys-color-on-surface, #334155);
  line-height: 1.2;
}
.m3-dialog--task .task-seg input:checked + span {
  background: var(--md-sys-color-primary-container, #dbeafe);
  border-color: var(--md-sys-color-primary, #2563eb);
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
  font-weight: 700;
}
.m3-dialog--task .task-seg input:focus-visible + span {
  outline: 2px solid var(--md-sys-color-primary, #2563eb);
  outline-offset: 2px;
}
.m3-dialog--task .task-seg--wrap {
  flex-wrap: wrap;
}
.m3-dialog--task .task-seg--wrap label {
  flex: 1 1 45%;
}
.m3-dialog--task .task-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #79747e;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  outline: none;
}
.m3-dialog--task .task-optional {
  font-weight: 400;
  color: var(--md-sys-color-on-support, #8996a8);
}
.m3-dialog--task select.m3-date-input {
  background: #fff;
  cursor: pointer;
}
#drop-zone {
  border: 2px dashed var(--md-sys-color-primary);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
  margin-bottom: 24px;
  color: var(--md-sys-color-on-surface);
  background: #dfe7fa;
}
#drop-zone:hover,
#drop-zone.dragover {
  background-color: #fff;
}
#drop-zone md-icon {
  font-size: 48px;
  width: 48px;
  height: 48px;
  color: var(--md-sys-color-primary);
}
#upload-mobile-actions {
  display: none;
  gap: 12px;
  margin-bottom: 24px;
}
#upload-mobile-actions .upload-action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 12px;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
  border: 1px solid var(--md-sys-color-outline-variant, #e2e8f0);
  background: #fff;
  color: var(--md-sys-color-on-surface);
}
#upload-mobile-actions .upload-action span {
  font-size: 13px;
  font-weight: 600;
}
#upload-mobile-actions .upload-action md-icon {
  font-size: 28px;
  width: 28px;
  height: 28px;
  color: var(--md-sys-color-primary);
}
#upload-mobile-actions .upload-action--camera {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary, #fff);
}
#upload-mobile-actions .upload-action--camera md-icon {
  color: var(--md-sys-color-on-primary, #fff);
}
.date-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.date-picker-wrapper label {
  font-size: 12px;
  color: var(--md-sys-color-primary);
  font-weight: 500;
  padding-left: 4px;
}
.date-picker-wrapper input[type="date"] {
  padding: 12px 16px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.date-picker-wrapper input[type="date"]:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}
.date-picker-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s;
  padding: 4px;
}
.date-picker-wrapper input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}
.sensitive-data {
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.blur-active .sensitive-data {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.6;
}
.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
#ai-loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--md-sys-color-surface);
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0.95;
}
#ai-loading-overlay h3 {
  margin-top: 24px;
  color: var(--md-sys-color-primary);
  font-weight: 400;
}
#ai-loading-overlay p {
  color: var(--md-sys-color-on-surface);
}
#email-notification-box {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
}
#email-notification-box .enb-text {
  font-size: 14px;
}
#drop-zone .dz-title {
  font-size: 16px;
  font-weight: 500;
  margin: 12px 0 4px 0;
}
#drop-zone .dz-hint {
  font-size: 14px;
  margin: 0;
}
#file-input,
#file-input-camera {
  display: none;
}
.m3-list-empty {
  padding: 16px;
  font-size: 14px;
  color: var(--md-sys-color-on-support);
}
.m3-list-empty--muted {
  color: var(--md-sys-color-outline);
}
.m3-list-section h2 md-icon,
.m3-list-item-headline md-icon {
  font-size: 20px;
}
.icon-success {
  color: #16a34a;
}
.m3-list-item--error {
  cursor: pointer;
  background-color: var(--md-sys-color-error-container);
  border-radius: 8px;
  margin-bottom: 8px;
}
.m3-list-item--error .m3-list-item-headline,
.m3-list-item--error .m3-list-item-supporting,
.m3-list-item--error md-icon {
  color: var(--md-sys-color-on-error-container);
}
.m3-list-item--error md-icon-button {
  --md-icon-button-icon-color: var(--md-sys-color-on-error-container);
}
.m3-list-item--clickable {
  cursor: pointer;
}
.m3-list .number {
  color: var(--md-sys-color-outline);
  font-weight: bold;
}
.m3-list-section--spaced {
  margin-top: 32px;
}
#invoice-editor {
  display: none;
}
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.editor-title {
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  color: var(--md-sys-color-primary);
}
#edit-model-used {
  font-size: 12px;
  color: #a6adb6;
  margin-top: 4px;
}
.editor-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.editor-section-title {
  font-size: 16px;
  font-weight: 500;
  margin-top: 32px;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-primary);
  padding-bottom: 8px;
}
#invoice-editor md-filled-text-field,
#invoice-editor md-filled-select {
  width: 100%;
  min-width: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.form-full--my16 {
  margin-top: 16px;
  margin-bottom: 16px;
}
.paid-checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}
.paid-checkbox-row label {
  font-size: 14px;
  cursor: pointer;
}
.md-btn-error-primary {
  --md-sys-color-primary: var(--md-sys-color-error);
}
.text-error {
  color: var(--md-sys-color-error);
}
.spacer {
  flex-grow: 1;
}
.pdf-empty {
  text-align: center;
  color: var(--md-sys-color-outline);
}
.pdf-empty md-icon {
  font-size: 64px;
  color: var(--md-sys-color-secondary);
}
.pdf-empty p {
  font-size: 16px;
  margin-top: 16px;
}
#preview-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: 95vw;
  height: 90vh;
  max-width: 1200px;
  background: var(--md-sys-color-surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.preview-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--md-sys-color-surface-variant);
}
.preview-dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
}
#modal-pdf-content {
  height: calc(100% - 65px);
  overflow: auto;
  background: var(--md-sys-color-surface-container-low);
}
#drop-zone.drop-zone--compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  min-height: unset;
  flex-direction: row;
  justify-content: flex-start;
  margin-bottom: 16px;
}
#drop-zone.drop-zone--compact md-icon {
  font-size: 24px;
  flex-shrink: 0;
}
#drop-zone.drop-zone--compact .dz-label {
  font-size: 14px;
  font-weight: 500;
}
#drop-zone.drop-zone--compact .dz-sublabel {
  font-size: 13px;
  color: var(--md-sys-color-outline);
  margin-left: 4px;
}
#search-wrapper {
  margin-bottom: 20px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  padding: 10px 16px;
}
.search-box md-icon {
  font-size: 20px;
  color: var(--md-sys-color-outline);
  flex-shrink: 0;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--md-sys-color-on-surface);
  font-family: inherit;
}
.search-box .search-clear {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--md-sys-color-on-support);
}
.search-box .search-clear[hidden] {
  display: none;
}
.search-box .search-clear:hover {
  color: var(--md-sys-color-error);
}
.search-box .search-clear md-icon {
  color: inherit;
}
.icon-danger {
  color: #dc2626;
}
.meta-small {
  font-size: 11px;
  color: var(--md-sys-color-outline);
}
.m3-list-item.is-overdue {
  border-left: 3px solid var(--md-sys-color-error);
  padding-left: 13px;
}
.badge-overdue {
  font-size: 11px;
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}
.btn-quick-pay {
  color: #16a34a;
  flex-shrink: 0;
}
.paid-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  white-space: nowrap;
}
.paid-flag md-icon {
  font-size: 14px;
}
.paid-flag--loading {
  color: var(--md-sys-color-outline);
}
.paid-flag--paid {
  background: #dcfce7;
  color: #15803d;
}
.paid-flag--partial {
  background: #fef9c3;
  color: #a16207;
}
.paid-flag--unpaid {
  background: #fee2e2;
  color: #b91c1c;
}
.m3-list-item-headline md-icon.icon-link {
  font-size: 16px;
  color: var(--md-sys-color-primary);
}
#edit-meta {
  font-size: 12px;
  color: var(--md-sys-color-outline);
  margin-top: 2px;
}
#btn-mark-paid {
  display: none;
}
md-filled-text-field,
md-filled-select {
  --md-filled-text-field-container-color: #ffffff;
  --md-filled-text-field-hover-container-color: #ffffff;
  --md-filled-text-field-focus-container-color: #ffffff;
  --md-filled-select-text-field-container-color: #ffffff;
  --md-filled-select-text-field-hover-container-color: #ffffff;
  --md-filled-select-text-field-focus-container-color: #ffffff;
  --md-filled-text-field-hover-state-layer-color: transparent;
  --md-filled-text-field-hover-state-layer-opacity: 0;
  --md-filled-text-field-active-indicator-height: 0px;
  --md-filled-text-field-hover-active-indicator-height: 0px;
  --md-filled-text-field-focus-active-indicator-height: 0px;
  --md-filled-select-text-field-active-indicator-height: 0px;
  --md-filled-select-text-field-hover-active-indicator-height: 0px;
  --md-filled-select-text-field-focus-active-indicator-height: 0px;
  --md-filled-text-field-container-shape: 4px;
  --md-filled-select-text-field-container-shape: 4px;
  --md-filled-text-field-label-text-color: #64748b;
  --md-filled-select-label-text-color: #64748b;
  --md-sys-color-on-surface-variant: #a2a2a2;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  transition: border-color 0.2s ease;
}
md-filled-text-field:focus-within,
md-filled-select:focus-within {
  border-color: #64748b;
}
md-outlined-text-field,
md-outlined-select {
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.form-grid .form-full {
  grid-column: 1 / -1;
}
.form-grid .background-color {
  background: var(--md-sys-color-secondary-container);
  padding: 24px;
  border-radius: 10px;
  margin-top: 16px;
}
.form-grid .background-color input {
  background: var(--md-sys-color-background);
}
#edit-price-type {
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}
#items-table-body tr {
  transition: background-color 0.2s ease;
}
#items-table-body tr:hover {
  background-color: var(--md-sys-color-secondary-container);
}
#items-table-body td:first-child {
  width: 100%;
}
#items-table-body input[name*="[name]"] {
  width: 100%;
}
#items-table-body input[name*="[quantity]"] {
  width: 35px;
  text-align: center;
}
#items-table-body input[name*="[unit_price]"] {
  width: 55px;
}
#items-table-body select[name*="[vat_rate]"] {
  width: 75px;
}
#items-table-body input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
#items-table-body input[type="number"]::-webkit-outer-spin-button,
#items-table-body input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
#items-table-body input,
#items-table-body select {
  background-color: #ffffff !important;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  padding: 8px;
  color: inherit;
}
.input-with-unit {
  display: flex;
  align-items: center;
  gap: 6px;
}
.input-unit {
  font-size: 14px;
  color: var(--md-sys-color-outline);
}
.m3-list-section h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-primary);
  margin: 24px 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.m3-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.m3-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.m3-list-item:hover {
  background-color: var(--md-sys-color-outline);
}
.m3-list-item:hover .m3-list-item-headline {
  color: var(--md-sys-color-primary);
}
.m3-list-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.m3-list-item-headline {
  font-size: 16px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  min-width: 0;
}
.m3-list-item-headline span.number {
  width: 30px;
  flex-shrink: 0;
}
.m3-list-item-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.m3-list-item > md-icon,
.m3-list-item > md-icon-button {
  flex-shrink: 0;
}
.m3-list-item-supporting {
  font-size: 14px;
  color: var(--md-sys-color-on-support);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.m3-list-item-supporting span {
  flex: 1;
  min-width: 0;
  border-left: 1px solid #c0cddf;
  padding-left: 10px;
}
.m3-list-item-supporting span:first-of-type {
  padding-left: 31px;
  border-left: 0;
}
.m3-list-item-supporting span strong {
  display: block;
}
.m3-list-item-supporting span.inv-check {
  flex: 0 0 auto;
  border-left: 0;
  padding-left: 0 !important;
}
.m3-list-item .delete {
  color: var(--md-sys-color-on-support);
}
.m3-list-item .delete:hover {
  color: var(--md-sys-color-error) !important;
}
.m3-list.sent .m3-list-item {
  background-color: white;
  border-radius: 12px;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high);
}
.m3-list.sent .m3-list-item-headline {
  padding-bottom: 3px;
}
.m3-list.sent .m3-list-item-supporting {
  font-size: 11px;
}
.m3-list.sent .m3-list-item-supporting span {
  border-left: 1px solid #c0cddf;
  padding-left: 10px;
}
.m3-list.sent .m3-list-item-supporting span:first-of-type {
  padding-left: 38px;
  border-left: 0;
}
.m3-list.sent .m3-list-item-supporting span strong {
  display: inline-block;
}
.bank-controls {
  background: var(--md-sys-color-surface-container);
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.bank-results {
  background: var(--md-sys-color-surface);
  border-radius: 16px;
  padding: 24px;
  min-height: 300px;
}
.unpaired-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.unpaired-item:last-child {
  border-bottom: none;
}
.amount-negative {
  color: var(--md-sys-color-error);
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}
.bank-hint {
  font-size: 12px;
  font-weight: normal;
  font-style: italic;
  color: var(--md-sys-color-on-support);
  margin-left: 6px;
}
.bank-tx-card .bank-tx-card-content {
  flex-direction: row;
}
.bank-statements-section {
  margin-top: 24px;
}
.bank-statements-section .statements-loading {
  text-align: center;
  color: var(--md-sys-color-outline);
  padding: 40px 0;
}
.bank-statements-section .statements-loading p {
  margin-top: 16px;
  color: var(--md-sys-color-primary);
  font-weight: 500;
  font-size: 15px;
}
.bank-statements-section .statements-empty {
  text-align: center;
  color: var(--md-sys-color-outline);
  padding: 40px 0;
}
.bank-statements-section .statements-empty span {
  font-size: 48px;
  opacity: 0.5;
  display: block;
  margin-bottom: 12px;
}
.bank-statements-section .statements-error {
  padding: 16px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  text-align: center;
  font-family: monospace;
}
.bank-statements-section .statements-header {
  margin-bottom: 20px;
}
.bank-statements-section .statements-header .statements-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bank-statements-section .statements-header .statements-title span {
  color: var(--md-sys-color-primary);
  font-size: 22px;
}
.bank-statements-section .statements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bank-statements-section .statement-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 12px;
  gap: 16px;
}
.bank-statements-section .statement-card .statement-card-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bank-statements-section .statement-card .statement-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #fef2f2;
}
.bank-statements-section .statement-card .statement-icon span {
  font-size: 22px;
  color: var(--md-sys-color-error);
}
.bank-statements-section .statement-card .statement-icon.fio {
  background: #fef2f2;
}
.bank-statements-section .statement-card .statement-icon.fio span {
  color: #c62828;
}
.bank-statements-section .statement-card .statement-icon.moneta {
  background: #e8f0fe;
}
.bank-statements-section .statement-card .statement-icon.moneta span {
  color: #1a73e8;
}
.bank-statements-section .statement-card .statement-details .statement-main-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  line-height: 1.2;
}
.bank-statements-section .statement-card .statement-details .statement-sub-title {
  font-size: 12px;
  color: var(--md-sys-color-on-support);
  margin-top: 2px;
}
.bank-statements-section .statement-card .statement-download-link {
  text-decoration: none;
}
.attendance-manager-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.attendance-manager-top .filter-actions-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.attendance-manager-top .select-compact {
  height: 40px;
  border-radius: 20px;
  font-size: 16px;
  padding: 0 12px;
}
.logs-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-top: 16px;
}
.logs-summary-card .logs-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  border-bottom: 1px solid #f1f5f9;
}
.logs-summary-card .logs-summary-header md-icon {
  font-size: 18px;
  vertical-align: middle;
}
.logs-summary-card .logs-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 1.4fr;
  gap: 0;
}
.logs-summary-card .logs-summary-grid .summary-cell {
  padding: 16px 20px;
  border-right: 1px solid #f1f5f9;
}
.logs-summary-card .logs-summary-grid .summary-cell:last-child {
  border-right: none;
}
.logs-summary-card .logs-summary-grid .summary-cell .summary-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 6px;
}
.logs-summary-card .logs-summary-grid .summary-cell .summary-value {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}
.logs-summary-card .logs-summary-grid .summary-cell .summary-value-tips {
  font-size: 16px;
  font-weight: 600;
  color: #16a34a;
}
.logs-summary-card .logs-summary-grid .summary-cell.total-cell {
  background: var(--md-sys-color-primary-container);
}
.logs-summary-card .logs-summary-grid .summary-cell.total-cell .summary-label {
  color: #1e40af;
}
.logs-summary-card .logs-summary-grid .summary-cell.total-cell .summary-value {
  font-size: 20px;
  color: var(--md-sys-color-on-primary-container);
}
.users-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.users-header-actions {
  display: flex;
  gap: 12px;
}
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.user-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e0e0e0;
}
.user-card .user-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.user-card .user-avatar {
  width: 48px;
  height: 48px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.user-card .user-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f1f1f;
}
.user-card .user-title .position-badge {
  font-size: 13px;
  color: #626262;
  font-weight: 500;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 4px;
}
.user-card .user-title .contract-badge {
  display: inline-block;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 3px;
}
.user-card .user-title .contract-badge--hpp {
  background: #dbeafe;
}
.user-card .user-title .contract-badge--brigada {
  background: #fef3c7;
}
.user-card .user-title .contract-badge--brigada_hpp {
  background: #dcfce7;
}
.user-card .user-title .contract-badge--externi {
  background: #f1f5f9;
}
.user-card .user-title .contract-badge--admin {
  background: #f3e8ff;
}
.user-card .user-details {
  font-size: 13px;
  color: #444;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  border-top: 1px solid #f5f5f5;
  padding-top: 12px;
}
.user-card .user-details div {
  display: flex;
  justify-content: space-between;
}
.user-card .user-details strong {
  color: #1f1f1f;
}
.user-card .user-details .user-pin-code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
  font-family: monospace;
}
.user-card .user-access-section {
  flex-direction: column;
  align-items: flex-start;
  margin-top: 6px;
}
.user-card .access-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.user-card .access-badge {
  font-size: 11px;
  background: #e8f0fe;
  color: #1a73e8;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.user-card .access-badge.admin {
  background: #ffebee;
  color: #c62828;
}
.user-card .access-badge.none {
  background: #fafafa;
  color: #9e9e9e;
}
.user-card .user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #f5f5f5;
  padding-top: 12px;
}
.user-card .user-actions .btn-delete {
  --md-text-button-label-text-color: var(--md-sys-color-error);
}
#user-dialog {
  border: none;
  border-radius: 28px;
  padding: 24px 28px;
  background: #fff;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
#user-dialog .modal-title {
  margin: 0 0 20px 0;
  font-weight: 500;
  font-size: 22px;
  color: var(--md-sys-color-primary);
}
#user-dialog .autofill-decoy {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
#user-dialog .form-section {
  margin-bottom: 22px;
}
#user-dialog .form-section:last-of-type {
  margin-bottom: 0;
}
#user-dialog .form-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--md-sys-color-on-surface-variant, #64748b);
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--md-sys-color-outline, #e2e8f0);
}
#user-dialog .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}
#user-dialog .form-row:last-child {
  margin-bottom: 0;
}
#user-dialog .form-row md-outlined-text-field,
#user-dialog .form-row .m3-select {
  flex: 1;
  min-width: 0;
}
#user-dialog md-outlined-text-field {
  --md-outlined-text-field-container-shape: 4px;
  --md-outlined-text-field-label-text-color: var(--md-sys-color-on-support, #8996a8);
  --md-outlined-text-field-hover-label-text-color: var(--md-sys-color-on-support, #8996a8);
}
#user-dialog select.m3-select {
  box-sizing: border-box;
  height: 56px;
  border: 1px solid var(--md-sys-color-outline, #79747e);
  border-radius: 4px;
  padding: 0 16px;
  font-size: 16px;
  background: #fff;
  outline: none;
  color: var(--md-sys-color-on-background, #0f172a);
}
#user-dialog select.m3-select:focus {
  border-color: var(--md-sys-color-primary);
}
#user-dialog .modal-info-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--md-sys-color-primary-container, #dbeafe);
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.45;
}
#user-dialog .modal-info-box .material-symbols-outlined {
  font-size: 18px;
  flex: none;
  margin-top: 1px;
}
#user-dialog .form-full-width {
  width: 100%;
}
#user-dialog .checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
#user-dialog .checkbox-item--admin {
  margin: 14px 0 4px;
}
#user-dialog .checkbox-group {
  margin-top: 14px;
  border: 1px solid var(--md-sys-color-outline, #e2e8f0);
  padding: 16px;
  border-radius: 12px;
  transition: opacity 0.15s ease;
}
#user-dialog .checkbox-group .checkbox-group-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 12px;
  color: var(--md-sys-color-on-surface-variant, #64748b);
}
#user-dialog .checkbox-group .checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}
#user-dialog .checkbox-group .checkbox-item {
  margin: 0;
}
#user-dialog .checkbox-group .perm-note {
  color: var(--md-sys-color-on-support, #8996a8);
  font-size: 12.5px;
}
#user-dialog .checkbox-group.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
#user-dialog .checkbox-item--static {
  color: var(--md-sys-color-on-surface, #334155);
}
#user-dialog .checkbox-item--static .perm-always-ico {
  font-size: 20px;
  color: var(--md-sys-color-primary);
}
#user-dialog .checkbox-item--static .perm-always-note {
  color: var(--md-sys-color-on-support, #8996a8);
  font-size: 12.5px;
}
#user-dialog .modal-actions {
  text-align: right;
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
#user-dialog #hub-access-block {
  display: none;
}
#user-dialog #user-report-link-section {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: var(--md-sys-color-primary-container, #dbeafe);
  border-radius: 12px;
}
#user-dialog #user-report-link-section .user-report-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
}
#user-dialog #user-report-link-section .user-report-hint .material-symbols-outlined {
  font-size: 16px;
  vertical-align: middle;
}
#user-dialog #user-report-link-section .user-report-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
#user-dialog #user-report-link-section #user-report-url {
  font-size: 12px;
  background: var(--md-sys-color-surface, #fff);
  padding: 6px 10px;
  border-radius: 6px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--md-sys-color-outline-variant, #cbd5e1);
}
.login-box {
  background: var(--md-sys-color-secondary-container);
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
}
.login-box h2 {
  margin-top: 0;
  color: #333;
  text-align: center;
}
.login-box label {
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.login-box button {
  width: 100%;
  padding: 10px;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}
.login-box button:hover {
  background: #005bb5;
}
.login-box .error {
  color: #d32f2f;
  font-size: 14px;
  text-align: center;
  margin-bottom: 10px;
}
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-box .checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
}
body.select-company {
  justify-content: center;
  align-items: center;
  padding: 24px;
  overflow: auto;
}
.sc-card {
  width: 100%;
  max-width: 480px;
  background: var(--md-sys-color-surface);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.sc-panel {
  display: flex;
  flex-direction: column;
  padding: 48px 44px;
}
.sc-panel-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--md-sys-color-on-background);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.sc-panel-sub {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 32px;
  opacity: 0.65;
}
.sc-companies {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sc-company-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  background: var(--md-sys-color-surface);
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.18s, background 0.18s, transform 0.1s;
  user-select: none;
}
.sc-company-btn:hover {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
  transform: translateY(-1px);
}
.sc-company-btn:active {
  transform: translateY(0);
}
.sc-company-btn .sc-company-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--md-sys-color-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--md-sys-color-on-secondary-container);
}
.sc-company-btn .sc-company-icon .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.sc-company-btn .sc-company-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--md-sys-color-on-background);
}
.sc-company-btn .sc-company-arrow {
  margin-left: auto;
  color: var(--md-sys-color-on-surface);
  opacity: 0.35;
  font-size: 20px;
}
.sc-logout {
  margin-top: 32px;
  display: inline-block;
  color: var(--md-sys-color-on-surface);
  font-size: 0.85rem;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.sc-logout:hover {
  opacity: 0.85;
}
@media (max-width: 640px) {
  body.select-company {
    padding: 16px;
    align-items: flex-start;
    padding-top: 48px;
  }
  .sc-card {
    border-radius: 16px;
  }
  .sc-panel {
    padding: 32px 28px 36px;
  }
}
.stats-page {
  padding-bottom: 48px;
}
.stats-period-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.stats-period-switch {
  display: inline-flex;
  flex-wrap: wrap;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.stats-period-switch__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.stats-period-switch__btn .material-symbols-outlined {
  font-size: 18px;
}
.stats-period-switch__btn:hover {
  color: #334155;
}
.stats-period-switch__btn.active {
  background: #ffffff;
  color: var(--md-sys-color-primary);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
}
.stats-period-switch__btn--disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}
.stats-period-switch__btn--disabled:hover {
  color: #cbd5e1;
}
.stats-period-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  text-transform: capitalize;
}
.stats-period-custom {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.stats-period-custom--open {
  display: flex;
}
.stats-period-custom__input {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
}
.stats-summary {
  margin-bottom: 20px;
  min-height: 40px;
}
.stats-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.stats-summary__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--md-sys-color-on-surface-variant);
  padding: 12px 0;
}
.stats-summary__daycounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stats-summary__warn {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
  padding: 8px 12px;
}
.stats-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-card__icon {
  font-size: 1.15rem;
  color: #94a3b8;
}
.stats-card__label {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.2;
}
.stats-card__value {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stats-card--result {
  border-color: #cbd5e1;
}
.stats-card--profit .stats-card__value,
.stats-card--profit .stats-card__icon {
  color: var(--md-sys-color-success);
}
.stats-card--loss .stats-card__value,
.stats-card--loss .stats-card__icon {
  color: var(--md-sys-color-error);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge--green {
  background: var(--md-sys-color-success-container);
  color: var(--md-sys-color-success);
}
.badge--red {
  background: #fee2e2;
  color: var(--md-sys-color-error);
}
.stats-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.stats-view-switch {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.stats-view-switch__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.stats-view-switch__btn .material-symbols-outlined {
  font-size: 18px;
}
.stats-view-switch__btn:hover {
  color: #334155;
}
.stats-view-switch__btn.active {
  background: #ffffff;
  color: var(--md-sys-color-primary);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12);
}
.stats-calendar-wrap {
  margin-bottom: 28px;
}
.stats-calendar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  padding: 16px;
}
.stats-calendar-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.stats-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.stats-calendar__loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.stats-day {
  border-radius: 10px;
  padding: 8px 7px 7px;
  min-height: 72px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: default;
  position: relative;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-left: 3px solid transparent;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
.stats-day__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.stats-day__top-right {
  display: flex;
  align-items: center;
  gap: 3px;
}
.stats-day__num {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}
.stats-day__amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  margin-top: auto;
  min-width: 0;
  max-width: 100%;
}
.stats-day__revenue {
  font-size: 0.66rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stats-day__result {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stats-day__warn {
  font-size: 0.7rem;
  color: #b45309;
  line-height: 1;
}
.stats-day__weather {
  font-size: 0.68rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 1px;
  font-weight: 500;
}
.stats-day__rain {
  font-size: 0.8rem !important;
  color: var(--md-sys-color-primary);
}
.stats-day__sun {
  font-size: 0.8rem !important;
  color: #eab308;
}
.stats-day--empty,
.stats-day--future {
  background: transparent;
  border-color: transparent;
  border-left-color: transparent;
  box-shadow: none;
}
.stats-day--empty .stats-day__num,
.stats-day--future .stats-day__num {
  color: #cbd5e1;
}
.stats-day--nodata {
  background: #f8fafc;
}
.stats-day--profit {
  cursor: pointer;
  border-left-color: var(--md-sys-color-success);
}
.stats-day--profit .stats-day__result {
  color: var(--md-sys-color-success);
}
.stats-day--profit:hover,
.stats-day--profit.stats-day--active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #e2e8f0;
  transform: translateY(-1px);
}
.stats-day--loss {
  cursor: pointer;
  border-left-color: var(--md-sys-color-error);
}
.stats-day--loss .stats-day__result {
  color: var(--md-sys-color-error);
}
.stats-day--loss:hover,
.stats-day--loss.stats-day--active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #e2e8f0;
  transform: translateY(-1px);
}
.stats-day--cogs-missing {
  opacity: 0.8;
}
.stats-day--holiday {
  background: var(--md-sys-color-background);
}
.day-detail-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(320px, calc(100vw - 32px));
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}
.day-detail-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.day-detail-dialog__inner {
  padding: 4px 0 8px;
}
.day-detail-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.day-detail-dialog__title {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: capitalize;
  color: #0f172a;
}
.day-detail-dialog__rows {
  padding: 6px 0 4px;
}
.stats-detail__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 20px;
  font-size: 0.85rem;
}
.stats-detail__row--result {
  font-weight: 700;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  padding-top: 14px;
}
.stats-detail__row--workers {
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  margin: 0 8px;
  padding: 9px 12px;
  transition: background 0.12s;
}
.stats-detail__row--workers:hover {
  background: #f8fafc;
}
.stats-detail__row--workers .stats-detail__value {
  display: flex;
  align-items: center;
  gap: 2px;
}
.stats-detail__row--expanded .stats-detail__chevron {
  transform: rotate(180deg);
}
.stats-detail__chevron {
  font-size: 16px !important;
  color: #94a3b8;
  transition: transform 0.15s;
}
.stats-detail__workers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 20px 12px;
  margin: 0 8px 2px;
}
.stats-detail__worker-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 500;
}
.stats-detail__label {
  color: #64748b;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stats-detail__label .material-symbols-outlined {
  font-size: 16px;
  color: #94a3b8;
}
.stats-detail__value {
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.stats-detail__warn {
  color: #b45309;
  margin-left: 3px;
  font-size: 0.75rem;
}
.stats-detail__row--pastry .stats-detail__label .material-symbols-outlined {
  color: #db2777;
}
.stats-detail__worker-chip--pastry {
  background: #fce7f3;
  color: #be185d;
}
.color-profit {
  color: var(--md-sys-color-success) !important;
}
.color-loss {
  color: var(--md-sys-color-error) !important;
}
.stats-detail__extra {
  margin-top: 16px;
  padding: 14px 20px;
  border-top: 1px dashed #e2e8f0;
}
.stats-detail__extra-head {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
}
.stats-detail__extra-head span {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 1px;
}
.stats-detail__extra-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid #f1f5f9;
}
.stats-detail__extra-item:last-of-type {
  border-bottom: 0;
}
.stats-detail__extra-note {
  flex: 1;
  color: #0f172a;
}
.stats-detail__extra-nums {
  color: var(--md-sys-color-success);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
}
.stats-detail__extra-cost {
  color: #94a3b8;
  font-weight: 400;
}
.stats-detail__extra-del {
  border: none;
  background: none;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
}
.stats-detail__extra-del:hover {
  color: var(--md-sys-color-error);
  background: #fef2f2;
}
.stats-detail__extra-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.stats-detail__extra-input {
  flex: 1 1 0;
  min-width: 90px;
  padding: 9px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.82rem;
  background: #f8fafc;
  color: #0f172a;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.stats-detail__extra-input::placeholder {
  color: #94a3b8;
}
.stats-detail__extra-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.stats-detail__extra-note-input {
  flex: 1 1 100%;
}
.stats-detail__extra-add {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 9px 20px;
  border: none;
  border-radius: 10px;
  background: var(--md-sys-color-primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.stats-detail__extra-add:hover {
  background: #1d4ed8;
}
.stats-detail__extra-add:active {
  transform: translateY(1px);
}
.stats-detail__extra-add:disabled {
  opacity: 0.5;
  cursor: default;
}
.stats-detail__hourly {
  margin-top: 16px;
  padding: 14px 20px 6px;
  border-top: 1px dashed #e2e8f0;
}
.stats-detail__hourly-head {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.stats-detail__hourly-total {
  font-weight: 700;
  color: var(--md-sys-color-primary);
}
.stats-detail__hourly-body {
  min-height: 40px;
}
.stats-hourly__plot {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.stats-hourly__svg {
  display: block;
  width: 100%;
  height: auto;
}
.stats-hourly__bar {
  fill: var(--md-sys-color-primary);
  opacity: 0.9;
}
.stats-hourly__bar--active {
  opacity: 1;
}
.stats-hourly__bar--open {
  opacity: 0.35;
}
.stats-hourly__bar--open.stats-hourly__bar--active {
  opacity: 0.45;
}
.stats-hourly__hover {
  stroke: #94a3b8;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}
.stats-hourly__avgdot--active {
  r: 4.5;
  stroke-width: 2;
}
.stats-hourly__grid {
  stroke: #e2e8f0;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.stats-hourly__ytick {
  font-size: 13px;
  fill: #94a3b8;
}
.stats-hourly__xtick {
  font-size: 13px;
  fill: #94a3b8;
}
.stats-hourly__avgline {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.stats-hourly__avgdot {
  fill: #3b82f6;
  stroke: #fff;
  stroke-width: 1.5;
}
.stats-hourly__templine {
  fill: none;
  stroke: #f97316;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.stats-hourly__tempdot {
  fill: #f97316;
}
.stats-hourly__templabel {
  fill: #ea580c;
  font-size: 10px;
  font-weight: 700;
}
.stats-hourly__raindrop {
  fill: #38bdf8;
}
.stats-hourly__legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #475569;
}
.stats-hourly__leg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.stats-hourly__legnote {
  color: #94a3b8;
}
.stats-hourly__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.stats-hourly__swatch--bar {
  background: var(--md-sys-color-primary);
}
.stats-hourly__swatch--avg {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #3b82f6;
}
.stats-hourly__swatch--open {
  background: var(--md-sys-color-primary);
  opacity: 0.35;
}
.stats-hourly__swatch--temp {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #f97316;
}
.stats-hourly__swatch--rain {
  background: #38bdf8;
  border-radius: 50% 50% 50% 0;
  transform: rotate(45deg);
}
.stats-hourly-loading {
  text-align: center;
  padding: 18px;
  color: var(--md-sys-color-outline);
}
.stats-hourly-empty {
  text-align: center;
  padding: 14px;
  color: #94a3b8;
  font-size: 0.8rem;
}
.stats-hourly-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 8px 0 28px;
}
@media (max-width: 900px) {
  .stats-hourly-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.stats-today-hourly {
  padding: 18px 20px 10px;
  background: var(--md-sys-color-surface, #fff);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  min-width: 0;
}
.stats-heatmap {
  padding: 18px 20px 16px;
  background: var(--md-sys-color-surface, #fff);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  min-width: 0;
}
.stats-heatmap__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.stats-heatmap__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}
.stats-heatmap__title md-icon {
  color: var(--md-sys-color-primary);
  --md-icon-size: 20px;
}
.stats-heatmap__sub {
  margin-top: 2px;
  font-size: 0.78rem;
  color: #94a3b8;
}
.stats-heatmap__filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #64748b;
}
.stats-heatmap__filter label {
  color: #94a3b8;
}
.stats-heatmap__filter select {
  font: inherit;
  font-size: 0.8rem;
  padding: 4px 6px;
  color: var(--md-sys-color-on-surface);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.stats-heatmap__body {
  min-height: 60px;
}
.stats-heatmap__plot {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.stats-heatmap__grid {
  display: grid;
  gap: 3px;
  align-items: stretch;
}
.stats-heatmap__daylabel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1;
}
.stats-heatmap__cell {
  height: 30px;
  border-radius: 3px;
  cursor: default;
  transition: outline-color 0.08s;
  outline: 2px solid transparent;
  outline-offset: -2px;
}
.stats-heatmap__cell:hover {
  outline-color: rgba(15, 23, 42, 0.35);
}
.stats-heatmap__hourlabel {
  padding-top: 6px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1;
  white-space: nowrap;
}
.stats-today-hourly__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.stats-today-hourly__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}
.stats-today-hourly__title md-icon {
  color: var(--md-sys-color-primary);
  --md-icon-size: 20px;
}
.stats-today-hourly__total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--md-sys-color-primary);
}
.stats-today-hourly__body {
  min-height: 60px;
}
.stats-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  font-size: 0.8rem;
  color: #64748b;
}
.stats-legend__item {
  display: flex;
  align-items: center;
  gap: 7px;
}
.stats-legend__item::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.stats-legend__item--profit::before {
  background: var(--md-sys-color-success);
}
.stats-legend__item--loss::before {
  background: var(--md-sys-color-error);
}
.stats-legend__item--nodata::before {
  background: #cbd5e1;
}
.stats-legend__item--cogs-missing::before {
  background: #f59e0b;
}
.stats-costs-section {
  margin-top: 8px;
}
.stats-costs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stats-costs-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--md-sys-color-on-surface);
}
.stats-costs__empty {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
  padding: 40px 0;
  text-align: center;
}
.stats-costs__loading {
  text-align: center;
  padding: 24px;
  color: var(--md-sys-color-on-surface-variant);
}
#costsList {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.stats-costs__group {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.stats-costs__group-title {
  margin: 0;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.costs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.costs-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.costs-table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  padding: 13px 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.costs-table thead th:last-child {
  text-align: right;
}
.costs-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.12s ease;
}
.costs-table tbody tr:last-child {
  border-bottom: none;
}
.costs-table tbody tr:hover {
  background-color: #f8fafc;
}
.costs-table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  color: #334155;
}
.costs-table .cost-row--closed td {
  opacity: 0.45;
}
.costs-table .cost-amount {
  font-weight: 600;
  text-align: right;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.costs-table .cost-active {
  color: #16a34a;
  font-size: 0.8rem;
  font-weight: 500;
}
.costs-table .cost-actions {
  text-align: right;
  white-space: nowrap;
  padding-right: 12px;
}
.costs-table .cost-actions .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  padding: 0;
}
.costs-table .cost-actions .btn-icon .material-symbols-outlined {
  font-size: 18px;
}
.costs-table .cost-actions .btn-icon:hover {
  background: #f1f5f9;
  color: #475569;
}
.costs-table .cost-actions .btn-icon.btn-delete-cost:hover {
  background: #fee2e2;
  color: #dc2626;
}
.cost-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.cost-badge--najem {
  background: #dbeafe;
  color: #1e40af;
}
.cost-badge--energie {
  background: #fef9c3;
  color: #854d0e;
}
.cost-badge--sluzby {
  background: #f3e8ff;
  color: #6b21a8;
}
.cost-badge--ostatni {
  background: #f1f5f9;
  color: #475569;
}
.cost-badge--investice {
  background: #ffedd5;
  color: #9a3412;
}
.cost-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}
.cost-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.cost-dialog__inner {
  padding: 28px;
}
.cost-dialog__title {
  margin: 0 0 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  letter-spacing: -0.01em;
}
.cost-dialog__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cost-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}
.cost-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cost-field__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.cost-field__hint {
  font-weight: 400;
  text-transform: none;
  color: #94a3b8;
  letter-spacing: 0;
}
.cost-field__input {
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  outline: none;
  box-sizing: border-box;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.cost-field__input::placeholder {
  color: #cbd5e1;
  opacity: 1;
}
.cost-field__input:hover {
  border-color: #94a3b8;
}
.cost-field__input:focus {
  border-color: var(--md-sys-color-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.cost-field__select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 34px;
}
.cost-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
}
.cost-field__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
}
.cost-field__checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
}
.owner-combo {
  position: relative;
}
.owner-combo__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 232px;
  overflow-y: auto;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  -webkit-overflow-scrolling: touch;
}
.owner-combo__menu[hidden] {
  display: none;
}
.owner-combo__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s;
}
.owner-combo__item:hover,
.owner-combo__item--active {
  background: #f1f5f9;
}
.owner-combo__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.owner-combo__avatar--new {
  color: #64748b;
  background: #e2e8f0;
  font-size: 1.3rem;
  font-weight: 400;
}
.owner-combo__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.owner-combo__item--new .owner-combo__name {
  color: #475569;
}
.owner-combo__empty {
  padding: 14px 12px;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}
.cost-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 8px;
  border: none;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  letter-spacing: 0.01em;
}
.cost-btn--primary {
  background: var(--md-sys-color-primary);
  color: #ffffff;
}
.cost-btn--primary:hover {
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.cost-btn--ghost {
  background: transparent;
  color: #475569;
  border: 1.5px solid #e2e8f0;
}
.cost-btn--ghost:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}
.stats-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.stats-table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  padding: 13px 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.stats-table thead th:not(:first-child) {
  text-align: right;
}
.stats-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.12s ease;
}
.stats-table tbody tr:last-child {
  border-bottom: none;
}
.stats-table tbody tr:hover {
  background-color: #f8fafc;
}
.stats-table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.stats-table tbody td:not(:first-child) {
  text-align: right;
}
.stats-table__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 12px 0 10px;
}
.stats-table__rank {
  width: 1%;
  color: #94a3b8;
  font-weight: 600;
  text-align: center !important;
}
.stats-table__rank + th,
.stats-table__rank + td {
  text-align: left !important;
}
.stats-table__empty {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
  padding: 24px 0;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.stats-table__loading {
  text-align: center;
  padding: 24px;
  color: var(--md-sys-color-on-surface-variant);
}
.stats-products-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
#statsPage .section-title {
  margin-top: 28px;
  margin-bottom: 14px;
}
#statsTemperature {
  margin-bottom: 50px;
}
#statsElectricity {
  margin-bottom: 50px;
}
.stats-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  padding: 16px;
}
.stats-chart__legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: #64748b;
}
.stats-chart__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stats-chart__legend-item::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}
.stats-chart__legend-item--revenue::before {
  background: var(--md-sys-color-primary);
}
.stats-chart__legend-item--result::before {
  background: #16a34a;
}
.stats-chart__legend-item--workers::before {
  background: #f59e0b;
}
.stats-chart__legend-item--temp-revenue::before {
  background: linear-gradient(90deg, hsl(220, 75%, 52%), hsl(110, 75%, 52%), hsl(0, 75%, 52%));
}
.stats-chart__legend-item--temp-result::before {
  background: #16a34a;
}
.stats-chart__legend-item--el-kwh::before {
  background: #0d9488;
}
.stats-chart__legend-item--el-czk::before {
  background: #7c3aed;
}
.stats-chart__legend-item--el-spot::before {
  background: linear-gradient(90deg, #16a34a, #f59e0b, #dc2626);
}
.stats-chart__inner {
  position: relative;
}
.stats-chart__svg {
  display: block;
  width: 100%;
  height: 250px;
  cursor: crosshair;
}
.stats-chart__area {
  stroke: none;
  pointer-events: none;
}
.stats-chart__area--revenue {
  fill: url(#statsChartAreaFillRevenue);
}
.stats-chart__area--result {
  fill: url(#statsChartAreaFillResult);
}
.stats-chart__area--workers {
  fill: url(#statsChartAreaFillWorkers);
}
.stats-chart__gridline {
  stroke: #eef2f7;
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.stats-chart__axis-label {
  font-size: 10px;
  fill: #94a3b8;
  font-family: 'Roboto', sans-serif;
}
.stats-chart__axis-label--y {
  text-anchor: end;
  dominant-baseline: middle;
}
.stats-chart__axis-label--y2 {
  text-anchor: start;
  dominant-baseline: middle;
  fill: #f59e0b;
}
.stats-chart__axis-label--x {
  text-anchor: middle;
}
.stats-chart__hover-line {
  stroke: #94a3b8;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}
.stats-chart__line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: none;
}
.stats-chart__line--revenue {
  stroke: var(--md-sys-color-primary);
}
.stats-chart__line--result {
  stroke: #16a34a;
}
.stats-chart__line--workers {
  stroke: #f59e0b;
}
.stats-chart__point {
  stroke: #ffffff;
  stroke-width: 1.5;
  transition: r 0.1s;
  pointer-events: none;
}
.stats-chart__point--revenue {
  fill: var(--md-sys-color-primary);
}
.stats-chart__point--result {
  fill: #16a34a;
}
.stats-chart__point--workers {
  fill: #f59e0b;
}
.stats-chart__point--active {
  r: 5.5;
  stroke-width: 2;
}
.stats-chart__tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  z-index: 5;
  background: var(--md-sys-color-primary, #2563eb);
  color: #ffffff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.76rem;
  line-height: 1.55;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), 0 2px 4px rgba(0, 0, 0, 0.08);
}
.stats-chart__tooltip-date {
  font-weight: 700;
  margin-bottom: 3px;
  text-transform: capitalize;
}
.stats-chart__tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stats-chart__tooltip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.stats-chart__tooltip-dot--revenue {
  background: #ffffff;
}
.stats-chart__tooltip-dot--result {
  background: #86efac;
}
.stats-chart__tooltip-dot--workers {
  background: #fde68a;
}
.stats-temp-insight {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #0c4a6e;
  margin: 14px 0 0;
  line-height: 1.5;
}
.stats-temp-chart-card {
  margin-bottom: 0;
}
.stats-temp-chart__svg {
  height: auto;
  aspect-ratio: 900 / 280;
}
.stats-temp-chart__x-label {
  font-weight: 600;
  fill: #475569;
}
.stats-temp-chart__x-sub {
  font-size: 9px;
  fill: #94a3b8;
}
.stats-el-tabs {
  display: inline-flex;
  margin-bottom: 16px;
}
.stats-el-panel[hidden] {
  display: none;
}
.stats-products-tabs {
  display: inline-flex;
  margin-bottom: 14px;
}
.stats-el-overview {
  display: flex;
  gap: 16px;
  align-items: stretch;
  flex-wrap: wrap;
}
.stats-el-summary {
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stats-el-overview__chart {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
}
.stats-el-overview__chart .stats-chart__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stats-el-overview__chart .stats-chart__svg {
  flex: 1 1 auto;
  height: auto;
  min-height: 220px;
}
.stats-el-stat {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}
.stats-el-stat--kwh {
  border-left: 3px solid transparent;
  border-left-color: #0d9488;
}
.stats-el-stat--czk {
  border-left: 3px solid transparent;
  border-left-color: #7c3aed;
}
.stats-el-stat--muted {
  color: var(--md-sys-color-outline);
  font-size: 0.82rem;
  box-shadow: none;
}
.stats-el-stat__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  margin-bottom: 4px;
}
.stats-el-stat__value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.stats-el-stat__hint {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}
.stats-el-daily-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.stats-el-daily-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}
.stats-el-date {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #0f172a;
  background: #ffffff;
}
@media (max-width: 640px) {
  .stats-el-summary {
    flex-basis: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stats-el-summary .stats-el-stat {
    flex: 1 1 140px;
  }
}
.stats-ev-tabs {
  display: inline-flex;
  margin-bottom: 16px;
}
.stats-ev-panel[hidden] {
  display: none;
}
.stats-ev-tab-count,
.stats-ev-group-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
}
.stats-view-switch__btn.active .stats-ev-tab-count {
  background: var(--md-sys-color-primary);
  color: #ffffff;
}
.stats-ev-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 22px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stats-ev-panel > .stats-ev-group-title:first-child {
  margin-top: 0;
}
.stats-ev-group {
  margin-bottom: 4px;
}
.stats-ev-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.stats-ev-pager__info {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.stats-ev-pager .btn-icon[disabled] {
  opacity: 0.35;
  pointer-events: none;
}
.stats-error {
  color: var(--md-sys-color-error);
  padding: 16px 0;
  font-size: 0.9rem;
}
.modal-box--narrow {
  max-width: 420px;
}
@media (max-width: 600px) {
  .stats-summary__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .stats-card {
    min-width: 0;
  }
  .stats-calendar-card {
    padding: 10px;
  }
  .stats-calendar-header {
    gap: 4px;
  }
  .stats-calendar {
    gap: 4px;
  }
  .stats-day {
    min-height: 40px;
    padding: 6px 4px;
    border-radius: 8px;
  }
  .stats-day__top-right,
  .stats-day__amounts {
    display: none;
  }
  .stats-day__num {
    font-size: 0.82rem;
  }
  .stats-products-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}
@media print {
  body > *:not(#attendance-workspace) {
    display: none !important;
  }
  #attendance-workspace,
  .app-layout,
  .right-content,
  .main-content {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .nav-rail,
  .m3-top-app-bar,
  .attendance-manager-top,
  .tabs,
  .tab-header-row,
  .btn-fix-shift,
  .action-footer-row {
    display: none !important;
  }
  .tab-content {
    display: none !important;
  }
  #logs {
    display: block !important;
  }
  .sensitive-data,
  .blur-active .sensitive-data {
    display: table-cell !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
    user-select: auto !important;
  }
  .attendance-section-card,
  .logs-summary-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    overflow: visible !important;
    margin-bottom: 8pt !important;
    page-break-inside: avoid;
  }
  table {
    font-size: 9pt;
    border-collapse: collapse;
    width: 100%;
  }
  th,
  td {
    border: 1px solid #ccc;
    padding: 3px 5px;
  }
  th {
    background: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .logs-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) 1.4fr !important;
  }
  .summary-cell {
    padding: 8px 10px !important;
    border: 1px solid #ccc !important;
    border-right: none !important;
  }
  .summary-cell:last-child {
    border-right: 1px solid #ccc !important;
  }
  .total-cell {
    background: #dbeafe !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .logs-summary-header {
    padding: 8px 10px !important;
    border-bottom: 1px solid #ccc !important;
    font-size: 10pt !important;
  }
  a {
    text-decoration: none;
    color: inherit;
  }
  @page {
    margin: 1.2cm;
    size: A4 landscape;
  }
}
@media (max-width: 768px) {
  body {
    padding: 0;
  }
  .app-layout {
    flex-direction: column;
  }
  .right-content {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
  }
  #drop-zone {
    display: none !important;
  }
  #upload-mobile-actions {
    display: flex !important;
  }
  #upload-mobile-actions.hidden {
    display: none !important;
  }
  .main-content {
    padding: 16px !important;
  }
  .user-grid {
    grid-template-columns: 1fr !important;
  }
  .main-container {
    padding-bottom: 96px !important;
  }
  .m3-top-app-bar {
    position: sticky;
    top: 0;
    border-radius: 0;
    margin-bottom: 12px;
    padding: 15px 16px;
    z-index: 100;
  }
  .main-container {
    flex-direction: column;
    gap: 16px;
    padding: 0 12px 24px 12px;
    height: auto;
  }
  .left-panel,
  .right-panel {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: auto;
  }
  #pdf-panel {
    display: none !important;
  }
  .mobile-preview-btn {
    display: inline-flex !important;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .form-full {
    grid-column: span 1 !important;
  }
  .m3-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .action-buttons {
    flex-direction: column;
    gap: 12px;
  }
  .action-buttons md-filled-button,
  .action-buttons md-outlined-button {
    width: 100%;
  }
  .nav-rail {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto !important;
    width: 100% !important;
    height: calc(64px + env(safe-area-inset-bottom, 0)) !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    background: var(--md-sys-color-surface-container, #f4f3f8);
    border-top: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
    border-right: none !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 999;
    padding: 0 8px env(safe-area-inset-bottom, 0) !important;
  }
  .nav-rail:has(.nav-extra.open) {
    z-index: 1100;
  }
  .nav-item {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 1;
    height: 100% !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    border-radius: 16px !important;
    font-size: 11px !important;
  }
  .nav-item.active .icon-container {
    background: var(--md-sys-color-secondary-container) !important;
    color: var(--md-sys-color-on-secondary-container) !important;
  }
  .nav-rail > .nav-item.nav-item-secondary {
    display: none !important;
  }
  .nav-more-trigger {
    display: flex !important;
  }
  .nav-extra {
    display: none !important;
    flex: 0 0 auto !important;
  }
  .nav-extra.open {
    display: flex !important;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0) + 12px);
    flex-direction: column !important;
    gap: 2px !important;
    padding: 8px;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--md-sys-color-surface-container, #f4f3f8);
    border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
    border-radius: 20px;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.12);
    z-index: 1001;
  }
  .nav-extra .nav-extra-module {
    display: flex !important;
  }
  .nav-extra .nav-item {
    flex: 0 0 auto !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }
  .nav-extra .nav-item .icon-container {
    width: 36px !important;
    height: 36px !important;
  }
  .nav-extra .nav-item span {
    font-size: 14px !important;
  }
  .nav-extra-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 1099;
  }
  #onesignal-bell-container,
  .onesignal-bell-launcher {
    bottom: 40px !important;
    z-index: 1000 !important;
  }
  .right-content .tabs {
    width: 100% !important;
    margin-left: 0 !important;
    height: auto !important;
    border-radius: 16px !important;
    padding: 4px !important;
    background: var(--md-sys-color-surface-container-low, #f1f5f9) !important;
    gap: 4px !important;
  }
  .right-content .tab {
    flex-direction: column !important;
    height: 56px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    gap: 2px !important;
    padding: 6px 2px !important;
  }
  .right-content .tab md-icon {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
    --md-icon-size: 20px !important;
  }
  .right-content .tab span {
    display: block !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    padding: 0 4px !important;
  }
  .logs-summary-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .logs-summary-grid .summary-cell {
    border-right: none;
    border-bottom: 1px solid #f1f5f9;
  }
  .logs-summary-grid .total-cell {
    grid-column: 1 / -1;
  }
  .bank-tx-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 16px !important;
    gap: 14px !important;
  }
  .bank-tx-card .bank-tx-card-content {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    min-width: 260px;
    flex-direction: column;
  }
  .bank-tx-card > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    border-top: 1px solid var(--md-sys-color-outline-variant, #e2e8f0);
    padding-top: 12px !important;
    margin-top: 4px !important;
  }
  .bank-tx-card > div:nth-child(2) > div:nth-child(3) {
    grid-column: span 2 !important;
    text-align: right !important;
    font-size: 18px !important;
    font-weight: 800 !important;
  }
  .bank-statements-section .statement-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .bank-statements-section .statement-card .statement-card-info {
    width: 100% !important;
  }
  .bank-statements-section .statement-card .statement-download-link,
  .bank-statements-section .statement-card .statement-download-link md-filled-button {
    width: 100% !important;
  }
  .m3-list-item-supporting {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px;
    margin-top: 8px;
  }
  .m3-list-item-supporting span {
    padding-left: 31px;
    border-left: 0;
  }
  .m3-list.sent .m3-list-item-supporting span {
    padding-left: 25px !important;
    border-left: 0;
  }
  .m3-list-item {
    align-items: flex-start !important;
  }
  .m3-list-item-headline {
    row-gap: 4px;
  }
  .m3-list-item-headline .m3-list-item-title {
    flex: 1 1 55%;
  }
  .m3-list-item-headline .paid-flag,
  .m3-list-item-headline .badge-overdue {
    margin-left: 0;
  }
  .form-grid {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .m3-table th,
  .m3-table td {
    padding: 6px 4px !important;
  }
  #items-table-body input,
  #items-table-body select {
    padding: 4px 6px !important;
    height: 32px !important;
    font-size: 16px;
  }
  #items-table-body input[name*="[quantity]"] {
    width: 100% !important;
    min-width: 0 !important;
    padding: 4px 0 !important;
    text-align: center;
  }
  #items-table-body input[name*="[quantity]"]::-webkit-outer-spin-button,
  #items-table-body input[name*="[quantity]"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  #items-table-body input[name*="[unit_price]"] {
    width: 70px !important;
    min-width: 0 !important;
  }
  #items-table-body select[name*="[vat_rate]"] {
    width: 70px !important;
    min-width: 0 !important;
  }
  #invoice-editor .grid-2,
  #invoice-editor .grid-3 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    margin-bottom: 12px;
  }
  #invoice-editor .form-grid .background-color {
    padding: 14px;
  }
  #invoice-editor .editor-header-actions {
    width: 100%;
  }
  #invoice-editor .paid-checkbox-row {
    padding-top: 0;
  }
  #invoice-editor .m3-table {
    display: block;
    overflow-x: visible;
    white-space: normal;
  }
  #invoice-editor .m3-table thead {
    display: none;
  }
  #invoice-editor .m3-table tbody,
  #invoice-editor .m3-table tfoot {
    display: block;
  }
  #invoice-editor .m3-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.35fr) minmax(0, 0.9fr);
    gap: 10px 8px;
    padding: 12px !important;
    margin-bottom: 10px;
    border: 1px solid var(--md-sys-color-outline-variant, #e2e8f0);
    border-radius: 10px;
    background: var(--md-sys-color-surface);
  }
  #invoice-editor .m3-table tbody td {
    display: block;
    min-width: 0;
    padding: 0 !important;
    border-bottom: 0;
  }
  #invoice-editor .m3-table tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--md-sys-color-outline);
  }
  #invoice-editor .m3-table tbody td:first-child,
  #invoice-editor .m3-table tbody td:last-child {
    grid-column: 1 / -1;
  }
  #invoice-editor .m3-table tbody td[colspan] {
    grid-column: 1 / -1;
    text-align: center;
  }
  #invoice-editor .m3-table tbody td.item-total {
    position: relative;
    display: flex;
    padding-top: 8px !important;
    border-top: 1px dashed var(--md-sys-color-outline-variant, #e2e8f0);
  }
  #invoice-editor .m3-table tbody td.item-total::before {
    position: absolute;
    left: 0;
    top: 8px;
  }
  #invoice-editor .m3-table tfoot .items-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 0 2px;
  }
  #invoice-editor .m3-table tfoot .items-sum-row td {
    display: block;
    border-top: 0;
    padding: 0 !important;
  }
  #invoice-editor .m3-table tfoot .items-sum-row td:first-child {
    text-align: left;
  }
  #invoice-editor .m3-table tfoot .items-sum-row td.item-total {
    display: flex;
  }
  #invoice-editor .m3-table tfoot .items-sum-verdict {
    display: block;
  }
  #invoice-editor .m3-table tfoot .items-sum-verdict td {
    display: block;
    text-align: left;
    padding: 6px 2px 0 !important;
  }
  #invoice-editor .m3-table #items-sum-hint {
    padding-right: 0;
  }
  #invoice-editor #items-table-body input[name*="[name]"],
  #invoice-editor #items-table-body input[name*="[unit_price]"],
  #invoice-editor #items-table-body select[name*="[vat_rate]"] {
    width: 100% !important;
  }
  #invoice-editor #items-table-body input[name*="[quantity]"] {
    width: 100% !important;
    text-align: left;
    padding: 4px 6px !important;
  }
}
body.zamestnanec-page {
  background: #f5f5f5;
  min-height: 100vh;
  height: auto;
  overflow-y: auto;
  font-family: 'Roboto', sans-serif;
  color: var(--md-sys-color-on-surface, #1c1b1f);
}
body.zamestnanec-page .zp-header {
  position: relative;
  background: #0f0d07;
  color: #fff;
  padding: 32px 20px 24px;
  text-align: center;
  overflow: hidden;
}
body.zamestnanec-page .zp-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  padding-bottom: 73%;
  background: url('/assets/icons/coffeesquare/zamek.svg') center bottom / 100% auto no-repeat;
  filter: invert(1);
  opacity: 0.1;
  pointer-events: none;
}
body.zamestnanec-page .zp-header-logo {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 8px;
}
body.zamestnanec-page .zp-header-company {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}
body.zamestnanec-page .zp-header-name {
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.2;
}
body.zamestnanec-page .zp-header-position {
  font-size: 14px;
  opacity: 0.85;
}
body.zamestnanec-page .zp-main {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.zamestnanec-page .zp-month-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
body.zamestnanec-page .zp-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 8px;
}
body.zamestnanec-page .zp-month-header:active {
  background: rgba(0, 0, 0, 0.04);
}
body.zamestnanec-page .zp-month-header--empty {
  cursor: default;
  opacity: 0.55;
}
body.zamestnanec-page .zp-month-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1c1b1f);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.zamestnanec-page .zp-month-locked {
  font-size: 11px;
  font-weight: 500;
  color: var(--md-sys-color-outline, #79747e);
  background: var(--md-sys-color-surface-container, #f3f0f4);
  border-radius: 100px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
body.zamestnanec-page .zp-month-empty {
  font-size: 13px;
  color: var(--md-sys-color-outline, #79747e);
}
body.zamestnanec-page .zp-month-toggle {
  font-size: 22px;
  width: 22px;
  height: 22px;
  color: var(--md-sys-color-outline, #79747e);
  transition: transform 0.2s;
  flex-shrink: 0;
}
body.zamestnanec-page .zp-vacation-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
body.zamestnanec-page .zp-vacation-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1c1b1f);
}
body.zamestnanec-page .zp-vacation-title .material-symbols-outlined {
  font-size: 20px;
  color: #b8c1cc;
}
body.zamestnanec-page .zp-vacation-stats {
  display: flex;
  gap: 24px;
}
body.zamestnanec-page .zp-vacation-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
body.zamestnanec-page .zp-vacation-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--md-sys-color-outline, #79747e);
}
body.zamestnanec-page .zp-vacation-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1c1b1f);
}
body.zamestnanec-page .zp-month-body {
  border-top: 1px solid var(--md-sys-color-outline-variant, #e2e8f0);
}
body.zamestnanec-page .zp-month-summary {
  padding: 4px 0 8px;
}
body.zamestnanec-page .zp-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 12px;
}
body.zamestnanec-page .zp-stat-row--payout {
  background: #f5f5f5;
  color: black;
  font-weight: 600;
}
body.zamestnanec-page .zp-stat-row--payout .zp-stat-value {
  font-weight: 600;
  font-size: 16px;
}
body.zamestnanec-page .zp-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}
body.zamestnanec-page .zp-stat-label .material-symbols-outlined {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: #b8c1cc;
}
body.zamestnanec-page .zp-stat-value {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
body.zamestnanec-page .zp-shifts {
  border-top: 1px solid var(--md-sys-color-outline-variant, #e2e8f0);
  padding: 8px 0;
}
body.zamestnanec-page .zp-shift {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 8px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant, #e2e8f0);
  font-size: 14px;
}
body.zamestnanec-page .zp-shift:last-child {
  border-bottom: none;
}
body.zamestnanec-page .zp-shift--vacation {
  background: #fffde7;
}
body.zamestnanec-page .zp-shift--pending {
  background: #fff3e0;
}
body.zamestnanec-page .zp-shift-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
}
body.zamestnanec-page .zp-shift-date {
  font-weight: 500;
  min-width: 90px;
}
body.zamestnanec-page .zp-shift-badge {
  display: inline-block;
  background: var(--md-sys-color-tertiary-container, #ffd8e4);
  color: var(--md-sys-color-on-tertiary-container, #31111d);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
body.zamestnanec-page .zp-shift-badge--vacation {
  background: var(--md-sys-color-secondary-container, #e8def8);
  color: var(--md-sys-color-on-secondary-container, #1d192b);
}
body.zamestnanec-page .zp-shift-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
body.zamestnanec-page .zp-shift-time {
  color: var(--md-sys-color-on-surface-variant, #49454f);
  white-space: nowrap;
  font-size: 13px;
}
body.zamestnanec-page .zp-edit-form {
  background: #dfe7fa;
  padding: 16px 20px;
}
body.zamestnanec-page .zp-edit-form-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--md-sys-color-on-surface, #1c1b1f);
}
body.zamestnanec-page .zp-edit-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
body.zamestnanec-page .zp-edit-label {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  width: 130px;
  flex-shrink: 0;
}
body.zamestnanec-page .zp-edit-input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  font-size: 15px;
  padding: 8px 10px;
  border: 1px solid var(--md-sys-color-outline-variant, #cac4d0);
  border-radius: 8px;
  background: #fff;
  color: var(--md-sys-color-on-surface, #1c1b1f);
  outline: none;
}
body.zamestnanec-page .zp-edit-input:focus {
  border-color: var(--md-sys-color-primary, #7c5c00);
}
body.zamestnanec-page .zp-edit-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
body.zamestnanec-page .zp-edit-cancel,
body.zamestnanec-page .zp-edit-submit {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
}
body.zamestnanec-page .zp-edit-cancel {
  background: none;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}
body.zamestnanec-page .zp-edit-submit {
  background: var(--md-sys-color-primary, #7c5c00);
  color: #fff;
}
body.zamestnanec-page .zp-edit-submit:disabled {
  opacity: 0.5;
  cursor: default;
}
body.zamestnanec-page .zp-footer {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 20px 32px;
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  text-align: center;
}
body.zamestnanec-page .zp-footer p {
  margin: 0;
}
body.zamestnanec-page .zp-footer .material-symbols-outlined {
  font-size: 16px;
  vertical-align: middle;
}
@media (max-width: 768px) {
  .dashboard-page {
    padding-bottom: 88px;
  }
}
.dashboard-page .dash-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 22px;
}
.dashboard-page .dash-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 11px;
  font-weight: 700;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-hello {
  font-size: clamp(18px, 2.4vw, 23px);
  font-weight: 700;
  color: var(--md-sys-color-on-background, #0f172a);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 2px 0 0;
  max-width: 52ch;
  text-wrap: balance;
}
.dashboard-page .dash-date {
  font-size: 13px;
  color: var(--md-sys-color-on-support, #8996a8);
  font-variant-numeric: tabular-nums;
}
.dashboard-page .dash-alerts {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  padding: 14px 18px;
  margin-bottom: 22px;
}
.dashboard-page .dash-alerts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.dashboard-page .dash-alerts__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.dashboard-page .dash-alerts__title .material-symbols-outlined {
  font-size: 18px;
  color: #f59e0b;
}
.dashboard-page .dash-alerts__body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dashboard-page .dash-alert {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}
.dashboard-page .dash-alert .material-symbols-outlined {
  font-size: 16px;
}
.dashboard-page .dash-alert b {
  font-weight: 600;
}
.dashboard-page .dash-alert__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
a.dashboard-page .dash-alert__link:hover b {
  text-decoration: underline;
}
.dashboard-page .dash-alert__owner {
  color: #94a3b8;
  font-size: 0.76rem;
}
.dashboard-page .dash-alert__state {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dashboard-page .dash-alert--low {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}
.dashboard-page .dash-alert--low .material-symbols-outlined {
  color: #d97706;
}
.dashboard-page .dash-alert--out {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}
.dashboard-page .dash-alert--out .material-symbols-outlined {
  color: #dc2626;
}
.dashboard-page .dash-alert--refill {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1e40af;
}
.dashboard-page .dash-alert--refill .material-symbols-outlined {
  color: #2563eb;
}
.dashboard-page .dash-alert--newproduct {
  background: #ede9fe;
  border-color: #ddd6fe;
  color: #5b21b6;
}
.dashboard-page .dash-alert--newproduct .material-symbols-outlined {
  color: #7c3aed;
}
.dashboard-page .dash-alert__dismiss {
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -4px -6px -4px 2px;
  padding: 4px;
  border-radius: 999px;
  line-height: 0;
  color: currentColor;
  opacity: 0.55;
}
.dashboard-page .dash-alert__dismiss .material-symbols-outlined {
  font-size: 15px;
  color: inherit;
}
.dashboard-page .dash-alert__dismiss:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.1);
}
.dashboard-page .dash-alert__dismiss:disabled {
  opacity: 0.3;
  cursor: default;
}
.dashboard-page .dash-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: 64px;
  grid-auto-flow: dense;
  gap: 16px;
}
.dashboard-page .dash-col1 {
  grid-column: span 1;
}
.dashboard-page .dash-col2 {
  grid-column: span 2;
}
.dashboard-page .dash-col3 {
  grid-column: span 3;
}
.dashboard-page .dash-col4 {
  grid-column: span 4;
}
.dashboard-page .dash-col5 {
  grid-column: span 5;
}
.dashboard-page .dash-col6 {
  grid-column: span 6;
}
.dashboard-page .dash-col7 {
  grid-column: span 7;
}
.dashboard-page .dash-col8 {
  grid-column: span 8;
}
.dashboard-page .dash-row1 {
  grid-row: span 1;
}
.dashboard-page .dash-row2 {
  grid-row: span 2;
}
.dashboard-page .dash-row3 {
  grid-row: span 3;
}
.dashboard-page .dash-row4 {
  grid-row: span 4;
}
.dashboard-page .dash-row5 {
  grid-row: span 5;
}
.dashboard-page .dash-row6 {
  grid-row: span 6;
}
.dashboard-page .dash-card {
  background: var(--md-sys-color-surface, #fff);
  border: 1px solid var(--md-sys-color-outline, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.dashboard-page a.dash-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.dashboard-page a.dash-card:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1), 0 2px 4px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}
.dashboard-page a.dash-card:focus-visible {
  outline: 2px solid var(--md-sys-color-primary, #2563eb);
  outline-offset: 2px;
}
.dashboard-page .dash-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dashboard-page .dash-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--md-sys-color-primary-container, #dbeafe);
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
}
.dashboard-page .dash-ico .material-symbols-outlined {
  font-size: 18px;
}
.dashboard-page .dash-ico.wx {
  background: #fef9c3;
  color: #a16207;
}
.dashboard-page .dash-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-go {
  margin-left: auto;
  color: var(--md-sys-color-on-support, #8996a8);
  opacity: 0.7;
  display: flex;
}
.dashboard-page .dash-go .material-symbols-outlined {
  font-size: 20px;
}
.dashboard-page a.dash-card:hover .dash-go {
  color: var(--md-sys-color-primary, #2563eb);
  opacity: 1;
}
.dashboard-page .tabnum {
  font-variant-numeric: tabular-nums;
}
.dashboard-page .dash-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.dashboard-page .dash-trend .material-symbols-outlined {
  font-size: 15px;
}
.dashboard-page .dash-trend.up {
  color: var(--md-sys-color-success, #16a34a);
  background: var(--md-sys-color-success-container, #dcfce7);
}
.dashboard-page .dash-trend.down {
  color: var(--md-sys-color-error, #dc2626);
  background: var(--md-sys-color-error-container, #fee2e2);
}
.dashboard-page .dash-rev-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.dashboard-page .dash-rev-num {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-background, #0f172a);
  line-height: 1;
}
.dashboard-page .dash-rev-cur {
  font-size: 18px;
  font-weight: 600;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-rev-sub {
  font-size: 12.5px;
  color: var(--md-sys-color-on-support, #8996a8);
  margin-top: 4px;
}
.dashboard-page .dash-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--md-sys-color-surface-container-high, #f1f5f9);
  font-size: 12.5px;
  color: var(--md-sys-color-on-surface, #334155);
}
.dashboard-page .dash-open .material-symbols-outlined {
  font-size: 15px;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-open b {
  font-weight: 700;
  color: var(--md-sys-color-on-background, #0f172a);
  font-variant-numeric: tabular-nums;
}
.dashboard-page .dash-spark-row {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 12px;
}
.dashboard-page .dash-spark-axis {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 96px;
  margin-bottom: 17px;
}
.dashboard-page .dash-spark-axis span {
  font-size: 10px;
  color: var(--md-sys-color-on-support, #8996a8);
  line-height: 1;
  white-space: nowrap;
}
.dashboard-page .dash-spark {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
  height: 113px;
}
.dashboard-page .dash-spark .bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  min-width: 0;
  cursor: default;
}
.dashboard-page .dash-spark .bar {
  width: 100%;
  min-height: 3px;
  border-radius: 5px 5px 3px 3px;
  background: var(--md-sys-color-primary-container, #dbeafe);
  position: relative;
  z-index: 1;
}
.dashboard-page .dash-spark .bar.today {
  background: var(--md-sys-color-primary, #2563eb);
}
.dashboard-page .dash-spark .day {
  font-size: 10px;
  color: var(--md-sys-color-on-support, #8996a8);
  position: relative;
  z-index: 1;
}
.dashboard-page .dash-spark__gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #eef2f7;
  pointer-events: none;
}
.dashboard-page .dash-spark__avg {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.5px dashed #94a3b8;
  pointer-events: none;
  z-index: 2;
}
.dashboard-page .dash-spark__avg-tag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-50%);
  padding: 0 4px;
  border-radius: 999px;
  background: var(--md-sys-color-surface, #fff);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--md-sys-color-on-background, #0f172a);
}
.dashboard-page .dash-badge {
  align-self: flex-start;
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
  background: var(--md-sys-color-primary-container, #dbeafe);
  padding: 2px 8px;
  border-radius: 999px;
}
.dashboard-page .dash-rev-sm {
  font-size: 26px;
  font-weight: 700;
  color: var(--md-sys-color-on-background, #0f172a);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.dashboard-page .dash-count {
  font-size: 44px;
  font-weight: 700;
  color: var(--md-sys-color-on-background, #0f172a);
  line-height: 1;
  letter-spacing: -0.02em;
}
.dashboard-page .dash-count-unit {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--md-sys-color-on-support, #8996a8);
  margin-left: 4px;
}
.dashboard-page .dash-count.attn {
  color: var(--md-sys-color-primary, #2563eb);
}
.dashboard-page .dash-note {
  font-size: 12.5px;
  margin-top: auto;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-chip-warn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--md-sys-color-error, #dc2626);
  background: var(--md-sys-color-error-container, #fee2e2);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.dashboard-page .dash-chip-warn .material-symbols-outlined {
  font-size: 14px;
}
.dashboard-page .dash-req {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}
.dashboard-page .dash-req-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.dashboard-page .dash-req-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--md-sys-color-primary, #2563eb);
}
.dashboard-page .dash-req-item b {
  color: var(--md-sys-color-on-background, #0f172a);
  font-weight: 600;
}
.dashboard-page .dash-req-kind {
  margin-left: auto;
  font-size: 11px;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-wx-now {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dashboard-page .dash-wx-temp {
  font-size: 42px;
  font-weight: 700;
  color: var(--md-sys-color-on-background, #0f172a);
  line-height: 1;
  letter-spacing: -0.02em;
}
.dashboard-page .dash-wx-desc {
  font-size: 13px;
  color: var(--md-sys-color-on-surface, #334155);
}
.dashboard-page .dash-wx-meta {
  font-size: 11.5px;
  color: var(--md-sys-color-on-support, #8996a8);
  margin-top: 2px;
}
.dashboard-page .dash-wx-fc {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--md-sys-color-outline, #e2e8f0);
}
.dashboard-page .dash-wx-day {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dashboard-page .dash-wx-day .d {
  font-size: 11px;
  color: var(--md-sys-color-on-support, #8996a8);
  font-weight: 600;
}
.dashboard-page .dash-wx-day .t {
  font-size: 13px;
  font-weight: 600;
  color: var(--md-sys-color-on-background, #0f172a);
}
.dashboard-page .dash-wx-day .material-symbols-outlined {
  font-size: 20px;
}
.dashboard-page .dash-wx-day .sun {
  color: #eab308;
}
.dashboard-page .dash-wx-day .rain {
  color: var(--md-sys-color-primary, #2563eb);
}
.dashboard-page .dash-wx-day .cloud {
  color: #64748b;
}
.dashboard-page .dash-el-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.dashboard-page .dash-el-kwh {
  font-size: 32px;
  font-weight: 700;
  color: var(--md-sys-color-on-background, #0f172a);
  letter-spacing: -0.02em;
  line-height: 1;
}
.dashboard-page .dash-el-kwh small {
  font-size: 16px;
  color: var(--md-sys-color-on-support, #8996a8);
  font-weight: 600;
}
.dashboard-page .dash-el-czk {
  font-size: 15px;
  color: var(--md-sys-color-on-support, #8996a8);
  font-weight: 600;
}
.dashboard-page .dash-el-bar {
  margin-top: auto;
}
.dashboard-page .dash-el-track {
  height: 8px;
  border-radius: 999px;
  background: var(--md-sys-color-surface-container-high, #f1f5f9);
  overflow: hidden;
}
.dashboard-page .dash-el-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--md-sys-color-primary, #2563eb);
}
.dashboard-page .dash-el-cap {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--md-sys-color-on-support, #8996a8);
  margin-top: 6px;
}
.dashboard-page .dash-el-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  text-decoration: none;
  color: inherit;
}
.dashboard-page .dash-card--el:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1), 0 2px 4px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}
.dashboard-page .dash-el-fetch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  background: var(--md-sys-color-surface, #fff);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--md-sys-color-primary, #2563eb);
}
.dashboard-page .dash-el-fetch .material-symbols-outlined {
  font-size: 16px;
}
.dashboard-page .dash-el-fetch:hover:not(:disabled) {
  border-color: var(--md-sys-color-primary, #2563eb);
  background: #f5f9ff;
}
.dashboard-page .dash-el-fetch:disabled {
  opacity: 0.65;
  cursor: default;
}
.dashboard-page .dash-el-missing {
  margin-top: 10px;
  font-size: 11.5px;
  color: #b45309;
}
.dashboard-page .dash-att-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--md-sys-color-success, #16a34a);
}
.dashboard-page .dash-att-live .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--md-sys-color-success, #16a34a);
  animation: dashPulse 2s infinite;
}
@keyframes dashPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}
.dashboard-page .dash-att-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
}
.dashboard-page .dash-att-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high, #f1f5f9);
}
.dashboard-page .dash-att-row:last-child {
  border-bottom: 0;
}
.dashboard-page .dash-att-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--md-sys-color-primary-container, #dbeafe);
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
}
.dashboard-page .dash-att-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--md-sys-color-on-background, #0f172a);
}
.dashboard-page .dash-att-role {
  font-size: 11.5px;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-att-since {
  margin-left: auto;
  font-size: 12px;
  color: var(--md-sys-color-on-support, #8996a8);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
}
.dashboard-page .dash-att-since b {
  color: var(--md-sys-color-on-background, #0f172a);
  font-weight: 600;
  margin-left: 4px;
}
.dashboard-page .dash-att-row--editable {
  cursor: pointer;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.dashboard-page .dash-att-row--editable:hover {
  background: var(--md-sys-color-surface-container-high, #f1f5f9);
}
.dashboard-page .dash-att-row--editable:focus-visible {
  outline: 2px solid var(--md-sys-color-primary, #3b82f6);
  outline-offset: -2px;
}
.dashboard-page .dash-att-edit-ico {
  font-size: 15px;
  margin-left: 6px;
  opacity: 0;
  color: var(--md-sys-color-primary, #3b82f6);
  transition: opacity 0.12s ease;
}
.dashboard-page .dash-att-row--editable:hover .dash-att-edit-ico,
.dashboard-page .dash-att-row--editable:focus-visible .dash-att-edit-ico {
  opacity: 0.85;
}
.dashboard-page .dash-att-empty {
  margin-top: 12px;
  font-size: 13px;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-tasks__head {
  flex-wrap: wrap;
  row-gap: 8px;
}
.dashboard-page .dash-tasks__tabs {
  display: flex;
  gap: 4px;
  order: 2;
  width: 100%;
}
.dashboard-page .dash-tasks__tab {
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-tasks__tab .n {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
  margin-left: 2px;
}
.dashboard-page .dash-tasks__tab:hover {
  background: var(--md-sys-color-surface-container-high, #f1f5f9);
}
.dashboard-page .dash-tasks__tab.is-active {
  background: var(--md-sys-color-primary-container, #dbeafe);
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
}
.dashboard-page .dash-tasks__tab.is-active .n {
  opacity: 1;
}
.dashboard-page .dash-tasks__filters {
  display: flex;
  gap: 6px;
  order: 3;
  width: 100%;
}
.dashboard-page .dash-tasks__filter {
  height: 30px;
  min-width: 0;
  flex: 1;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  background: var(--md-sys-color-surface, #fff);
  font: inherit;
  font-size: 12px;
  color: var(--md-sys-color-on-surface, #334155);
  cursor: pointer;
}
.dashboard-page .dash-tasks__new {
  order: 1;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--md-sys-color-primary, #2563eb);
  color: var(--md-sys-color-on-primary, #fff);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}
.dashboard-page .dash-tasks__new .material-symbols-outlined {
  font-size: 16px;
}
.dashboard-page .dash-tasks__new:hover {
  filter: brightness(1.08);
}
.dashboard-page .dash-tasks__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 2px -8px 0;
  padding: 0 8px;
}
.dashboard-page .dash-tasks__list {
  display: flex;
  flex-direction: column;
}
.dashboard-page .dash-tasks__list[hidden],
.dashboard-page .dash-task[hidden] {
  display: none;
}
.dashboard-page .dash-tasks__empty {
  padding: 14px 2px;
  font-size: 13px;
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high, #f1f5f9);
}
.dashboard-page .dash-task:last-of-type {
  border-bottom: 0;
}
.dashboard-page .dash-task--overdue {
  background: #fef2f2;
}
.dashboard-page .dash-task--done .dash-task__title {
  color: var(--md-sys-color-on-support, #8996a8);
  font-weight: 500;
}
.dashboard-page .dash-task--flash {
  animation: dashTaskFlash 1.6s ease-out;
}
@keyframes dashTaskFlash {
  0% {
    background: var(--md-sys-color-primary-container, #dbeafe);
  }
  100% {
    background: transparent;
  }
}
.dashboard-page .dash-task__btn {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1.5px solid var(--md-sys-color-outline-variant, #d5dae2);
  background: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-support, #8996a8);
}
.dashboard-page .dash-task__btn .material-symbols-outlined {
  font-size: 16px;
}
.dashboard-page .dash-task__btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.dashboard-page .dash-task__btn--done:hover:not(:disabled) {
  border-color: var(--md-sys-color-success, #16a34a);
  background: var(--md-sys-color-success-container, #dcfce7);
  color: var(--md-sys-color-success, #16a34a);
}
.dashboard-page .dash-task__btn--undo:hover:not(:disabled) {
  border-color: var(--md-sys-color-primary, #2563eb);
  color: var(--md-sys-color-primary, #2563eb);
}
.dashboard-page .dash-task__open {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.dashboard-page .dash-task__open:hover .dash-task__title {
  text-decoration: underline;
}
.dashboard-page .dash-task__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
}
.dashboard-page .dash-task__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-background, #0f172a);
  word-break: break-word;
}
.dashboard-page .dash-task__detail {
  display: none;
}
.dashboard-page .dash-mocknote {
  margin-top: 18px;
  font-size: 12px;
  color: var(--md-sys-color-on-support, #8996a8);
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.dashboard-page .dash-mocknote .material-symbols-outlined {
  font-size: 15px;
}
@media (max-width: 860px) {
  .dashboard-page .dash-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .dashboard-page .dash-col3,
  .dashboard-page .dash-col4,
  .dashboard-page .dash-col5,
  .dashboard-page .dash-col6,
  .dashboard-page .dash-col7,
  .dashboard-page .dash-col8 {
    grid-column: span 4;
  }
}
@media (max-width: 520px) {
  .dashboard-page .dash-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .dashboard-page .dash-grid > .dash-card {
    grid-column: auto;
    grid-row: auto;
  }
  .dashboard-page .dash-card {
    min-height: 124px;
  }
  .dashboard-page .dash-card--tasks .dash-tasks__body {
    max-height: 60vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-page .dash-att-live .pulse {
    animation: none;
  }
  .dashboard-page .dash-task--flash {
    animation: none;
  }
  .dashboard-page a.dash-card:hover {
    transform: none;
  }
}
.sklad-warehouses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 12px;
  align-items: start;
}
.sklad-wh {
  background: var(--md-sys-color-surface-container-low);
  border-radius: 24px;
  padding: 18px 20px 22px;
  border-top: 4px solid transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.sklad-wh--external {
  background: #dfe7fa;
}
.sklad-wh--dragover {
  background: var(--md-sys-color-secondary-container);
  box-shadow: inset 0 0 0 2px var(--md-sys-color-primary);
}
.sklad-wh__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--md-sys-color-on-surface);
}
.sklad-wh__title .material-symbols-outlined {
  font-size: 20px;
  color: var(--md-sys-color-on-surface-variant);
}
.sklad-wh__total {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sklad-wh__total:empty {
  display: none;
}
.sklad-owner-group + .sklad-owner-group {
  margin-top: 22px;
}
.sklad-owner-heading {
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0 0 10px;
  padding: 2px 0 2px 10px;
  border-left: 4px solid currentColor;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.sklad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.sklad-empty {
  padding: 24px 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.95rem;
}
.sklad-card {
  background: var(--md-sys-color-surface-container);
  border-radius: 16px;
  padding: 16px 18px 18px;
  border-left: 4px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: grab;
}
.sklad-card--dragging {
  opacity: 0.4;
}
.sklad-card--low {
  border-left-color: #EA6247;
}
.sklad-card--out {
  border-left-color: var(--md-sys-color-error);
}
.sklad-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.sklad-card__name {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}
.sklad-card__code {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 2px;
}
.sklad-card__aliases {
  font-size: 0.78rem;
  color: var(--md-sys-color-outline);
  margin-top: 2px;
}
.sklad-card__stock {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--md-sys-color-primary);
  margin: 8px 0 0;
  font-variant-numeric: tabular-nums;
}
.sklad-card--out .sklad-card__stock {
  color: var(--md-sys-color-error);
}
.sklad-card__other {
  font-size: 0.76rem;
  color: var(--md-sys-color-outline);
  margin-top: -2px;
}
.sklad-card__meta {
  font-size: 0.8rem;
  color: var(--md-sys-color-on-surface-variant);
}
.sklad-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.sklad-card__actions .cost-btn {
  flex: 1 1 auto;
}
.sklad-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.sklad-badge--low {
  background: #EA6247;
  color: #fff;
}
.sklad-badge--out {
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error, #fff);
}
.sklad-archive-list {
  display: flex;
  flex-direction: column;
}
.sklad-archive-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.sklad-archive-row:last-child {
  border-bottom: none;
}
.sklad-archive-row:hover {
  background: #f8fafc;
}
.sklad-archive-row__info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}
.sklad-archive-row__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}
.sklad-archive-row__owner {
  font-size: 0.78rem;
  font-weight: 600;
}
.sklad-archive-row__code {
  font-size: 0.76rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.sklad-archive-row__date {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-left: auto;
  white-space: nowrap;
}
.sklad-archive-row__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.sklad-archive-row__del:hover {
  color: #dc2626;
  border-color: #fecaca;
}
@media (max-width: 520px) {
  .sklad-archive-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .sklad-archive-row__actions {
    width: 100%;
  }
  .sklad-archive-row__actions .cost-btn {
    flex: 1 1 auto;
  }
}
.sklad-mv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.sklad-mv-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.sklad-mv-table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  padding: 12px 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.sklad-mv-table thead th.ta-right {
  text-align: right;
}
.sklad-mv-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.12s ease;
}
.sklad-mv-table tbody tr:last-child {
  border-bottom: none;
}
.sklad-mv-table tbody tr:hover {
  background-color: #f8fafc;
}
.sklad-mv-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  color: #334155;
}
.sklad-mv__time {
  color: #64748b;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sklad-mv__wh {
  color: #94a3b8;
  white-space: nowrap;
  font-size: 0.82rem;
}
.sklad-mv__after {
  font-variant-numeric: tabular-nums;
  color: #64748b;
  white-space: nowrap;
}
.sklad-mv__delta {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}
.sklad-mv__delta--pos {
  color: #16a34a;
}
.sklad-mv__delta--neg {
  color: #dc2626;
}
.sklad-mv__delta--transfer {
  color: #64748b;
}
.sklad-mv__src {
  color: #94a3b8;
  font-size: 0.78rem;
}
.sklad-mv__note {
  color: #64748b;
}
.sklad-mv__type {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
}
.sklad-mv__type--roast {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-surface);
}
.sklad-mv__type--restock {
  background: #dcedc8;
  color: #33691e;
}
.sklad-mv__type--correction {
  background: var(--md-sys-color-surface-container-high);
}
.sklad-mv__type--transfer {
  background: #e1e6f7;
  color: #2a3e8c;
}
.sklad-mv__type--revert {
  background: #fde7d9;
  color: #8c3d00;
}
.sklad-mv__actions {
  width: 32px;
  text-align: right;
}
.sklad-mv__revert {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  color: var(--md-sys-color-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sklad-mv__revert .material-symbols-outlined {
  font-size: 18px;
}
.sklad-mv__revert:hover {
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-error);
}
.sklad-mv-row--reverted {
  opacity: 0.55;
}
.sklad-mv-row--reverted .sklad-mv__delta {
  text-decoration: line-through;
}
.sklad-mv-row--revert {
  background: var(--md-sys-color-surface-container-lowest, transparent);
}
.sklad-stats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.sklad-stats-bar .cost-field__input {
  width: auto;
  flex: 0 0 auto;
}
.sklad-stats-summary {
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 16px;
}
.sklad-stats-summary strong {
  color: var(--md-sys-color-primary);
  font-size: 1.05em;
}
.sklad-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 28px;
}
.sklad-panel__title {
  margin: 0;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.sklad-panel__body {
  padding: 16px;
}
.sklad-panel .sklad-empty {
  border: none;
  margin: 0;
}
.sklad-chart {
  max-width: 720px;
  margin: 0 auto;
}
.sklad-chart__inner {
  position: relative;
}
.sklad-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
}
.sklad-chart__bar {
  fill: var(--md-sys-color-primary);
  opacity: 0.9;
}
.sklad-chart__bar--active {
  opacity: 1;
}
.sklad-chart__grid {
  stroke: #e2e8f0;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.sklad-chart__axis {
  font-size: 13px;
  fill: #94a3b8;
}
.sklad-chart__axisline {
  stroke: #e2e8f0;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.sklad-chart__avgline {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 2;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.sklad-chart__legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
  font-size: 0.82rem;
  color: #475569;
}
.sklad-chart__leg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sklad-chart__leg b {
  font-weight: 700;
  color: #0f172a;
}
.sklad-chart__swatch {
  display: inline-block;
  flex: 0 0 auto;
}
.sklad-chart__swatch--bar {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--md-sys-color-primary);
}
.sklad-chart__swatch--avg {
  width: 16px;
  height: 0;
  border-top: 2px dashed #3b82f6;
}
.sklad-stats-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.sklad-stats-tables .sklad-panel {
  margin-bottom: 0;
}
@media (max-width: 860px) {
  .sklad-warehouses {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sklad-stats-tables {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
@media (max-width: 520px) {
  .sklad-grid {
    grid-template-columns: 1fr;
  }
  .sklad-mv-table {
    font-size: 0.8rem;
  }
  .sklad-mv-table th:nth-child(7),
  .sklad-mv-table td:nth-child(7) {
    display: none;
  }
}
.sklad-share-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.sklad-share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--md-sys-color-secondary-container, #f1f5f9);
}
.sklad-share-row__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.sklad-share-row__info {
  flex: none;
  min-width: 0;
  max-width: 38%;
}
.sklad-share-row__name {
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sklad-share-row__count {
  font-size: 0.78rem;
  color: var(--md-sys-color-on-surface-variant);
}
.sklad-share-row__url {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--md-sys-color-surface, #fff);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--md-sys-color-outline-variant, #cbd5e1);
  color: var(--md-sys-color-on-surface-variant);
}
.sklad-share-row__copy {
  white-space: nowrap;
  flex: none;
}
@media (max-width: 520px) {
  .sklad-share-row__info {
    max-width: none;
    flex: 1;
  }
  .sklad-share-row__url {
    display: none;
  }
}
.sklad-partner-page {
  background: var(--md-sys-color-background, #f8fafc);
  color: var(--md-sys-color-on-background, #0f172a);
  min-height: 100vh;
  margin: 0;
  overflow: auto;
}
.skp-header {
  background: var(--md-sys-color-surface, #fff);
  border-bottom: 1px solid var(--md-sys-color-outline, #e2e8f0);
  padding: 20px 16px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.skp-header-logo {
  height: 40px;
  width: auto;
  margin-bottom: 2px;
}
.skp-header-company {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}
.skp-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}
.skp-header-title .material-symbols-outlined {
  font-size: 22px;
  color: var(--md-sys-color-primary);
}
.skp-header-owner {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--md-sys-color-on-primary-container, #1e3a8a);
  background: var(--md-sys-color-primary-container, #dbeafe);
  padding: 3px 12px;
  border-radius: 999px;
}
.skp-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}
.skp-moves {
  margin-top: 32px;
  margin-bottom: 8px;
}
.skp-moves-count {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--md-sys-color-on-surface-variant);
}
.skp-moves-scroll {
  overflow: auto;
  max-height: 65vh;
}
.skp-moves .sklad-mv-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}
.skp-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  text-align: center;
}
.skp-footer p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}
.skp-footer p .material-symbols-outlined {
  font-size: 16px;
}
.sklad-card--readonly {
  cursor: default;
}
.email-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.email-title {
  margin: 0 0 6px;
  color: var(--md-sys-color-primary);
  font-weight: 400;
}
.email-top__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.email-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 999px;
  background: var(--md-sys-color-surface, #fff);
  padding: 0 6px 0 12px;
  height: 40px;
  min-width: 220px;
  max-width: 340px;
  flex: 1 1 220px;
}
.email-search:focus-within {
  border-color: var(--md-sys-color-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.email-search > .material-symbols-outlined {
  font-size: 18px;
  color: #94a3b8;
  flex-shrink: 0;
}
.email-search input {
  border: none;
  outline: none;
  background: transparent;
  min-width: 0;
  flex: 1;
  font: inherit;
  font-size: 13.5px;
  color: inherit;
  padding: 0;
}
.email-search input::-webkit-search-cancel-button,
.email-search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.email-search__clear {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  line-height: 0;
  flex-shrink: 0;
}
.email-search__clear .material-symbols-outlined {
  font-size: 16px;
}
.email-search__clear:hover {
  background: #f1f5f9;
  color: #475569;
}
.email-searchinfo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 8px 12px;
}
.email-searchinfo .material-symbols-outlined {
  font-size: 16px;
}
.email-searchinfo__clear {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #1d4ed8;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  margin-left: auto;
}
.email-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.email-side {
  position: sticky;
  top: 16px;
}
.email-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.email-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--md-sys-color-on-surface, #1a1c1e);
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
}
.email-chip:hover {
  background: var(--md-sys-color-surface-container, #f2f5f9);
}
.email-chip--active {
  background: var(--md-sys-color-primary, #2563eb);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.email-chip--active:hover {
  background: var(--md-sys-color-primary, #2563eb);
}
.email-chip__count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
}
.email-chip--active .email-chip__count {
  background: rgba(255, 255, 255, 0.25);
}
@media (max-width: 1000px) {
  .email-search {
    max-width: none;
    flex-basis: 100%;
    order: -1;
  }
  .email-layout {
    display: block;
  }
  .email-side {
    position: static;
    margin-bottom: 18px;
  }
  .email-filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .email-chip {
    width: auto;
    border-radius: 999px;
    padding: 6px 12px;
    border-color: var(--md-sys-color-outline-variant, #d5dae2);
    background: var(--md-sys-color-surface, #fff);
  }
  .email-chip--active {
    border-color: transparent;
  }
  .email-chip__count {
    margin-left: 0;
  }
}
.email-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  position: relative;
}
.email-list[data-loading] {
  opacity: 0.5;
}
.email-list__loading {
  text-align: center;
  padding: 40px;
  color: var(--md-sys-color-outline);
}
.email-note {
  padding: 24px;
  text-align: center;
  color: var(--md-sys-color-outline);
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.email-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  border-radius: 12px;
  background: var(--md-sys-color-surface, #fff);
  padding: 16px 16px 14px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.email-card:hover {
  border-color: var(--md-sys-color-outline-variant, #cdd5df);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.email-card--done {
  opacity: 0.55;
}
.email-card--review {
  border-left: 3px solid #f59e0b;
}
.email-card__avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}
.email-card__body {
  min-width: 0;
}
.email-card__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.email-card__titles {
  min-width: 0;
  flex: 1;
}
.email-card__subject {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--md-sys-color-on-background, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-card--unread .email-card__subject {
  font-weight: 700;
}
.email-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}
.email-card__from {
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-card--unread .email-card__from {
  color: #475569;
}
.email-card__date {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--md-sys-color-on-surface-variant, #64748b);
}
.email-card--unread .email-card__date {
  font-weight: 700;
  color: #475569;
}
.email-card__desc {
  font-size: 13.5px;
  color: #97a1b0;
  line-height: 1.5;
  margin-top: 10px;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.email-card__tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.email-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 10px 0 7px;
  border-radius: 9px;
  box-sizing: border-box;
  background: #f1eefe;
  color: #5b4bb5;
  font-size: 12px;
  font-weight: 700;
}
.email-att-chip .material-symbols-outlined {
  font-size: 17px;
}
.email-card__att {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.email-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.email-card__att + .email-card__actions {
  margin-top: 8px;
}
.email-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 26px;
  padding: 0 11px 0 8px;
  border-radius: 9px;
  box-sizing: border-box;
  background: #eef2f7;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.email-cat .material-symbols-outlined {
  font-size: 17px;
  flex-shrink: 0;
}
.email-cat__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-cat--faktura {
  background: #dbeafe;
  color: #1e3a8a;
}
.email-cat--zajemce_prace {
  background: #dcfce7;
  color: #166534;
}
.email-cat--nabidka_kava {
  background: #f3e8ff;
  color: #6b21a8;
}
.email-cat--objednavka_moje {
  background: #fef9c3;
  color: #854d0e;
}
.email-cat--objednavka_zakaznik {
  background: #ffedd5;
  color: #9a3412;
}
.email-cat--platba_zakaznik {
  background: #ecfccb;
  color: #3f6212;
}
.email-cat--newsletter {
  background: #f1f5f9;
  color: #64748b;
}
.email-cat--ostatni {
  background: #e2e8f0;
  color: #334155;
}
.email-flag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 9px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.email-flag--urgent {
  background: #fee2e2;
  color: #b91c1c;
}
.email-flag--review {
  background: #fef3c7;
  color: #b45309;
}
.email-flag--ok {
  background: #dcfce7;
  color: #166534;
}
.email-flag--pending {
  background: #dbeafe;
  color: #1e40af;
}
.email-flag--miss {
  background: #fef3c7;
  color: #92400e;
}
.email-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--md-sys-color-surface-container-high, #eef2f7);
  color: var(--md-sys-color-on-support, #64748b);
}
.email-badge--zajemce_prace {
  background: #dcfce7;
  color: #166534;
}
.email-badge--faktura {
  background: #dbeafe;
  color: #1e3a8a;
}
.email-badge--nabidka_kava {
  background: #f3e8ff;
  color: #6b21a8;
}
.email-badge--objednavka {
  background: #fef9c3;
  color: #854d0e;
}
.email-badge--newsletter {
  background: #f1f5f9;
  color: #64748b;
}
.email-badge--ostatni {
  background: #e2e8f0;
  color: #334155;
}
.email-replied {
  font-size: 12px;
  color: #166534;
  font-weight: 600;
}
.email-btn {
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 20px;
  background: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-surface, #1a1c1e);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.email-btn--primary {
  background: var(--md-sys-color-primary, #2563eb);
  color: #fff;
  border-color: transparent;
}
.email-btn--ghost {
  background: transparent;
}
.email-btn--send {
  border-color: #2563eb;
  color: #2563eb;
}
.email-btn--send:hover {
  background: #eff5ff;
}
.email-btn--send:disabled {
  opacity: 0.6;
  cursor: default;
}
.email-done-btn {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.email-done-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.email-done-btn--done {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}
.email-done-btn--done:hover {
  background: #bbf7d0;
  border-color: #86efac;
}
.email-done-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.email-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 760px;
  width: 92vw;
  max-height: 88vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.email-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
.email-dialog__inner {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
}
.email-detail__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--md-sys-color-surface, #fff);
  margin: 0 -22px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
}
.email-detail__avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}
.email-detail__ident {
  min-width: 0;
  flex: 1;
}
.email-detail__subject {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--md-sys-color-on-background, #0f172a);
}
.email-detail__meta {
  font-size: 12.5px;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.email-detail__date {
  white-space: nowrap;
}
.email-detail__date::before {
  content: " · ";
}
.email-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--md-sys-color-outline);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}
.email-close:hover {
  background: var(--md-sys-color-surface-container-high, #eef2f7);
}
.email-detail__tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.email-detail__sec-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--md-sys-color-outline, #94a3b8);
  margin-bottom: 8px;
}
.email-detail__sec {
  margin-bottom: 16px;
}
.email-detail__summary {
  display: flex;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.55;
  background: #f4f7ff;
  border: 1px solid #e2e9fb;
  border-left: 3px solid var(--md-sys-color-primary, #2563eb);
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.email-detail__summary .material-symbols-outlined {
  font-size: 18px;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}
.email-detail__att {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.email-detail__imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.email-atts:not(.email-atts--open) .email-att--more {
  display: none;
}
.email-atts__more {
  display: inline-block;
  margin-top: 8px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--md-sys-color-primary, #2563eb);
  text-decoration: underline;
}
.email-atts__more:hover {
  color: #1d4ed8;
}
.email-att-img {
  display: block;
  width: 132px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--md-sys-color-surface-container, #f7f9fc);
}
.email-att-img img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  background: #fff;
}
.email-att-img__name {
  display: block;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--md-sys-color-on-surface-variant, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-att-img:hover {
  border-color: var(--md-sys-color-primary, #2563eb);
}
.email-att {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  text-decoration: none;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 8px;
  padding: 6px 11px;
  color: var(--md-sys-color-primary, #2563eb);
  background: var(--md-sys-color-surface, #fff);
}
.email-att .material-symbols-outlined {
  font-size: 16px;
}
.email-att:hover {
  border-color: #2563eb;
  background: #f5f9ff;
}
.email-detail__body {
  margin-bottom: 18px;
}
.email-trans {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid #cddffb;
  border-radius: 10px 10px 0 0;
  border-bottom: none;
  background: #f2f7ff;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #1d4ed8;
}
.email-trans .material-symbols-outlined {
  font-size: 17px;
}
.email-trans__label {
  font-weight: 600;
}
.email-trans__btn {
  margin-left: auto;
  border: 1px solid #cddffb;
  border-radius: 7px;
  background: var(--md-sys-color-surface, #fff);
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
}
.email-trans__btn:hover {
  background: #e6efff;
  border-color: #1d4ed8;
}
.email-trans--busy {
  color: #64748b;
  border-color: #e2e8f0;
  background: var(--md-sys-color-surface-container, #f7f9fc);
}
.email-trans--busy .material-symbols-outlined {
  animation: emailTransPulse 1.1s ease-in-out infinite;
}
.email-trans--fail {
  color: #b45309;
  border-color: #fde3bf;
  background: #fff8ed;
}
.email-trans--fail .email-trans__btn {
  color: #b45309;
  border-color: #fde3bf;
}
.email-trans--fail .email-trans__btn:hover {
  background: #fff1dc;
  border-color: #b45309;
}
.email-trans--offer {
  justify-content: flex-end;
  gap: 4px;
  padding: 3px 2px;
  border: none;
  background: none;
  color: #94a3b8;
}
.email-trans--offer .material-symbols-outlined {
  font-size: 15px;
}
.email-trans--offer .email-trans__btn {
  margin-left: 0;
  border: none;
  background: none;
  color: #64748b;
  padding: 2px 4px;
  font-weight: 500;
  text-decoration: underline;
}
.email-trans--offer .email-trans__btn:hover {
  background: none;
  color: #1d4ed8;
}
@keyframes emailTransPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.email-trans--ok ~ .email-body .email-frame,
.email-trans--busy ~ .email-body .email-frame,
.email-trans--fail ~ .email-body .email-frame,
.email-trans--ok ~ .email-body .email-bodytext,
.email-trans--busy ~ .email-body .email-bodytext,
.email-trans--fail ~ .email-body .email-bodytext {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.email-frame {
  width: 100%;
  height: 360px;
  border: 1px solid var(--md-sys-color-outline-variant, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}
.email-bodytext {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  background: var(--md-sys-color-surface-container, #f7f9fc);
  border: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  padding: 14px;
  border-radius: 10px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
}
.email-sent {
  border: 1px solid #cdebd8;
  border-left: 3px solid #16a34a;
  border-radius: 10px;
  background: #f2fbf5;
  padding: 10px 13px;
  margin-bottom: 8px;
}
.email-sent:last-child {
  margin-bottom: 0;
}
.email-sent__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 6px;
}
.email-sent__meta .material-symbols-outlined {
  font-size: 15px;
}
.email-sent__text {
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
  color: var(--md-sys-color-on-surface, #0f172a);
  max-height: 240px;
  overflow: auto;
}
.email-reply {
  border-top: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  padding-top: 16px;
}
.email-reply__cc {
  margin-bottom: 8px;
}
.email-reply__cc-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--md-sys-color-primary, #2563eb);
}
.email-reply__cc-btn:hover {
  text-decoration: underline;
}
.email-reply__cc-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 9px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 13.5px;
}
.email-reply__cc-input[hidden] {
  display: none;
}
.email-reply__cc-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.email-editor {
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--md-sys-color-surface, #fff);
}
.email-editor:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.email-editor__bar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: var(--md-sys-color-surface-container, #f7f9fc);
  border-bottom: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
}
.email-editor__sep {
  width: 1px;
  height: 18px;
  margin: 0 5px;
  background: var(--md-sys-color-outline-variant, #d5dae2);
}
.email-editor__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant, #475569);
  cursor: pointer;
}
.email-editor__btn .material-symbols-outlined {
  font-size: 19px;
}
.email-editor__btn:hover {
  background: var(--md-sys-color-surface-container-high, #e8edf4);
}
.email-editor__btn.is-active {
  background: #dbe6fe;
  color: #1d4ed8;
}
.email-editor__area {
  min-height: 130px;
  max-height: 320px;
  overflow: auto;
  padding: 12px 13px;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  word-break: break-word;
}
.email-editor__area p,
.email-editor__area ul,
.email-editor__area ol {
  margin: 0 0 8px;
}
.email-editor__area ul,
.email-editor__area ol {
  padding-left: 22px;
}
.email-editor__area a {
  color: var(--md-sys-color-primary, #2563eb);
}
.email-editor__area:empty::before {
  content: attr(data-ph);
  color: var(--md-sys-color-outline, #94a3b8);
  pointer-events: none;
}
.email-sig {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  color: var(--md-sys-color-on-surface-variant, #475569);
}
.email-reply__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}
.email-detail--sig .email-detail__head {
  position: static;
}
@media (min-width: 1100px) {
  .email-dialog--detail[open] {
    display: flex;
    flex-direction: column;
    width: 70vw;
    max-width: 1700px;
    height: 90vh;
    max-height: 90vh;
  }
  .email-dialog--detail[open] .email-dialog__inner {
    flex: 1;
    min-height: 0;
  }
  .email-dialog--detail[open] .email-detail {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .email-dialog--detail[open] .email-detail__head {
    flex-shrink: 0;
  }
  .email-dialog--detail[open] .email-detail__cols {
    flex: 1;
    min-height: 0;
  }
  .email-dialog--detail[open] .email-detail__col {
    min-height: 0;
    overflow-y: auto;
  }
  .email-dialog--detail[open] .email-detail__col--main {
    display: flex;
    flex-direction: column;
  }
  .email-dialog--detail[open] .email-detail__col--main > * {
    flex-shrink: 0;
  }
  .email-dialog--detail[open] .email-detail__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 240px;
    margin-bottom: 0;
  }
  .email-dialog--detail[open] .email-detail__body > .email-trans {
    flex-shrink: 0;
  }
  .email-dialog--detail[open] .email-body {
    flex: 1;
    min-height: 0;
  }
  .email-dialog--detail[open] .email-body > .email-frame {
    height: 100%;
  }
  .email-dialog--detail[open] .email-body > .email-bodytext {
    height: 100%;
    max-height: none;
    box-sizing: border-box;
  }
  .email-dialog--detail[open] .email-detail__col--side {
    display: flex;
    flex-direction: column;
    padding-top: 10px;
  }
  .email-dialog--detail[open] .email-detail__col--side > * {
    flex-shrink: 0;
  }
  .email-dialog--detail[open] .email-reply {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 260px;
  }
  .email-dialog--detail[open] .email-editor {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .email-dialog--detail[open] .email-editor__area {
    flex: 1;
    max-height: none;
  }
  .email-detail__cols {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0;
  }
  .email-detail__col {
    min-width: 0;
    scrollbar-gutter: stable;
  }
  .email-detail__col--main {
    padding-right: 30px;
  }
  .email-detail__col--side {
    padding-left: 30px;
    border-left: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  }
  .email-detail__col--side > .email-reply:first-child {
    border-top: none;
    padding-top: 0;
  }
}
@media (max-width: 600px) {
  .email-frame {
    height: 260px;
  }
}
.email-cfg-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: center;
}
.email-cfg-add input[type="text"] {
  flex: 1 1 180px;
  min-width: 140px;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-surface, #1a1c1e);
  box-sizing: border-box;
}
.email-cfg-add input[type="text"]:focus,
.email-cfg-select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.email-cfg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.email-cfg-empty {
  color: var(--md-sys-color-outline);
  font-size: 13px;
  padding: 8px 0;
}
.email-cfg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  border-radius: 10px;
  padding: 10px 12px;
}
.email-cfg-row--off {
  opacity: 0.5;
}
.email-cfg-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
}
.email-cfg-row__main b {
  color: var(--md-sys-color-on-background, #0f172a);
}
.email-cfg-row__main span {
  color: var(--md-sys-color-on-surface-variant);
}
.email-cfg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  cursor: pointer;
}
.email-cfg-del {
  border: none;
  background: transparent;
  color: var(--md-sys-color-outline);
  cursor: pointer;
  font-size: 15px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.email-cfg-del:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.email-badge--objednavka_moje {
  background: #fef9c3;
  color: #854d0e;
}
.email-badge--objednavka_zakaznik {
  background: #ffedd5;
  color: #9a3412;
}
.email-badge--platba_zakaznik {
  background: #ecfccb;
  color: #3f6212;
}
.email-reclass {
  border: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  border-radius: 12px;
  margin-top: 16px;
  background: var(--md-sys-color-surface, #fff);
}
.email-reclass[open] {
  background: #eff4ff;
  border-color: #dbe6fe;
}
.email-reclass__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant, #475569);
  border-radius: 11px;
}
.email-reclass__toggle .material-symbols-outlined {
  font-size: 18px;
}
.email-reclass__toggle:hover {
  background: var(--md-sys-color-surface-container, #f2f5f9);
}
.email-reclass[open] .email-reclass__toggle {
  color: #1d4ed8;
  border-radius: 11px 11px 0 0;
}
.email-reclass[open] .email-reclass__toggle:hover {
  background: transparent;
}
.email-reclass__toggle::-webkit-details-marker {
  display: none;
}
.email-reclass__toggle-txt {
  flex: 1;
}
.email-reclass__chev {
  transition: transform 0.15s ease;
}
.email-reclass[open] .email-reclass__chev {
  transform: rotate(180deg);
}
.email-reclass__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 14px 14px;
}
.email-reclass__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.email-reclass__cat {
  flex: 1 1 200px;
  min-width: 160px;
  border: 1px solid #cdd9f0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--md-sys-color-on-surface, #1a1c1e);
}
.email-reclass__cat:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.email-reclass__row .email-btn {
  margin-left: auto;
}
.email-reclass__learn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--md-sys-color-on-surface-variant, #475569);
  border-top: 1px solid #dbe6fe;
  padding-top: 12px;
}
.email-reclass__hint {
  flex-basis: 100%;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 2px;
}
.email-reclass__learn > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #dbe6fe;
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  white-space: nowrap;
}
.email-reclass__learn > label:hover {
  border-color: #93b4fb;
}
.email-reclass__learn > label.emrem-txt {
  background: transparent;
  border-color: transparent;
  padding: 5px 0;
}
.email-reclass__learn .emrem-txt {
  gap: 8px;
}
.email-reclass__learn .emrem-txt input {
  border: 1px solid #cdd9f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12.5px;
  font-family: inherit;
  width: 130px;
}
.email-reclass__learn .emrem-txt input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.email-cfg-add--wrap {
  align-items: center;
}
.email-cfg-add--wrap input[type="text"] {
  flex: 1 1 150px;
  min-width: 120px;
}
.email-settings {
  max-width: 880px;
}
.email-settings__intro {
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 20px;
  max-width: 640px;
  line-height: 1.5;
}
.email-sec {
  background: var(--md-sys-color-surface, #fff);
  border: 1px solid var(--md-sys-color-surface-container-high, #e6eaf0);
  border-radius: 14px;
  padding: 18px 18px 20px;
  margin-bottom: 18px;
}
.email-sec__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.email-sec__head .material-symbols-outlined {
  color: var(--md-sys-color-primary, #2563eb);
  font-size: 22px;
}
.email-sec__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--md-sys-color-on-background, #0f172a);
}
.email-sec__desc {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.5;
  max-width: 660px;
}
.email-cfg-select {
  flex: 0 1 210px;
  min-width: 150px;
  border: 1px solid var(--md-sys-color-outline-variant, #d5dae2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-surface, #1a1c1e);
  box-sizing: border-box;
}
.email-cfg-row {
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.email-cfg-row:hover {
  border-color: var(--md-sys-color-outline-variant, #cbd5e1);
}
.email-cfg-drag {
  cursor: grab;
  color: var(--md-sys-color-outline, #94a3b8);
  font-size: 20px;
  flex: none;
  user-select: none;
  margin-right: 2px;
}
.email-cfg-drag:active {
  cursor: grabbing;
}
.email-cfg-row--drag {
  padding-left: 8px;
}
.email-cfg-row.dragging {
  opacity: 0.5;
  border-style: dashed;
  border-color: var(--md-sys-color-primary, #2563eb);
  background: var(--md-sys-color-surface-container, #f5f7fa);
}
.email-cfg-row__edit {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.email-cfg-name,
.email-cfg-descinput {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 6px;
  font-family: inherit;
  background: transparent;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
}
.email-cfg-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--md-sys-color-on-background, #0f172a);
}
.email-cfg-descinput {
  font-size: 12.5px;
  color: var(--md-sys-color-on-surface-variant);
}
.email-cfg-name:hover,
.email-cfg-descinput:hover {
  border-color: var(--md-sys-color-outline-variant, #e2e8f0);
}
.email-cfg-name:focus,
.email-cfg-descinput:focus {
  outline: none;
  border-color: var(--md-sys-color-primary, #2563eb);
  background: var(--md-sys-color-surface, #fff);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 380px;
  max-width: calc(100vw - 36px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.toast--in {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.toast--leaving {
  opacity: 0;
  transform: translateX(24px) scale(0.98);
}
.toast__icon {
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  margin-top: 1px;
  animation: toast-pop 0.32s ease both;
}
.toast__body {
  min-width: 0;
}
.toast__title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}
.toast__msg {
  font-size: 0.86rem;
  line-height: 1.4;
  color: #475569;
  margin-top: 2px;
  word-break: break-word;
  white-space: pre-line;
}
.toast__action {
  margin-top: 10px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: #64748b;
}
.toast__close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 8px;
  line-height: 0;
  margin: -2px -2px 0 0;
}
.toast__close .material-symbols-outlined {
  font-size: 18px;
}
.toast__close:hover {
  background: #f1f5f9;
  color: #475569;
}
.toast__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: currentColor;
  opacity: 0.45;
  animation: toast-bar linear forwards;
}
.toast--success {
  border-left-color: #16a34a;
}
.toast--success .toast__icon {
  color: #16a34a;
}
.toast--success .toast__action {
  background: #16a34a;
}
.toast--success .toast__bar {
  color: #16a34a;
}
.toast--info {
  border-left-color: #2563eb;
}
.toast--info .toast__icon {
  color: #2563eb;
}
.toast--info .toast__action {
  background: #2563eb;
}
.toast--info .toast__bar {
  color: #2563eb;
}
.toast--warning {
  border-left-color: #d97706;
}
.toast--warning .toast__icon {
  color: #d97706;
}
.toast--warning .toast__action {
  background: #d97706;
}
.toast--error {
  border-left-color: #dc2626;
}
.toast--error .toast__icon {
  color: #dc2626;
}
.toast--error .toast__action {
  background: #dc2626;
}
@keyframes toast-bar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
@keyframes toast-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 640px) {
  .toast-stack {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  .toast {
    transform: translateY(24px) scale(0.98);
  }
  .toast--in {
    transform: translateY(0) scale(1);
  }
  .toast--leaving {
    transform: translateY(24px) scale(0.98);
  }
}
.plan-hint {
  margin: -4px 0 14px;
}
.plan-grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 12px;
  background: var(--md-sys-color-surface-container);
}
.plan-grid {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
}
.plan-grid th,
.plan-grid td {
  border-bottom: 1px solid var(--md-sys-color-outline);
  border-right: 1px solid var(--md-sys-color-outline);
  padding: 0;
  text-align: center;
  vertical-align: middle;
}
.plan-grid th:last-child,
.plan-grid td:last-child {
  border-right: none;
}
.plan-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  font-weight: 700;
  padding: 8px 6px;
  white-space: nowrap;
}
.plan-grid .plan-day-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--md-sys-color-surface-container-high);
  min-width: 72px;
  white-space: nowrap;
  padding: 4px 8px;
  text-align: left;
  font-weight: 600;
}
.plan-grid thead .plan-day-col {
  z-index: 4;
}
.plan-grid .plan-dow {
  color: var(--md-sys-color-on-support);
  margin-right: 4px;
}
.plan-grid .plan-dnum {
  font-weight: 700;
}
.plan-grid .plan-row-weekend .plan-day-col,
.plan-grid .plan-row-weekend .plan-cell {
  background: var(--md-sys-color-secondary-container);
}
.plan-grid .plan-row-today .plan-day-col {
  box-shadow: inset 3px 0 0 var(--md-sys-color-primary);
}
.plan-grid .plan-row-today .plan-cell {
  background: var(--md-sys-color-primary-container);
}
.plan-grid .plan-cell {
  min-width: 62px;
  height: 34px;
  padding: 2px;
}
.plan-cell-add {
  width: 100%;
  height: 100%;
  min-height: 30px;
  border: none;
  background: transparent;
  color: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.plan-cell-add:hover,
.plan-cell-add:focus-visible {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-primary);
  outline: none;
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 1px;
  padding: 4px 7px;
  border: none;
  border-radius: 7px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.plan-chip:hover,
.plan-chip:focus-visible {
  filter: brightness(1.08);
  outline: none;
}
.plan-chip.plan-chip-kitchen {
  background: #b45309;
}
.plan-chip-role {
  font-size: 9px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  padding: 0 3px;
}
.plan-totals-row th,
.plan-totals-row td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--md-sys-color-surface-container-high);
  font-weight: 700;
  padding: 6px 4px;
  border-bottom: none;
}
.plan-totals-row .plan-day-col {
  z-index: 3;
}
.plan-totals-row .plan-total {
  color: var(--md-sys-color-on-surface);
}
.modal-actions-row--split {
  align-items: center;
}
.modal-actions-spacer {
  flex: 1 1 auto;
}
.plan-delete-btn {
  --md-text-button-label-text-color: var(--md-sys-color-error);
}
.plan-status {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.plan-status--draft {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.plan-status--live {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.plan-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.plan-actions-row .plan-pub-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--md-sys-color-on-support);
}
.plan-actions-row .plan-pub-info md-icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--md-sys-color-primary);
}
.plan-history-dialog {
  min-width: min(460px, 92vw);
}
.plan-history-dialog h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-history-list {
  max-height: 55vh;
  overflow-y: auto;
  margin: 8px 0 4px;
}
.plan-hist-row {
  display: flex;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant, var(--md-sys-color-outline));
}
.plan-hist-row:last-child {
  border-bottom: none;
}
.plan-hist-row .plan-hist-icon {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: var(--md-sys-color-on-support);
  flex: 0 0 auto;
  margin-top: 1px;
}
.plan-hist-row--delete_shift .plan-hist-icon {
  color: var(--md-sys-color-error);
}
.plan-hist-row--publish .plan-hist-icon {
  color: var(--md-sys-color-primary);
}
.plan-hist-body {
  min-width: 0;
}
.plan-hist-line {
  font-size: 13px;
}
.plan-hist-action {
  font-weight: 700;
  margin-right: 6px;
}
.plan-hist-detail {
  color: var(--md-sys-color-on-surface);
}
.plan-hist-before {
  font-size: 12px;
  color: var(--md-sys-color-on-support);
  text-decoration: line-through;
}
.plan-hist-meta {
  font-size: 11px;
  color: var(--md-sys-color-on-support);
  margin-top: 2px;
}
.plan-hist-view {
  margin-left: auto;
  align-self: center;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 8px;
}
.plan-hist-view md-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
}
.plan-hist-view:hover {
  background: var(--md-sys-color-primary-container);
}
.plan-preview-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--md-sys-color-secondary-container);
  border: 1px solid var(--md-sys-color-outline);
}
.plan-preview-banner > md-icon {
  color: var(--md-sys-color-primary);
  flex: 0 0 auto;
}
.plan-preview-banner .plan-preview-text {
  font-size: 13px;
  min-width: 0;
}
.plan-preview-banner .plan-preview-note {
  display: block;
  font-size: 11px;
  color: var(--md-sys-color-on-support);
}
.plan-danger-zone {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px dashed var(--md-sys-color-outline);
  text-align: right;
}
.plan-clear-link {
  background: none;
  border: none;
  padding: 4px 2px;
  font-size: 12px;
  color: var(--md-sys-color-on-support);
  cursor: pointer;
  text-decoration: none;
}
.plan-clear-link:hover,
.plan-clear-link:focus-visible {
  color: var(--md-sys-color-error);
  text-decoration: underline;
  outline: none;
}
.plan-grid--preview .plan-cell,
.plan-grid--preview .plan-cell-add,
.plan-grid--preview .plan-chip {
  pointer-events: none;
}
.plan-grid--preview .plan-cell-add {
  visibility: hidden;
}
.plan-grid--preview .plan-chip.plan-chip--diff-added {
  box-shadow: 0 0 0 2px var(--md-sys-color-success, #16a34a) !important;
}
.plan-grid--preview .plan-chip.plan-chip--diff-changed {
  box-shadow: 0 0 0 2px #b45309 !important;
}
.plan-grid--preview .plan-chip.plan-chip--diff-removed {
  background: transparent !important;
  color: var(--md-sys-color-error) !important;
  box-shadow: inset 0 0 0 1.5px var(--md-sys-color-error) !important;
  text-decoration: line-through;
  opacity: 0.85;
}
.plan-diff-legend {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 6px;
  font-weight: 600;
}
.plan-diff-legend--added {
  color: var(--md-sys-color-success, #16a34a);
  box-shadow: inset 0 0 0 1.5px var(--md-sys-color-success, #16a34a);
}
.plan-diff-legend--changed {
  color: #b45309;
  box-shadow: inset 0 0 0 1.5px #b45309;
}
.plan-diff-legend--removed {
  color: var(--md-sys-color-error);
  box-shadow: inset 0 0 0 1.5px var(--md-sys-color-error);
  text-decoration: line-through;
}
.plan-grid--draft .plan-chip {
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-primary);
  box-shadow: inset 0 0 0 1.5px var(--md-sys-color-primary);
}
.plan-grid--draft .plan-chip.plan-chip-kitchen {
  background: var(--md-sys-color-surface-container-high);
  color: #b45309;
  box-shadow: inset 0 0 0 1.5px #b45309;
}
.plan-grid--draft .plan-chip .plan-chip-role {
  background: rgba(0, 0, 0, 0.12);
}
.plan-chip--req {
  box-shadow: 0 0 0 2px var(--md-sys-color-error);
}
.plan-chip-req-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 13px;
  height: 13px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error, #fff);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.plan-req-badge {
  display: inline-block;
  padding: 1px 7px;
  margin-right: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.plan-req-badge--change {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.plan-req-badge--release {
  background: var(--md-sys-color-error-container, #fdd);
  color: var(--md-sys-color-on-error-container, #900);
}
.zp-plan {
  background: var(--md-sys-color-surface-container, #fff);
  border-radius: 16px;
  padding: 14px 16px 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.zp-plan-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}
.zp-plan-title .material-symbols-outlined {
  font-size: 20px;
}
.zp-plan-month {
  font-size: 12px;
  font-weight: 700;
  color: var(--md-sys-color-on-support);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 10px 0 4px;
}
.zp-plan-shift {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--md-sys-color-surface-container-high, #f4f4f4);
  margin-bottom: 6px;
  cursor: pointer;
}
.zp-plan-shift--pending {
  opacity: 0.75;
  cursor: default;
}
.zp-plan-shift-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.zp-plan-shift-date {
  font-weight: 600;
}
.zp-plan-shift-time {
  font-weight: 700;
  white-space: nowrap;
}
.zp-plan-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}
.zp-plan-badge--kitchen {
  background: #fde9c8;
  color: #b45309;
}
.zp-plan-badge--pending {
  background: var(--md-sys-color-tertiary-container, #eee);
  color: var(--md-sys-color-on-tertiary-container, #333);
}
.zp-plan-form {
  margin: -2px 0 8px;
}
.zp-plan-form-inner {
  background: var(--md-sys-color-surface-container-high, #f0f0f0);
  border-radius: 10px;
  padding: 12px;
}
.zp-plan-form-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.zp-plan-form-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 8px;
}
.zp-plan-form-choice label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.zp-plan-time-row {
  display: flex;
  gap: 10px;
}
.zp-plan-hint {
  font-size: 12px;
  color: var(--md-sys-color-on-support);
  margin: 8px 2px 0;
}
.plan-chip.plan-chip--dim {
  opacity: 0.2;
  font-weight: 400;
}
.plan-chip.plan-chip--dim:hover {
  opacity: 0.75;
}
.plan-prop-brig-name--dim {
  opacity: 0.4;
}
.plan-grid td.plan-cell--unavail {
  background-color: rgba(220, 38, 38, 0.13) !important;
}
.plan-grid .plan-chip.plan-chip-unavail--faint {
  background: transparent;
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.45);
  opacity: 0.6;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.plan-grid .plan-chip.plan-chip-unavail--faint:hover,
.plan-grid .plan-chip.plan-chip-unavail--faint:focus-visible {
  opacity: 1;
  outline: none;
}
.plan-demand-details {
  margin: 0 0 14px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 12px;
  background: var(--md-sys-color-surface-container);
  overflow: hidden;
}
.plan-demand-details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--md-sys-color-on-surface);
}
.plan-demand-details > summary::-webkit-details-marker {
  display: none;
}
.plan-demand-details > summary md-icon {
  font-size: 20px;
  color: var(--md-sys-color-on-support);
}
.plan-demand-details > summary::after {
  content: '▾';
  margin-left: auto;
  font-size: 14px;
  color: var(--md-sys-color-on-support);
  transition: transform 0.15s;
}
.plan-demand-details[open] > summary::after {
  transform: rotate(180deg);
}
.plan-demand-details .plan-demand-month {
  font-weight: 700;
  color: var(--md-sys-color-primary);
}
.plan-demand {
  padding: 0 12px 12px;
}
.plan-demand .plan-demand-hint {
  display: block;
  font-size: 12px;
  color: var(--md-sys-color-on-support);
  margin-bottom: 8px;
}
.plan-demand .plan-demand-days {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-demand .plan-demand-day {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--md-sys-color-on-support);
}
.plan-demand .plan-demand-input {
  width: 42px;
  text-align: center;
  padding: 6px 4px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  color: var(--md-sys-color-on-surface);
}
.plan-help {
  margin: 10px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--md-sys-color-on-support);
}
.plan-proposal-dialog {
  min-width: min(760px, 96vw);
}
.plan-proposal-dialog h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-grid--proposal .plan-prop-tag {
  display: block;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
}
.plan-grid--proposal .plan-prop-tag--hpp {
  color: var(--md-sys-color-primary);
}
.plan-grid--proposal .plan-prop-tag--brig {
  color: var(--md-sys-color-on-support);
}
.plan-grid--proposal .plan-chip--static {
  cursor: default;
}
.plan-grid--proposal .plan-chip--static:hover {
  filter: none;
}
.plan-grid--proposal .plan-day-col.plan-day-uncovered {
  color: #fff;
  background: #dc2626 !important;
}
.plan-grid--proposal .plan-prop-brig-col {
  min-width: 130px;
}
.plan-grid--proposal .plan-prop-brig-cell {
  text-align: left;
  padding: 2px 6px;
  white-space: normal;
}
.plan-grid--proposal .plan-prop-brig-name {
  display: inline-block;
  margin: 1px 3px 1px 0;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.plan-proposal-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--md-sys-color-on-support);
  margin: 14px 0 6px;
}
.plan-uncovered-box {
  background: var(--md-sys-color-error-container, #fde8e8);
  color: var(--md-sys-color-on-error-container, #7a1010);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
.plan-uncovered-box .plan-uncovered-hint {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}
.plan-covered-box {
  background: var(--md-sys-color-success-container, #d7f0d7);
  color: var(--md-sys-color-on-surface);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}
.plan-bal-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant, var(--md-sys-color-outline));
}
.plan-bal-row:last-child {
  border-bottom: none;
}
.plan-bal-row .plan-bal-name {
  font-weight: 600;
}
.plan-bal-row .plan-bal-name em {
  font-style: normal;
  font-size: 11px;
  color: var(--md-sys-color-on-support);
  margin-left: 4px;
}
.plan-bal-row .plan-bal-val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.plan-bal-row .plan-bal-meter {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--md-sys-color-surface-container-high);
}
.plan-bal-row .plan-bal-meter span {
  display: block;
  height: 100%;
  background: var(--md-sys-color-primary);
}
.plan-bal-row .plan-bal-meter--low span {
  background: var(--md-sys-color-error);
}
.plan-bal-row .plan-bal-meter--mid span {
  background: #d97706;
}
.plan-bal-row .plan-bal-meter--ok span {
  background: #16a34a;
}
#plan-proposal-days {
  max-height: 34vh;
  overflow-y: auto;
}
#plan-proposal-days .plan-pday {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant, var(--md-sys-color-outline));
}
#plan-proposal-days .plan-pday:last-child {
  border-bottom: none;
}
#plan-proposal-days .plan-pday-date {
  color: var(--md-sys-color-on-support);
  white-space: nowrap;
}
#plan-proposal-days .plan-pday-names {
  font-weight: 600;
}
.plan-cell--selected {
  background: var(--md-sys-color-primary-container) !important;
  box-shadow: inset 0 0 0 2px var(--md-sys-color-primary);
}
.plan-grid {
  user-select: none;
  -webkit-user-select: none;
}
.plan-type-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.plan-type-toggle label {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}
.plan-type-toggle label md-icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
}
.plan-type-toggle label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.plan-type-toggle label.is-active,
.plan-type-toggle label:has(input:checked) {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}
md-text-button[hidden],
md-filled-button[hidden],
md-outlined-button[hidden],
md-icon-button[hidden] {
  display: none !important;
}
#plan-shift-fields md-filled-select,
#plan-shift-fields md-filled-text-field {
  width: 100%;
}
#plan-shift-note {
  width: 100%;
}
.plan-unavail-dialog {
  min-width: min(460px, 92vw);
}
.plan-unavail-dialog h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-unavail-list {
  max-height: 40vh;
  overflow-y: auto;
  margin: 6px 0 4px;
}
.plan-unavail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant, var(--md-sys-color-outline));
}
.plan-unavail-row:last-child {
  border-bottom: none;
}
.plan-unavail-body {
  flex: 1 1 auto;
  min-width: 0;
}
.plan-unavail-who {
  font-weight: 700;
  font-size: 14px;
}
.plan-unavail-when {
  font-size: 13px;
  color: var(--md-sys-color-on-support);
}
.plan-unavail-note {
  color: var(--md-sys-color-on-surface);
}
.plan-unavail-del {
  --md-icon-button-icon-color: var(--md-sys-color-error);
  flex: 0 0 auto;
}
.zp-unavail-empty {
  font-size: 14px;
  color: var(--md-sys-color-on-support);
  padding: 4px 0 8px;
}
.zp-unavail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--md-sys-color-surface-container-high, #f4f4f4);
  margin-bottom: 6px;
}
.zp-unavail-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.zp-unavail-when {
  font-weight: 600;
}
.zp-unavail-note {
  font-size: 13px;
  color: var(--md-sys-color-on-support);
}
.zp-unavail-del {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--md-sys-color-error);
  display: flex;
  align-items: center;
  padding: 4px;
}
.zp-unavail-form {
  margin-top: 10px;
}
.zp-unavail-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
/* ── Kontroly faktur (Vrstva 0 = aritmetika, Vrstva 1 = nezávislý odečet) ──
   Odznak v seznamu faktur + panel nálezů v editoru. */
.inv-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}
.inv-check md-icon {
  font-size: 14px;
  width: 14px;
  height: 14px;
}
.js-tip {
  position: fixed;
  z-index: 3000;
  pointer-events: none;
  max-width: 280px;
  padding: 7px 11px;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
}
.js-tip--on {
  opacity: 1;
  visibility: visible;
}
.inv-check--error {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}
.inv-check--warn {
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
}
.inv-check--ok {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
#edit-checks {
  margin: 0 0 20px;
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}
#edit-checks.checks--ok {
  background: #c1f6df;
  color: var(--md-sys-color-on-secondary-container);
}
#edit-checks.checks--warn {
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
}
#edit-checks .checks-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
#edit-checks ul {
  margin: 0;
  padding-left: 22px;
}
#edit-checks li {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.45;
}
#edit-checks .checks-diff {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  opacity: 0.85;
}
#edit-checks .checks-actions {
  margin-top: 12px;
}
/* Sloupec "Celkem za položku" – počítá JS, needitovatelné.
   Dvě hodnoty pod sebou: nahoře tučně s DPH, pod ní bez DPH. */
.m3-table .col-total {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.m3-table .item-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  line-height: 1.25;
}
.m3-table .item-total__gross {
  font-weight: 700;
}
.m3-table .item-total__net {
  font-size: 12px;
  font-weight: 400;
  color: var(--md-sys-color-on-surface-variant, #64748b);
}
.m3-table .items-sum-row td {
  font-weight: 700;
  border-top: 2px solid var(--md-sys-color-outline-variant);
  padding-top: 10px;
}
.m3-table .items-sum-row td:first-child {
  text-align: right;
}
.m3-table .items-sum-row .item-total__net {
  font-weight: 700;
}
/* Verdikt „sedí / nesedí na hlavičku" – řádek v patičce tabulky, hned pod
   součtem položek. Bez rámečku a podbarvení, jen ikona a barevný text.

   Buňka nesmí dědit tučné písmo a horní linku ze součtového řádku, proto se
   obojí ruší. Bez třídy (nic k hlášení) je vnitřní span `display: none`, takže
   řádek splaskne na nulu a pod tabulkou nezůstane mezera. */
.m3-table .items-sum-verdict td {
  text-align: right;
  padding: 3px 0 0;
  border-top: 0;
  font-weight: 400;
}
#items-sum-hint {
  display: none;
  align-items: center;
  gap: 5px;
  padding-right: 12px;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
}
#items-sum-hint md-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
#items-sum-hint.items-sum-hint--ok,
#items-sum-hint.items-sum-hint--bad {
  display: inline-flex;
}
#items-sum-hint.items-sum-hint--ok {
  color: #16a34a;
}
#items-sum-hint.items-sum-hint--bad {
  color: var(--md-sys-color-error);
  font-weight: 600;
}
