:root {
  --bg: #f4f8f7;
  --surface: #ffffff;
  --ink: #0f2a2a;
  --muted: #4b6161;
  --brand: #0c8a78;
  --brand-dark: #0b6b5d;
  --accent: #f2b134;
  --line: #d7e3e3;
  --radius: 16px;
  --shadow: 0 16px 32px rgba(7, 44, 43, 0.12);
}

* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
}
img, video, canvas {
  max-width: 100%;
  height: auto;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 0% 0%, rgba(12,138,120,.12), transparent 38%),
  radial-gradient(circle at 100% 15%, rgba(242,177,52,.12), transparent 30%),
  linear-gradient(180deg, #f4f8f7 0%, #eaf1f1 100%);
}

.container {
  width: min(1600px, calc(100vw - 24px));
  margin: 0 auto;
}
.header {
  position: sticky;
  top: 0;
  z-index: 120;
  backdrop-filter: blur(8px);
  background: rgba(244,248,247,.86);
  border-bottom: 1px solid rgba(15,42,42,.1);
}
.nav-wrap {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}
.logo {
  text-decoration: none;
  color: var(--ink);
  font-family: "Avenir Next Condensed", "Avenir Next", Avenir, sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
}
.logo-k { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 16px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.nav-ticket-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #b8d4cf;
  background: linear-gradient(130deg, #eef8f6 0%, #e4f2ef 100%);
  color: var(--brand-dark) !important;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(16, 73, 64, .12);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}
.nav-ticket-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 73, 64, .18);
  border-color: #86baaf;
}
.nav-ticket-link.has-unread {
  border-color: #7eb4a8;
  background: linear-gradient(130deg, #e9f9f5 0%, #d9f0ea 100%);
}
.nav-ticket-icon-wrap {
  position: relative;
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
}
.nav-ticket-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  border: 1px solid #bed9d4;
  background: #ffffff;
  color: #0f6a5d;
}
.nav-ticket-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.15;
}
.nav-ticket-ping {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 2px solid #eff8f6;
  background: #d43f35;
  box-shadow: 0 0 0 0 rgba(212, 63, 53, .55);
  animation: nav-ticket-ping 1.8s ease-out infinite;
}
.nav-ticket-label {
  letter-spacing: .01em;
}
.nav-ticket-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #c8352c;
  background: linear-gradient(150deg, #e14d43 0%, #c9352c 100%);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 12px rgba(180, 42, 34, .34);
}

