[hidden] { display: none !important; }
    :root {
      color-scheme: light;
      --ink: #25231f;
      --muted: #6c6a62;
      --line: #d9d4c8;
      --soft: #f4f1ea;
      --paper: #fffaf0;
      --white: #ffffff;
      --green: #16735c;
      --green-soft: #dff2ea;
      --blue: #245f94;
      --blue-soft: #e2edf7;
      --red: #a83d37;
      --red-soft: #f7e4e0;
      --amber: #9a6519;
      --amber-soft: #f5ead2;
      --shadow: 0 16px 42px rgba(37, 35, 31, 0.10);
    }

    .leave-panel { display: grid; gap: 16px; }
    .leave-rule { display: grid; gap: 5px; padding: 14px 16px; border-radius: 14px; background: #eef6ff; border: 1px solid #bfdbfe; }
    .leave-rule span, .leave-card .muted { color: var(--muted); }
    .leave-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
    .leave-form label, .leave-actions label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
    .leave-form .wide { grid-column: 1 / -1; }
    .leave-form input, .leave-form select, .leave-form textarea, .leave-actions input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; }
    .leave-form textarea { min-height: 76px; resize: vertical; }
    .leave-balances { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; }
    .leave-balances > div { display: grid; gap: 4px; padding: 13px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--line); }
    .leave-balances span { color: var(--muted); font-size: 13px; }
    .leave-list { display: grid; gap: 12px; }
    .leave-card { border: 1px solid var(--line); border-left: 5px solid #f59e0b; border-radius: 14px; background: #fff; padding: 14px; display: grid; gap: 12px; }
    .leave-card.status-completed { border-left-color: #22c55e; }
    .leave-card.status-scheduled, .leave-card.status-approved { border-left-color: #3b82f6; }
    .leave-card.status-overdue { border-left-color: #dc2626; }
    .leave-card.status-cancelled { border-left-color: #94a3b8; opacity: .75; }
    .leave-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
    .leave-status { font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 999px; background: #f1f5f9; }
    .leave-dates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .leave-dates span { display: grid; gap: 3px; padding: 10px; border-radius: 10px; background: #f8fafc; }
    .leave-dates small { color: var(--muted); }
    .leave-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
    .leave-actions label { min-width: 170px; }
    .leave-feedback { padding: 10px 12px; border-radius: 10px; background: #f8fafc; }
    @media (max-width: 720px) {
      .leave-form, .leave-dates { grid-template-columns: 1fr; }
      .leave-form .wide { grid-column: auto; }
      .leave-actions { display: grid; }
      .leave-actions button, .leave-actions label { width: 100%; }
    }

    * { box-sizing: border-box; }

    html { overflow-x: hidden; }

    body {
      margin: 0;
      min-height: 100vh;
      overflow-x: hidden;
      font-family: "Trebuchet MS", "Segoe UI", sans-serif;
      color: var(--ink);
      background:
        linear-gradient(90deg, rgba(37,35,31,0.035) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(0deg, rgba(37,35,31,0.025) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--soft);
    }

    button, input { font: inherit; }

    .shell {
      min-width: 0;
      min-height: 100vh;
      display: grid;
      grid-template-columns: 256px minmax(0, 1fr);
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 22px 18px;
      background: #2b2925;
      color: #f9f4e9;
      border-right: 1px solid #161511;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 28px;
    }

    .brand-mark {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255,255,255,0.22);
      background: #f9f4e9;
      color: #2b2925;
      font-weight: 800;
      border-radius: 8px;
    }

    .brand-title {
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 0;
      line-height: 1.1;
    }

    .brand-sub {
      margin-top: 2px;
      color: rgba(249,244,233,0.68);
      font-size: 12px;
    }

    .nav {
      display: grid;
      gap: 8px;
    }

    .nav button {
      width: 100%;
      min-height: 44px;
      display: grid;
      grid-template-columns: 28px 1fr auto;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      color: rgba(249,244,233,0.84);
      background: transparent;
      border: 1px solid transparent;
      border-radius: 8px;
      text-align: left;
      cursor: pointer;
    }

    .nav button.active {
      background: #f9f4e9;
      color: #2b2925;
    }

    .nav button:hover:not(.active) {
      border-color: rgba(255,255,255,0.18);
      background: rgba(255,255,255,0.06);
    }

    .badge {
      min-width: 24px;
      height: 24px;
      padding: 0 7px;
      display: inline-grid;
      place-items: center;
      border-radius: 999px;
      background: rgba(255,255,255,0.16);
      font-size: 12px;
      font-weight: 800;
    }

    .active .badge { background: #2b2925; color: #f9f4e9; }

    .identity {
      position: absolute;
      left: 18px;
      right: 18px;
      bottom: 18px;
      padding: 14px;
      border-radius: 8px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.12);
    }

    .identity strong { display: block; font-size: 15px; }
    .identity span { display: block; margin-top: 5px; font-size: 12px; color: rgba(249,244,233,0.68); }

    .login-card {
      margin: 18px 0;
      padding: 12px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      background: rgba(255,255,255,0.06);
      color: rgba(249,244,233,0.86);
    }

    .login-card small {
      display: block;
      margin-bottom: 5px;
      color: rgba(249,244,233,0.58);
      font-size: 11px;
      text-transform: uppercase;
    }

    .login-card b {
      display: block;
      font-size: 16px;
      letter-spacing: 0;
    }

    .login-card span {
      display: block;
      margin-top: 5px;
      color: rgba(249,244,233,0.64);
      font-size: 12px;
      line-height: 1.35;
    }

    .main {
      min-width: 0;
      width: 100%;
      max-width: 1500px;
      margin-inline: auto;
      padding: 24px;
      display: grid;
      gap: 18px;
      align-content: start;
    }

    .topbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 16px;
      align-items: end;
    }

    h1 {
      margin: 0;
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(30px, 4vw, 54px);
      line-height: 0.95;
      letter-spacing: 0;
    }

    .date-line {
      margin-top: 8px;
      color: var(--muted);
      font-size: 15px;
    }

    .tools {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: end;
      flex-wrap: wrap;
    }

    .icon-btn, .text-btn {
      min-height: 42px;
      border: 1px solid var(--line);
      background: var(--white);
      color: var(--ink);
      border-radius: 8px;
      box-shadow: 0 4px 16px rgba(37,35,31,0.06);
      cursor: pointer;
    }

    .icon-btn {
      width: 42px;
      display: grid;
      place-items: center;
      font-size: 18px;
      position: relative;
    }

    .menu-btn {
      display: none;
    }

    .icon-btn:disabled {
      opacity: 0.55;
      cursor: wait;
    }

    .icon-btn.notification.has-items {
      background: var(--red);
      border-color: var(--red);
      color: #fff;
    }

    .icon-count {
      position: absolute;
      top: -7px;
      right: -7px;
      min-width: 20px;
      height: 20px;
      display: none;
      place-items: center;
      padding: 0 5px;
      border: 2px solid var(--white);
      border-radius: 999px;
      background: var(--ink);
      color: #fff;
      font-size: 11px;
      line-height: 1;
      font-weight: 900;
    }

    .icon-btn.has-items .icon-count {
      display: grid;
    }

    .text-btn {
      padding: 0 14px;
      font-weight: 800;
    }

    .text-btn.plan-refresh {
      background: var(--ink);
      color: var(--white);
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 10px;
    }

    .stat {
      padding: 14px;
      min-height: 92px;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: 0 6px 20px rgba(37,35,31,0.05);
    }

    .stat.alert-stat {
      width: 100%;
      color: var(--ink);
      text-align: left;
      cursor: pointer;
    }

    .stat.alert-stat b {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .stat.alert-stat b::after {
      content: "↗";
      font-size: 17px;
      color: var(--muted);
    }

    .stat.alert-stat.has-items {
      border-color: var(--amber);
      background: var(--amber-soft);
    }

    .stat.alert-stat.issue.has-items {
      border-color: var(--red);
      background: var(--red-soft);
    }

    .stat.penalty-stat {
      border-color: var(--red);
      background: var(--red-soft);
      color: var(--red);
      text-align: left;
      cursor: pointer;
    }

    .stat.penalty-stat b {
      color: var(--red);
    }

    .stat.extra-sales-stat {
      width: 100%;
      border-color: var(--green);
      background: var(--green-soft);
      color: var(--ink);
      text-align: left;
      cursor: pointer;
    }

    .stat.extra-sales-stat.has-unpaid {
      border-color: var(--amber);
      background: var(--amber-soft);
    }

    .stat.extra-sales-stat:hover {
      transform: translateY(-1px);
    }

    .stat.penalty-stat.has-unassigned {
      cursor: default;
    }

    .penalty-stat-main {
      display: block;
      width: 100%;
      margin: -4px 0 0;
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      cursor: pointer;
    }

    .penalty-stat-main b {
      display: block;
      margin-top: 10px;
      font-size: 30px;
      line-height: 1;
    }

    .penalty-stat-main:hover small,
    .penalty-stat-main:hover b {
      text-decoration: underline;
      text-decoration-thickness: 1px;
      text-underline-offset: 3px;
    }

    .stat.unassigned-stat {
      border-color: var(--amber);
      background: var(--amber-soft);
      color: var(--ink);
    }

    .stat.penalty-stat.has-unassigned .stat-line,
    .stat.unassigned-stat .stat-line {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin-top: 10px;
    }

    .stat.penalty-stat.has-unassigned .stat-line {
      padding-top: 10px;
      border-top: 1px solid rgba(175, 62, 38, 0.18);
    }

    .stat.penalty-stat.has-unassigned .stat-line small {
      flex-basis: 100%;
      color: var(--muted);
    }

    .stat.penalty-stat.has-unassigned .unresolved-jump,
    .stat.unassigned-stat .unresolved-jump {
      min-height: 30px;
      padding: 0 10px;
      border: 1px solid var(--amber);
      border-radius: 999px;
      background: var(--white);
      color: var(--ink);
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .stat.penalty-stat.has-unassigned .unresolved-jump:hover,
    .stat.unassigned-stat .unresolved-jump:hover {
      background: #fff7ed;
    }

    .stat.alert-stat:hover {
      transform: translateY(-1px);
    }

    .stat small {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .stat b {
      display: block;
      margin-top: 10px;
      font-size: 30px;
      line-height: 1;
    }

    .stat .stat-line {
      display: block;
      margin-top: 10px;
      color: var(--ink);
      font-size: 18px;
      font-weight: 900;
      line-height: 1.25;
    }

    .mobile-day-focus {
      display: none;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      box-shadow: 0 6px 20px rgba(37,35,31,0.06);
    }

    .mobile-focus-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
    }

    .mobile-focus-title {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .mobile-focus-title strong {
      font-size: 18px;
      line-height: 1.15;
    }

    .mobile-focus-title span,
    .mobile-focus-note {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.3;
    }

    .mobile-focus-note.warning {
      color: #8a2d1b;
      font-weight: 800;
    }

    .mobile-focus-count {
      min-width: 54px;
      min-height: 42px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      background: #2b2925;
      color: #f9f4e9;
      font-size: 20px;
      font-weight: 900;
    }

    .mobile-focus-metrics {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .mobile-focus-metric {
      min-height: 54px;
      display: grid;
      align-content: center;
      gap: 3px;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .mobile-focus-metric small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .mobile-focus-metric b {
      font-size: 18px;
      line-height: 1;
    }

    .mobile-focus-actions {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 2px;
      scrollbar-width: none;
    }

    .mobile-focus-actions::-webkit-scrollbar { display: none; }

    .mobile-focus-actions button {
      min-height: 42px;
      padding: 0 12px;
      flex: 0 0 auto;
      border: 1px solid var(--amber);
      border-radius: 8px;
      background: var(--amber-soft);
      color: var(--ink);
      font-weight: 900;
      cursor: pointer;
    }

    .mobile-focus-actions button.cleaning-ready {
      border-color: var(--green);
      background: var(--green-soft);
      color: var(--green);
    }

    .mobile-focus-actions button.cleaning-pending {
      border-color: var(--line);
      background: var(--paper);
      color: var(--ink);
    }

    .mobile-focus-actions button.cleaning-problem {
      border-color: var(--red);
      background: var(--red-soft);
      color: var(--red);
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) 356px;
      gap: 18px;
      align-items: start;
    }
    .layout.directory-focus { grid-template-columns: 1fr; }
    .stats[hidden], .mobile-day-focus[hidden], .layout aside[hidden] { display: none !important; }

    .section-title {
      margin: 0 0 10px;
      font-size: 15px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
    }

    .tasks {
      display: grid;
      gap: 12px;
    }

    .task {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .task-head {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 14px;
      align-items: center;
      padding: 16px;
      border-bottom: 1px solid var(--line);
    }

    .apt {
      width: auto;
      min-width: 66px;
      height: 66px;
      padding-inline: 8px;
      display: grid;
      place-items: center;
      background: #2b2925;
      color: #f9f4e9;
      border-radius: 8px;
      font-size: 22px;
      font-weight: 900;
    }

    .task h2 {
      margin: 0;
      font-size: 21px;
      line-height: 1.15;
      letter-spacing: 0;
    }

    .meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
      color: var(--muted);
      font-size: 13px;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 2px 8px;
      border-radius: 999px;
      background: var(--soft);
      color: var(--ink);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .pill.green { background: var(--green-soft); color: var(--green); }
    .pill.amber { background: var(--amber-soft); color: var(--amber); }
    .pill.red { background: var(--red-soft); color: var(--red); }
    .pill.blue { background: var(--blue-soft); color: var(--blue); }

    .task-body {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 260px;
      gap: 14px;
      padding: 16px;
    }

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

    .info {
      min-height: 72px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .info small {
      display: block;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .info span {
      display: block;
      font-size: 14px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .info.assignment-open {
      width: 100%;
      min-height: 72px;
      text-align: left;
      color: inherit;
      cursor: pointer;
    }

    button.info.assignment-open {
      appearance: none;
      font: inherit;
    }

    .info.assignment-open span::after {
      content: "Открыть";
      display: inline-block;
      margin-left: 8px;
      padding: 2px 7px;
      border-radius: 999px;
      background: var(--blue-soft);
      color: var(--blue);
      font-size: 11px;
      font-weight: 900;
      vertical-align: 1px;
      white-space: nowrap;
    }

    .task-body > .manager-grid,
    .task-body > .info-grid,
    .task-body > .manager-actions,
    .task-body > .date-line,
    .task-body > .cleaner-quick-actions {
      grid-column: 1 / -1;
      min-width: 0;
    }

    .task-body > .manager-grid {
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
    }

    .task-body > .info-grid {
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    }

    .task-body > .date-line {
      padding: 0 2px;
      overflow-wrap: anywhere;
    }

    .actions {
      display: grid;
      gap: 8px;
    }

    .action {
      min-height: 42px;
      border: 0;
      border-radius: 8px;
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .action.done { background: var(--green); }
    .action.done.completed {
      background: var(--green-soft);
      color: var(--green);
      border: 1px solid rgba(22, 115, 92, 0.35);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    }
    .action.issue { background: var(--red); }
    .action.dirt { background: var(--amber); }
    .action.help { background: var(--blue); }

    .event-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding-top: 10px;
    }

    .event-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 8px;
      background: var(--white);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .history-tools {
      display: grid;
      gap: 8px;
      margin-bottom: 12px;
    }

    .history-tools.manager-tools {
      grid-template-columns: minmax(140px, 180px) minmax(140px, 180px) minmax(0, 1fr);
      align-items: center;
    }

    .history-tools input,
    .history-tools select {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 12px;
      font: inherit;
      background: var(--white);
    }

    .history-card {
      display: grid;
      gap: 8px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
    }

    .history-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
    }

    .history-head h3 {
      margin: 0;
      font-size: 18px;
    }

    .history-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
    }

    .thumbs {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .thumbs button {
      display: block;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
    }

    .thumbs img,
    .thumbs video {
      width: 100%;
      aspect-ratio: 1;
      object-fit: cover;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--paper);
    }

    .manager-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .manager-cell {
      min-height: 68px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .manager-cell small {
      display: block;
      margin-bottom: 5px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .manager-cell strong {
      display: block;
      font-size: 16px;
      line-height: 1.2;
    }

    .manager-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
      gap: 8px;
      margin-top: 10px;
    }

    .manager-actions button,
    .manager-actions select {
      min-width: 0;
      min-height: 38px;
      border-radius: 8px;
      border: 1px solid var(--line);
      padding: 0 10px;
      background: var(--white);
      color: var(--ink);
      font-weight: 900;
      cursor: pointer;
      white-space: normal;
      overflow-wrap: anywhere;
      line-height: 1.15;
    }

    .manager-actions button.active {
      background: var(--green-soft);
      color: var(--green);
      border-color: var(--green);
    }

    .manager-actions select.active {
      background: var(--amber-soft);
      color: var(--amber);
      border-color: var(--amber);
    }

    .manager-actions button.danger {
      background: var(--red-soft);
      color: var(--red);
      border-color: var(--red);
    }

    .manager-actions button.danger.active {
      background: var(--red);
      color: var(--white);
    }

    .manager-actions .action.note {
      background: var(--paper);
      border: 1px solid var(--line);
      color: var(--ink);
      font-size: 13px;
    }

    .manager-actions .action.note:active {
      background: var(--blue-soft, #e8f0fe);
    }

        .info.comment-block {
      grid-column: 1 / -1;
      display: grid;
      gap: 6px;
    }

    .info.comment-block span {
      font-size: 14px;
      line-height: 1.35;
    }

    .manager-comment-input {
      width: 100%;
      min-height: 60px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px;
      font: inherit;
      background: var(--paper);
      color: var(--ink);
      resize: vertical;
    }

    .manager-comment-input:focus {
      outline: 2px solid var(--blue, #4a90d9);
      outline-offset: -1px;
    }

    .save-comment-btn {
      justify-self: start;
      min-height: 36px;
      font-size: 13px;
      padding: 0 12px;
      opacity: 0.5;
      transition: opacity 0.2s, background 0.2s;
    }

    .save-comment-btn.active {
      opacity: 1;
      background: var(--green);
      color: #ffffff;
    }

    .comment-actions-row {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .delete-comment-btn {
      min-height: 36px;
      font-size: 13px;
      padding: 0 12px;
      background: var(--red);
      color: #ffffff;
      border: 1px solid var(--red);
      cursor: pointer;
      border-radius: 8px;
      font-weight: 800;
    }

    .cleaning-type-badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 800;
    }

    .cleaning-type-badge.own {
      background: var(--green-soft);
      color: var(--green);
    }

    .cleaning-type-badge.extra {
      background: var(--amber-soft);
      color: var(--amber);
    }

.info.clickable {
      cursor: pointer;
      border-radius: 6px;
      transition: background 0.15s;
    }

    .info.clickable:hover {
      background: var(--hover, rgba(0,0,0,0.03));
    }

    .final-flow {
      border-color: var(--blue);
      background: var(--blue-soft);
    }

    .final-flow .task-body {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
    }

    .plan-diff-card {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
      border-color: var(--amber);
      background: #fffbeb;
    }

    .plan-diff-card .task-body {
      display: grid;
      gap: 10px;
    }

    .plan-diff-section {
      display: grid;
      gap: 6px;
    }

    .plan-diff-section strong {
      font-size: 13px;
      color: var(--ink);
    }

    .plan-diff-items {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }

    .plan-diff-items.with-reasons {
      display: grid;
      grid-template-columns: 1fr;
      align-items: stretch;
    }

    .plan-diff-change-row {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      min-width: 0;
      padding: 4px 0;
    }

    .plan-diff-change-row .date-line {
      min-width: 0;
      margin: 0;
      overflow-wrap: anywhere;
      line-height: 1.35;
    }

    .plan-diff-items button,
    .plan-diff-pill {
      min-height: 30px;
      padding: 0 10px;
      border: 1px solid var(--amber);
      border-radius: 999px;
      background: var(--white);
      color: var(--ink);
      font-size: 13px;
      font-weight: 900;
    }

    .plan-diff-items button {
      cursor: pointer;
    }

    .plan-diff-items button:hover {
      background: #fff7ed;
    }

    .plan-diff-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 2px;
    }

    .plan-diff-actions button {
      min-height: 34px;
      padding: 0 12px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--white);
      color: var(--ink);
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .plan-diff-actions button.primary {
      border-color: var(--green);
      background: var(--green);
      color: var(--white);
    }

    .plan-diff-actions button.warn {
      border-color: var(--amber);
      background: var(--amber-soft);
      color: var(--amber);
    }

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

    .final-distribution-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 10px;
    }

    .final-distribution-group {
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
    }

    .final-distribution-group strong {
      color: var(--ink);
      font-size: 14px;
      line-height: 1.25;
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .final-distribution-group span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .final-distribution-group ul {
      display: grid;
      gap: 4px;
      margin: 0;
      padding-left: 18px;
    }

    .final-distribution-group li {
      color: var(--ink);
      font-size: 13px;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }

    .final-actions button {
      min-height: 40px;
      padding: 0 14px;
      border-radius: 8px;
      border: 1px solid var(--green);
      background: var(--green);
      color: var(--white);
      font-weight: 900;
      cursor: pointer;
    }

    .final-actions button:disabled {
      border-color: var(--line);
      background: var(--white);
      color: var(--muted);
      cursor: not-allowed;
    }

    .final-actions button.is-disabled,
    .manager-actions button:disabled {
      border-color: var(--line);
      background: var(--white);
      color: var(--muted);
    }

    .final-actions .unresolved-jump {
      min-height: 30px;
      padding: 0 10px;
      border-color: var(--amber);
      background: var(--white);
      color: var(--ink);
      font-size: 13px;
    }

    .final-actions .unresolved-jump:hover {
      background: #fff7ed;
    }

    .unresolved-detail-list {
      width: 100%;
      display: grid;
      gap: 8px;
      margin-top: 2px;
    }

    .unresolved-detail {
      width: 100%;
      padding: 9px 10px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 8px 10px;
      align-items: start;
      border: 1px solid rgba(180, 83, 9, 0.24);
      border-radius: 8px;
      background: #fff7ed;
      color: var(--ink);
      text-align: left;
    }

    .unresolved-detail .unresolved-jump {
      grid-row: 1 / span 2;
      align-self: start;
      margin: 0;
    }

    .unresolved-detail strong {
      min-width: 0;
      font-size: 14px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .unresolved-detail span {
      min-width: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.3;
      overflow-wrap: anywhere;
    }

    .task.attention {
      outline: 3px solid var(--amber);
      outline-offset: 3px;
    }

    .final-messages {
      display: grid;
      gap: 8px;
    }

    .final-message {
      margin: 0;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      color: var(--ink);
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      font-size: 13px;
      line-height: 1.45;
    }

    .modal {
      position: fixed;
      inset: 0;
      display: none;
      place-items: center;
      padding: 18px;
      background: rgba(37, 35, 31, 0.42);
      z-index: 50;
    }

    .modal.open { display: grid; }

    .modal-card {
      width: min(520px, 100%);
      max-height: min(760px, calc(100vh - 36px));
      overflow: auto;
      border-radius: 10px;
      background: var(--white);
      box-shadow: 0 24px 70px rgba(37,35,31,0.28);
      border: 1px solid var(--line);
    }

    .modal-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 16px;
      border-bottom: 1px solid var(--line);
    }

    .modal-head h2 {
      margin: 0;
      font-size: 20px;
    }

    .modal-head.compact {
      align-items: flex-start;
      padding: 14px 16px 10px;
    }

    .modal-head.compact .date-line {
      margin-top: 4px;
      line-height: 1.28;
    }

    .modal-close {
      width: 36px;
      height: 36px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
      cursor: pointer;
      font-weight: 900;
    }

    .modal-body {
      display: grid;
      gap: 12px;
      padding: 16px;
    }

    #cleaningOverviewModal .modal-card {
      width: min(980px, calc(100vw - 48px));
    }

    #cleaningOverviewModal .modal-body {
      min-width: 0;
      overflow-x: hidden;
    }

    .cleaning-task-popup {
      min-width: 0;
    }

    .cleaning-task-popup .task {
      margin: 0;
    }

    .cleaning-task-popup .task-body {
      grid-template-columns: 1fr;
    }

    .cleaning-task-popup .manager-actions {
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    }

    .cleaning-task-popup .cleaner-quick-actions {
      grid-column: 1 / -1;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
    }

    .cleaning-task-popup .manager-actions button,
    .cleaning-task-popup .manager-actions select {
      min-width: 0;
      width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
      line-height: 1.15;
    }

    .modal-body label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .modal-body textarea,
    .modal-body input[type="file"],
    .modal-body input[type="date"],
    .modal-body select {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px;
      font: inherit;
      background: var(--paper);
      color: var(--ink);
    }

    .cleaning-overview-summary {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .cleaning-overview-summary div {
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .cleaning-overview-summary small {
      display: block;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }

    .cleaning-overview-summary b {
      display: block;
      margin-top: 2px;
      font-size: 20px;
    }

    .cleaning-overview-group {
      display: grid;
      gap: 8px;
      padding-top: 2px;
    }

    .cleaning-overview-group h3 {
      margin: 8px 0 0;
      font-size: 14px;
    }

    .cleaning-overview-row {
      display: grid;
      grid-template-columns: 64px 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .cleaning-overview-row strong {
      font-size: 16px;
    }

    .cleaning-overview-row small {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .metric-link {
      border: 0;
      padding: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-weight: inherit;
      cursor: pointer;
      text-align: left;
    }

    .metric-link:hover {
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .offline-note {
      display: none;
      padding: 10px;
      border-radius: 8px;
      background: var(--amber-soft);
      color: var(--amber);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.35;
    }

    .offline-note.show { display: block; }

    .event-error {
      display: none;
      padding: 10px;
      border-radius: 8px;
      background: var(--red-soft);
      color: var(--red);
      font-size: 13px;
      font-weight: 900;
      line-height: 1.35;
    }

    .event-error.show { display: block; }

    .modal-body textarea {
      min-height: 96px;
      resize: vertical;
    }

    .manual-issue-panel {
      display: grid;
      gap: 10px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .manual-issue-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .manual-issue-head button {
      border: 1px solid var(--red);
      border-radius: 8px;
      background: var(--red-soft);
      color: var(--red);
      font-weight: 900;
      padding: 9px 12px;
      cursor: pointer;
    }

    .manual-issue-form {
      display: grid;
      gap: 10px;
    }

    .manual-issue-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .manual-issue-form button[type="submit"] {
      border: 0;
      border-radius: 8px;
      background: var(--red);
      color: white;
      font-weight: 900;
      padding: 10px 12px;
      cursor: pointer;
    }

    .manual-issue-form button:disabled {
      opacity: .55;
      cursor: wait;
    }

    .alert-journal {
      display: grid;
      gap: 10px;
    }

    .alert-apartment {
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--soft);
    }

    .alert-apartment-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      font-weight: 900;
    }

    .alert-row {
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

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

    .alert-row-head strong {
      font-size: 16px;
    }

    .alert-row-meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .alert-photo-links {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }

    .alert-photo-links a,
    .alert-photo-links button {
      min-height: 30px;
      display: inline-flex;
      align-items: center;
      padding: 0 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      color: var(--ink);
      font-size: 12px;
      font-weight: 800;
      text-decoration: none;
      cursor: pointer;
    }

    .alert-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .signal-photo-upload {
      flex: 1 1 220px;
      margin: 0;
    }

    .alert-actions button {
      flex: 0 0 auto;
      min-height: 32px;
      border: 0;
      border-radius: 8px;
      padding: 0 10px;
      font-size: 12px;
      font-weight: 900;
      color: #fff;
      background: var(--blue);
      cursor: pointer;
      white-space: nowrap;
    }

    .alert-actions button.close-signal {
      background: var(--green);
    }

    .notification-compose,
    .notification-row {
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
    }

    .notification-compose {
      background: var(--paper);
      margin-bottom: 12px;
    }

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

    .notification-list {
      display: grid;
      gap: 10px;
    }

    .notification-row-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .notification-row-meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .notification-message {
      color: var(--ink);
      line-height: 1.35;
      white-space: pre-wrap;
    }

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

    .notification-actions button,
    .notification-compose button {
      min-height: 36px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 12px;
      background: var(--white);
      color: var(--ink);
      font-weight: 900;
      cursor: pointer;
    }

    .notification-actions .primary,
    .notification-compose button[type="submit"] {
      background: var(--green);
      border-color: var(--green);
      color: #fff;
    }

    .notification-compose button:disabled {
      opacity: .55;
      cursor: wait;
    }

    .notification-reply-form {
      display: grid;
      gap: 8px;
    }

    .modal-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      padding: 0 16px 16px;
    }

    .modal-actions button {
      min-height: 42px;
      border-radius: 8px;
      border: 0;
      padding: 0 14px;
      font-weight: 900;
      cursor: pointer;
    }

    .modal-actions .secondary { background: var(--paper); color: var(--ink); }
    .modal-actions .primary { background: var(--green); color: #fff; }

    .extra-sales-popup-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .extra-sales-popup-summary div {
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--soft);
    }

    .extra-sales-popup-summary small {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      margin-bottom: 4px;
    }

    .extra-sales-popup-summary b {
      font-size: 18px;
    }

    .extra-sales-popup-list {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }

    .extra-sales-popup-add {
      margin-top: 12px;
    }

    .extra-sales-popup-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .extra-sales-popup-row strong {
      display: block;
      font-size: 14px;
    }

    .extra-sales-popup-row span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      margin-top: 3px;
    }

    .extra-sales-popup-row .status {
      min-width: 82px;
      border-radius: 999px;
      padding: 6px 8px;
      text-align: center;
      font-size: 12px;
      font-weight: 900;
      background: var(--green-soft);
      color: var(--green);
    }

    .extra-sales-popup-row .status.unpaid {
      background: var(--amber-soft);
      color: var(--amber);
    }

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

    .plan-date-grid button {
      min-height: 62px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
      color: var(--ink);
      font-weight: 900;
      cursor: pointer;
    }

    .plan-date-grid button:disabled {
      opacity: 0.65;
      cursor: wait;
    }

    .plan-status {
      min-height: 20px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.35;
    }

    .photo-modal-card {
      width: min(960px, 100%);
    }

    .photo-viewer-body {
      padding: 12px;
      background: #171614;
    }

    .photo-viewer-body img {
      display: block;
      width: 100%;
      max-height: calc(100vh - 160px);
      object-fit: contain;
      border-radius: 8px;
      background: #171614;
    }

    .report-modal .modal-card {
      width: min(980px, 100%);
    }

    .report-modal .modal-body {
      min-width: 0;
      overflow-x: hidden;
    }

    .report-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
      gap: 8px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      background: var(--paper);
    }

    .report-actions button,
    .report-actions a {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 12px;
      background: var(--white);
      color: var(--ink);
      font-weight: 900;
      text-decoration: none;
      cursor: pointer;
    }

    .report-actions .primary {
      border-color: var(--green);
      background: var(--green);
      color: #fff;
    }

    .report-actions .secondary {
      border-color: #d5a028;
      background: #fff6d8;
      color: #5a430b;
    }

    .owner-business-dashboard {
      display: grid;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      padding: 14px;
      margin-bottom: 14px;
    }

    .owner-business-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      border-bottom: 1px solid var(--line);
      padding-bottom: 10px;
    }

    .owner-business-head h3 {
      margin: 0 0 4px;
      font-size: 18px;
    }

    .owner-business-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      align-items: start;
    }

    .owner-business-card {
      display: grid;
      gap: 6px;
      align-content: start;
      min-height: 104px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .owner-business-card strong {
      font-size: 14px;
    }

    .owner-business-card.owner-business-attention {
      grid-column: 1 / -1;
      min-height: 0;
    }

    .owner-business-card .metric {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      font-size: 12px;
      color: var(--muted);
      font-weight: 800;
    }

    .owner-business-card .metric b {
      color: var(--ink);
      font-size: 18px;
    }

    .owner-attention-list {
      display: grid;
      gap: 6px;
    }

    .owner-attention-item {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 8px;
      align-items: start;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
      font-size: 13px;
      line-height: 1.35;
    }

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

    .owner-business-actions button {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      font-weight: 900;
      cursor: pointer;
    }

    .month-report {
      display: grid;
      gap: 18px;
      min-width: 0;
      color: var(--ink);
    }

    .month-report h3 {
      margin: 0 0 8px;
      font-size: 18px;
    }

    .month-report-section {
      padding: 14px;
      min-width: 0;
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
    }

    .month-report-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .month-report-table th,
    .month-report-table td {
      padding: 8px 6px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: top;
    }

    .month-report-table th {
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
    }

    .month-report-note {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .copy-status {
      min-height: 18px;
      padding: 0 16px 14px;
      color: var(--green);
      font-size: 13px;
      font-weight: 800;
    }

    @media (max-width: 620px) {
      .report-modal .info-grid {
        grid-template-columns: 1fr;
      }

      .report-actions button,
      .report-actions a {
        width: 100%;
      }

      .month-report-table {
        min-width: 620px;
      }
    }

    @media print {
      body * {
        visibility: hidden !important;
      }

      #monthReportModal,
      #monthReportModal * {
        visibility: visible !important;
      }

      #monthReportModal {
        position: static !important;
        display: block !important;
        background: #fff !important;
        padding: 0 !important;
      }

      #monthReportModal .modal-card {
        width: 100% !important;
        max-height: none !important;
        box-shadow: none !important;
        border: 0 !important;
      }

      #monthReportModal .report-actions,
      #monthReportModal .modal-close,
      #monthReportCopyStatus {
        display: none !important;
      }

      #monthReportModal .modal-body,
      #monthReportModal .month-report-section {
        max-height: none !important;
        overflow: visible !important;
      }
    }

    .side {
      display: grid;
      gap: 12px;
    }

    .panel {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: 0 8px 28px rgba(37,35,31,0.07);
      padding: 16px;
    }

    .apart-list {
      display: grid;
      gap: 8px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .apart-list li {
      display: grid;
      grid-template-columns: 56px 1fr;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .apart-list b {
      display: grid;
      place-items: center;
      min-height: 40px;
      background: #ebe3d3;
      border-radius: 6px;
    }

    .apart-list span {
      font-size: 13px;
      line-height: 1.25;
      color: var(--muted);
    }

    .month-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--line);
    }

    .month-row:last-child { border-bottom: 0; }
    .month-row small { color: var(--muted); }
    .month-row b { font-size: 24px; }

    .small-action {
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 10px;
      background: var(--soft);
      color: var(--ink);
      font-weight: 900;
      cursor: pointer;
    }

    .cleaner-directory-row {
      width: 100%;
      border-left: 0;
      border-right: 0;
      border-top: 0;
      background: transparent;
      color: var(--ink);
      font: inherit;
      text-align: left;
      cursor: pointer;
    }

    .cleaner-directory-row:hover {
      background: var(--soft);
    }

    .cleaner-directory-row:focus-visible {
      outline: 3px solid var(--blue-soft);
      outline-offset: -2px;
    }

    .cleaner-card-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .cleaner-apartment-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .cleaner-apartment-chip {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
      font-weight: 900;
    }

    .cleaner-vacation-form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      align-items: end;
      margin-top: 8px;
    }

    .cleaner-vacation-form label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .cleaner-vacation-form input {
      width: 100%;
      min-width: 0;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 10px;
      background: var(--white);
      color: var(--ink);
    }

    .cleaner-vacation-form button {
      grid-column: 1 / -1;
      min-height: 42px;
      border: 0;
      border-radius: 8px;
      padding: 0 14px;
      background: var(--amber);
      color: var(--white);
      font-weight: 900;
      cursor: pointer;
    }

    .cleaner-vacation-form .checkbox-line {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.25;
    }

    .cleaner-vacation-form .checkbox-line input {
      width: 16px;
      min-width: 16px;
      min-height: 16px;
      padding: 0;
      flex: 0 0 16px;
    }

    .cleaner-vacation-status {
      margin-top: 8px;
      min-height: 18px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .cleaner-pay-rule-form {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: end;
      margin-top: 8px;
    }

    .cleaner-pay-rule-form label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .cleaner-pay-rule-form button,
    .cleaner-pay-rule-form [data-pay-rule-error],
    .cleaner-pay-rule-form .wide-field {
      grid-column: 1 / -1;
    }

    .cleaner-pay-rule-note {
      margin-top: 8px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .cleaner-vacation-current {
      display: grid;
      gap: 6px;
      margin-bottom: 10px;
    }

    .cleaner-vacation-current .vacation-range {
      display: inline-flex;
      width: fit-content;
      min-height: 32px;
      align-items: center;
      padding: 0 10px;
      border: 1px solid var(--amber);
      border-radius: 8px;
      background: var(--amber-soft);
      color: var(--ink);
      font-weight: 900;
    }

    .extra-sale-row {
      grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
      align-items: start;
    }

    .extra-sale-row > div:first-child {
      min-width: 0;
    }

    .extra-sale-row strong {
      display: inline-block;
      max-width: 100%;
      line-height: 1.15;
    }

    .extra-sale-row small {
      display: block;
      max-width: 100%;
      overflow-wrap: anywhere;
      line-height: 1.45;
    }

    .row-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .row-actions button {
      min-height: 32px;
      border: 1px solid var(--green);
      border-radius: 8px;
      padding: 0 10px;
      background: var(--green);
      color: var(--white);
      font-weight: 900;
      cursor: pointer;
    }

    .extra-sale-row .row-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(104px, 1fr));
      justify-items: stretch;
      align-items: stretch;
      min-width: 220px;
    }

    .extra-sale-row .row-actions .pill,
    .extra-sale-row .row-actions button {
      width: 100%;
      min-height: 38px;
      justify-content: center;
      text-align: center;
    }

    .extra-sale-form {
      display: grid;
      grid-template-columns: minmax(130px, 150px) minmax(110px, 130px) minmax(72px, 86px) minmax(130px, 150px) minmax(140px, 1fr) auto;
      gap: 8px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .extra-sale-form input,
    .extra-sale-form select {
      width: 100%;
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 10px;
      background: var(--white);
      color: var(--ink);
      font: inherit;
    }

    .extra-sale-form button {
      min-height: 38px;
      border: 0;
      border-radius: 8px;
      padding: 0 12px;
      background: var(--ink);
      color: var(--white);
      font-weight: 900;
      cursor: pointer;
    }

    .extra-sale-form .checkbox-line {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      padding: 0 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .extra-sale-form .checkbox-line input {
      width: 16px;
      min-height: 16px;
      padding: 0;
      flex: 0 0 16px;
    }

    [data-history-reassign-form] {
      grid-template-columns: minmax(132px, 160px) minmax(160px, 1fr) minmax(160px, 1fr) auto;
    }

    [data-history-reassign-form] .date-line,
    [data-history-reassign-form] .checklist {
      grid-column: 1 / -1;
    }

    .checklist {
      display: grid;
      gap: 6px;
    }

    .checklist label {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--white);
      color: var(--ink);
      font-size: 13px;
      font-weight: 800;
    }

    .checklist input {
      width: 16px;
      min-height: 16px;
      padding: 0;
      flex: 0 0 16px;
    }

    .penalty-form {
      grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr);
      align-items: stretch;
    }

    .penalty-form select,
    .penalty-form input[name="comment"],
    .penalty-photo-upload,
    .penalty-form button,
    .penalty-form .extra-sale-error {
      grid-column: 1 / -1;
    }

    .penalty-photo-upload {
      display: grid;
      gap: 7px;
      padding: 10px;
      border: 1px dashed var(--line);
      border-radius: 8px;
      background: rgba(255,255,255,0.58);
      cursor: pointer;
    }

    .penalty-photo-upload input[type="file"] {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .penalty-photo-upload .upload-title {
      width: fit-content;
      min-height: 38px;
      display: inline-grid;
      place-items: center;
      padding: 0 14px;
      border-radius: 8px;
      background: var(--white);
      border: 1px solid var(--line);
      color: var(--ink);
      font-weight: 900;
    }

    .penalty-photo-upload .upload-caption {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .penalty-open {
      width: 100%;
      min-height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 12px;
      background: var(--paper);
      color: var(--ink);
      font: inherit;
      font-weight: 900;
      cursor: pointer;
      text-align: left;
    }

    .penalty-open span:last-child {
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      white-space: nowrap;
    }

    .penalty-summary {
      display: grid;
      gap: 8px;
    }

    .penalty-quick {
      width: 100%;
      min-height: 44px;
      border: 0;
      border-radius: 8px;
      padding: 0 14px;
      background: var(--red);
      color: #fff;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .penalty-list {
      display: grid;
      gap: 8px;
    }

    .penalty-list-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
    }

    .penalty-list-row button {
      min-height: 36px;
      border: 0;
      border-radius: 8px;
      padding: 0 12px;
      background: var(--red);
      color: #fff;
      font-weight: 900;
      cursor: pointer;
    }

    .extra-sale-error {
      min-height: 18px;
      color: var(--red);
      font-size: 12px;
      font-weight: 800;
    }

    .manual-cleaning-toggle {
      border: 0;
      cursor: pointer;
      font: inherit;
      font-weight: 900;
    }

    .manual-cleaning-form {
      grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) auto minmax(160px, 1fr);
    }

    .stats-filter-form {
      grid-template-columns: minmax(130px, 150px) minmax(150px, 1fr) minmax(130px, 150px) minmax(140px, 160px) minmax(130px, 150px) auto;
    }

    .stats-date-field {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .stats-date-field span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
    }

    .stats-date-field input {
      width: 100%;
    }

    @media (max-width: 899px) {
      .extra-sale-form {
        grid-template-columns: 1fr 1fr;
      }
      .extra-sale-form input[name="comment"],
      .extra-sale-form button,
      .extra-sale-error {
        grid-column: 1 / -1;
      }
      .penalty-form {
        grid-template-columns: 1fr;
      }
      .penalty-photo-upload .upload-title {
        width: 100%;
      }
      .manual-cleaning-form {
        grid-template-columns: 1fr;
      }
      .stats-filter-form button {
        grid-column: auto;
      }
    }

    .menu-overlay {
      position: fixed;
      inset: 0;
      z-index: 90;
      display: none;
      background: rgba(20,19,17,0.48);
      backdrop-filter: blur(2px);
    }

    .menu-overlay.open {
      display: block;
    }

    .mobile-menu {
      position: fixed;
      inset: 0 0 0 auto;
      z-index: 91;
      width: min(360px, 92vw);
      height: 100vh;
      display: none;
      grid-template-rows: auto 1fr auto;
      background: #2b2925;
      color: #f9f4e9;
      box-shadow: -18px 0 54px rgba(20,19,17,0.28);
      transform: translateX(100%);
      transition: transform 180ms ease;
    }

    .mobile-menu.open {
      display: grid;
      transform: translateX(0);
    }

    .mobile-menu-head {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 14px;
      align-items: center;
      padding: calc(16px + env(safe-area-inset-top)) 16px 14px;
      border-bottom: 1px solid rgba(255,255,255,0.12);
    }

    .mobile-menu-title strong {
      display: block;
      font-size: 18px;
      line-height: 1.1;
    }

    .mobile-menu-title span {
      display: block;
      margin-top: 4px;
      color: rgba(249,244,233,0.64);
      font-size: 12px;
    }

    .mobile-menu-close {
      width: 42px;
      height: 42px;
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 8px;
      background: rgba(255,255,255,0.08);
      color: #f9f4e9;
      font-size: 24px;
      line-height: 1;
      cursor: pointer;
    }

    .mobile-menu-body {
      min-height: 0;
      overflow: auto;
      padding: 14px 16px 20px;
    }

    .mobile-menu-group {
      margin-bottom: 16px;
    }

    .mobile-menu-group-title {
      margin: 0 0 8px;
      color: rgba(249,244,233,0.54);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .mobile-menu .nav {
      gap: 7px;
    }

    .mobile-menu .nav button {
      min-height: 48px;
      background: rgba(255,255,255,0.05);
      border-color: rgba(255,255,255,0.08);
    }

    .mobile-menu .nav button[hidden] {
      display: none;
    }

    .mobile-menu-foot {
      padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
      border-top: 1px solid rgba(255,255,255,0.12);
      color: rgba(249,244,233,0.66);
      font-size: 12px;
    }

    .auth-screen {
      position: fixed;
      inset: 0;
      z-index: 20;
      display: grid;
      place-items: center;
      padding: 24px;
      background:
        linear-gradient(90deg, rgba(37,35,31,0.06) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(0deg, rgba(37,35,31,0.04) 1px, transparent 1px) 0 0 / 32px 32px,
        #f4f1ea;
    }

    .auth-screen.hidden { display: none; }

    .auth-card {
      width: min(440px, 100%);
      padding: 24px;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .auth-card h2 {
      margin: 0 0 8px;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 34px;
      line-height: 1;
    }

    .auth-card p {
      margin: 0 0 18px;
      color: var(--muted);
      line-height: 1.45;
    }

    .field {
      display: grid;
      gap: 6px;
      margin-bottom: 12px;
    }

    .field span {
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .field input, .field select {
      width: 100%;
      min-height: 46px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
      color: var(--ink);
    }

    .auth-error {
      min-height: 20px;
      margin: 4px 0 12px;
      color: var(--red);
      font-size: 13px;
      font-weight: 800;
    }

    .auth-submit {
      width: 100%;
      min-height: 46px;
      border: 0;
      border-radius: 8px;
      background: #2b2925;
      color: #f9f4e9;
      font-weight: 900;
      cursor: pointer;
    }

    .auth-hint {
      margin-top: 14px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    @media (max-width: 1100px) {
      .shell { grid-template-columns: 1fr; }
      .sidebar { display: none; }
      .main { max-width: 100%; padding: 20px; }
      .menu-btn { display: grid; }
      .layout { grid-template-columns: 1fr; }
      .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }

      .extra-sale-form,
      [data-history-reassign-form],
      .manual-cleaning-form,
      .stats-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .extra-sale-form input[name="comment"],
      .extra-sale-form button,
      .extra-sale-error,
      [data-history-reassign-form] .date-line,
      [data-history-reassign-form] .checklist,
      .manual-cleaning-form button,
      .stats-filter-form button {
        grid-column: 1 / -1;
      }

      .manager-actions button,
      .manager-actions select,
      .row-actions button,
      .tools button {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
      }
    }

    @media (max-width: 899px) {
      .main { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
      .mobile-day-focus { display: grid; }
      .modal {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
      }
      .modal-card {
        max-height: min(760px, calc(100vh - 42px));
      }
    }

    @media (min-width: 761px) and (max-width: 1099px) {
      .owner-business-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 760px) {
      .topbar { grid-template-columns: 1fr; align-items: start; }
      .tools { justify-content: start; }
      .tools .text-btn { flex: 1 1 150px; }
      .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
      .stat { min-height: 72px; padding: 10px; }
      .stat b { margin-top: 8px; font-size: 25px; }
      .stat .stat-line { margin-top: 8px; font-size: 16px; }
      .history-tools.manager-tools { grid-template-columns: 1fr; }
      .notification-grid { grid-template-columns: 1fr; }
      .manager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .owner-business-grid { grid-template-columns: 1fr; }
      .owner-business-head { display: grid; }
      .manager-cell { min-height: 58px; padding: 8px; }
      .manager-actions { grid-template-columns: 1fr; }
      .side,
      .extra-sale-form,
      [data-history-reassign-form],
      .manual-cleaning-form,
      .stats-filter-form,
      .cleaner-pay-rule-form {
        grid-template-columns: 1fr;
      }
      .extra-sale-row {
        grid-template-columns: 1fr;
      }
      .extra-sale-row .row-actions {
        min-width: 0;
        grid-template-columns: 1fr 1fr;
      }
      #cleaningOverviewModal .modal-card {
        width: min(520px, 100%);
      }
      .cleaning-task-popup .task-body,
      .cleaning-task-popup .manager-actions,
      .cleaning-task-popup .cleaner-quick-actions {
        grid-template-columns: 1fr;
      }
      .task-head {
        grid-template-columns: auto 1fr;
        gap: 10px;
        padding: 12px;
      }
      .task-head .pill { grid-column: 1 / -1; justify-self: start; }
      .apt { width: auto; min-width: 54px; height: 54px; padding-inline: 7px; font-size: 18px; }
      .task h2 { font-size: 18px; }
      .meta { gap: 5px; margin-top: 6px; font-size: 12px; }
      .task-body { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
      .info-grid { grid-template-columns: 1fr; }
      .info { min-height: auto; padding: 9px; }
      .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .alert-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .signal-photo-upload {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
      }
      .alert-actions button {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 0 8px;
        white-space: normal;
        overflow-wrap: anywhere;
      }
      .action,
      .manager-actions button,
      .manager-actions select,
      .final-actions button,
      .history-tools input,
      .history-tools select {
        min-height: 48px;
      }
      .mobile-focus-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .side { grid-template-columns: 1fr; }
      .month-row.extra-sale-row {
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch;
      }
      .extra-sale-row .row-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
        width: 100%;
      }
      .extra-sale-row .row-actions .pill,
      .extra-sale-row .row-actions button {
        min-width: 0;
        padding: 0 8px;
        font-size: 15px;
      }
      h1 { font-size: 36px; }
    }

    .directory-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 14px; }
    .directory-toolbar input { min-height: 46px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; color: var(--ink); font: inherit; }
    .directory-toolbar button, .directory-action, .directory-link { min-height: 44px; border-radius: 11px; padding: 0 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
    .directory-toolbar button, .directory-action.primary { background: var(--green); color: #fff; border-color: var(--green); }
    .directory-status { min-height: 22px; margin: 0 0 12px; color: var(--muted); }
    .directory-status.error { color: #b42318; }
    .directory-company { display: grid; gap: 14px; }
    .directory-company + .directory-company { margin-top: 14px; }
    .directory-company-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
    .directory-company-head h3 { margin: 0 0 4px; }
    .directory-company-actions, .directory-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .directory-addresses, .directory-contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .directory-address, .directory-contact { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #fbfcfd; display: grid; gap: 8px; }
    .directory-address strong, .directory-contact strong { overflow-wrap: anywhere; }
    .directory-address small, .directory-contact small { color: var(--muted); }
    .directory-links { display: flex; flex-wrap: wrap; gap: 8px; }
    .directory-link.call { background: #eaf7ef; border-color: #b7dec4; color: #176b3a; }
    .directory-link.emergency { background: #fff0ee; border-color: #f2b8b0; color: #a5271c; }
    .directory-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
    .directory-editor { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
    .directory-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .directory-editor .field { margin: 0; }
    .directory-editor .field.wide { grid-column: 1 / -1; }
    .directory-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .directory-history { margin-top: 12px; }
    .directory-history details { border-top: 1px solid var(--line); padding-top: 10px; }
    .directory-history li { margin: 7px 0; color: var(--muted); }
    .directory-priority { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .directory-priority-card { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #fbfcfd; display: grid; gap: 8px; }
    .directory-priority-card small { color: var(--muted); }
    .directory-settings-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(15,23,42,.52); display: grid; place-items: center; padding: 16px; }
    .directory-settings-modal { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 24px 70px rgba(15,23,42,.24); }
    .directory-settings-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
    .directory-settings-head h3 { margin: 0; }
    .directory-settings-list { display: grid; gap: 10px; }
    .directory-settings-row { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
    @media (max-width: 720px) {
      .directory-toolbar { grid-template-columns: 1fr; }
      .directory-toolbar button { width: 100%; }
      .directory-addresses, .directory-contacts, .directory-editor-grid { grid-template-columns: 1fr; }
      .directory-company-head { display: grid; }
      .directory-company-actions, .directory-contact-actions, .directory-links { display: grid; grid-template-columns: 1fr; }
      .directory-priority { grid-template-columns: 1fr; }
      .directory-settings-backdrop { padding: 8px; place-items: stretch; }
      .directory-settings-modal { max-height: calc(100vh - 16px); }
      .directory-action, .directory-link { width: 100%; min-height: 48px; }
    }