.menu-toggle {
  display: none;
  border: 1px solid #a5c8c4;
  border-radius: 12px;
  background: #f2f8f6;
  color: var(--brand-dark);
  padding: 10px 12px;
  font-weight: 700;
}
.mobile-postbox-link {
  display: none;
  align-items: center;
  gap: 7px;
  border: 1px solid #b8d4cf;
  border-radius: 999px;
  background: linear-gradient(130deg, #eef8f6 0%, #e4f2ef 100%);
  color: #0f6558;
  text-decoration: none;
  font-weight: 700;
  padding: 7px 9px 7px 8px;
  box-shadow: 0 5px 14px rgba(16, 73, 64, .12);
}
.mobile-postbox-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #bed9d4;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-postbox-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}
.mobile-postbox-text {
  font-size: .78rem;
  letter-spacing: .01em;
}
.mobile-postbox-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #c8352c;
  background: linear-gradient(150deg, #e14d43 0%, #c9352c 100%);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}
body.menu-open {
  overflow: hidden;
}
body.planner-sheet-open {
  overflow: hidden;
}

.section { padding: 40px 0 60px; }
.page-content > :is(.cards, .card, .table-wrap, .time-stack, .planner-controls, .planner-layout, .location-page, .locations-shell, .location-detail-shell, .employee-page-stack, .ticket-v2-shell, .cleanplan-editor, .location-task-card) + :is(.cards, .card, .table-wrap, .time-stack, .planner-controls, .planner-layout, .location-page, .locations-shell, .location-detail-shell, .employee-page-stack, .ticket-v2-shell, .cleanplan-editor, .location-task-card) {
  margin-top: 16px;
}
.page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.page-back-link {
  white-space: nowrap;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb-list li + li::before {
  content: '>';
  color: #9fb2af;
}
.breadcrumb-list a {
  color: #0d6e62;
  text-decoration: none;
}
.breadcrumb-list a:hover {
  text-decoration: underline;
}
.breadcrumb-list span[aria-current="page"] {
  color: #344744;
  font-weight: 700;
}
h1, h2, h3 {
  font-family: "Avenir Next Condensed", "Avenir Next", Avenir, sans-serif;
  margin: 0 0 10px;
}
.lead { color: var(--muted); margin-top: 0; }

.cards { display: grid; gap: 16px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-5 { grid-template-columns: repeat(5, 1fr); }
.compact-grid { gap: 12px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(14,40,40,.08);
  padding: 20px;
  min-width: 0;
}
.cards > * { min-width: 0; }

.form-grid { display: grid; gap: 12px; }
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.admin-card-order-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-card-grid .admin-card {
  position: relative;
}
.admin-card-grid .admin-card h3 {
  padding-right: 110px;
}
.admin-card-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.admin-card-controls .btn {
  min-width: 30px;
  min-height: 30px;
  padding: 6px 8px;
  line-height: 1;
}
.admin-card-side-move {
  cursor: ew-resize;
}
.admin-card.is-dragging {
  opacity: .62;
}
.admin-card.is-drag-over {
  outline: 2px dashed var(--brand);
  outline-offset: 3px;
}
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
  border: 1px solid #bdd0cf;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(100deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 20px rgba(12,138,120,.25);
}
.btn-primary:hover {
  background: linear-gradient(100deg, #0a7f6e, #095f53);
  box-shadow: 0 12px 24px rgba(12,138,120,.35);
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--brand-dark);
  background: transparent;
  border: 1px solid #a5c8c4;
}
.btn-ghost:hover {
  background: #eaf8f3;
  border-color: #7bb4aa;
  transform: translateY(-1px);
}
.btn-danger {
  color: #8e2a2a;
  border-color: #d7a7a1;
  background: #fff7f6;
}
.btn-danger:hover {
  color: #6f1f1f;
  border-color: #c37d75;
}
.btn-nav { background: var(--ink); color: #fff; }
.btn-mini { padding: 6px 10px; font-size: .86rem; border-radius: 10px; }
.btn-stop {
  color: #fff;
  background: #c33a32;
  border: 1px solid #c33a32;
  box-shadow: 0 10px 20px rgba(195, 58, 50, .25);
}
.btn-stop:hover,
.btn-stop:active,
.btn-stop:focus-visible {
  color: #7a1f1f;
  background: #fff;
  border-color: #d7a7a1;
  box-shadow: 0 6px 14px rgba(122, 31, 31, .14);
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 2px solid #3e8f78;
  outline-offset: 2px;
}

.inline-form { display: inline-flex; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.small { font-size: .9rem; color: var(--muted); }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.compact-list { gap: 4px; }
.alert-note { background: #fff1f0; border: 1px solid #f3c9c5; border-radius: 12px; padding: 14px 16px; }
.alert-note p { margin: 0; color: #7d2018; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
th { background: #f2f8f6; }

.planner-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.planner-controls { margin-bottom: 16px; }
.planner-hub-intro {
  display: grid;
  gap: 12px;
}
.planner-hub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.planner-hub-head h1 {
  margin-bottom: 6px;
}
.planner-hub-state {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.planner-hub-active {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #b8d5cf;
  background: #f4fbf8;
  color: #12473f;
  font-size: .82rem;
  font-weight: 800;
  padding: 4px 10px;
}
.planner-hub-mode {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #c7ddd8;
  background: #fff;
  color: #375a55;
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 10px;
}
.planner-hub-mode.is-edit {
  border-color: #88bbaf;
  background: #ebf8f4;
  color: #0f6658;
}
.planner-hub-mode.is-readonly {
  border-color: #d6d8d8;
  background: #fafafa;
  color: #5c6665;
}
.planner-plan-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7e6e3;
  border-radius: 14px;
  background: linear-gradient(120deg, #f8fcfb, #f2f8f6);
}
.planner-plan-tab {
  border: 1px solid #b9d4cf;
  border-radius: 12px;
  padding: 8px 10px;
  color: #134d44;
  text-decoration: none;
  font-weight: 700;
  font-size: .84rem;
  background: #ffffff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 66, 58, .08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease;
}
.planner-plan-tab:hover {
  border-color: #7bb4aa;
  background: #e7f6f2;
  box-shadow: 0 8px 18px rgba(16, 66, 58, .16);
  transform: translateY(-1px);
}
.planner-plan-tab.is-active {
  border-color: #4e8f84;
  background: linear-gradient(120deg, #e8f6f1, #e2f1ed);
  box-shadow: 0 8px 18px rgba(16, 66, 58, .14);
  color: #0d6155;
}
.planner-plan-tab-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9ded9;
  background: #f0f8f5;
  color: #115f53;
}
.planner-plan-tab-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}
.planner-plan-tab-label {
  min-width: 0;
}
.planner-plan-tab-mode {
  border: 1px solid #d2dcdc;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .68rem;
  font-weight: 800;
  color: #5c6a69;
  background: #f7faf9;
  line-height: 1.2;
}
.planner-readonly-note {
  margin: 0;
}
.planner-placeholder-module article {
  border: 1px solid #dce7e5;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
}
.planner-tech-controls h2 {
  margin-bottom: 6px;
}
.planner-tech-create-panel {
  margin-top: 16px;
  margin-bottom: 14px;
  display: grid;
  gap: 12px;
}
.planner-tech-create-panel > summary {
  list-style: none;
}
.planner-tech-create-panel > summary::-webkit-details-marker {
  display: none;
}
.planner-tech-create-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}
.planner-tech-create-toggle::after {
  content: '▾';
  font-size: .78rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .16s ease;
}
.planner-tech-create-panel[open] .planner-tech-create-toggle::after {
  transform: rotate(180deg);
}
.planner-tech-create {
  border: 1px solid #d6e4e2;
  background: #f8fcfb;
  margin: 0;
}
.planner-tech-week-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: stretch;
}
.planner-tech-day {
  display: grid;
  gap: 10px;
  align-content: start;
  height: 100%;
}
.planner-tech-day.is-today {
  border-color: #87b8ad;
  box-shadow: inset 0 0 0 1px rgba(43, 143, 122, .25);
}
.planner-tech-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.planner-tech-day-head h4 {
  margin: 0;
}
.planner-tech-entry-list {
  display: grid;
  gap: 8px;
}
.planner-tech-entry {
  border: 1px solid #d3e3e1;
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}
.planner-tech-entry.is-planned {
  border-left: 4px solid #2f8b76;
}
.planner-tech-entry.is-in_progress {
  border-left: 4px solid #e0ab26;
}
.planner-tech-entry.is-done {
  border-left: 4px solid #2f7f42;
}
.planner-tech-entry.is-cancelled {
  border-left: 4px solid #9a9e9e;
}
.planner-tech-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.planner-tech-entry-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.planner-tech-status {
  border: 1px solid #bcd5d1;
  border-radius: 999px;
  background: #f6fbfa;
  font-size: .74rem;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}
.planner-tech-entry-edit {
  border-top: 1px dashed #d3dfde;
  padding-top: 6px;
  overflow: hidden;
}
.planner-tech-entry-edit > summary {
  list-style: none;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  color: #1d5f55;
}
.planner-tech-entry-edit > summary::-webkit-details-marker {
  display: none;
}
.planner-tech-entry-edit .cards {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.planner-tech-entry-edit .cards.cards-2,
.planner-tech-entry-edit .cards.cards-3,
.planner-tech-entry-edit .cards.cards-4,
.planner-tech-entry-edit .cards.cards-5 {
  grid-template-columns: minmax(0, 1fr);
}
.planner-tech-entry-edit label,
.planner-tech-entry-edit .cards > * {
  min-width: 0;
}
.planner-tech-entry-edit input,
.planner-tech-entry-edit select,
.planner-tech-entry-edit textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.alert-note.is-ok {
  background: #ecfaf4;
  border-color: #bfe3d2;
}
.alert-note.is-ok p {
  color: #1f6955;
}
.planner-employees {
  position: sticky;
  top: 96px;
  z-index: 20;
}
.planner-subcontrols { margin-top: 8px; align-items: center; }
.planner-label { font-weight: 700; color: var(--ink); }
.planner-range { margin: 10px 0 0; }
.planner-weeks-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
label.planner-inline-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
label.planner-inline-label select { min-width: 72px; padding: 6px 8px; border-radius: 9px; }
.planner-control-center {
  margin-top: 12px;
  border: 1px solid #d6e4e2;
  border-radius: 12px;
  background: #f8fcfb;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.planner-control-center h4 {
  margin: 0;
}
.planner-control-kpis article {
  border: 1px solid #dce7e5;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
}
.planner-control-kpis article p {
  margin: 4px 0 0;
  font-weight: 700;
}
.planner-control-list {
  margin: 0;
}
.planner-location-order {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.planner-location-order.is-dirty {
  border-color: #d2b071;
  box-shadow: inset 0 0 0 1px rgba(197, 147, 62, .22);
}
.planner-location-order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.planner-location-order-head h4 {
  margin: 0;
}
.planner-location-order-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.planner-location-order-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.planner-location-order-item {
  border: 1px solid #d3e2e1;
  border-radius: 10px;
  background: #fff;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: auto auto 70px 1fr auto;
  align-items: center;
  gap: 6px;
  cursor: grab;
}
.planner-location-order-item.is-dragging {
  opacity: .65;
}
.planner-location-order-item.is-drag-over {
  border-color: #6caea2;
  background: #eef8f5;
}
.planner-location-order-input {
  width: 100%;
  min-width: 62px;
  padding: 5px 7px;
  border: 1px solid #b7cdca;
  border-radius: 9px;
  font-weight: 700;
}
.planner-location-order-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.planner-location-order-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  color: #5d7a75;
  font-weight: 700;
  cursor: grab;
}
.planner-employee-filter { max-width: 320px; margin-bottom: 10px; }
.planner-active-assign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.employee-chip {
  background: #f2f8f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  list-style: none;
  cursor: grab;
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  user-select: none;
}
.employee-chip:focus-visible {
  outline: 2px solid #1f8f79;
  outline-offset: 2px;
}
.employee-chip-check {
  width: 18px;
  height: 18px;
  border: 1px solid #9bb9b5;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: #fff;
  font-size: .75rem;
  font-weight: 800;
  flex: 0 0 18px;
}
.employee-chip-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-chip.is-active {
  border-color: #1f8f79;
  box-shadow: inset 0 0 0 1px #1f8f79;
  background: #eaf8f3;
}
.employee-chip.is-active .employee-chip-check {
  border-color: #1f8f79;
  background: #1f8f79;
  color: #fff;
}
.employee-chip.employee-away {
  background: #fff8df;
  border-color: #f0d48a;
}
.employee-chip.employee-away.employee-away-vacation {
  background: #fff8df;
  border-color: #f0d48a;
}
.employee-chip.employee-away.employee-away-sick {
  background: #fff1f1;
  border-color: #e7b3ae;
}
.employee-chip.employee-away.employee-away-pending {
  background: #eef5ff;
  border-color: #aac4e6;
}
.employee-chip.employee-away.employee-away-other {
  background: #f5f4ff;
  border-color: #c6c2e6;
}
.employee-chip.employee-away.is-active {
  background: #eef7d9;
  border-color: #1f8f79;
  box-shadow: inset 0 0 0 1px #1f8f79;
}
.mini-badge {
  margin-left: auto;
  background: #8f6700;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .74rem;
  font-weight: 700;
}
.mini-badge.is-away {
  border: 1px solid transparent;
}
.mini-badge.is-away-vacation {
  background: #8f6700;
  border-color: #b18827;
}
.mini-badge.is-away-sick {
  background: #a43a32;
  border-color: #c85d55;
}
.mini-badge.is-away-pending {
  background: #285a92;
  border-color: #4d79ad;
}
.mini-badge.is-away-other {
  background: #5d4f95;
  border-color: #7f72b5;
}

.employee-list-grid {
  padding-left: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.employee-location-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfefe;
}
.employee-location-item {
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #d7e3e3;
  border-radius: 9px;
  background: #fff;
}
.employee-anchor-target {
  height: 0;
  scroll-margin-top: 110px;
}
.employee-page-stack {
  display: grid;
  gap: 16px;
}
.employee-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.employee-head-row h3,
.employee-head-row h4 {
  margin: 0;
}
.employee-editor-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.5fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}
.employee-editor-layout > section {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 12px;
}
.employee-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 12px;
}
.employee-profile-card {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  display: grid;
  gap: 10px;
}
.employee-profile-card h6 {
  margin: 0;
}
.profile-absence-card {
  border-color: #d4e7e4;
  background: #f5fbfa;
}
.employee-profile-fields {
  display: grid;
  gap: 10px;
}
.employee-role-fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  background: #fbfefe;
}
.employee-role-fieldset legend {
  padding: 0 4px;
  font-weight: 700;
}
.employee-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.employee-role-toggle {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #c9dddd;
  border-radius: 9px;
  background: #fff;
  font-weight: 600;
}
.employee-role-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.employee-role-toggle.is-locked {
  background: #f4f7f7;
  opacity: .75;
}
.employee-role-help {
  margin: 0;
}
.employee-access-pane {
  display: grid;
  gap: 12px;
}
.field-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}
.field-with-action input {
  flex: 1 1 auto;
  min-width: 0;
}
.field-with-action .btn {
  white-space: nowrap;
}
.employee-password-check {
  border-top: 1px solid #dce7e6;
  padding-top: 10px;
}
.employee-modal-open {
  overflow: hidden;
}
.employee-modal[hidden] {
  display: none;
}
.employee-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
}
.employee-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 32, 30, .45);
}
.employee-modal-panel {
  position: relative;
  width: min(1200px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 50px rgba(9, 36, 33, .26);
  padding: 14px;
}
.employee-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.employee-modal-head h3 {
  margin: 0;
}

.planner-grid-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-gutter: stable both-edges;
}

.planner-week-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.planner-week-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}

.planner-week-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.planner-week-head h4 { margin: 0; }
.planner-week-range { margin: 0; }

.planner-week-block .planner-grid {
  border-radius: 12px;
}

.planner-grid {
  --planner-days: 7;
  --planner-col-min: 175px;
  --planner-location-col: 200px;
  display: grid;
  grid-template-columns: var(--planner-location-col) repeat(var(--planner-days), minmax(var(--planner-col-min), 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: visible;
  margin: 0;
  width: max(100%, calc(var(--planner-location-col) + (var(--planner-days) * var(--planner-col-min))));
}
.planner-grid-wrap { overflow: visible; }
.planner-grid-wrap h3 { margin-bottom: 6px; }
.planner-scroll-hint { margin-top: 0; margin-bottom: 10px; }
.planner-grid-wrap,
.planner-grid-scroll {
  min-width: 0;
}

.planner-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px;
  min-height: 74px;
  background: #fff;
}
.planner-head { background: #edf7f5; font-weight: 700; min-height: auto; }
.planner-grid > .planner-head {
  position: sticky;
  top: 0;
  z-index: 6;
}
.planner-head.is-today {
  background: #e7f6ef;
  box-shadow: inset 0 -2px 0 #2f8f7b;
}
.planner-date { font-size: .76rem; color: var(--muted); margin-top: 1px; font-weight: 600; }
.planner-location { font-weight: 700; background: #f8fbfb; }
.planner-location-name {
  display: block;
  font-size: .92rem;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.planner-slot { display: grid; gap: 8px; align-content: start; }
.planner-budget-badge {
  border: 1px solid #d6e3e1;
  border-radius: 10px;
  background: #f7fbfa;
  padding: 6px 7px;
  display: grid;
  gap: 2px;
}
.planner-budget-badge strong {
  font-size: .76rem;
  line-height: 1.2;
}
.planner-budget-badge span {
  font-size: .70rem;
  color: #46615d;
  line-height: 1.25;
}
.planner-budget-badge.is-green {
  border-color: #7bc4a0;
  background: #edf9f1;
}
.planner-budget-badge.is-yellow {
  border-color: #d6b06a;
  background: #fff8e7;
}
.planner-budget-badge.is-red {
  border-color: #d88984;
  background: #fff0ef;
}
.planner-budget-badge.is-neutral {
  border-color: #cddddd;
  background: #f4f8f8;
}
.planner-budget-missing {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #d5a79d;
  background: #fff2ef;
  color: #81372f;
  font-weight: 700;
  font-size: .66rem;
}
.planner-budget-warning {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #d2a064;
  background: #fff5e6;
  color: #7d4b12;
  font-weight: 700;
  font-size: .66rem;
}
.planner-slot.has-missing-bookings {
  box-shadow: inset 0 0 0 1px rgba(191, 97, 78, 0.22);
}
.planner-overhang-wrap {
  border: 1px dashed #d99a95;
  border-radius: 10px;
  background: #fff8f8;
  overflow: hidden;
}
.planner-overhang-cut {
  background: #ba3f38;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 4px 7px;
}
.planner-overhang-item {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 6px 28px 6px 7px;
  border-top: 1px solid #f1cfcc;
}
.planner-overhang-remove {
  position: absolute;
  top: 4px;
  right: 6px;
  border: 0;
  background: transparent;
  color: #8e2a2a;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  padding: 0;
}
.planner-overhang-remove:hover,
.planner-overhang-remove:focus-visible {
  color: #c33a32;
}
.planner-overhang-item strong {
  font-size: .82rem;
  color: #5f2622;
}
.planner-overhang-meta {
  font-size: .74rem;
  color: #74403a;
}
.planner-overhang-item.is-overhang {
  background: #fff8ea;
  border-top-color: #f2dfbe;
}
.planner-overhang-item.is-overhang strong {
  color: #6a4b16;
}
.planner-overhang-item.is-overhang .planner-overhang-meta {
  color: #7d5f2d;
}
.planner-sticky-col {
  position: sticky;
  left: 0;
  z-index: 9;
  box-shadow: 1px 0 0 var(--line), 8px 0 10px rgba(10, 45, 52, 0.06);
}
.planner-head.planner-sticky-col { background: #edf7f5; }
.planner-grid > .planner-head.planner-sticky-col {
  z-index: 12;
}
.planner-location.planner-sticky-col { background: #f8fbfb; }
.planner-grid > .planner-cell.planner-sticky-col {
  min-width: var(--planner-location-col);
  max-width: var(--planner-location-col);
}

.shift-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  display: grid;
  gap: 4px;
}
.shift-meta { font-size: .82rem; color: var(--muted); }
.shift-copy-note {
  font-size: .72rem;
  color: #6a4b16;
}
.shift-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.shift-actions .btn-mini { padding: 4px 8px; font-size: .78rem; }
.shift-actions .js-shift-copy.is-copy-active {
  border-color: #d49d64;
  background: #fff3e6;
  color: #7a4d14;
}
.shift-assignment-list {
  display: grid;
  gap: 4px;
}
.shift-assignment {
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  padding: 4px 8px;
  background: #f4f9f7;
  cursor: grab;
  font-size: .84rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  width: 100%;
}
.shift-assignment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shift-assignment-remove {
  border: 0;
  background: transparent;
  color: #8e2a2a;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  padding: 0;
}
.shift-assignment-remove:hover {
  color: #5d1818;
}
.shift-card.shift-card-copied {
  border-color: #d9bf8f;
  background: #fffaf2;
}
.planner-slot.is-copy-target {
  background: #fff4f4;
  box-shadow: inset 0 0 0 2px rgba(186, 63, 56, .22);
}
.planner-slot.is-copy-target:hover {
  background: #ffeaea;
}
.planner-slot.is-copy-replace {
  background: #fff6ea;
  box-shadow: inset 0 0 0 2px rgba(196, 131, 45, .24);
}
.planner-slot.is-copy-replace:hover {
  background: #ffefd8;
}
.planner-slot.is-copy-target .js-create-shift.is-copy-paste {
  border-color: #d59c97;
  color: #8e2a2a;
  background: #fff;
}
.planner-copy-slot-action {
  justify-self: end;
  align-self: start;
  margin-bottom: 2px;
  border-color: #d6b786;
  color: #7e4f15;
  background: #fffaf2;
}
.planner-copy-slot-action:hover {
  border-color: #c79d62;
  background: #fff3de;
  color: #6e410d;
}
.planner-slot.is-copy-busy {
  opacity: .7;
  pointer-events: none;
}

.planner-assign-sheet[hidden] {
  display: none;
}
.planner-assign-sheet {
  position: fixed;
  inset: 0;
  z-index: 260;
}
.planner-assign-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 31, 30, .44);
}
.planner-assign-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -18px 40px rgba(8, 33, 31, .28);
  padding: 12px;
  display: grid;
  gap: 10px;
  max-height: min(82vh, 760px);
  overflow: hidden;
  font-size: 1rem;
}
.planner-assign-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.planner-assign-sheet-head h4 {
  margin: 0;
  font-size: 1.1rem;
}
.planner-assign-sheet-meta {
  margin: 0;
  font-size: .95rem;
}
.planner-assign-sheet-search-wrap {
  display: grid;
  gap: 6px;
}
.planner-assign-sheet-search {
  width: 100%;
  font-size: 1rem;
  padding: 11px 12px;
}
.planner-assign-sheet-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  max-height: min(46vh, 460px);
  overflow: auto;
  display: grid;
  gap: 6px;
  background: #fbfefe;
}
.planner-assign-sheet-item {
  width: 100%;
  text-align: left;
  border: 1px solid #c4d6d4;
  border-radius: 999px;
  padding: 9px 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .98rem;
}
.planner-assign-sheet-item.is-selected {
  border-color: #2f8f7b;
  background: #edf8f4;
}
.planner-assign-sheet-check {
  width: 24px;
  text-align: center;
  font-weight: 700;
  color: #2f8f7b;
  font-size: 1.02rem;
}
.planner-assign-sheet-name {
  font-weight: 600;
  font-size: 1rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.planner-assign-sheet-item .mini-badge {
  font-size: .86rem;
  padding: 4px 9px;
}
.planner-assign-sheet-foot {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.planner-assign-sheet-keep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: .95rem;
}
.planner-assign-sheet-foot .btn {
  min-height: 42px;
  font-size: .96rem;
}
.today-stack { display: grid; gap: 16px; }
.today-intro-card p { margin: 0; }
.today-plan-card { margin-top: 0; }
.today-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.today-shift-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  background: #fff;
  display: grid;
  gap: 7px;
  min-width: 0;
}
.today-shift-card.state-full { border-color: #4f9d84; }
.today-shift-card.state-partial { border-color: #d8b867; }
.today-shift-card.state-empty { border-color: #d98a8a; }
.today-shift-card.state-over { border-color: #4e77c8; }
.today-shift-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.today-shift-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.today-status-pill {
  font-size: .74rem;
  font-weight: 700;
  color: #0f2a2a;
  background: #edf7f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.today-capacity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.today-dots { display: inline-flex; align-items: center; gap: 5px; }
.today-capacity .small {
  margin-left: auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.today-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #a9bab8;
  background: #fff;
}
.today-dot.is-filled { background: #3e8f78; border-color: #3e8f78; }
.today-own-badge {
  display: inline-flex;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: #edf2ff;
  border: 1px solid #8ea7de;
  color: #1f3c74;
  font-weight: 700;
  font-size: .76rem;
}
.today-name-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.today-name-chip {
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  background: #f4f9f7;
  padding: 4px 8px;
  font-size: .82rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.today-shift-list {
  list-style: none;
  padding-left: 0;
  gap: 10px;
}
.today-shift-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.today-shift-row-main {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.today-shift-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.today-status-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  background: #32a56f;
  box-shadow: 0 0 0 2px rgba(50, 165, 111, .2);
}
.today-status-icon.is-active {
  animation: today-status-blink .9s steps(2, end) infinite;
  background: #d33c33;
  box-shadow: 0 0 0 2px rgba(211, 60, 51, .2);
}
.today-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  text-decoration: none;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .12s ease;
}
.today-icon-btn:hover {
  border-color: #6faea3;
  background: #eaf8f3;
  color: #0b6b5d;
  transform: translateY(-1px);
}
.today-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.today-location-form { display: grid; gap: 6px; }
.today-ticket-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.today-ticket-grid > * {
  min-width: 0;
}
.today-ticket-grid .form-grid,
.today-ticket-grid .form-grid label {
  min-width: 0;
}
.today-ticket-grid .form-grid input,
.today-ticket-grid .form-grid select,
.today-ticket-grid .form-grid textarea,
.today-ticket-grid .form-grid .btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.today-object-actions { margin-top: 12px; }
.today-session-list { margin-top: 10px; }
.today-ticket-list { margin-top: 10px; }
.time-stack { display: grid; gap: 16px; }
.time-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.time-card-head h3 { margin-bottom: 0; }
.time-export-actions { justify-content: flex-end; }
.time-action-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.time-inline-form { margin: 0; }
.time-review-actions {
  display: grid;
  gap: 6px;
  min-width: 220px;
}
.time-review-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.time-review-form select {
  min-width: 120px;
}
.time-danger {
  border-color: #d7a7a1;
  color: #7d2018;
}
.time-danger-zone {
  border-color: #f0d3ce;
  background: #fffaf9;
}
.time-kpi-grid {
  align-items: stretch;
}
.time-kpi-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfefe;
}
.time-kpi-card h4 {
  margin: 0 0 4px;
}
.time-kpi-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}
.time-stack .cards.cards-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.time-stack .cards.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.time-stack .cards.cards-5 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.time-stack .btnrow {
  align-items: stretch;
}
.time-stack .btnrow .btn {
  flex: 1 1 170px;
  min-width: 0;
}
.time-stack .form-grid label {
  min-width: 0;
}
.muted-note { margin-top: 6px; }
.today-checklist-meter {
  width: 100%;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4f4;
  overflow: hidden;
  margin: 8px 0;
}
.today-checklist-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}
.today-checklist-preview { margin: 8px 0 12px; }
.today-checklist-widget-list {
  display: grid;
  gap: 14px;
}
.material-section-anchor {
  scroll-margin-top: 86px;
}
.material-subnav {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  padding: 12px;
  background: linear-gradient(120deg, #f8fcfb, #f2f8f6);
  border: 1px solid #d7e6e3;
}
.material-subnav-link {
  border: 1px solid #b9d4cf;
  border-radius: 12px;
  padding: 8px 10px;
  color: #134d44;
  text-decoration: none;
  font-weight: 700;
  font-size: .84rem;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 66, 58, .08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease;
}
.material-subnav-link:hover {
  border-color: #7bb4aa;
  background: #e7f6f2;
  box-shadow: 0 8px 18px rgba(16, 66, 58, .16);
  transform: translateY(-1px);
}
.material-subnav-link.is-active {
  border-color: #4e8f84;
  background: linear-gradient(120deg, #e8f6f1, #e2f1ed);
  box-shadow: 0 8px 18px rgba(16, 66, 58, .14);
}
.material-subnav-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c7dfd9;
  background: #f0f8f5;
  color: #115f53;
  flex: 0 0 auto;
}
.material-subnav-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.material-quick-list {
  display: grid;
  gap: 8px;
}
.material-picker {
  display: grid;
  gap: 10px;
}
.material-picker-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-end;
}
.material-picker-count {
  margin: 0;
  white-space: nowrap;
}
.material-picker-search {
  min-width: min(100%, 290px);
}
.material-picker-search input {
  margin-top: 4px;
}
.material-picker-more {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfefe;
  padding: 7px 9px;
}
.material-picker-more summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.material-quick-list-more {
  margin-top: 8px;
}
.material-picker-empty {
  margin: 0;
}
.material-quick-row {
  display: grid;
  grid-template-columns: 28px 1fr 94px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfefe;
  padding: 8px;
}
.material-quick-row.is-yellow {
  border-color: #d9b46e;
  background: #fff9ec;
}
.material-quick-row.is-red {
  border-color: #dd9b95;
  background: #fff3f1;
}
.material-quick-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.material-quick-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.material-quick-info strong {
  overflow-wrap: anywhere;
}
.material-quick-qty input {
  width: 100%;
}
.material-status-grid article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfefe;
  padding: 8px 10px;
}
.material-status-grid article p {
  margin: 4px 0 0;
  font-weight: 700;
}
.material-admin-create {
  margin-top: 12px;
}
.material-admin-create .cards.cards-5 {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}
.material-admin-create label,
.material-admin-create input {
  min-width: 0;
}
.material-admin-create input {
  width: 100%;
}
.material-admin-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.material-admin-toolbar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-end;
}
.material-stock-toolbar {
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-end;
}
.material-stock-table th,
.material-stock-table td {
  vertical-align: top;
}
.material-stock-inline-form {
  display: grid;
  grid-template-columns: 90px minmax(130px, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.material-stock-inline-form input {
  padding: 7px 8px;
}
.material-stock-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8d9d6;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .76rem;
  font-weight: 700;
  background: #f6fbfa;
  color: #385856;
}
.material-stock-status.is-red {
  border-color: #dd9b95;
  background: #fff3f1;
  color: #7d2018;
}
.material-stock-status.is-yellow {
  border-color: #d9b46e;
  background: #fff9ec;
  color: #7a5b14;
}
.material-stock-status.is-green {
  border-color: #9ecfbc;
  background: #eef9f3;
  color: #0f6e5e;
}
.material-admin-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 12px;
}
.material-admin-card summary {
  list-style: none;
}
.material-admin-card summary::-webkit-details-marker {
  display: none;
}
.material-admin-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.material-admin-summary::after {
  content: "Aufklappen";
  font-size: .76rem;
  color: #4d6664;
  border: 1px solid #c9d9d7;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.material-admin-card[open] .material-admin-summary::after {
  content: "Zuklappen";
}
.material-admin-summary-main {
  display: grid;
  gap: 2px;
}
.material-admin-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.material-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.material-delete-form {
  margin: 0;
  display: inline-flex;
}
.material-admin-card h4 {
  margin: 0;
}
.material-admin-card.is-yellow {
  border-color: #d9b46e;
}
.material-admin-card.is-red {
  border-color: #dd9b95;
}
.material-stock-form {
  margin-top: 6px;
}
.material-stock-button {
  align-self: end;
}
.material-order-manual {
  margin-top: 14px;
}
.material-order-list {
  display: grid;
  gap: 8px;
}
.material-orders-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.material-order-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 10px;
  display: grid;
  gap: 6px;
}
.material-order-card h4 {
  margin: 0;
}
.offers-intro-card {
  display: grid;
  gap: 10px;
}
.offers-intro-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.offers-lexoffice-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #b8d4cf;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
  color: #155d51;
  background: #edf8f4;
}
.offers-lexoffice-note svg {
  width: 14px;
  height: 14px;
}
.offers-status-grid {
  align-items: stretch;
}
.offers-status-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 10px 12px;
}
.offers-status-grid article h4 {
  margin: 0;
  font-size: .9rem;
}
.offers-status-grid article p {
  margin: 5px 0 0;
  font-size: 1.25rem;
  font-weight: 800;
}
.offers-main-grid {
  align-items: start;
}
.offers-main-grid .card {
  min-height: 100%;
}
.offers-emergency-check {
  align-self: end;
}
.offers-profile-list {
  display: grid;
  gap: 10px;
}
.offers-profile-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 10px;
}
.offers-profile-card summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}
.offers-profile-card summary::-webkit-details-marker {
  display: none;
}
.offers-profile-card summary small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.offers-list {
  display: grid;
  gap: 12px;
}
.offers-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.offers-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.offers-row-head h4 {
  margin: 0 0 4px;
}
.offers-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  background: #f4f9f7;
  color: #2d4d49;
  font-size: .76rem;
  font-weight: 700;
  padding: 3px 8px;
  white-space: nowrap;
}
.offers-status.is-draft {
  border-color: #bdd0cf;
  background: #f4f9f7;
}
.offers-status.is-sent {
  border-color: #8cb5d8;
  background: #eef6ff;
  color: #1f4f7c;
}
.offers-status.is-accepted {
  border-color: #8fc4b6;
  background: #e8f6ef;
  color: #0c6a5c;
}
.offers-status.is-rejected {
  border-color: #dfb3ae;
  background: #fff2f0;
  color: #7c2b24;
}
.offers-status.is-converted {
  border-color: #c9bfdf;
  background: #f2effd;
  color: #4b3f77;
}
.offers-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .86rem;
  color: #2f4b49;
}
.offers-row-note {
  margin: 0;
}
.offers-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.offers-inline-form {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  border: 1px solid #d7e6e3;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}
.offers-inline-form label {
  margin: 0;
  min-width: 130px;
}
.today-checklist-widget-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfefe;
  min-width: 0;
}
.today-checklist-widget-item p,
.today-checklist-widget-item li,
.today-checklist-widget-item .small {
  overflow-wrap: anywhere;
}
.today-checklist-widget-item .form-grid,
.today-checklist-widget-item .inline-form,
.today-checklist-widget-item label {
  min-width: 0;
}
.today-checklist-widget-item input,
.today-checklist-widget-item select,
.today-checklist-widget-item textarea {
  max-width: 100%;
}
.today-item-state {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.today-item-state.is-open { background: #d98a8a; }
.today-item-state.is-done { background: #3e8f78; }
.today-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .85rem;
}
.today-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #999;
  display: inline-block;
}
.legend-full { background: #3e8f78; border-color: #3e8f78; }
.legend-partial { background: #d8b867; border-color: #d8b867; }
.legend-empty { background: #d98a8a; border-color: #d98a8a; }
.legend-over { background: #4e77c8; border-color: #4e77c8; }
.legend-own {
  background: #edf2ff;
  border: 1px solid #8ea7de;
}
.sub-card { margin-top: 14px; }
.locations-shell {
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(420px, 1fr);
  gap: 16px;
  align-items: start;
}
.locations-shell.is-readonly {
  grid-template-columns: 1fr;
}
.locations-directory,
.locations-create-pane {
  margin: 0;
}
.locations-directory-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.locations-directory-head h3 {
  margin-bottom: 0;
}
.locations-directory-tools {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.locations-filter-form {
  display: grid;
  gap: 8px;
}
.locations-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.locations-filter-form label,
.locations-filter-per-page {
  margin: 0;
  display: grid;
  gap: 4px;
  font-weight: 600;
  color: var(--ink);
}
.locations-filter-search {
  flex: 1 1 auto;
  min-width: 240px;
}
.locations-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.locations-filter-actions .btn {
  min-height: 42px;
  padding-inline: 16px;
}
.locations-filter-meta {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.locations-filter-per-page {
  min-width: 120px;
}
.locations-filter-form input[type="search"] {
  min-height: 42px;
}
.locations-filter-form select {
  min-width: 96px;
  min-height: 42px;
}
.locations-alpha-panel {
  border: 1px solid #d5e5e2;
  border-radius: 12px;
  background: linear-gradient(130deg, #fbfefe 0%, #f4faf8 100%);
  padding: 8px 10px 10px;
}
.locations-alpha-title {
  margin: 0 0 8px;
  color: #2d5750;
  font-weight: 700;
}
.locations-alpha-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.locations-alpha-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 48px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #b8d3cd;
  background: #fff;
  color: #14564c;
  font-size: .79rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0 8px;
  gap: 6px;
  box-shadow: 0 3px 8px rgba(24, 82, 72, .07);
}
.locations-alpha-link-all {
  min-width: 72px;
}
.locations-alpha-char {
  line-height: 1;
}
.locations-alpha-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #c3dad4;
  background: #f3faf8;
  color: #2f5f57;
  font-size: .66rem;
  line-height: 1;
  padding: 0 4px;
}
.locations-alpha-link:hover {
  border-color: #8abdb3;
  background: #ecf8f4;
}
.locations-alpha-link.is-active {
  border-color: #3f8c7c;
  background: linear-gradient(140deg, #e3f5ef 0%, #d9efe8 100%);
  color: #0b6758;
  box-shadow: 0 5px 12px rgba(24, 82, 72, .14);
}
.locations-alpha-link.is-active .locations-alpha-count {
  border-color: #77b7a8;
  background: #fff;
  color: #0f6658;
}
.locations-alpha-link.is-disabled {
  opacity: .42;
  pointer-events: none;
  box-shadow: none;
}
.locations-list-compact {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.locations-list-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  color: var(--ink);
  text-decoration: none;
  padding: 9px 10px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.locations-list-link:hover {
  border-color: #8abdb3;
  background: #f4fbf9;
  box-shadow: 0 8px 18px rgba(35, 77, 70, .08);
}
.locations-order {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e8f4f1;
  border: 1px solid #b7d6cf;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1d6257;
}
.locations-list-main {
  display: grid;
  gap: 2px;
}
.locations-status-pill {
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  font-size: .76rem;
  font-weight: 700;
  padding: 3px 8px;
  white-space: nowrap;
}
.locations-status-pill.is-active {
  color: #0b6b5d;
  background: #e7f6ef;
  border-color: #8fc4b6;
}
.locations-status-pill.is-inactive {
  color: #7d2018;
  background: #fff2f0;
  border-color: #e2b9b4;
}
.locations-pagination {
  margin-top: 10px;
  border-top: 1px solid #d9e7e4;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.locations-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.location-advanced-fields {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  padding: 8px 10px;
}
.location-advanced-fields summary {
  font-weight: 700;
  cursor: pointer;
}
.location-advanced-body {
  margin-top: 10px;
}
.location-import-lexoffice {
  margin-bottom: 12px;
}
.location-import-form {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.location-import-file-field {
  margin: 0;
  display: grid;
  gap: 6px;
}
.location-import-file-input {
  width: 100%;
  border: 1px solid #bdd0cf;
  border-radius: 10px;
  padding: 6px 8px;
  background: #fff;
}
.location-import-file-input::file-selector-button {
  border: 1px solid #8cbab1;
  border-radius: 9px;
  background: #e8f5f2;
  color: #0f4e45;
  font-weight: 700;
  padding: 7px 12px;
  margin-right: 10px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.location-import-file-input:hover::file-selector-button {
  background: #d8eee9;
  border-color: #5fa89a;
  color: #0d6458;
}
.location-import-file-selected {
  font-size: .82rem;
  color: var(--muted);
}
.location-import-form .btn {
  justify-self: start;
}
.planning-days-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.planning-days-title {
  font-weight: 600;
  color: var(--ink);
}
.planning-days-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  max-width: 100%;
}
.planning-days-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  min-width: 0;
  border: 1px solid #bdd0cf;
  border-radius: 10px;
  background: #ffffff;
  padding: 6px 8px;
}
.planning-days-item span {
  order: 1;
  font-weight: 700;
  letter-spacing: .01em;
}
.planning-days-item input[type="checkbox"] {
  order: 2;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}
.planner-visibility-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.planner-visibility-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  min-width: 0;
  border: 1px solid #bdd0cf;
  border-radius: 10px;
  background: #ffffff;
  padding: 7px 9px;
}
.planner-visibility-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.planner-visibility-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}
@media (max-width: 1180px) {
  .planning-days-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .planner-visibility-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .locations-filter-row {
    align-items: stretch;
    flex-direction: column;
  }
  .locations-filter-search {
    min-width: 0;
  }
  .locations-filter-actions {
    justify-content: flex-start;
  }
  .locations-filter-actions .btn {
    min-width: 120px;
    justify-content: center;
  }
  .locations-filter-meta {
    justify-content: flex-start;
  }
  .locations-filter-per-page {
    min-width: 110px;
  }
  .locations-pagination {
    align-items: stretch;
  }
  .locations-pagination-actions {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-width: 780px) {
  .locations-alpha-link {
    min-width: 42px;
  }
  .locations-alpha-link-all {
    min-width: 62px;
  }
  .planning-days-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .planner-visibility-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  .planning-days-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.location-page {
  display: grid;
  gap: 16px;
}
.location-top-actions {
  margin-bottom: 12px;
}
.btn-location-new-object {
  background: #fff;
  color: var(--brand-dark);
  border-color: #9fc6bf;
}
.btn-location-new-object:hover {
  background: #eef7f5;
  color: #0b6b5d;
  border-color: #78b2a8;
}
.location-detail-shell {
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}
.location-column {
  display: grid;
  gap: 16px;
}
.location-info-card {
  display: grid;
  gap: 12px;
}
.location-info-card h3 {
  margin: 0;
}
.location-info-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.location-facts {
  margin: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.location-fact {
  border: 1px solid #dce7e5;
  border-radius: 10px;
  background: #fbfefe;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.location-fact dt {
  margin: 0;
  font-size: .78rem;
  font-weight: 700;
  color: #5a7270;
}
.location-fact dd {
  margin: 0;
  font-weight: 700;
  color: #132f2e;
  overflow-wrap: anywhere;
}
.location-note-block {
  border: 1px solid #dce7e5;
  border-radius: 10px;
  background: #fbfefe;
  padding: 10px;
  line-height: 1.45;
}
.location-sensitive-field {
  padding: 6px 8px;
  background: #f8fcfb;
}
.location-sensitive-field summary {
  font-weight: 700;
}
.location-debug-panel {
  border-color: #c9d9d7;
  background: #f9fcfc;
}
.location-debug-panel summary {
  font-weight: 700;
}
.location-debug-table {
  font-size: .82rem;
}
.location-debug-table th,
.location-debug-table td {
  white-space: nowrap;
  vertical-align: top;
}
.location-stack { display: grid; gap: 16px; }
.location-main-cards { margin: 0; }
.location-task-section { margin: 0; }
.location-task-form { margin-bottom: 16px; }
.location-task-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.location-task-head h3 {
  margin-bottom: 0;
}
.location-ticket-board {
  display: grid;
  gap: 10px;
}
.location-ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.location-ticket-head h3 {
  margin-bottom: 0;
}
.location-ticket-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.location-ticket-pill {
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  padding: 3px 9px;
  font-size: .76rem;
  font-weight: 700;
}
.location-ticket-pill.is-new { background: #eef6ff; border-color: #9dbde6; color: #285a92; }
.location-ticket-pill.is-read { background: #f0fbf7; border-color: #9ecfbc; color: #0f6e5e; }
.location-ticket-pill.is-progress { background: #fff8e8; border-color: #e2c885; color: #7a5b14; }
.location-ticket-pill.is-done { background: #edf2ff; border-color: #9caee0; color: #2f4a86; }
.location-ticket-pill.is-archived { background: #f5f5f5; border-color: #d5d5d5; color: #555; }
.location-ticket-grid {
  display: grid;
  gap: 10px;
}
.location-ticket-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfefe;
}
.location-ticket-panel h4 {
  margin: 0 0 6px;
}
.location-ticket-panel summary {
  cursor: pointer;
  font-weight: 700;
}
.location-ticket-list {
  margin-top: 8px;
  gap: 8px;
}
.location-ticket-item {
  border: 1px solid #d8e5e4;
  border-radius: 10px;
  background: #fff;
  padding: 8px 9px;
  display: grid;
  gap: 3px;
}
.location-ticket-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.location-task-accordion-stack {
  display: grid;
  gap: 10px;
}
.location-task-accordion {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
  overflow: hidden;
}
.location-task-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
}
.location-task-accordion summary::-webkit-details-marker {
  display: none;
}
.location-task-summary-main {
  display: grid;
  gap: 2px;
}
.location-task-summary-count {
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  background: #fff;
  font-size: .76rem;
  padding: 2px 8px;
}
.location-task-accordion-body {
  padding: 0 12px 12px;
}
.location-task-list-delete {
  margin-bottom: 10px;
}
.location-task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.location-task-edit-row td {
  background: #fbfefe;
  padding: 10px;
}
.location-task-edit-form {
  margin: 0;
}
.location-danger-zone {
  margin-top: 14px;
  border: 1px solid #f0d3ce;
  border-radius: 12px;
  background: #fffaf9;
  padding: 10px 12px;
}
.location-danger-zone summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: #7d2018;
}
.location-danger-zone summary::-webkit-details-marker {
  display: none;
}
.task-filter-info {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: .92rem;
}
.task-photo-stack {
  display: grid;
  gap: 6px;
}
.js-task-photo {
  min-width: 170px;
  border-radius: 10px;
  border: 1px solid #bdd0cf;
  background: #f9fcfc;
  padding: 6px;
}
.js-task-photo::file-selector-button {
  border: 1px solid #95bab5;
  border-radius: 8px;
  background: #eef7f5;
  color: #0f2a2a;
  font-weight: 700;
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.js-task-photo:hover::file-selector-button {
  background: #dff0ec;
  border-color: #6faea3;
}
.task-photo-delete {
  color: #7a1f1f;
}
.task-photo-delete input {
  accent-color: #b83a32;
}
.js-task-save:hover {
  background: #dff0ec;
  border-color: #5aa497;
  color: #0d6558;
}
.js-task-save.is-saving {
  opacity: .75;
  pointer-events: none;
}
.js-task-save.is-saved {
  background: #e6f6ef;
  border-color: #72af9f;
  color: #0b6b5d;
}
.leave-status-badge {
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  padding: 2px 9px;
}
.leave-status-badge.is-pending {
  background: #fff8e8;
  border-color: #e2c885;
  color: #7a5b14;
}
.leave-status-badge.is-approved {
  background: #e7f6ef;
  border-color: #8fc4b6;
  color: #0b6b5d;
}
.leave-status-badge.is-rejected {
  background: #fff2f0;
  border-color: #e2b9b4;
  color: #7d2018;
}
.leave-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.leave-actions .inline-form {
  margin: 0;
}

.cleanplan-editor {
  display: grid;
  gap: 16px;
}
.cleanplan-setup h3 {
  margin-bottom: 2px;
}
.cleanplan-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.cleanplan-head h3 {
  margin-bottom: 0;
}
.cleanplan-table th,
.cleanplan-table td {
  vertical-align: top;
}
.cleanplan-col-task {
  min-width: 250px;
  width: 250px;
}
.cleanplan-col-area {
  min-width: 280px;
}
.cleanplan-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cleanplan-category-row td {
  background: #eff8f5;
  color: #0d6a5b;
  font-weight: 700;
}
.cleanplan-task-cell {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.cleanplan-task-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cleanplan-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid #b8d4ce;
  background: #f4fbf9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0e6659;
}
.cleanplan-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cleanplan-delete {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #d8a7a3;
  background: #fff4f3;
  color: #8a2a22;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}
.cleanplan-delete:hover {
  background: #ffe8e5;
  border-color: #ce7c74;
}
.cleanplan-cell {
  display: grid;
  gap: 8px;
}
.cleanplan-cell input[type="text"] {
  padding: 7px 8px;
  font-size: .88rem;
}
.cleanplan-frequency-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  font-weight: 700;
  color: #1c3f3e;
}
.cleanplan-frequency-label input[type="number"] {
  width: 66px;
  text-align: center;
  padding: 6px 8px;
}
.cleanplan-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(30px, 1fr));
  gap: 5px;
}
.cleanplan-days label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: .72rem;
  font-weight: 700;
  color: #325a56;
}
.cleanplan-days input[type="checkbox"] {
  margin: 0;
}

.ticket-v2-page,
.ticket-detail-page {
  display: grid;
  gap: 16px;
}
.ticket-settings-shell {
  display: grid;
  gap: 14px;
}
.ticket-settings-form {
  gap: 16px;
}
.ticket-settings-block {
  border: 1px solid #d0e1df;
  border-radius: 14px;
  background: #f8fcfb;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.ticket-settings-block-head {
  display: grid;
  gap: 3px;
}
.ticket-settings-block-head h4 {
  margin: 0;
}
.ticket-settings-block-head p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.ticket-settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #c9dcda;
  border-radius: 12px;
  background: #ffffff;
  font-weight: 600;
}
.ticket-settings-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex: 0 0 auto;
}
.ticket-settings-toggle-copy {
  display: grid;
  gap: 2px;
}
.ticket-settings-toggle-copy strong {
  line-height: 1.2;
}
.ticket-settings-toggle-copy small {
  color: var(--muted);
  font-weight: 500;
}
.ticket-settings-input-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
}
.ticket-settings-fetch {
  margin: 0;
}

.security-kpi-grid {
  margin-bottom: 16px;
}
.security-kpi {
  display: grid;
  gap: 8px;
}
.security-kpi.is-ok {
  border-color: #91c8b9;
  background: #f0faf7;
}
.security-kpi.is-warn {
  border-color: #e2c885;
  background: #fff9eb;
}
.security-kpi.is-critical {
  border-color: #d7a7a1;
  background: #fff3f2;
}
.security-kpi-value {
  font-size: 2rem;
  line-height: 1;
  margin: 0;
  font-weight: 800;
}
.security-kpi-inline {
  margin: 0;
}
.security-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #c7d8d7;
  font-size: .8rem;
  font-weight: 700;
}
.security-pill.is-ok {
  background: #e7f6ef;
  border-color: #8fc4b6;
  color: #0b6b5d;
}
.security-pill.is-warn {
  background: #fff5df;
  border-color: #e2c885;
  color: #7a5b14;
}
.security-pill.is-critical {
  background: #fff1f0;
  border-color: #e2b9b4;
  color: #7d2018;
}
.security-cron-card {
  margin-bottom: 16px;
  display: grid;
  gap: 12px;
}
.security-cron-grid {
  display: grid;
  gap: 6px;
}
.security-cron-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #d5e3e2;
}
.security-cron-row:last-child {
  border-bottom: none;
}
.security-cron-row strong {
  text-align: right;
}
.security-cron-details {
  border: 1px solid #d5e3e2;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbfb;
}
.security-cron-details summary {
  cursor: pointer;
  font-weight: 700;
}
.security-cron-details pre {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #102221;
  color: #dff8f5;
  overflow-x: auto;
  font-size: .84rem;
}

.admin-maintenance-grid {
  margin-top: 10px;
}
.admin-maintenance-card {
  display: grid;
  gap: 12px;
}
.admin-maintenance-hint {
  margin: 2px 0 0;
}
.admin-maintenance-form {
  display: grid;
  gap: 12px;
}
.admin-maintenance-field {
  display: grid;
  gap: 6px;
}
.admin-maintenance-field > label {
  font-weight: 700;
  color: #163535;
}
.admin-maintenance-field input[type="text"],
.admin-maintenance-field input[type="file"] {
  width: 100%;
}
.admin-maintenance-actions {
  display: grid;
  gap: 8px;
}
.admin-maintenance-actions-restore {
  padding-top: 8px;
}
.admin-maintenance-danger {
  border-color: #e7c2be;
  background: #fff8f7;
}

@media (max-width: 900px) {
  .security-cron-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .security-cron-row strong {
    text-align: left;
  }
}

.ticket-v2-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.ticket-v2-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ticket-v2-filter-popover {
  position: relative;
}
.ticket-v2-filter-popover > summary {
  list-style: none;
}
.ticket-v2-filter-popover > summary::-webkit-details-marker {
  display: none;
}
.ticket-v2-filter-popover[open] {
  z-index: 30;
}
.ticket-v2-filter-popover[open] > form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(520px, 92vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 35px rgba(13, 51, 45, .16);
  padding: 12px;
}
.ticket-v2-dashboard {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}
.ticket-v2-kpi {
  border-radius: 14px;
  border: 1px solid #c7d8d7;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  padding: 12px;
  display: grid;
  gap: 4px;
  min-height: 88px;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.ticket-v2-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(12, 70, 62, .12);
}
.ticket-v2-kpi.is-active {
  border-color: #2a8b78;
  box-shadow: inset 0 0 0 1px #2a8b78;
}
.ticket-v2-kpi-count {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 800;
}
.ticket-v2-kpi-label {
  font-size: .9rem;
  font-weight: 700;
  color: #36504f;
}
.ticket-v2-kpi.is-new { border-left: 5px solid #d33c33; }
.ticket-v2-kpi.is-progress { border-left: 5px solid #e0ab26; }
.ticket-v2-kpi.is-waiting { border-left: 5px solid #3a7fb4; }
.ticket-v2-kpi.is-done { border-left: 5px solid #21956d; }
.ticket-v2-kpi.is-order { border-left: 5px solid #6a56aa; }
.ticket-v2-kpi.is-archived {
  border-left: 5px solid #8b9393;
  background: #f6f7f7;
  color: #4f5656;
}
.ticket-v2-view-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ticket-v2-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ticket-v2-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.ticket-v2-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.ticket-v2-card:hover {
  border-color: #86b8ae;
}
.ticket-v2-card.status-new { border-left: 5px solid #d33c33; }
.ticket-v2-card.status-read { border-left: 5px solid #3a7fb4; }
.ticket-v2-card.status-in_progress { border-left: 5px solid #e0ab26; }
.ticket-v2-card.status-done { border-left: 5px solid #21956d; }
.ticket-v2-card.status-archived { border-left: 5px solid #8b9393; }
.ticket-v2-card.is-high-priority {
  box-shadow: inset 0 0 0 1px #c87d2f;
}
.ticket-v2-card.is-unread {
  background: #fcfffe;
}
.ticket-v2-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.ticket-v2-head-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ticket-v2-head-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ticket-v2-new-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d33c33;
}
.ticket-v2-state {
  font-size: .78rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  padding: 3px 8px;
  white-space: nowrap;
}
.ticket-v2-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ticket-v2-badge {
  font-size: .76rem;
  border-radius: 999px;
  border: 1px solid #bdd0cf;
  background: #f6fbfa;
  padding: 3px 8px;
  font-weight: 700;
}
.ticket-v2-preview {
  margin: 0;
  color: #183331;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-v2-meta {
  display: grid;
  gap: 5px;
  font-size: .85rem;
  color: #36504f;
}
.ticket-v2-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.ticket-v2-action-group {
  width: min(100%, 340px);
  min-width: 0;
  margin-left: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.ticket-v2-inline-status {
  margin: 0;
  min-width: 0;
}
.ticket-v2-inline-status select {
  width: 100%;
  min-width: 145px;
  max-width: 100%;
  padding: 6px 8px;
}
.ticket-v2-action-group .inline-form,
.ticket-v2-action-group form {
  margin: 0;
}
.ticket-v2-action-group .js-ticket-delete-form {
  justify-self: end;
}
.ticket-v2-table-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ticket-v2-priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #8aa2a0;
  background: #d9e5e4;
  display: inline-block;
}
.ticket-v2-priority-dot.is-high {
  border-color: #bf6921;
  background: #d98a3a;
}

.ticket-v2-modal[hidden] {
  display: none;
}
.ticket-v2-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
}
.ticket-v2-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 32, 30, .45);
}
.ticket-v2-modal-panel {
  position: relative;
  width: min(940px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  margin: 20px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 50px rgba(9, 36, 33, .26);
  padding: 14px;
}
.ticket-v2-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ticket-v2-create-form {
  gap: 14px;
}
.ticket-v2-create-form > label {
  border: 1px solid #d3e3e1;
  border-radius: 12px;
  background: #f8fcfb;
  padding: 10px 12px;
}
.ticket-v2-create-form > label > input,
.ticket-v2-create-form > label > textarea,
.ticket-v2-create-form > label > select {
  background: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.ticket-v2-create-form .cards.cards-2.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ticket-v2-create-form .cards.cards-2.compact-grid > label {
  min-width: 0;
}
.ticket-v2-create-form [data-ticket-create-location] {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ticket-v2-file-field {
  border-style: dashed;
  border-color: #9ec3bc;
  gap: 7px;
}
.ticket-v2-file-help {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}
.ticket-v2-file-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bfd4d2;
  border-radius: 10px;
  background: #fff;
  font-size: .92rem;
  color: #163534;
}
.ticket-v2-file-input::file-selector-button {
  border: 1px solid #8cbab1;
  border-radius: 9px;
  background: #e8f5f2;
  color: #0f4e45;
  font-weight: 700;
  padding: 7px 12px;
  margin-right: 10px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.ticket-v2-file-input:hover::file-selector-button {
  background: #d8eee9;
  border-color: #5fa89a;
  color: #0d6458;
}
.ticket-v2-file-selected {
  color: #2f4a48;
  font-size: .84rem;
  font-weight: 600;
}
.ticket-modal-open {
  overflow: hidden;
}

.ticket-detail-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ticket-detail-top h1 {
  margin: 0;
}
.ticket-detail-status-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7e6e3;
  border-radius: 14px;
  background: linear-gradient(120deg, #f8fcfb, #f2f8f6);
}
.ticket-detail-status-link {
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid #b9d4cf;
  background: #fff;
  color: #134d44;
  text-decoration: none;
  padding: 8px 10px;
  font-size: .84rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(16, 66, 58, .08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease;
}
.ticket-detail-status-link:hover {
  border-color: #7bb4aa;
  background: #e7f6f2;
  box-shadow: 0 8px 18px rgba(16, 66, 58, .16);
  transform: translateY(-1px);
}
.ticket-detail-status-link.is-active {
  border-color: #4e8f84;
  background: linear-gradient(120deg, #e8f6f1, #e2f1ed);
  box-shadow: 0 8px 18px rgba(16, 66, 58, .14);
  color: #0d6155;
}
.ticket-status-link-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9ded9;
  background: #f0f8f5;
  color: #115f53;
  flex: 0 0 auto;
}
.ticket-status-link-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}
.ticket-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.ticket-detail-main {
  display: grid;
  gap: 16px;
}
.ticket-detail-main--full {
  max-width: none;
}
.ticket-detail-action-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}
.ticket-detail-jump-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.ticket-detail-action-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7e6e3;
  border-radius: 14px;
  background: linear-gradient(120deg, #f8fcfb, #f2f8f6);
}
.ticket-detail-action-row .btn {
  width: 100%;
  justify-content: flex-start;
  border: 1px solid #b9d4cf;
  border-radius: 12px;
  background: #fff;
  color: #134d44;
  box-shadow: 0 4px 12px rgba(16, 66, 58, .08);
}
.ticket-detail-action-row .btn:hover {
  border-color: #7bb4aa;
  background: #e7f6f2;
  box-shadow: 0 8px 18px rgba(16, 66, 58, .16);
}
.ticket-btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ticket-btn-with-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}
.ticket-detail-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.ticket-detail-headline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.ticket-detail-title-edit-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ticket-inline-title-edit {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ticket-inline-title-edit input {
  min-width: 240px;
}
.ticket-detail-reference-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
}
.ticket-detail-origin {
  border: 1px solid #d6e6e4;
  border-radius: 12px;
  background: #f9fdfc;
  padding: 10px 11px;
  display: grid;
  gap: 8px;
}
.ticket-detail-origin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ticket-detail-fields-card {
  border-color: #c6ddd7;
  background: #fbfefe;
}
.ticket-detail-edit-panel {
  border: 1px solid #cadfd9;
  border-radius: 12px;
  background: #f8fcfb;
  padding: 10px 11px;
}
.ticket-detail-edit-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
  color: #103533;
}
.ticket-detail-edit-panel > summary::-webkit-details-marker {
  display: none;
}
.ticket-detail-edit-panel[open] > summary {
  margin-bottom: 10px;
}
.ticket-form-shell {
  display: grid;
  gap: 12px;
}
.ticket-form-shell > label,
.ticket-form-shell .cards > label {
  border: 1px solid #c9dfd9;
  border-radius: 12px;
  background: #f4fbf9;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.ticket-form-shell > label > input,
.ticket-form-shell > label > textarea,
.ticket-form-shell > label > select,
.ticket-form-shell .cards > label > input,
.ticket-form-shell .cards > label > textarea,
.ticket-form-shell .cards > label > select {
  background: #fff;
  border-color: #b1d0ca;
}
.ticket-form-shell textarea {
  resize: vertical;
}
.ticket-editor {
  display: grid;
  gap: 0;
  border: 1px solid #b8d1cc;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.ticket-editor:focus-within {
  border-color: #5fa89a;
  box-shadow: 0 0 0 2px rgba(95, 168, 154, .18);
}
.ticket-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px;
  border-bottom: 1px solid #d8e7e4;
  background: linear-gradient(180deg, #fbfdfd 0%, #f1f7f6 100%);
}
.ticket-editor-btn {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #214746;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.ticket-editor-btn:hover {
  border-color: #b5d4ce;
  background: #e9f5f2;
  color: #0f5f53;
}
.ticket-editor-btn:focus-visible {
  outline: none;
  border-color: #4e9689;
  box-shadow: 0 0 0 2px rgba(78, 150, 137, .22);
}
.ticket-editor-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.ticket-editor textarea {
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0;
}
.ticket-v2-create-form .ticket-editor textarea {
  min-height: 170px;
}
.ticket-v2-create-form > label.ticket-editor-field,
.ticket-form-shell > label.ticket-editor-field {
  padding: 8px 10px;
  gap: 8px;
}
.ticket-file-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #b9d4ce;
  border-radius: 10px;
  background: #fff;
}
.ticket-file-input::file-selector-button {
  border: 1px solid #8cbab1;
  border-radius: 9px;
  background: #e8f5f2;
  color: #0f4e45;
  font-weight: 700;
  padding: 7px 12px;
  margin-right: 10px;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.ticket-file-input:hover::file-selector-button {
  background: #d8eee9;
  border-color: #5fa89a;
  color: #0d6458;
}
.ticket-detail-update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ticket-detail-edit-panel > form + form {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.ticket-detail-compose-card {
  border-color: #b8d8d1;
  background: linear-gradient(180deg, #fbfffe 0%, #f4fbf9 100%);
}
.ticket-detail-compose-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ticket-detail-compose-head h3 {
  margin: 0;
}
.ticket-detail-compose-form {
  gap: 14px;
}
.ticket-detail-compose-form textarea {
  min-height: 230px;
  line-height: 1.44;
  font-size: .98rem;
}
.ticket-detail-compose-form .ticket-editor textarea {
  min-height: 230px;
}
.ticket-detail-compose-form.is-submitting {
  opacity: .85;
}
.ticket-detail-compose-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ticket-detail-thread {
  gap: 10px;
  padding-left: 0;
  list-style: none;
}
.ticket-detail-thread-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  background: #fbfefe;
  display: grid;
  gap: 8px;
}
.ticket-detail-thread-item--mail {
  border-left: 4px solid #3a7fb4;
}
.ticket-detail-thread-item--internal {
  border-left: 4px solid #1e7a65;
}
.ticket-detail-thread-item--public {
  border-left: 4px solid #b77c2d;
}
.ticket-thread-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
}
.ticket-thread-message {
  border: 1px solid #d7e5e3;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
}
.ticket-thread-message summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ticket-thread-message summary::-webkit-details-marker {
  display: none;
}
.ticket-thread-preview {
  color: #214342;
  font-size: .92rem;
  line-height: 1.36;
}
.ticket-thread-summary-action {
  font-size: .8rem;
  font-weight: 700;
  color: #0f6f60;
  white-space: nowrap;
}
.ticket-thread-message .ticket-thread-body {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ticket-thread-message:not([open]) .ticket-thread-body {
  display: none;
}
.ticket-thread-message.is-short {
  padding: 0;
  border: none;
  background: transparent;
}
.ticket-thread-message.is-short summary {
  display: none;
}
.ticket-thread-message.is-short .ticket-thread-body {
  display: block;
}
.ticket-detail-activity {
  gap: 8px;
  margin-top: 10px;
}
.ticket-detail-activity li {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  background: #fbfefe;
}
.ticket-detail-activity-panel > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
}
.ticket-detail-activity-panel > summary::-webkit-details-marker {
  display: none;
}

.location-task-card { margin-top: 16px; }
.js-task-comment { min-width: 180px; width: 100%; }
.planner-slot.drop-warn { background: #fff8df; }
.planner-slot.drop-block { background: #ffe7e7; }

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  background: #0f2a2a;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.warn { background: #8f6700; }
.toast.error { background: #962c2c; }

@keyframes today-status-blink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: .2;
    transform: scale(.84);
  }
}

@keyframes nav-ticket-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 63, 53, .52);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(212, 63, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 63, 53, 0);
  }
}

@media (max-width: 1024px) {
  .page-breadcrumb {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .mobile-postbox-link {
    display: inline-flex;
    margin-left: auto;
  }
  .mobile-postbox-link + .menu-toggle {
    margin-left: 0;
  }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .nav {
    position: fixed;
    top: 78px;
    left: 12px;
    right: 12px;
    margin: 0;
    width: auto;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 12px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    z-index: 160;
  }
  .nav.open { display: flex; }
  .nav a,
  .nav .inline-form {
    width: 100%;
  }
  .nav a {
    padding: 6px 2px;
  }
  .nav .nav-ticket-link {
    display: none;
  }
  .nav .btn-nav {
    width: 100%;
  }

  .planner-layout { grid-template-columns: 1fr; }
  .planner-employees {
    display: block;
    position: sticky;
    top: 84px;
    z-index: 45;
  }
  .planner-controls .btnrow {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .planner-controls .btnrow .btn,
  .planner-controls .btnrow .planner-weeks-form,
  .planner-controls .btnrow .planner-label {
    flex: 0 0 auto;
  }
  .planner-grid {
    grid-template-columns: var(--planner-location-col) repeat(var(--planner-days), var(--planner-col-min));
    width: max-content;
    min-width: calc(var(--planner-location-col) + (var(--planner-days) * var(--planner-col-min)));
    --planner-location-col: 164px !important;
    --planner-col-min: 138px !important;
  }
  .planner-grid-scroll {
    overflow-x: auto !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    max-height: min(72vh, 640px);
    position: relative;
  }
  .employee-list-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .employee-editor-layout { grid-template-columns: 1fr; }
  .planner-subcontrols { row-gap: 8px; }
  .planner-control-kpis {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
  .planner-location-order-item {
    grid-template-columns: auto auto 62px 1fr auto;
  }
  .planner-week-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .locations-shell,
  .location-detail-shell {
    grid-template-columns: 1fr;
  }
  .cleanplan-col-area {
    min-width: 220px;
  }
  .locations-create-pane {
    order: -1;
  }
  .ticket-v2-dashboard {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
  .ticket-detail-status-nav,
  .ticket-detail-action-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .offers-row-actions {
    flex-direction: column;
  }
  .offers-inline-form {
    width: 100%;
  }
}

@media (max-width: 740px) {
  .nav-wrap {
    min-height: 76px;
  }
  .logo {
    font-size: 1.18rem;
  }
  .section {
    padding: 24px 0 40px;
  }
  .card {
    padding: 14px;
  }
  .cards-2, .cards-3, .cards-4, .cards-5 { grid-template-columns: 1fr; }
  .card .inline-form {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .card input,
  .card select,
  .card textarea,
  .card .btn {
    max-width: 100%;
  }
  .employee-profile-grid { grid-template-columns: 1fr; }
  .employee-head-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .employee-modal-panel {
    width: min(1200px, calc(100vw - 16px));
    margin: 8px auto;
    max-height: calc(100vh - 16px);
  }
  .planner-grid-wrap { overflow: visible; }
  .planner-grid {
    grid-template-columns: var(--planner-location-col) repeat(var(--planner-days), var(--planner-col-min));
    width: max-content;
    min-width: calc(var(--planner-location-col) + (var(--planner-days) * var(--planner-col-min)));
    --planner-location-col: 96px !important;
    --planner-col-min: 132px !important;
  }
  .planner-grid-scroll {
    max-height: min(68vh, 560px);
    position: relative;
  }
  .planner-sticky-col {
    left: 0 !important;
    z-index: 14;
  }
  .planner-head.planner-sticky-col {
    text-align: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: .02em;
    padding: 6px 4px;
  }
  .planner-location.planner-sticky-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
  }
  .planner-location-name {
    font-size: .78rem;
    line-height: 1.05;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 130px;
  }
  .planner-control-kpis {
    grid-template-columns: 1fr;
  }
  .planner-budget-badge {
    padding: 6px;
  }
  .planner-budget-badge strong {
    font-size: .74rem;
  }
  .planner-budget-badge span {
    font-size: .68rem;
  }
  .shift-assignment-list {
    max-height: 132px;
    overflow-y: auto;
    padding-right: 2px;
  }
  .shift-assignment {
    font-size: .76rem;
    padding: 3px 6px;
    gap: 6px;
    align-items: flex-start;
  }
  .shift-assignment-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.12;
  }
  .shift-assignment-remove {
    font-size: .9rem;
    margin-top: 1px;
  }
  .planner-weeks-form { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .planner-location-order {
    padding: 9px;
  }
  .planner-location-order-item {
    grid-template-columns: auto auto 54px 1fr;
    gap: 5px;
  }
  .planner-location-order-handle {
    display: none;
  }
  .planner-location-order-input {
    min-width: 50px;
    font-size: .86rem;
    padding: 5px 6px;
  }
  .planner-location-order-name {
    font-size: .86rem;
  }
  .planner-employees {
    position: sticky;
    top: 72px;
    z-index: 45;
  }
  .employee-list-grid { max-height: 170px; }
  .time-stack .cards.cards-4,
  .time-stack .cards.cards-2,
  .time-stack .cards.cards-5 {
    grid-template-columns: 1fr;
  }
  .time-stack .btnrow .btn {
    flex: 1 1 100%;
  }
  .time-card-head { flex-direction: column; align-items: flex-start; }
  .time-export-actions { justify-content: flex-start; }
  .time-review-actions { min-width: 0; }
  .time-review-form { flex-wrap: wrap; }
  .offers-inline-form label {
    width: 100%;
    min-width: 0;
  }
  .offers-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .offers-main-grid {
    grid-template-columns: 1fr;
  }
  .js-task-photo {
    min-width: 0;
    width: 100%;
  }
  .today-shift-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .cleanplan-days {
    grid-template-columns: repeat(4, minmax(32px, 1fr));
  }
  .today-shift-icons {
    align-self: flex-end;
  }
  .today-checklist-widget-item .inline-form,
  .today-checklist-widget-item .form-grid {
    width: 100%;
  }
  .today-checklist-widget-item .inline-form {
    display: grid;
    gap: 8px;
  }
  .today-checklist-widget-item .inline-form .btn,
  .today-checklist-widget-item .form-grid .btn {
    width: 100%;
  }
  .today-checklist-widget-item .form-grid label,
  .today-checklist-widget-item .inline-form label,
  .today-checklist-widget-item input,
  .today-checklist-widget-item select,
  .today-checklist-widget-item textarea {
    min-width: 0;
    width: 100%;
  }
  .material-quick-row {
    grid-template-columns: 28px 1fr;
  }
  .material-quick-qty {
    grid-column: 2 / -1;
  }
  .material-picker-head,
  .material-admin-toolbar,
  .material-stock-toolbar {
    align-items: stretch;
  }
  .material-subnav {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .material-subnav-link {
    width: 100%;
  }
  .material-picker-count {
    white-space: normal;
  }
  .material-stock-inline-form {
    grid-template-columns: 1fr;
  }
  .material-admin-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .material-admin-summary::after {
    align-self: flex-start;
  }
  .material-status-grid {
    grid-template-columns: 1fr;
  }
  .ticket-v2-top {
    flex-direction: column;
    align-items: stretch;
  }
  .ticket-v2-top-actions {
    justify-content: flex-start;
  }
  .ticket-v2-dashboard {
    grid-template-columns: 1fr;
  }
  .ticket-v2-card-grid {
    grid-template-columns: 1fr;
  }
  .ticket-v2-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .ticket-v2-action-group {
    width: 100%;
    max-width: none;
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ticket-v2-inline-status {
    width: 100%;
  }
  .ticket-v2-inline-status select {
    width: 100%;
    min-width: 0;
  }
  .ticket-v2-filter-popover[open] > form {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
  .ticket-detail-headline {
    flex-direction: column;
  }
  .ticket-detail-headline-meta {
    justify-content: flex-start;
  }
  .ticket-detail-status-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }
  .ticket-detail-jump-row {
    justify-content: flex-start;
  }
  .ticket-detail-action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }
  .ticket-detail-compose-actions {
    justify-content: flex-start;
  }
  .ticket-inline-title-edit {
    width: 100%;
  }
  .ticket-inline-title-edit input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 980px) {
  .today-ticket-grid {
    grid-template-columns: 1fr;
  }
}
