:root {
      --bg-gradient: linear-gradient(140deg, #0f0f0f 0%, #121212 55%, #151515 100%);
      --panel: rgba(255, 255, 255, 0.05);
      --panel-strong: rgba(255, 255, 255, 0.08);
      --border: rgba(255, 255, 255, 0.12);
      --text: #f6f8fb;
      --muted: #9fb0c2;
      --primary: linear-gradient(135deg, #2f81f7, #1f6feb);
      --shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
      --hour-height: 78px;
      --time-width: 110px;
      --blur: blur(16px);
      --accent: #BA2A34;
      --accent-rgb: 186, 42, 52;
      --accent-dark: #121212;
      --cursor-x: 65%;
      --cursor-y: 65%;
      --heading-font: "Lexend Deca", "Geist", "Inter", 'Helvetica Neue', 'Segoe UI', sans-serif;
      --heading-weight: 500;
    }

    /* Light mode - warm, modern, easy on eyes */
    [data-theme="light"] {
      --bg-gradient: linear-gradient(140deg, #f8f6f4 0%, #f3f1ef 55%, #edeae6 100%);
      --panel: rgba(0, 0, 0, 0.04);
      --panel-strong: rgba(0, 0, 0, 0.06);
      --border: rgba(0, 0, 0, 0.12);
      --text: #000000;
      --muted: #000000;
      --primary: linear-gradient(135deg, #0071e3, #0077ed);
      --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      --accent: #0071e3;
      --accent-rgb: 0, 113, 227;
      --accent-dark: #f8f6f4;
    }

    [data-theme="light"] body,
    [data-theme="light"] body.calendar-page {
      background: linear-gradient(135deg, #f5f3f0 0%, #ebe8e4 100%);
    }

    /* Header - distinct warm tone */
    [data-theme="light"] header.top-nav {
      background: linear-gradient(180deg, #fdfcfb 0%, #f8f6f4 100%);
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    /* Sidebar - subtle cream tint */
    [data-theme="light"] aside.sidebar {
      background: linear-gradient(180deg, #faf9f7 0%, #f5f3f0 100%);
      border-right: 1px solid rgba(0, 0, 0, 0.08);
    }

    /* Work cards - crisp white with shadow */
    [data-theme="light"] .work-card {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.1);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    [data-theme="light"] .work-card:hover {
      background: #fff;
      border-color: rgba(0, 0, 0, 0.15);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .work-card.active {
      background: #fff;
      border-color: var(--accent);
      box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.12);
    }

    /* Light mode technician text */
    [data-theme="light"] .work-id {
      color: #0f172a;
    }
    [data-theme="light"] .work-metrics .metric {
      background: #f9fafb;
      border: 1px solid #e5e7eb;
    }
    [data-theme="light"] .work-metrics .metric-label {
      color: #6b7280;
    }
    [data-theme="light"] .work-metrics .metric-value {
      color: #0f172a;
    }
    [data-theme="light"] .work-meta {
      color: #111827;
    }

    /* Light mode slot navigation */
    [data-theme="light"] .slot-nav-btn {
      background: #f3f4f6;
      border-color: #d1d5db;
      color: #374151;
    }
    [data-theme="light"] .slot-nav-btn:hover:not(:disabled) {
      background: rgba(var(--accent-rgb), 0.1);
      border-color: var(--accent);
    }
    [data-theme="light"] .slot-counter {
      color: #374151;
    }

    /* Light mode card details */
    [data-theme="light"] .card-header {
      border-bottom-color: rgba(0, 0, 0, 0.08);
    }
    [data-theme="light"] .card-details {
      border-top-color: rgba(0, 0, 0, 0.08);
    }
    [data-theme="light"] .detail-label {
      color: #6b7280;
    }
    [data-theme="light"] .detail-value {
      color: #1f2937;
    }

    /* Tabs */
    [data-theme="light"] .tab-button,
    [data-theme="light"] .sub-tab-button {
      color: #000000;
    }

    [data-theme="light"] .tab-button.active {
      color: #000000;
      background: rgba(var(--accent-rgb), 0.08);
      border-bottom-color: var(--accent);
    }

    [data-theme="light"] .sub-tab-button.active {
      color: #000000;
      border-bottom-color: var(--accent);
    }

    /* Status pills - colored backgrounds */
    [data-theme="light"] .status-pill {
      background: #f0eeec;
      border: 1px solid rgba(0, 0, 0, 0.1);
      color: #000000;
    }

    [data-theme="light"] .status-pill.status-scheduled {
      background: #e3f0ff;
      border-color: #a8cafc;
      color: #000000;
    }

    [data-theme="light"] .status-pill.status-accepted,
    [data-theme="light"] .status-pill.status-waiting-tenant,
    [data-theme="light"] .status-pill.status-waiting-vendor {
      color: #000000;
    }

    /* Work cards - text colors */
    [data-theme="light"] .work-id {
      color: #000000;
    }
    [data-theme="light"] .work-address,
    [data-theme="light"] .work-meta {
      color: #000000;
    }

    /* User menu */
    [data-theme="light"] .user-menu {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.12);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }

    [data-theme="light"] .user-menu-item:hover {
      background: #f5f3f0;
    }

    [data-theme="light"] .user-menu-header {
      border-bottom-color: rgba(0, 0, 0, 0.08);
    }

    /* Search box - visible with border */
    [data-theme="light"] .search-wrap input,
    [data-theme="light"] #email-search {
      background: #fff !important;
      border: 1px solid rgba(0, 0, 0, 0.15) !important;
      color: #000000 !important;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    [data-theme="light"] .search-wrap input:focus,
    [data-theme="light"] #email-search:focus {
      border-color: var(--accent) !important;
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
    }

    [data-theme="light"] .search-wrap input::placeholder {
      color: #000000;
    }

    [data-theme="light"] input::placeholder,
    [data-theme="light"] textarea::placeholder {
      color: #000000;
      opacity: 1;
    }

    [data-theme="light"] .search-btn {
      background: var(--accent) !important;
      border-color: var(--accent) !important;
    }

    /* Suggest list */
    [data-theme="light"] .suggest-list {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.12);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }

    [data-theme="light"] .suggest-item:hover {
      background: #f5f3f0;
    }

    /* Calendar controls */
    [data-theme="light"] .cal-controls button {
      color: #000000;
    }

    [data-theme="light"] .cal-controls button:hover {
      background: rgba(0, 0, 0, 0.06);
      color: #000000;
    }

    [data-theme="light"] header.top-nav #today-btn {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.15);
      color: #000000;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] header.top-nav #today-btn:hover {
      background: #f5f3f0;
      border-color: rgba(0, 0, 0, 0.2);
    }

    /* Calendar body */
    [data-theme="light"] .calendar-body {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.1);
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .day-header {
      background: linear-gradient(180deg, #fdfcfb 0%, #f8f6f4 100%);
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .day-header .day {
      background: transparent;
    }

    [data-theme="light"] .day-header .day.today .date {
      background: var(--accent);
      color: #fff;
    }

    [data-theme="light"] .week-grid .cell {
      background: #fff;
      border-color: rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .week-grid .cell:hover {
      background: rgba(var(--accent-rgb), 0.04);
    }

    [data-theme="light"] .time-column {
      background: #faf9f7;
      border-right: 1px solid rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .time-label {
      border-bottom-color: rgba(0, 0, 0, 0.06);
      color: #000000;
    }

    /* Status strip */
    [data-theme="light"] .status-strip {
      background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.03), rgba(59, 130, 246, 0.02), rgba(16, 185, 129, 0.02));
      border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .status-flow {
      background: rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .status-flow::before {
      background: linear-gradient(90deg,
        #3b82f6 0%,
        #06b6d4 33%,
        #14b8a6 66%,
        #10b981 100%);
    }

    [data-theme="light"] .status-flow::after {
      background: linear-gradient(270deg,
        rgba(16, 185, 129, 0.6) 0%,
        rgba(20, 184, 166, 0.4) 50%,
        transparent 100%);
    }

    [data-theme="light"] .status-step {
      color: rgba(0, 0, 0, 0.35);
    }

    [data-theme="light"] .status-step .step-icon {
      background: rgba(0, 0, 0, 0.08);
      border: 2px solid rgba(0, 0, 0, 0.15);
    }

    [data-theme="light"] .status-step.complete,
    [data-theme="light"] .status-step.current {
      color: #fff;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    [data-theme="light"] .status-step.complete .step-icon,
    [data-theme="light"] .status-step.current .step-icon {
      background: #fff;
      border-color: #fff;
      box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    }

    [data-theme="light"] .status-step.complete .step-icon svg {
      stroke: #059669;
      stroke-width: 3;
    }

    [data-theme="light"] .status-step.current .step-icon svg {
      stroke: #2563eb;
      stroke-width: 3;
    }

    /* Action buttons */
    [data-theme="light"] .action-btn {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.15);
      color: #000000;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .action-btn:hover {
      background: #f5f3f0;
      border-color: rgba(0, 0, 0, 0.2);
    }

    /* Modals */
    [data-theme="light"] .modal-backdrop {
      background: rgba(0, 0, 0, 0.35);
    }

    [data-theme="light"] .modal-box {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.1);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }

    [data-theme="light"] .modal {
      background: linear-gradient(165deg, #ffffff, #f8f9fc);
      border: 1px solid rgba(0, 0, 0, 0.08);
      box-shadow: 0 24px 80px -12px rgba(0, 0, 0, 0.2), 0 8px 24px -8px rgba(0, 0, 0, 0.12);
    }

    [data-theme="light"] .modal__header {
      border-bottom-color: rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .modal__title {
      color: #111827;
    }

    [data-theme="light"] .modal__subtitle {
      color: #6b7280;
    }

    [data-theme="light"] .modal__close {
      background: rgba(0, 0, 0, 0.04);
      color: #6b7280;
    }

    [data-theme="light"] .modal__close:hover {
      background: rgba(0, 0, 0, 0.08);
      color: #111;
    }

    [data-theme="light"] .modal__card,
    [data-theme="light"] .modal__summary {
      background: #f3f4f6;
      border-color: rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .modal__card-header {
      border-bottom-color: rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .modal__card-icon {
      background: rgba(0, 0, 0, 0.05);
      color: #4b5563;
    }

    [data-theme="light"] .modal__card-title {
      color: #4b5563;
    }

    [data-theme="light"] .modal__label {
      color: #374151;
    }

    [data-theme="light"] .modal__input,
    [data-theme="light"] .modal__textarea,
    [data-theme="light"] .modal__select {
      background: #fff;
      border-color: rgba(0, 0, 0, 0.12);
      color: #111827;
    }

    [data-theme="light"] .modal__input:focus,
    [data-theme="light"] .modal__textarea:focus,
    [data-theme="light"] .modal__select:focus {
      background: #fff;
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    }

    [data-theme="light"] .modal__footer {
      border-top-color: rgba(0, 0, 0, 0.06);
    }

    [data-theme="light"] .modal__btn--ghost {
      background: rgba(0, 0, 0, 0.04);
      border-color: rgba(0, 0, 0, 0.12);
      color: #374151;
    }

    [data-theme="light"] .modal__btn--ghost:hover {
      background: rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .modal__cutoff {
      color: #d97706;
    }

    [data-theme="light"] .modal__error {
      color: #dc2626;
    }

    /* Logo */
    [data-theme="light"] .logo-block {
      background: #fff;
      border: 1px solid rgba(0, 0, 0, 0.1);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    /* Inputs and selects - VISIBLE */
    [data-theme="light"] input,
    [data-theme="light"] select,
    [data-theme="light"] textarea {
      background: #fff !important;
      border: 1px solid rgba(0, 0, 0, 0.18) !important;
      color: #000000 !important;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    [data-theme="light"] input:focus,
    [data-theme="light"] select:focus,
    [data-theme="light"] textarea:focus {
      border-color: var(--accent) !important;
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
      outline: none;
    }

    [data-theme="light"] input::placeholder {
      color: #000000;
    }

    /* Filter dropdowns */
    [data-theme="light"] .sub-tab-select {
      background: #fff !important;
      border: 1px solid rgba(0, 0, 0, 0.18) !important;
      color: #000000 !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    /* Calendar blocks - vibrant but soft */
    [data-theme="light"] .block-scheduled {
      background: linear-gradient(135deg, #dbeafe, #bfdbfe);
      border: 1px solid #93c5fd;
    }


    /* User avatar */
    [data-theme="light"] .user-avatar-btn {
      background: #f0eeec;
      border: 1px solid rgba(0, 0, 0, 0.1);
    }

    [data-theme="light"] .avatar-icon {
      color: #000000;
    }

    /* Month label */
    [data-theme="light"] .month-label {
      color: #000000;
    }

    /* App title */
    [data-theme="light"] .app-title {
      color: #000000;
    }

    /* Theme toggle icon styles */
    .theme-icon {
      position: relative;
      width: 16px;
      height: 16px;
    }

    .theme-icon .icon-sun,
    .theme-icon .icon-moon {
      position: absolute;
      top: 0;
      left: 0;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .theme-icon .icon-moon {
      opacity: 1;
      transform: rotate(0deg);
    }

    .theme-icon .icon-sun {
      opacity: 0;
      transform: rotate(-90deg);
    }

    [data-theme="light"] .theme-icon .icon-moon {
      opacity: 0;
      transform: rotate(90deg);
    }

    [data-theme="light"] .theme-icon .icon-sun {
      opacity: 1;
      transform: rotate(0deg);
    }

    * {
      box-sizing: border-box;
    }

    .is-hidden {
      display: none !important;
    }

    html, body {
      margin: 0;
      height: 100vh;
      overflow: hidden;
    }

    body {
      font-family: 'Helvetica Neue', 'Segoe UI', sans-serif;
      font-size: 16px;
      letter-spacing: 0.2px;
      background: var(--accent-dark);
      color: var(--text);
    }

    body.calendar-page {
      background: linear-gradient(155deg, #101010 0%, #121212 60%, rgba(var(--accent-rgb), 0.08) 100%);
    }

    .auth-wrapper {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-gradient);
      padding: 20px;
    }

    .auth-wrapper--wide {
      padding: 0;
      justify-content: stretch;
      align-items: stretch;
    }

    .auth-wrapper--wide .auth-card {
      border-radius: 0;
      box-shadow: none;
      max-width: 480px;
    }

    .auth-wrapper--wide .auth-card--form {
      flex: 0 0 420px;
      width: 100%;
      padding: 48px;
      border-left: 1px solid rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(20px);
    }

    .auth-wrapper--wide {
      display: flex;
      width: 100%;
    }

    .auth-showcase {
      flex: 1;
      background: radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.15), transparent 60%), rgba(6, 8, 12, 0.92);
      padding: 60px 70px;
      display: flex;
      align-items: center;
      color: #f5f7fb;
    }

    .auth-showcase-content {
      max-width: 520px;
    }

    .auth-showcase-logo {
      width: 90px;
      height: 90px;
      object-fit: contain;
      margin-bottom: 20px;
      filter: brightness(0) invert(1) drop-shadow(0 12px 30px rgba(0, 0, 0, 0.45));
    }

    .auth-showcase h1 {
      margin: 0 0 12px;
      font-size: 34px;
      letter-spacing: 0.4px;
    }

    .auth-showcase p {
      font-size: 16px;
      color: rgba(255, 255, 255, 0.92);
      margin-bottom: 24px;
      line-height: 1.6;
    }

    .showcase-highlights {
      display: flex;
      gap: 24px;
      flex-wrap: wrap;
    }

    .showcase-highlights div {
      display: flex;
      flex-direction: column;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 14px;
      padding: 16px;
      min-width: 120px;
      box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
    }

    .highlight-label {
      font-size: 28px;
      font-weight: 700;
      color: #ffffff;
    }

    .highlight-note {
      font-size: 13px;
      color: rgba(255, 255, 255, 0.8);
      letter-spacing: 0.3px;
    }

    .auth-card {
      width: 100%;
      max-width: 380px;
      padding: 32px;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow);
      backdrop-filter: var(--blur);
    }

    .auth-card h1 {
      margin-top: 0;
      margin-bottom: 8px;
    }

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

    .auth-logo {
      width: 64px;
      height: 64px;
      object-fit: contain;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.08);
      padding: 6px;
      border: 1px solid rgba(255, 255, 255, 0.16);
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    }

    .auth-details {
      margin-bottom: 12px;
    }

    .auth-feature-list {
      margin: 8px 0 0;
      padding-left: 18px;
      color: var(--text);
      font-size: 13px;
      line-height: 1.5;
    }

    .auth-feature-list li {
      margin-bottom: 4px;
    }

    @media (max-width: 960px) {
      .auth-wrapper--wide {
        flex-direction: column;
      }

      .auth-showcase {
        padding: 40px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      }

      .auth-wrapper--wide .auth-card--form {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 32px;
      }
    }

    .auth-form label {
      display: block;
      margin-top: 14px;
      font-weight: 600;
      font-size: 14px;
    }

    .auth-form input,
    .auth-form select {
      width: 100%;
      margin-top: 6px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.03);
      padding: 10px 12px;
      color: var(--text);
    }

    .auth-form select {
      color: #000;
      background-color: #fff;
    }

    .auth-error {
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(201, 118, 118, 0.2);
      border: 1px solid rgba(201, 118, 118, 0.4);
      color: #ffd7d7;
    }

    .auth-hint {
      margin-top: 20px;
      font-size: 13px;
      color: var(--muted);
    }

    .auth-hint ul {
      margin: 4px 0 0;
      padding-left: 18px;
    }

    .app-shell {
      height: 100vh;
      max-height: 100vh;
      display: flex;
      flex-direction: column;
      padding: 0;
      max-width: 100%;
      width: 100%;
      margin: 0;
      background: var(--bg-gradient);
      overflow: hidden;
    }

    .app-shell::before {
      content: '';
      position: fixed;
      inset: 0;
      background: radial-gradient(circle at var(--cursor-x, 65%) var(--cursor-y, 65%), rgba(var(--accent-rgb), 0.06), transparent 50%);
      pointer-events: none;
      z-index: 0;
      transition: background-position 0.2s ease;
    }

    header.top-nav {
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      padding: 12px 20px;
      background: var(--accent-dark);
      border: none;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-left {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .logo-block {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      background: #ffffff;
      display: grid;
      place-items: center;
      padding: 5px;
    }

    .logo-block img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .app-title {
      font-family: var(--heading-font);
      font-weight: 400;
      font-size: 22px;
      letter-spacing: -0.3px;
      color: var(--text);
    }

    .titles {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .titles h1 {
      margin: 0;
      font-family: var(--heading-font);
      font-weight: var(--heading-weight);
      font-size: 22px;
      letter-spacing: 0.4px;
    }

    .titles span {
      font-size: 13px;
      color: var(--muted);
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .user-chip {
      display: flex;
      flex-direction: column;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 14px;
      min-width: 180px;
    }

    .user-chip .user-name {
      font-weight: 700;
      font-size: 15px;
    }

    .role-toggle {
      display: inline-flex;
      align-items: center;
      padding: 4px;
      background: var(--panel-strong);
      border: 1px solid var(--border);
      border-radius: 14px;
      backdrop-filter: var(--blur);
    }

    .role-toggle button {
      border: none;
      background: transparent;
      color: var(--muted);
      padding: 10px 14px;
      border-radius: 10px;
      font-weight: 600;
      letter-spacing: 0.3px;
      transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
      cursor: pointer;
    }

    .role-toggle button:hover {
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
    }

    .role-toggle button.active {
      background: var(--primary);
      color: #0c130f;
      transform: translateY(-1px);
    }

    .ghost-btn {
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      padding: 10px 14px;
      border-radius: 12px;
      font-weight: 600;
      letter-spacing: 0.3px;
      cursor: pointer;
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }

    .ghost-btn:hover {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(255, 255, 255, 0.16);
      transform: translateY(-1px);
    }

    .user-menu-wrapper {
      position: relative;
    }
    .user-avatar-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: none;
      background: transparent;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      cursor: pointer;
      transition: opacity 0.15s ease;
    }
    .user-avatar-btn:hover {
      opacity: 0.8;
    }
    .user-avatar-btn:active {
      transform: scale(0.96);
    }
    .avatar-icon {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background: linear-gradient(135deg, #5b7a99, #3d5a80);
      color: #fff;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1;
      text-transform: uppercase;
      display: grid;
      place-items: center;
    }
    .user-menu {
      position: absolute;
      right: 0;
      top: 48px;
      min-width: 200px;
      background: #0f0f14;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
      padding: 8px;
      display: grid;
      gap: 4px;
      z-index: 5;
    }
    .user-menu.is-hidden {
      display: none;
    }
    .user-menu-header {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 10px 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      margin-bottom: 4px;
    }
    .menu-name {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .menu-role {
      font-size: 10px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--muted);
    }
    .menu-display {
      font-weight: 600;
      font-size: 14px;
      color: var(--text);
    }
    .menu-email {
      font-size: 12px;
      color: var(--muted);
    }
    .user-menu-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 12px;
      border: none;
      background: transparent;
      color: var(--text);
      border-radius: 6px;
      cursor: pointer;
      text-align: left;
      text-decoration: none;
      font-size: 13px;
      transition: background 0.12s ease;
    }
    .user-menu-item:hover {
      background: rgba(255, 255, 255, 0.06);
    }
    .menu-icon {
      font-size: 16px;
      width: 20px;
      text-align: center;
    }
    .menu-icon img {
      width: 16px;
      height: 16px;
      display: inline-block;
      vertical-align: middle;
    }
    .menu-role {
      font-size: 11px;
      letter-spacing: 0.4px;
      color: var(--muted);
    }
    .menu-display {
      font-weight: 700;
      color: var(--text);
      font-size: 15px;
    }
    .menu-email {
      font-size: 12px;
      color: var(--muted);
    }

    .profile-card {
      display: grid;
      gap: 6px;
      padding: 6px 2px;
    }
    .profile-role {
      font-size: 12px;
      letter-spacing: 0.4px;
      color: var(--muted);
    }
    .profile-name {
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
    }
    .profile-email {
      font-size: 13px;
      color: var(--muted);
    }

    .status-strip {
      margin: 0 0 16px;
      padding: 12px 0;
      background: linear-gradient(to right, rgba(16, 185, 129, 0.03), rgba(59, 130, 246, 0.03), rgba(16, 185, 129, 0.03));
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .status-strip:empty {
      display: none;
    }

    .status-flow {
      display: flex;
      align-items: center;
      gap: 0;
      flex-wrap: nowrap;
      overflow-x: auto;
      scrollbar-width: none;
      justify-content: center;
      position: relative;
      border-radius: 24px;
      background: rgba(255, 255, 255, 0.03);
    }

    .status-flow::-webkit-scrollbar {
      display: none;
    }

    /* Water flow animations */
    @keyframes fillLeftToRight {
      0% {
        clip-path: inset(0 100% 0 0);
      }
      100% {
        clip-path: inset(0 0 0 0);
      }
    }

    @keyframes waveReturn {
      0% {
        opacity: 0;
        clip-path: inset(0 0 0 100%);
      }
      50% {
        opacity: 0.6;
      }
      100% {
        opacity: 0;
        clip-path: inset(0 0 0 0);
      }
    }

    /* Water flow background - fills left to right (dark mode - muted colors) */
    .status-flow::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: var(--flow-progress, 0%);
      background: linear-gradient(90deg,
        rgba(59, 130, 246, 0.4) 0%,
        rgba(6, 182, 212, 0.38) 33%,
        rgba(20, 184, 166, 0.38) 66%,
        rgba(16, 185, 129, 0.4) 100%);
      border-radius: 24px;
      animation: fillLeftToRight 1s ease-out forwards;
      z-index: 0;
    }

    /* Return wave - green/teal going right to left */
    .status-flow::after {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: var(--flow-progress, 0%);
      background: linear-gradient(270deg,
        rgba(16, 185, 129, 0.3) 0%,
        rgba(20, 184, 166, 0.2) 50%,
        transparent 100%);
      border-radius: 24px;
      animation: waveReturn 0.8s ease-in-out 0.8s forwards;
      z-index: 0;
      opacity: 0;
      pointer-events: none;
    }

    .status-step {
      padding: 10px 20px;
      border: none;
      background: transparent;
      color: rgba(255, 255, 255, 0.4);
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 500;
      white-space: nowrap;
      position: relative;
      justify-content: center;
      z-index: 1;
      transition: color 0.4s ease;
      transition-delay: calc(var(--step-index, 0) * 0.12s);
    }

    .status-step .step-icon {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.08);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid rgba(255, 255, 255, 0.15);
      transition: all 0.4s ease;
      transition-delay: calc(var(--step-index, 0) * 0.12s);
    }

    .status-step .step-icon svg {
      width: 12px;
      height: 12px;
      opacity: 0;
      transition: opacity 0.3s ease;
      transition-delay: calc(var(--step-index, 0) * 0.12s + 0.15s);
    }

    .status-step.complete,
    .status-step.current {
      color: rgba(255, 255, 255, 0.9);
    }

    .status-step.complete .step-icon {
      background: rgba(16, 185, 129, 0.25);
      border-color: rgba(16, 185, 129, 0.5);
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
    }

    .status-step.current .step-icon {
      background: rgba(59, 130, 246, 0.25);
      border-color: rgba(59, 130, 246, 0.5);
      box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
    }

    .status-step.complete .step-icon svg {
      opacity: 1;
      stroke: #34d399;
      stroke-width: 2.5;
    }

    .status-step.current .step-icon svg {
      opacity: 1;
      stroke: #60a5fa;
      stroke-width: 2.5;
    }

    .content {
      position: relative;
      z-index: 1;
      display: flex;
      gap: 16px;
      margin-top: 0;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    aside.sidebar {
      width: 320px;
      flex: 0 0 320px;
      display: flex;
      flex-direction: column;
      background: rgba(255, 255, 255, 0.02);
      border-right: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 0;
      padding: 12px 16px;
      min-height: 0;
      overflow: hidden;
    }

    .sidebar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .sidebar-header h2 {
      margin: 0;
      font-family: var(--heading-font);
      font-weight: var(--heading-weight);
      font-size: 18px;
      letter-spacing: 0.4px;
    }

    .sidebar-hint {
      color: var(--muted);
      font-size: 13px;
    }

    .work-orders {
      overflow: auto;
      padding-right: 4px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-height: 0;
      flex: 1;
    }

    /* GitHub/SO-style numbered pagination: < 1 … 4 5 6 … 20 >
       With a meta row above the strip:
         Showing 1-25 of 47+    Page 1 of 2+ pages
         <   1  2  …  47   >
    */
    .orders-pagination {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
      padding: 10px 10px;
      margin-top: 4px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      font-size: 12px;
    }
    .pagi-meta {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 6px;
      color: var(--muted);
      font-size: 11px;
      letter-spacing: 0.1px;
    }
    .pagi-meta strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
    .pagi-meta-count, .pagi-meta-page { white-space: nowrap; }
    .pagi-strip {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 4px;
    }
    .pagi-btn {
      appearance: none;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      padding: 0 10px;
      min-width: 30px;
      height: 30px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      font-family: inherit;
      font-variant-numeric: tabular-nums;
      transition: background 0.12s ease, border-color 0.12s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .pagi-btn:hover:not(:disabled):not(.is-current) {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.2);
    }
    .pagi-btn:disabled {
      opacity: 0.32;
      cursor: not-allowed;
    }
    .pagi-num.is-current {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
      cursor: default;
    }
    .pagi-ellipsis {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 22px;
      height: 30px;
      color: var(--muted);
      user-select: none;
    }
    .pagi-step {
      font-size: 13px;
      line-height: 1;
    }
    .pagi-btn--full {
      width: 100%;
      min-width: 0;
      justify-content: center;
    }

    .work-card {
      padding: 12px 14px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      transition: background 0.12s ease, border-color 0.12s ease;
      cursor: pointer;
      scroll-margin-top: 20px;
    }

    .work-card:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.12);
    }

    /* In workload panel, technician cards should not be clickable */
    #workload-list .work-card {
      cursor: default;
      pointer-events: auto;
    }

    .work-card.active {
      background: rgba(255, 255, 255, 0.06);
      border-color: var(--accent);
    }

    /* Card Header */
    .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* Card Details Section */
    .card-details {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .detail-row {
      display: flex;
      align-items: baseline;
      gap: 10px;
      font-size: 14px;
    }

    .detail-label {
      flex-shrink: 0;
      min-width: 70px;
      font-size: 12px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      color: var(--muted);
    }

    .detail-value {
      color: var(--text);
      line-height: 1.4;
      flex: 1;
      font-size: 14px;
    }

    .phone-link {
      color: var(--text);
      text-decoration: none;
      border-bottom: 1px dashed var(--muted);
      transition: color 0.12s ease, border-color 0.12s ease;
    }
    .phone-link:hover {
      color: var(--accent);
      border-color: var(--accent);
    }

    .card-badges {
      margin-top: 8px;
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    /* Legacy support */
    .work-card .top-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 4px;
    }
    .tech-actions {
      display: inline-flex;
      gap: 6px;
    }
    .mini-btn {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: var(--text);
      padding: 4px 8px;
      border-radius: 8px;
      font-size: 12px;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .mini-btn:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.24);
    }
    .mini-btn.danger {
      background: rgba(248, 113, 113, 0.12);
      border-color: rgba(248, 113, 113, 0.4);
      color: #fca5a5;
    }
    .mini-btn.danger:hover {
      background: rgba(248, 113, 113, 0.2);
    }
    .mini-btn.success {
      background: rgba(74, 222, 128, 0.14);
      border-color: rgba(74, 222, 128, 0.4);
      color: #bbf7d0;
    }
    .mini-btn.success:hover {
      background: rgba(74, 222, 128, 0.24);
    }

    .tech-inactive {
      opacity: 1;
      filter: none;
      border-style: dashed;
      border-color: var(--border);
      background: rgba(255, 255, 255, 0.02);
      box-shadow: none;
      color: var(--muted);
    }
    .tech-inactive .mini-btn {
      opacity: 1;
      filter: none;
    }
    .tech-inactive .work-id,
    .tech-inactive .work-metrics,
    .tech-inactive .work-meta {
      opacity: 0.55;
      filter: grayscale(0.95);
    }
    .tech-inactive .work-metrics .metric {
      background: rgba(255, 255, 255, 0.02);
      border-color: rgba(255, 255, 255, 0.08);
    }

    .work-id {
      font-family: var(--heading-font);
      font-weight: var(--heading-weight);
      letter-spacing: 0.3px;
      color: #f0f4f6;
    }

    .status-pill {
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      white-space: nowrap;
      border: 1px solid;
    }

    .status-pill.status-accepted { background: rgba(142, 198, 178, 0.15); color: #8ec6b2; border-color: rgba(142, 198, 178, 0.3); }
    .status-pill.status-waiting-tenant { background: rgba(242, 211, 154, 0.15); color: #f2d39a; border-color: rgba(242, 211, 154, 0.3); }
    .status-pill.status-waiting-vendor { background: rgba(168, 181, 207, 0.15); color: #a8b5cf; border-color: rgba(168, 181, 207, 0.3); }
    .status-pill.status-scheduled { background: rgba(127, 179, 224, 0.15); color: #7fb3e0; border-color: rgba(127, 179, 224, 0.3); }

    /* Priority badge — shown only for high and medium; low is silent */
    .priority-pill {
      padding: 3px 7px;
      border-radius: 4px;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      white-space: nowrap;
      border: 1px solid;
    }
    .priority-pill.priority-high   { background: rgba(239, 68, 68, 0.15);  color: #f87171; border-color: rgba(239, 68, 68, 0.35); }
    .priority-pill.priority-medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); }
    [data-theme="light"] .priority-pill.priority-high   { background: rgba(239, 68, 68, 0.1);  color: #b91c1c; border-color: rgba(239, 68, 68, 0.3); }
    [data-theme="light"] .priority-pill.priority-medium { background: rgba(245, 158, 11, 0.1); color: #92400e; border-color: rgba(245, 158, 11, 0.3); }

    .card-title-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }

    .work-title {
      margin: 0 0 4px;
      font-family: var(--heading-font);
      font-weight: var(--heading-weight);
      font-size: 16px;
      letter-spacing: 0.2px;
      color: var(--text);
      line-height: 1.3;
      flex: 1;
    }

    .created-date {
      font-size: 11px;
      color: var(--muted);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .work-address {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
    }

    .work-meta {
      display: flex;
      gap: 10px;
      color: #cdd4dc;
      font-size: 13px;
      flex-wrap: wrap;
    }
    .tech-warning-icon {
      width: 18px;
      height: 18px;
      display: inline-block;
      vertical-align: middle;
      margin-left: 4px;
    }
    .tech-select-input {
      background: #111827;
      color: #e6edf3;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 13px;
      min-width: 140px;
    }
    .tech-select-input:focus {
      outline: none;
      border-color: rgba(var(--accent-rgb), 0.5);
      box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
    }
    .tech-select-label {
      margin-right: 6px;
    }
    .work-metrics {
      display: flex;
      gap: 12px;
      margin: 8px 0 4px;
    }
    .work-metrics .metric {
      flex: 1;
      padding: 10px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .work-metrics .metric-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      color: rgba(255, 255, 255, 0.6);
    }
    .work-metrics .metric-value {
      font-size: 20px;
      font-weight: 700;
      color: #f4f7fb;
      line-height: 1.1;
    }
    .skills-row {
      margin-top: 6px;
    }

    .empty-state {
      color: var(--muted);
      font-size: 13px;
      padding: 10px;
      text-align: center;
    }

    /* Slot navigation for vendor selection */
    .slot-nav-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--border);
    }

    .slot-nav-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s ease;
    }

    .slot-nav-btn:hover:not(:disabled) {
      background: rgba(var(--accent-rgb), 0.2);
      border-color: rgba(var(--accent-rgb), 0.5);
    }

    .slot-nav-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }

    .slot-counter {
      display: flex;
      flex-direction: column;
      align-items: center;
      line-height: 1.2;
      color: var(--text);
      flex: 1;
      min-width: 0;
      text-align: center;
    }

    .slot-counter-date {
      font-size: 12px;
      font-weight: 600;
    }

    .slot-counter-time {
      font-size: 11px;
      font-weight: 400;
      opacity: 0.8;
    }

    /* Cards that require immediate vendor action */
    .work-card.action-needed {
      border-color: rgba(245, 158, 11, 0.45);
    }
    .work-card.action-needed:hover {
      border-color: rgba(245, 158, 11, 0.75);
    }
    .work-card.urgency-card-fresh   { border-color: rgba(16, 185, 129, 0.35); }
    .work-card.urgency-card-urgent  { border-color: rgba(245, 158, 11, 0.55); }
    .work-card.urgency-card-expired { border-color: rgba(239, 68, 68, 0.45); }
    .work-card.urgency-card-fresh:hover   { border-color: rgba(16, 185, 129, 0.6); }
    .work-card.urgency-card-urgent:hover  { border-color: rgba(245, 158, 11, 0.85); }
    .work-card.urgency-card-expired:hover { border-color: rgba(239, 68, 68, 0.75); }

    .action-banner {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 5px 9px;
      margin-bottom: 8px;
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.3);
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      color: #f59e0b;
      letter-spacing: 0.2px;
    }
    .action-banner-fresh {
      background: rgba(16, 185, 129, 0.12);
      border-color: rgba(16, 185, 129, 0.3);
      color: #10b981;
    }
    .action-banner-urgent {
      background: rgba(245, 158, 11, 0.16);
      border-color: rgba(245, 158, 11, 0.45);
      color: #fbbf24;
    }
    .action-banner-expired {
      background: rgba(239, 68, 68, 0.12);
      border-color: rgba(239, 68, 68, 0.35);
      color: #f87171;
    }

    .urgency-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.3px;
      text-transform: uppercase;
      line-height: 1.5;
      border: 1px solid transparent;
      white-space: nowrap;
    }
    .urgency-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
      flex-shrink: 0;
      box-shadow: 0 0 6px currentColor;
    }
    .urgency-chip-fresh {
      background: rgba(16, 185, 129, 0.14);
      color: #10b981;
      border-color: rgba(16, 185, 129, 0.35);
    }
    .urgency-chip-urgent {
      background: rgba(245, 158, 11, 0.16);
      color: #fbbf24;
      border-color: rgba(245, 158, 11, 0.45);
      animation: urgency-chip-pulse 2.4s ease-in-out infinite;
    }
    .urgency-chip-expired {
      background: rgba(239, 68, 68, 0.14);
      color: #f87171;
      border-color: rgba(239, 68, 68, 0.4);
    }
    @keyframes urgency-chip-pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
      50%      { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
    }

    [data-theme="light"] .work-card.action-needed {
      border-color: rgba(217, 119, 6, 0.4);
    }
    [data-theme="light"] .action-banner {
      background: rgba(245, 158, 11, 0.1);
      border-color: rgba(217, 119, 6, 0.3);
      color: #92400e;
    }
    [data-theme="light"] .action-banner-fresh {
      background: rgba(16, 185, 129, 0.09);
      border-color: rgba(5, 150, 105, 0.3);
      color: #047857;
    }
    [data-theme="light"] .action-banner-urgent {
      background: rgba(245, 158, 11, 0.12);
      border-color: rgba(217, 119, 6, 0.4);
      color: #92400e;
    }
    [data-theme="light"] .action-banner-expired {
      background: rgba(239, 68, 68, 0.08);
      border-color: rgba(220, 38, 38, 0.3);
      color: #991b1b;
    }
    [data-theme="light"] .urgency-chip-fresh {
      background: rgba(16, 185, 129, 0.1);
      color: #047857;
      border-color: rgba(5, 150, 105, 0.35);
    }
    [data-theme="light"] .urgency-chip-urgent {
      background: rgba(245, 158, 11, 0.12);
      color: #b45309;
      border-color: rgba(217, 119, 6, 0.45);
    }
    [data-theme="light"] .urgency-chip-expired {
      background: rgba(239, 68, 68, 0.1);
      color: #b91c1c;
      border-color: rgba(220, 38, 38, 0.4);
    }

    .slot-instructions {
      margin-top: 10px;
      padding: 7px 10px;
      background: rgba(var(--accent-rgb), 0.08);
      border: 1px solid rgba(var(--accent-rgb), 0.2);
      border-radius: 8px;
      font-size: 12px;
      color: var(--text);
      text-align: center;
      line-height: 1.4;
    }

    .slot-nav-row {
      gap: 8px;
    }

    .slot-nav-book-btn {
      padding: 4px 14px;
      border-radius: 999px;
      border: 1px solid rgba(245, 158, 11, 0.7);
      background: rgba(245, 158, 11, 0.2);
      color: #f59e0b;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .slot-nav-book-btn:hover {
      background: rgba(245, 158, 11, 0.4);
      border-color: rgba(245, 158, 11, 1);
    }

    [data-theme="light"] .slot-instructions {
      background: rgba(var(--accent-rgb), 0.06);
      border-color: rgba(var(--accent-rgb), 0.25);
      color: #374151;
    }

    [data-theme="light"] .slot-nav-book-btn {
      border-color: rgba(217, 119, 6, 0.5);
      background: rgba(245, 158, 11, 0.12);
      color: #92400e;
    }
    [data-theme="light"] .slot-nav-book-btn:hover {
      background: rgba(245, 158, 11, 0.25);
    }

    /* Slot highlight animation */
    .block-chip.slot-highlight {
      animation: slotPulse 1.5s ease-in-out infinite;
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.5), 0 4px 20px rgba(var(--accent-rgb), 0.4);
      z-index: 25 !important;
    }

    @keyframes slotPulse {
      0%, 100% {
        box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.5), 0 4px 20px rgba(var(--accent-rgb), 0.4);
      }
      50% {
        box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.3), 0 4px 30px rgba(var(--accent-rgb), 0.6);
      }
    }

    main.calendar-area {
      flex: 1;
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 12px 16px;
      overflow: hidden;
    }

    .calendar-panel {
      flex: 1;
      display: flex;
      flex-direction: column;
      background: transparent;
      border: none;
      padding: 0;
      min-height: 0;
      overflow: hidden;
    }

    .cal-controls {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: 20px;
    }

    .cal-controls button {
      border: none;
      background: transparent;
      color: var(--muted);
      padding: 8px;
      border-radius: 50%;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
      min-width: 32px;
      height: 32px;
      font-weight: 500;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .cal-controls button:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text);
    }

    header.top-nav #today-btn {
      border-radius: 6px;
      padding: 6px 14px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: transparent;
      color: var(--muted);
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.2px;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
      margin-left: calc(320px - 200px);
    }

    header.top-nav #today-btn:hover {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.18);
      color: var(--text);
    }

    .month-label {
      font-family: var(--heading-font);
      font-weight: 500;
      letter-spacing: -0.2px;
      margin: 0 8px;
      font-size: 16px;
      color: var(--text);
      min-width: 140px;
      text-align: center;
    }

    /* Week / Month segmented toggle — sits next to the prev/next arrows. */
    .view-toggle {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      margin-left: 12px;
      padding: 3px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      border-radius: 8px;
    }
    .view-toggle-btn {
      appearance: none;
      border: none;
      background: transparent;
      color: var(--muted);
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.2px;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
      font-family: inherit;
    }
    .view-toggle-btn:hover:not(.is-active) {
      color: var(--text);
      background: rgba(255, 255, 255, 0.05);
    }
    .view-toggle-btn.is-active {
      background: var(--accent);
      color: #fff;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    }

    .legend {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: var(--muted);
    }

    .legend-swatch {
      width: 14px;
      height: 14px;
      border-radius: 4px;
      background: #6c7f95;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    }

    .legend-swatch.scheduled {
      background: #4c9fff;
    }

    /* Timezone Legend Container - compact inline version */
    .timezone-legend-container {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-left: auto;
      padding: 0;
      background: transparent;
      border: none;
    }

    .timezone-legend-container .legend-title {
      font-size: 11px;
      font-weight: 500;
      color: var(--muted);
    }

    .timezone-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      color: var(--text);
      padding: 2px 6px;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 4px;
      cursor: help;
    }

    .timezone-legend-item .legend-label {
      font-weight: 500;
    }

    .timezone-swatch {
      width: 10px;
      height: 10px;
      border-radius: 2px;
    }

    /* Tenant block with timezone styling */
    .block-tenant-tz {
      color: #0b1623 !important;
    }

    .block-tenant-tz .block-title {
      font-weight: 700;
      font-size: 12px;
      color: #0b1623;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .block-tenant-tz .block-time {
      font-size: 11px;
      font-weight: 600;
      color: #1a2a3a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .block-tenant-tz .block-tz {
      font-size: 10px;
      font-weight: 700;
      color: #2a3a4a;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: 2px;
    }

    .calendar-body {
      margin-top: 12px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.02);
      overflow: auto;
      flex: 1;
      min-height: 0;
    }

    .day-header {
      display: grid;
      grid-template-columns: var(--time-width) repeat(7, 1fr);
      align-items: stretch;
      position: sticky;
      top: 0;
      z-index: 20;
      backdrop-filter: blur(12px);
      background: rgba(11, 16, 25, 0.95);
      border-bottom: 1px solid var(--border);
    }

    .day-header .time-spacer {
      border-right: 1px solid var(--border);
    }

    .day {
      padding: 12px 8px;
      text-align: center;
      border-right: 1px solid var(--border);
    }

    .day:last-child {
      border-right: none;
    }

    .day .name {
      font-size: 12px;
      letter-spacing: 0.6px;
      color: var(--muted);
      text-transform: uppercase;
    }

    .day .date {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-top: 6px;
      width: 34px;
      height: 34px;
      border-radius: 10px;
      color: var(--text);
      font-weight: 700;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .day.today .date {
      background: var(--primary);
      color: #0c1310;
    }

    .grid-wrap {
      display: grid;
      grid-template-columns: var(--time-width) 1fr;
      min-width: 900px;
    }

    .time-column {
      border-right: 1px solid var(--border);
    }

    .time-label {
      height: var(--hour-height);
      display: flex;
      align-items: flex-start;
      justify-content: flex-end;
      padding: 14px 14px 0 0;
      color: var(--muted);
      font-size: 13px;
      border-bottom: 1px solid var(--border);
    }

    .week-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      grid-auto-rows: var(--hour-height);
      position: relative;
    }

    .week-grid .cell {
      border-bottom: 1px solid var(--border);
      border-right: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.01);
      transition: background 0.15s ease;
    }

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

    .week-grid .cell:hover {
      background: rgba(var(--accent-rgb), 0.12);
    }

    /* ═══════════════════════════════════════════════════════════════════
       MONTH VIEW
       6 rows × 7 cols. Reuses existing tokens; matches week-view vibe.
       Today is highlighted with an accent-color disc behind the day number.
       Chips use the same status-pill color classes the week view does.
       ═══════════════════════════════════════════════════════════════════ */
    .week-view.is-hidden,
    .month-view.is-hidden { display: none; }

    .month-view {
      display: flex;
      flex-direction: column;
    }

    .month-dow-header {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      border-bottom: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.02);
    }
    .month-dow {
      padding: 10px 8px;
      text-align: center;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.7px;
      color: var(--muted);
      text-transform: uppercase;
    }
    .month-dow + .month-dow { border-left: 1px solid var(--border); }

    /* Always 6 rows × 7 cols. Cells have a fixed min-height so they read
       as full bordered boxes regardless of viewport height. If the grid is
       taller than the calendar panel, the panel scrolls — cells never
       compress to fit, ever. */
    .month-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      grid-auto-rows: minmax(120px, auto);
    }

    /* Cells are uniform bordered boxes — even when empty. We give every
       cell right + bottom borders, then add the missing top + left only on
       the first row and first column so interior intersections stay 1px. */
    .month-cell {
      position: relative;
      padding: 8px 8px 4px;
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.012);
      transition: background 0.12s ease;
      min-width: 0;
      min-height: 120px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 4px;
      overflow: hidden;
    }
    .month-grid > .month-cell:nth-child(-n+7) {
      border-top: 1px solid var(--border);
    }
    .month-grid > .month-cell:nth-child(7n+1) {
      border-left: 1px solid var(--border);
    }
    .month-cell:hover {
      background: rgba(var(--accent-rgb), 0.08);
    }
    .month-cell.is-other-month {
      background: rgba(0, 0, 0, 0.22);
    }
    .month-cell.is-other-month .month-day-num {
      color: rgba(159, 176, 194, 0.45);
    }
    .month-cell.is-today {
      background: rgba(var(--accent-rgb), 0.06);
    }

    .month-day-num {
      font-size: 13px;
      font-weight: 600;
      color: var(--muted);
      line-height: 1;
      padding: 2px 0 2px 2px;
    }
    .month-cell.is-today .month-day-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      padding: 0;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      align-self: flex-start;
    }

    .month-chips {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-height: 0;
      overflow: hidden;
    }

    .month-chip {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 3px 7px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 500;
      line-height: 1.3;
      cursor: pointer;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid transparent;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: background 0.12s ease, border-color 0.12s ease;
    }
    .month-chip:hover {
      background: rgba(255, 255, 255, 0.1);
    }
    .month-chip-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
      background: var(--muted);
    }
    .month-chip-time {
      font-variant-numeric: tabular-nums;
      color: var(--muted);
      font-size: 10px;
      flex-shrink: 0;
    }
    .month-chip-title {
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Reuse week-view status semantics on the chip via background tint */
    .month-chip.status-scheduled { background: rgba(127, 179, 224, 0.16); }
    .month-chip.status-scheduled .month-chip-dot { background: #7fb3e0; }
    .month-chip.status-waiting-tenant { background: rgba(242, 211, 154, 0.16); }
    .month-chip.status-waiting-tenant .month-chip-dot { background: #f2d39a; }
    .month-chip.status-waiting-vendor { background: rgba(168, 181, 207, 0.16); }
    .month-chip.status-waiting-vendor .month-chip-dot { background: #a8b5cf; }
    .month-chip.status-accepted { background: rgba(142, 198, 178, 0.16); }
    .month-chip.status-accepted .month-chip-dot { background: #8ec6b2; }

    .month-more {
      font-size: 11px;
      font-weight: 500;
      color: var(--muted);
      padding: 1px 4px;
      cursor: pointer;
      align-self: flex-start;
    }
    .month-more:hover {
      color: var(--text);
      text-decoration: underline;
    }

    /* Mobile: keep the grid but tighten cells and hide chip text/time —
       a colored dot still tells you "something is happening today". */
    @media (max-width: 768px) {
      .month-cell {
        padding: 4px 4px 2px;
        gap: 2px;
        min-height: 80px;
      }
      .month-day-num { font-size: 11px; }
      .month-cell.is-today .month-day-num { width: 20px; height: 20px; font-size: 11px; }
      .month-chip {
        padding: 2px 4px;
        font-size: 10px;
      }
      .month-chip-time,
      .month-chip-title { display: none; }
      .month-chip-dot { width: 8px; height: 8px; }
      .month-more { font-size: 9px; }
      .month-dow { padding: 6px 2px; font-size: 9px; letter-spacing: 0.5px; }
    }

    .block-chip {
      position: absolute;
      border-radius: 12px;
      padding: 10px;
      color: #0f1419;
      font-size: 13px;
      font-weight: 700;
      display: flex;
      flex-direction: column;
      gap: 4px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      overflow: hidden;
      transition: transform 0.1s ease;
    }

    .block-chip:hover {
      transform: scale(1.02);
    }

    .block-chip .block-title {
      font-size: 12px;
      letter-spacing: 0.2px;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.3;
    }
    .block-chip .block-title .block-order-id {
      font-weight: 700;
      margin-left: 6px;
      color: inherit;
    }

    .block-chip .block-time {
      font-size: 11px;
      color: rgba(19, 27, 34, 0.82);
      font-weight: 600;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      line-height: 1.3;
    }

    .block-tenant {
      background: linear-gradient(135deg, #e2e6ee, #cbd3df);
      color: #0b1623;
      padding: 8px 10px;
      min-height: 32px;
    }

    .block-scheduled {
      background: linear-gradient(135deg, #a8cafc, #7aa6f2);
      color: #0b1623;
    }

    .block-scheduled .block-title {
      font-weight: 700;
      font-size: 12px;
      color: #0b1623;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .block-scheduled .block-time {
      font-size: 11px;
      font-weight: 600;
      color: #1a2a3a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .block-scheduled .block-tz {
      font-size: 10px;
      font-weight: 700;
      color: #2a3a4a;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: 2px;
    }

    .vendor-selectable {
      cursor: pointer;
      outline: 1px solid rgba(var(--accent-rgb), 0.5);
      transform: translateY(-1px);
    }

    .vendor-selectable:hover {
      transform: translateY(-2px) scale(1.01);
      outline-color: rgba(var(--accent-rgb), 0.85);
    }

    .book-badge {
      position: absolute;
      bottom: 4px;
      right: 5px;
      padding: 1px 5px;
      background: rgba(var(--accent-rgb), 0.85);
      color: #fff;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.4px;
      border-radius: 4px;
      text-transform: uppercase;
      pointer-events: none;
      line-height: 1.5;
    }

    .vendor-slot-locked {
      opacity: 0.45;
      cursor: not-allowed;
      filter: grayscale(0.4);
    }

    .locked-badge {
      position: absolute;
      bottom: 4px;
      right: 5px;
      padding: 1px 5px;
      background: rgba(100, 100, 110, 0.75);
      color: #ccc;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.4px;
      border-radius: 4px;
      text-transform: uppercase;
      pointer-events: none;
      line-height: 1.5;
    }

    .slot-instructions-expired {
      color: #f87171;
    }

    .slot-nav-book-btn--locked {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .slot-nav-request-btn {
      width: 100%;
      margin-top: 6px;
      padding: 7px 12px;
      background: transparent;
      border: 1px solid rgba(245, 158, 11, 0.4);
      border-radius: 6px;
      color: #f59e0b;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
    }

    .slot-nav-request-btn:hover {
      background: rgba(245, 158, 11, 0.08);
      border-color: rgba(245, 158, 11, 0.7);
    }

    .pref-card-highlight {
      outline: 2px solid #f59e0b;
      outline-offset: 2px;
      border-radius: 8px;
      transition: outline 0.2s ease;
    }

    .block-delete {
      position: absolute;
      top: 6px;
      right: 8px;
      background: rgba(11, 15, 25, 0.15);
      border: 1px solid rgba(11, 15, 25, 0.2);
      width: 20px;
      height: 20px;
      border-radius: 50%;
      color: inherit;
      cursor: pointer;
      display: grid;
      place-items: center;
      font-size: 12px;
      line-height: 1;
      opacity: 0.85;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .block-delete:hover {
      opacity: 1;
      transform: scale(1.05);
    }

    #sms-toast-container {
      position: fixed;
      right: 18px;
      bottom: 18px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      z-index: 10;
      pointer-events: none;
    }

    .sms-toast {
      min-width: 220px;
      max-width: 320px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 14px;
      padding: 12px;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
      backdrop-filter: blur(12px);
      pointer-events: auto;
    }

    .sms-toast .sms-title {
      font-weight: 700;
      font-size: 13px;
      letter-spacing: 0.3px;
      margin-bottom: 4px;
      color: #e2e7ed;
    }

    .sms-toast .sms-body {
      font-size: 12px;
      color: #cdd3db;
      line-height: 1.4;
    }

    .sidebar-tabs {
      display: flex;
      gap: 6px;
      margin-bottom: 12px;
      align-items: stretch;
    }

    .sidebar-tabs .tab-button {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      padding: 8px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-family: var(--heading-font);
      font-weight: var(--heading-weight);
      text-align: center;
      transition: background 0.2s ease, border-color 0.2s ease;
    }

    .sidebar-tabs .tab-button.active {
      background: rgba(var(--accent-rgb), 0.2);
      border-color: rgba(var(--accent-rgb), 0.6);
      color: var(--text);
    }

    .tab-panel {
      display: none;
      flex-direction: column;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .tab-panel.active {
      display: flex;
    }

    .sub-tabs {
      display: flex;
      gap: 6px;
      padding: 0 8px 8px 8px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 8px;
    }

    .sub-tab-button {
      flex: 1;
      padding: 6px 12px;
      border: none;
      background: transparent;
      color: var(--muted);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      border-radius: 6px;
      transition: all 0.15s ease;
    }

    .sub-tab-button:hover {
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
    }

    .sub-tab-button.active {
      background: rgba(var(--accent-rgb), 0.15);
      color: var(--accent);
    }

    .sub-tab-panel {
      display: none;
      flex-direction: column;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .sub-tab-panel.active {
      display: flex;
    }

    .sub-tabs.with-action {
      align-items: center;
    }

    .sub-tabs.with-action .sub-tab-button {
      flex: 0 1 auto;
      min-width: 70px;
    }

    .sub-tab-add-btn {
      margin-left: auto;
      width: 28px;
      height: 28px;
      border: 1px solid var(--border);
      background: rgba(var(--accent-rgb), 0.1);
      color: var(--accent);
      font-size: 18px;
      font-weight: 500;
      line-height: 1;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .sub-tab-add-btn:hover {
      background: rgba(var(--accent-rgb), 0.25);
      border-color: var(--accent);
    }

    /* ── Filter button + dropdown ── */
    .filter-btn-wrap {
      margin-left: auto;
      position: relative;
    }

    .sub-tab-filter-btn {
      width: 28px;
      height: 28px;
      border: 1px solid var(--border);
      background: rgba(var(--accent-rgb), 0.1);
      color: var(--accent);
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .sub-tab-filter-btn:hover,
    .sub-tab-filter-btn[aria-expanded="true"] {
      background: rgba(var(--accent-rgb), 0.25);
      border-color: var(--accent);
    }

    .filter-active-dot {
      display: none;
      position: absolute;
      top: 4px;
      right: 4px;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent);
    }

    .filter-active-dot.visible {
      display: block;
    }

    .filter-panel {
      display: none;
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      width: 200px;
      background: #1a1a1d;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.5);
      z-index: 50;
      gap: 8px;
      flex-direction: column;
    }

    .filter-panel.open {
      display: flex;
    }

    .filter-panel-row {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .filter-panel-label {
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .filter-panel-select {
      height: 30px;
      padding: 0 8px;
      border: 1px solid var(--border);
      background: #111113;
      color: var(--text);
      font-size: 12px;
      font-family: inherit;
      border-radius: 6px;
      cursor: pointer;
      transition: border-color 0.15s ease;
      width: 100%;
    }

    .filter-panel-select:hover,
    .filter-panel-select:focus {
      outline: none;
      border-color: var(--accent);
    }

    .filter-panel-select option:disabled {
      color: var(--muted);
      font-style: italic;
    }

    [data-theme="light"] .filter-panel-select option:disabled {
      color: rgba(0,0,0,0.35);
    }

    [data-theme="light"] .filter-panel {
      background: #ffffff;
      border-color: rgba(0,0,0,0.12);
      box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    }

    [data-theme="light"] .filter-panel-select {
      background: #f5f5f5;
      border-color: rgba(0,0,0,0.18);
      color: #000;
    }

    [data-theme="light"] #tech-filter,
    [data-theme="light"] #service-filter {
      background: #f5f5f5;
      border-color: rgba(0,0,0,0.18);
      color: #000;
    }

    [data-theme="light"] #tech-filter option,
    [data-theme="light"] #service-filter option {
      background: #ffffff;
      color: #000;
    }

    .sub-tab-select {
      height: 28px;
      padding: 0 8px;
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--text);
      font-size: 12px;
      font-family: inherit;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.15s ease;
      max-width: 100px;
    }
    .sub-tab-select:first-of-type {
      margin-left: auto;
    }

    .sub-tab-select:hover {
      border-color: var(--accent);
    }

    .sub-tab-select:focus {
      outline: none;
      border-color: var(--accent);
    }

    .pill {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 11px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--text);
    }
    .pill.on-track { background: linear-gradient(135deg, #2f81f7, #1f6feb); color: #0b1623; }
    .pill.at-risk { background: linear-gradient(135deg, #f4b740, #d7921a); color: #1a1308; }
    .pill.confirmed-pill {
      background: linear-gradient(135deg, #3dd598, #1eb980);
      color: #032d1b;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .history-list {
      max-height: 240px;
      overflow: auto;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 8px;
      background: rgba(255, 255, 255, 0.02);
    }

    .history-item {
      padding: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      cursor: pointer;
    }

    .history-item:last-child {
      border-bottom: none;
    }

    .history-item .meta {
      font-size: 11px;
      color: var(--muted);
    }

    .history-item .action {
      font-weight: 700;
      font-size: 13px;
    }

    .modal-backdrop.unified {
      z-index: 15;
    }

    .filter-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }

    .filter-row input,
    .filter-row select {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 10px;
      padding: 8px 10px;
      color: var(--text);
      font-size: 13px;
    }
    #tech-filter {
      background: #0b0d10;
      border-color: rgba(255, 255, 255, 0.18);
      color: var(--text);
    }
    #tech-filter option {
      background: #050608;
      color: var(--text);
    }

    .tech-panel {
      margin-top: 10px;
      padding: 12px 14px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 10px;
      align-items: center;
    }

    .tech-panel .label {
      color: var(--muted);
      font-size: 12px;
      letter-spacing: 0.3px;
      text-transform: uppercase;
    }

    .tech-panel .value {
      font-size: 14px;
      font-weight: 700;
    }

    .tech-panel .notes-area {
      grid-column: 1 / -1;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .tech-panel textarea {
      width: 100%;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 10px;
      padding: 10px 12px;
      color: var(--text);
      font-size: 13px;
      min-height: 60px;
      resize: vertical;
    }

    .action-row {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .action-btn {
      border: 1px solid rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.08);
      padding: 10px 12px;
      border-radius: 8px;
      font-weight: 500;
      font-size: 13px;
      color: #fff;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .action-btn:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.25);
    }

    .action-btn.disabled,
    .action-btn.disabled:hover {
      opacity: 0.4;
      cursor: not-allowed;
      background: rgba(255, 255, 255, 0.04);
    }

    .btn-ghost {
      background: rgba(255, 255, 255, 0.06);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .btn-reschedule {
      background: rgba(59, 130, 246, 0.25);
      border-color: rgba(59, 130, 246, 0.5);
      color: #fff;
    }

    .btn-reschedule:hover {
      background: rgba(59, 130, 246, 0.35);
      border-color: rgba(59, 130, 246, 0.7);
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      backdrop-filter: blur(6px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 12;
      overflow-y: auto;
      padding: 24px 12px;
    }

    .modal-backdrop.show {
      display: flex;
    }

    .modal {
      width: min(640px, 96vw);
      max-height: calc(100vh - 48px);
      overflow-y: auto;
      background: rgba(20, 24, 38, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 18px;
      padding: 24px;
      box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
      color: var(--text);
      font-size: 18px;
      line-height: 1.7;
      position: relative;
    }

    .modal--lg {
      width: min(1024px, 96vw);
    }

    /* Modal BEM Header */
    .modal__header {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      padding-bottom: 16px;
      margin-bottom: 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      position: relative;
    }

    .modal__icon {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .modal__icon--success {
      background: rgba(34, 197, 94, 0.15);
      color: #22c55e;
    }

    .modal__icon--warning {
      background: rgba(245, 158, 11, 0.15);
      color: #f59e0b;
    }

    .modal__icon--info {
      background: rgba(59, 130, 246, 0.15);
      color: #3b82f6;
    }

    .modal__icon--danger {
      background: rgba(239, 68, 68, 0.15);
      color: #ef4444;
    }

    .modal__title-group {
      flex: 1;
      min-width: 0;
    }

    .modal__title {
      margin: 0;
      font-family: var(--heading-font);
      font-weight: var(--heading-weight);
      font-size: 20px;
      letter-spacing: 0.3px;
      color: var(--text);
    }

    .modal__subtitle {
      margin: 4px 0 0;
      font-size: 14px;
      color: var(--muted);
    }

    .modal__close {
      position: absolute;
      top: 0;
      right: 0;
      width: 36px;
      height: 36px;
      border: none;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 10px;
      color: var(--muted);
      font-size: 22px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s ease;
    }

    .modal__close:hover {
      background: rgba(255, 255, 255, 0.12);
      color: var(--text);
    }

    /* Modal BEM Body */
    .modal__body {
      margin-bottom: 16px;
    }

    .modal__grid {
      display: grid;
      gap: 16px;
    }

    .modal__grid--3 {
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .modal__card {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 14px;
      padding: 14px;
    }

    .modal__card--accent {
      border-color: rgba(59, 130, 246, 0.3);
      background: rgba(59, 130, 246, 0.06);
    }

    .modal__card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding-bottom: 12px;
      margin-bottom: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .modal__card-icon {
      width: 28px;
      height: 28px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
    }

    .modal__card-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .modal__summary {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 14px;
      margin-bottom: 16px;
    }

    .modal__form {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .modal__label {
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      margin-bottom: 6px;
      display: block;
    }

    .modal__input,
    .modal__textarea,
    .modal__select {
      width: 100%;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 10px;
      padding: 10px 12px;
      color: var(--text);
      font-size: 14px;
      outline: none;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .modal__textarea {
      min-height: 80px;
      resize: vertical;
    }

    .modal__input:focus,
    .modal__textarea:focus,
    .modal__select:focus {
      border-color: rgba(59, 130, 246, 0.6);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    }

    .modal__slots {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }

    .modal__cutoff {
      font-size: 12px;
      color: #f59e0b;
      margin-top: 8px;
    }

    .modal__error {
      font-size: 13px;
      color: #ef4444;
      margin-top: 8px;
    }

    /* Modal BEM Footer */
    .modal__footer {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding-top: 16px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .modal__btn {
      padding: 10px 18px;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      border: none;
    }

    .modal__btn--primary {
      background: linear-gradient(135deg, #3b82f6, #2563eb);
      color: #fff;
    }

    .modal__btn--primary:hover {
      background: linear-gradient(135deg, #2563eb, #1d4ed8);
    }

    .modal__btn--primary:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .modal__btn--success {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #fff;
    }

    .modal__btn--success:hover {
      background: linear-gradient(135deg, #16a34a, #15803d);
    }

    .modal__btn--danger {
      background: linear-gradient(135deg, #ef4444, #dc2626);
      color: #fff;
    }

    .modal__btn--danger:hover {
      background: linear-gradient(135deg, #dc2626, #b91c1c);
    }

    .modal__btn--ghost {
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .modal__btn--ghost:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .modal__btn--full {
      width: 100%;
    }
    
    .rsched {
      width: min(920px, 96vw);
      max-height: calc(100vh - 40px);
      background: linear-gradient(165deg, rgba(18, 22, 28, 0.98) 0%, rgba(12, 14, 18, 0.99) 100%);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 20px;
      overflow: hidden;
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 32px 100px -20px rgba(0, 0, 0, 0.7),
        0 0 60px -10px rgba(59, 130, 246, 0.08);
      position: relative;
      display: flex;
      flex-direction: column;
    }

    .rsched__close {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 34px;
      height: 34px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.04);
      border-radius: 10px;
      color: rgba(255, 255, 255, 0.5);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      z-index: 10;
    }

    .rsched__close:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.2);
      color: #fff;
      transform: scale(1.05);
    }

    /* Info Bar - Top Navbar Style */
    .rsched__infobar {
      display: flex;
      align-items: center;
      gap: 0;
      padding: 16px 60px 16px 20px;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.02) 100%);
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .rsched__info-item {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 1;
      padding: 0 16px;
    }

    .rsched__info-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: rgba(59, 130, 246, 0.12);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #60a5fa;
      flex-shrink: 0;
    }

    .rsched__info-content {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .rsched__info-label {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: rgba(255, 255, 255, 0.4);
    }

    .rsched__info-value {
      font-size: 13px;
      font-weight: 500;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .rsched__info-sep {
      width: 1px;
      height: 32px;
      background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
      flex-shrink: 0;
    }

    /* Two Panel Split */
    .rsched__panels {
      display: grid;
      grid-template-columns: 1fr 1fr;
      flex: 1;
      overflow: hidden;
    }

    .rsched__panel {
      display: flex;
      flex-direction: column;
      border-right: 1px solid rgba(255, 255, 255, 0.06);
      overflow: hidden;
    }

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

    .rsched__panel:last-child {
      border-right: none;
    }

    .rsched__panel--alt {
      background: rgba(59, 130, 246, 0.03);
    }

    .rsched__panel-head {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 18px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.02);
    }

    .rsched__panel-head svg {
      color: #60a5fa;
      flex-shrink: 0;
    }

    .rsched__panel-head h3 {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      color: #fff;
      letter-spacing: 0.2px;
    }

    .rsched__panel-body {
      flex: 1;
      padding: 16px 18px;
      overflow-y: auto;
      min-height: 280px;
      max-height: 380px;
    }

    .rsched__panel-foot {
      padding: 14px 18px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(0, 0, 0, 0.2);
    }

    /* Slots Grid */
    .rsched__slots {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .rsched__slots .slot-group {
      margin-bottom: 12px;
    }

    .rsched__slots .slot-date {
      font-size: 12px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.5);
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .rsched__slots .slot-times {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .rsched__cutoff {
      margin-top: 12px;
      padding: 10px 12px;
      background: rgba(245, 158, 11, 0.1);
      border: 1px solid rgba(245, 158, 11, 0.2);
      border-radius: 8px;
      font-size: 12px;
      color: #fbbf24;
    }

    .rsched__cutoff:empty {
      display: none;
    }

    /* Textarea */
    .rsched__textarea {
      width: 100%;
      min-height: 70px;
      padding: 12px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      color: #fff;
      font-size: 13px;
      font-family: inherit;
      resize: vertical;
      outline: none;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .rsched__textarea:focus {
      border-color: rgba(59, 130, 246, 0.5);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .rsched__textarea::placeholder {
      color: rgba(255, 255, 255, 0.3);
    }

    .rsched__error {
      margin-top: 8px;
      font-size: 12px;
      color: #f87171;
    }

    .rsched__error:empty {
      display: none;
    }

    /* Buttons */
    .rsched__btn {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 20px;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .rsched__btn--confirm {
      background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
      color: #fff;
      box-shadow: 0 4px 14px -4px rgba(34, 197, 94, 0.4);
    }

    .rsched__btn--confirm:hover:not(:disabled) {
      background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
      transform: translateY(-1px);
      box-shadow: 0 6px 20px -4px rgba(34, 197, 94, 0.5);
    }

    .rsched__btn--confirm:disabled {
      opacity: 0.4;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    .rsched__btn--send {
      background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
      color: #fff;
      box-shadow: 0 4px 14px -4px rgba(59, 130, 246, 0.4);
    }

    .rsched__btn--send:hover {
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      transform: translateY(-1px);
      box-shadow: 0 6px 20px -4px rgba(59, 130, 246, 0.5);
    }

    /* Light Mode */
    [data-theme="light"] .rsched {
      background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
      border-color: rgba(0, 0, 0, 0.1);
      box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 32px 100px -20px rgba(0, 0, 0, 0.25);
    }

    [data-theme="light"] .rsched__close {
      border-color: rgba(0, 0, 0, 0.1);
      background: rgba(0, 0, 0, 0.03);
      color: rgba(0, 0, 0, 0.4);
    }

    [data-theme="light"] .rsched__close:hover {
      background: rgba(0, 0, 0, 0.08);
      border-color: rgba(0, 0, 0, 0.15);
      color: #000;
    }

    [data-theme="light"] .rsched__infobar {
      background: linear-gradient(90deg, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.03) 50%, rgba(0, 0, 0, 0.01) 100%);
      border-bottom-color: rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .rsched__info-icon {
      background: rgba(59, 130, 246, 0.1);
      color: #2563eb;
    }

    [data-theme="light"] .rsched__info-label {
      color: rgba(0, 0, 0, 0.45);
    }

    [data-theme="light"] .rsched__info-value {
      color: #111;
    }

    [data-theme="light"] .rsched__info-sep {
      background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
    }

    [data-theme="light"] .rsched__panel {
      border-right-color: rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .rsched__panel--alt {
      background: rgba(59, 130, 246, 0.03);
    }

    [data-theme="light"] .rsched__panel-head {
      border-bottom-color: rgba(0, 0, 0, 0.08);
      background: rgba(0, 0, 0, 0.02);
    }

    [data-theme="light"] .rsched__panel-head svg {
      color: #2563eb;
    }

    [data-theme="light"] .rsched__panel-head h3 {
      color: #111;
    }

    [data-theme="light"] .rsched__panel-foot {
      border-top-color: rgba(0, 0, 0, 0.08);
      background: rgba(0, 0, 0, 0.02);
    }

    [data-theme="light"] .rsched__cutoff {
      background: rgba(245, 158, 11, 0.08);
      border-color: rgba(245, 158, 11, 0.25);
      color: #b45309;
    }

    [data-theme="light"] .rsched__textarea {
      background: #fff;
      border-color: rgba(0, 0, 0, 0.12);
      color: #111;
    }

    [data-theme="light"] .rsched__textarea:focus {
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    }

    [data-theme="light"] .rsched__textarea::placeholder {
      color: rgba(0, 0, 0, 0.35);
    }

    [data-theme="light"] .rsched__error {
      color: #dc2626;
    }

    /* Responsive */
    @media (max-width: 700px) {
      .rsched__panels {
        grid-template-columns: 1fr;
      }

      .rsched__panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      }

      .rsched__panel:last-child {
        border-bottom: none;
      }

      .rsched__infobar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 50px 14px 14px;
      }

      .rsched__info-item {
        flex: 0 0 calc(50% - 6px);
        padding: 0;
      }

      .rsched__info-sep {
        display: none;
      }

      .rsched__panel-body {
        min-height: 200px;
        max-height: 260px;
      }
    }

    .modal h3 {
      margin: 0 0 12px;
      font-family: var(--heading-font);
      font-weight: var(--heading-weight);
      font-size: 22px;
      letter-spacing: 0.3px;
    }

    .modal .summary {
      margin-bottom: 14px;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.6;
    }

    .modal .field {
      margin-bottom: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .modal label {
      font-size: 13px;
      color: var(--text);
    }

    .modal input,
    .modal textarea {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 10px;
      padding: 10px 12px;
      color: var(--text);
      font-size: 14px;
      outline: none;
    }

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

    .modal input:focus,
    .modal textarea:focus {
      border-color: rgba(var(--accent-rgb), 0.6);
      box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.24);
    }

    .modal select {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 10px;
      padding: 10px 12px;
      color: var(--text);
      font-size: 14px;
      outline: none;
      appearance: none;
    }

    .modal select:focus {
      border-color: rgba(var(--accent-rgb), 0.6);
      box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.24);
    }

    .modal select option {
      background: #0f1313;
      color: var(--text);
    }

    .form-modal {
      display: grid;
      gap: 12px;
    }
    .form-modal-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 10px;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.04);
    }
    .form-modal-summary .form-modal-value {
      font-weight: 700;
      color: var(--text);
    }
    .form-modal-label {
      font-size: 13px;
      color: var(--text);
      font-weight: 600;
    }
    .input-error {
      border-color: rgba(244, 63, 94, 0.8) !important;
      box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.3) !important;
    }

    .modal .section {
      margin: 12px 0;
    }

    .modal .section h4 {
      margin: 0 0 6px;
      font-size: 14px;
      letter-spacing: 0.2px;
      color: var(--text);
    }

    .modal .field-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 8px;
    }

    .slot-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 6px;
    }

    .slot-btn {
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      padding: 8px 12px;
      border-radius: 10px;
      cursor: pointer;
      transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
    }

    .slot-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      border-style: dashed;
    }

    .slot-btn:hover {
      border-color: rgba(var(--accent-rgb), 0.6);
      transform: translateY(-1px);
    }

    .slot-btn.active {
      background: var(--primary);
      color: #0c130f;
      border-color: rgba(var(--accent-rgb), 0.6);
      box-shadow: none;
    }

    .slot-day {
      padding: 10px 12px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      margin-bottom: 10px;
      background: rgba(255, 255, 255, 0.04);
    }

    .slot-day .day-label {
      font-weight: 700;
      color: var(--text);
      margin-bottom: 6px;
    }

    .cutoff-msg {
      font-size: 12px;
      color: #f2d39a;
      margin: 8px 0;
    }

    .reschedule-layout {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 12px;
      align-items: flex-start;
      max-width: 1200px;
      margin: 0 auto;
    }

    .vendor-pref-card {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px;
      background: rgba(255, 255, 255, 0.04);
    }

    .vendor-pref-nav {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      gap: 8px;
    }

    .vendor-pref-days {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 6px;
      margin-bottom: 8px;
    }

    .vendor-day-btn {
      padding: 8px 6px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
    }

    .vendor-day-btn.active {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #0b2a10;
      border-color: transparent;
    }

    .vendor-day-btn.active:hover {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #0b2a10;
      border-color: transparent;
    }

    .vendor-day-btn.has-selection::after {
      content: 'â€¢';
      display: inline-block;
      margin-left: 4px;
      font-size: 12px;
    }

    .vendor-day-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .vendor-pref-hours {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      margin-bottom: 8px;
    }

    .vendor-hour-btn {
      padding: 10px 8px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      border-radius: 10px;
      cursor: pointer;
      font-size: 13px;
    }

    .vendor-hour-btn.selected {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #0b2a10;
      border-color: transparent;
    }

    .vendor-hour-btn.selected:hover {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #0b2a10;
      border-color: transparent;
    }

    .vendor-pref-counter {
      font-weight: 700;
      margin: 6px 0;
      color: #f59e0b;
    }

    .vendor-pref-counter.met {
      color: #22c55e;
    }

    .vendor-pref-selected {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 8px;
    }

    .vendor-selected-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 12px;
    }

    .vendor-selected-chip button {
      border: none;
      background: transparent;
      color: #f87171;
      cursor: pointer;
      font-size: 12px;
    }

    .vendor-pref-error {
      color: #f87171;
      font-size: 12px;
      margin: 4px 0;
    }

    .reschedule-card {
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 12px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, 0.04);
      max-height: 480px;
      overflow: auto;
    }

    .reschedule-card h5 {
      margin: 0 0 6px;
      font-size: 13px;
      letter-spacing: 0.3px;
    }

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

    .badge {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 999px;
      background: rgba(var(--accent-rgb), 0.18);
      color: #0c130f;
      font-size: 11px;
      font-weight: 700;
    }

    .pill.rescheduled {
      background: rgba(var(--accent-rgb), 0.18);
      color: #0c130f;
      border: 1px solid rgba(var(--accent-rgb), 0.4);
    }

    .btn.secondary {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.18);
      color: var(--text);
    }

    .modal .actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 8px;
    }

    .btn {
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      padding: 10px 14px;
      border-radius: 12px;
      font-weight: 700;
      letter-spacing: 0.2px;
      cursor: pointer;
      transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    }

    .btn.loading {
      cursor: default;
      opacity: 0.8;
      pointer-events: none;
      position: relative;
      color: transparent;
    }

    .btn.loading::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 18px;
      height: 18px;
      margin: -9px 0 0 -9px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.4);
      border-top-color: rgba(255, 255, 255, 0.9);
      animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .btn.primary {
      background: var(--primary);
      color: #0f1313;
      border-color: rgba(255, 255, 255, 0.2);
    }
    .btn.danger {
      background: linear-gradient(135deg, #f87171, #ef4444);
      color: #0b0d11;
      border-color: rgba(255, 255, 255, 0.2);
    }
    .btn.success {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #0b2a10;
      border-color: rgba(255, 255, 255, 0.2);
    }

    .btn:hover {
      transform: translateY(-1px);
      border-color: rgba(255, 255, 255, 0.2);
    }

    .error-text {
      color: #e3b8b6;
      font-size: 12px;
    }

    ::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    ::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.02);
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.12);
      border-radius: 10px;
    }

    /* (moved to comprehensive mobile section at end of file) */

    /* Audit Log */
    .audit-page {
      padding: 32px 42px;
      background: var(--bg-gradient);
      min-height: 100vh;
      color: var(--text);
    }
    .audit-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 18px;
    }
    .audit-header h1 { margin: 6px 0; }
    .audit-header-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .search-wrap {
      display: flex;
      align-items: center;
      gap: 0;
      position: relative;
      min-width: 200px;
    }
    .search-stack {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 0;
      position: relative;
      width: 100%;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 8px;
      padding: 0 8px;
    }
    .search-wrap input[type="text"] {
      border: none;
      background: transparent;
      color: var(--text);
      font-size: 13px;
      outline: none;
      flex: 1;
      min-width: 140px;
      padding: 8px 8px;
    }
    .search-wrap input[type="text"]::placeholder {
      color: var(--muted);
      font-size: 13px;
    }
    .suggest-list {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      background: #0b0d11;
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: var(--shadow);
      max-height: 220px;
      overflow-y: auto;
      z-index: 50;
    }
    .search-btn {
      width: 28px;
      height: 28px;
      min-width: 28px;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      flex-shrink: 0;
      background: transparent;
      border: none;
      color: var(--muted);
      cursor: pointer;
    }
    .search-btn:hover {
      color: var(--text);
    }
    .search-btn svg {
      display: block;
      width: 16px;
      height: 16px;
    }
    .suggest-item {
      padding: 10px 12px;
      color: var(--text);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 2px;
      overflow: hidden;
    }
    .suggest-item:hover {
      background: rgba(255, 255, 255, 0.06);
    }
    .suggest-name {
      font-weight: 600;
      color: var(--text);
    }
    .suggest-email {
      font-size: 12px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .audit-filters {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 14px;
      background: var(--panel);
      border: 1px solid var(--border);
      padding: 16px;
      border-radius: 14px;
      backdrop-filter: var(--blur);
      margin-bottom: 12px;
    }
    .audit-filters .field label {
      display: block;
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 6px;
    }
    .audit-filters input,
    .audit-filters select {
      width: 100%;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
    }
    .audit-filters .date-range {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 6px;
    }
    .audit-filters .dash { color: var(--muted); }
    .audit-filters .actions-field {
      display: flex;
      align-items: flex-end;
      gap: 8px;
    }
    .audit-quick-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }
    .chip {
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      padding: 8px 12px;
      border-radius: 12px;
      cursor: pointer;
      transition: border-color 0.2s ease, background 0.2s ease;
    }
    .chip:hover { border-color: rgba(255, 255, 255, 0.3); }
    .audit-table-panel {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 14px;
      backdrop-filter: var(--blur);
      box-shadow: var(--shadow);
    }
    .audit-table-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      border-bottom: 1px solid var(--border);
    }
    .pagination {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .table-scroll {
      max-height: 70vh;
      overflow: auto;
    }
    .audit-table {
      width: 100%;
      border-collapse: collapse;
    }
    .audit-table th,
    .audit-table td {
      padding: 12px 14px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      text-align: left;
    }
    .audit-table th {
      color: var(--muted);
      font-weight: 600;
      letter-spacing: 0.3px;
      font-size: 13px;
    }
    .audit-table tr:hover { background: rgba(255, 255, 255, 0.03); }
    .actor-cell {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .pill {
      border-radius: 10px;
      padding: 4px 8px;
      font-size: 12px;
      font-weight: 700;
      border: 1px solid var(--border);
      text-transform: capitalize;
      background: rgba(255, 255, 255, 0.04);
    }
    .pill-success { background: rgba(50, 205, 121, 0.16); border-color: rgba(50, 205, 121, 0.4); color: #9ff0be; }
    .pill-danger { background: rgba(214, 76, 76, 0.16); border-color: rgba(214, 76, 76, 0.4); color: #f6c1c1; }
    .pill-warning { background: rgba(255, 193, 59, 0.12); border-color: rgba(255, 193, 59, 0.4); color: #ffd78a; }
    .pill-info { background: rgba(64, 156, 255, 0.12); border-color: rgba(64, 156, 255, 0.4); color: #b7d7ff; }
    .pill-default { background: rgba(255, 255, 255, 0.06); color: var(--text); }
    .details-cell {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      color: var(--muted);
    }
    .btn.link-btn {
      background: none;
      border: none;
      padding: 0;
      color: #7cb5ff;
      font-weight: 600;
    }
    .btn.ghost {
      background: rgba(255, 255, 255, 0.04);
      border-color: var(--border);
    }

    .cal-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 12px;
      width: 100%;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 8px;
      transition: all 0.15s ease;
      text-decoration: none;
      color: var(--text);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      font-family: inherit;
    }
    .cal-btn:hover:not(:disabled) {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.2);
    }
    .cal-btn:active:not(:disabled) {
      background: rgba(255, 255, 255, 0.1);
    }
    .cal-btn:disabled,
    .cal-btn.disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }
    .cal-btn img {
      height: 20px;
      width: auto;
      display: block;
    }

    .toggle {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      user-select: none;
    }
    .toggle input { display: none; }
    .toggle .slider {
      width: 42px;
      height: 22px;
      border-radius: 30px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid var(--border);
      position: relative;
      transition: background 0.2s ease;
    }
    .toggle .slider::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--text);
      transition: transform 0.2s ease;
    }
    .toggle input:checked + .slider { background: var(--primary); }
    .toggle input:checked + .slider::after {
      transform: translateX(20px);
      background: #0f1313;
    }
    #audit-modal.modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      z-index: 999;
    }
    #audit-modal .modal-content {
      background: #0b0d11;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px;
      max-width: 840px;
      width: 100%;
      box-shadow: var(--shadow);
    }
    #audit-modal .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }
    .json-viewer {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px;
      max-height: 420px;
      overflow: auto;
      color: #e0e7ff;
    }

    /* Overflow badge for stacked blocks */
    .block-overflow-badge {
      position: absolute;
      background: linear-gradient(135deg, #667eea, #764ba2);
      color: white;
      font-size: 11px;
      font-weight: 700;
      padding: 4px 8px;
      border-radius: 12px;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      z-index: 15;
      min-width: 28px;
      text-align: center;
    }

    .block-overflow-badge:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
    }

    /* Thin vertical strip variation */
    .block-overflow-thin {
      width: 18px;
      min-width: 18px;
      padding: 4px 2px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #8b5cf6, #6d28d9);
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
      box-shadow: 0 2px 8px rgba(109, 40, 217, 0.5);
    }

    .block-overflow-thin span {
      writing-mode: vertical-rl;
      transform: rotate(180deg);
    }

    .block-overflow-thin:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 12px rgba(109, 40, 217, 0.7);
    }

    /* Overflow popup */
    .overflow-popup {
      background: #1a1f2e;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      min-width: 260px;
      max-width: 320px;
      max-height: 400px;
      overflow-y: auto;
      z-index: 1000;
    }

    .overflow-popup-header {
      padding: 12px 16px;
      font-weight: 600;
      font-size: 13px;
      color: #a0aec0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      position: sticky;
      top: 0;
      background: #1a1f2e;
    }

    .overflow-popup-list {
      padding: 8px;
    }

    .overflow-popup-item {
      padding: 10px 12px;
      border-radius: 8px;
      margin-bottom: 6px;
      cursor: pointer;
      transition: background 0.15s ease;
    }

    .overflow-popup-item:last-child {
      margin-bottom: 0;
    }

    .overflow-popup-item-tenant {
      background: rgba(72, 187, 120, 0.15);
      border: 1px solid rgba(72, 187, 120, 0.3);
    }

    .overflow-popup-item-tenant:hover {
      background: rgba(72, 187, 120, 0.25);
    }

    .overflow-popup-item-scheduled {
      background: rgba(99, 179, 237, 0.15);
      border: 1px solid rgba(99, 179, 237, 0.3);
    }

    .overflow-popup-item-scheduled:hover {
      background: rgba(99, 179, 237, 0.25);
    }

    .overflow-item-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 4px;
    }

    .overflow-item-service {
      font-weight: 600;
      font-size: 13px;
      color: #e2e8f0;
    }

    .overflow-item-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 4px;
      text-transform: uppercase;
    }

    .overflow-item-badge.tenant {
      background: rgba(72, 187, 120, 0.3);
      color: #68d391;
    }

    .overflow-item-badge.scheduled {
      background: rgba(99, 179, 237, 0.3);
      color: #63b3ed;
    }

    .overflow-item-details {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: #a0aec0;
    }

    /* Stacked blocks (books on top of each other) */
    /* Compact blocks for side-by-side display */
    .block-compact {
      padding: 6px 8px !important;
      gap: 1px !important;
    }

    .block-compact .block-title {
      font-size: 10px !important;
      font-weight: 700 !important;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #0a0a0a !important;
    }

    .block-compact .block-time {
      font-size: 9px !important;
      font-weight: 600 !important;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #1a1a1a !important;
    }

    .block-compact .block-tz {
      font-size: 8px !important;
      font-weight: 700 !important;
      color: #2a2a2a !important;
    }

    /* ──────────────────────────────────────────
       Mobile-only elements (hidden on desktop)
    ────────────────────────────────────────── */
    .sheet-handle {
      display: none;
    }

    .mobile-day-nav {
      display: none;
      align-items: center;
      justify-content: center;
      gap: 16px;
      padding: 10px 12px;
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--border);
      border-radius: 12px;
      margin-bottom: 8px;
    }
    .mobile-day-arrow {
      background: none;
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.15s ease;
      flex-shrink: 0;
    }
    .mobile-day-arrow:hover { background: rgba(255,255,255,0.08); }
    .mobile-day-arrow:active { background: rgba(var(--accent-rgb), 0.15); transform: scale(0.95); }
    .mobile-day-label {
      text-align: center;
      min-width: 150px;
    }
    .mobile-day-label .mobile-day-name {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--muted);
      font-weight: 600;
    }
    .mobile-day-label .mobile-day-date {
      font-size: 20px;
      font-weight: 700;
      font-family: var(--heading-font);
      color: var(--text);
      margin-top: 2px;
    }
    .mobile-day-label .mobile-day-today {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: rgb(var(--accent-rgb));
      font-weight: 700;
      margin-top: 2px;
    }

    [data-theme="light"] .mobile-day-arrow { border-color: rgba(0,0,0,0.12); }
    [data-theme="light"] .mobile-day-arrow:hover { background: rgba(0,0,0,0.05); }
    [data-theme="light"] .mobile-day-nav { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }

    /* ──────────────────────────────────────────
       TABLET BREAKPOINT (≤ 1080px)
    ────────────────────────────────────────── */
    @media (max-width: 1080px) {
      .content {
        flex-direction: column;
      }
      aside.sidebar {
        width: 100%;
        flex: none;
        max-height: 340px;
      }
      main.calendar-area {
        min-height: 520px;
      }
      header.top-nav {
        flex-wrap: wrap;
      }
      header.top-nav #today-btn {
        position: static;
        margin-left: 16px;
      }
    }

    /* ──────────────────────────────────────────
       MOBILE BREAKPOINT (≤ 768px)
       Bottom sheet + single-day calendar
    ────────────────────────────────────────── */
    @media (max-width: 768px) {

      /* ── Unlock scroll chain ── */
      html, body {
        height: auto;
        overflow: auto;
      }
      body.calendar-page {
        height: 100dvh;
        overflow: hidden;
      }
      .app-shell {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
      }
      .content {
        flex-direction: column;
        overflow: hidden;
        flex: 1;
        min-height: 0;
        position: relative;
      }
      main.calendar-area {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        padding: 6px 10px;
        padding-bottom: 72px; /* space for bottom sheet peek */
      }
      .calendar-panel {
        overflow: hidden;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
      }
      .calendar-body {
        margin-top: 0;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
      }

      /* ── Header compact ── */
      header.top-nav {
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: wrap;
      }
      .nav-left {
        gap: 8px;
        flex: 1;
        min-width: 0;
      }
      .nav-right { gap: 8px; }
      .logo-block { width: 32px; height: 32px; border-radius: 6px; padding: 4px; }
      .app-title { font-size: 15px; white-space: nowrap; }
      header.top-nav #today-btn {
        position: static; margin-left: 0; padding: 4px 10px; font-size: 11px;
      }
      .cal-controls { margin-left: 4px; gap: 2px; }
      .cal-controls button { min-width: 28px; height: 28px; font-size: 12px; }
      .month-label { font-size: 12px; min-width: 90px; margin: 0 2px; }
      .search-wrap { display: none; }
      .timezone-legend-container { display: none !important; }

      /* ── HIDE STATUS STRIP ON MOBILE ── */
      .status-strip { display: none !important; }
      .tech-panel { display: none; }

      /* ── Show mobile day navigator ── */
      .mobile-day-nav { display: flex; flex-shrink: 0; }

      /* ── Hide desktop day header ── */
      .day-header { display: none; }

      /* ── Grid: single day column ── */
      .grid-wrap {
        min-width: 0;
        grid-template-columns: var(--time-width) 1fr;
      }
      .week-grid { grid-template-columns: 1fr; }

      :root {
        --time-width: 52px;
        --hour-height: 56px;
      }
      .time-label {
        font-size: 11px;
        padding: 8px 6px 0 0;
      }

      /* ── Block chips: touch targets ── */
      .block-chip {
        min-height: 44px;
        padding: 8px 10px;
        border-radius: 10px;
        font-size: 12px;
      }
      .block-chip .block-title { font-size: 13px; }
      .block-chip .block-time { font-size: 11px; }
      .block-chip .block-tz { font-size: 9px; }

      /* ──────────────────────────────────────
         BOTTOM SHEET
      ────────────────────────────────────── */
      aside.sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 85dvh;
        max-height: 85dvh;
        z-index: 60;
        border-radius: 20px 20px 0 0;
        border: none;
        border-top: 1px solid var(--border);
        padding: 0 0 16px;
        background: #13161c;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.45);
        flex: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        /* Start at peek — JS will set --sheet-translate */
        transform: translateY(var(--sheet-translate, calc(100% - 64px)));
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        will-change: transform;
        touch-action: none;
      }
      aside.sidebar.sheet-dragging {
        transition: none; /* disable animation during drag */
      }

      [data-theme="light"] aside.sidebar {
        background: #faf9f7;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
        border-top: 1px solid rgba(0,0,0,0.1);
      }

      /* ── Sheet handle ── */
      .sheet-handle {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 16px 8px;
        cursor: grab;
        flex-shrink: 0;
        user-select: none;
        -webkit-user-select: none;
      }
      .sheet-handle:active { cursor: grabbing; }
      .sheet-handle-bar {
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: rgba(255,255,255,0.25);
        margin-bottom: 8px;
        transition: background 0.15s ease;
      }
      .sheet-handle:hover .sheet-handle-bar,
      .sheet-handle:active .sheet-handle-bar {
        background: rgba(255,255,255,0.4);
      }
      [data-theme="light"] .sheet-handle-bar {
        background: rgba(0,0,0,0.2);
      }
      [data-theme="light"] .sheet-handle:hover .sheet-handle-bar {
        background: rgba(0,0,0,0.35);
      }
      .sheet-handle-label {
        font-size: 13px;
        font-weight: 600;
        color: var(--muted);
        letter-spacing: 0.2px;
      }
      .sheet-handle-label .sheet-count {
        color: var(--text);
        font-weight: 700;
      }

      /* ── Sidebar content inside sheet ── */
      .sidebar-tabs {
        padding: 4px 12px 0;
        flex-shrink: 0;
      }
      aside.sidebar .tab-panel {
        flex: 1;
        min-height: 0;
        flex-direction: column;
      }
      aside.sidebar .tab-panel.active {
        display: flex;
      }
      aside.sidebar .sub-tab-panel {
        flex: 1;
        min-height: 0;
        overflow: hidden;
      }
      aside.sidebar .sub-tab-panel.active {
        display: flex;
        flex-direction: column;
      }
      aside.sidebar .work-orders {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 12px 12px;
        flex: 1;
        min-height: 0;
      }
      aside.sidebar .sub-tabs {
        padding: 0 12px;
      }

      /* Work cards in sheet */
      .work-card {
        padding: 14px;
      }

      /* ── Modals ── */
      .modal {
        width: 96vw;
        max-height: 90dvh;
        padding: 16px;
        border-radius: 14px;
      }
      .modal-backdrop { padding: 12px 8px; }
      .modal--lg { width: 96vw; }
      .modal__field-row { flex-direction: column; }

      /* ── User avatar ── */
      .user-avatar-btn { width: 32px; height: 32px; }
      .avatar-icon { font-size: 13px; }

      /* ── Reschedule modal ── */
      .rsched__panels { grid-template-columns: 1fr; }
      .rsched__panel { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
      .rsched__panel:last-child { border-bottom: none; }
      .rsched__infobar { flex-wrap: wrap; gap: 8px; padding: 12px; }
      .rsched__info-item { flex: 0 0 calc(50% - 4px); }
      .rsched__info-sep { display: none; }
    }

    /* ──────────────────────────────────────────
       SMALL MOBILE (≤ 480px)
    ────────────────────────────────────────── */
    @media (max-width: 480px) {
      header.top-nav { padding: 6px 8px; }
      .app-title { font-size: 13px; }
      .logo-block { width: 28px; height: 28px; }
      .month-label { font-size: 11px; min-width: 80px; }

      :root {
        --time-width: 48px;
        --hour-height: 52px;
      }
      .time-label { font-size: 10px; padding: 6px 4px 0 0; }
      .mobile-day-label .mobile-day-date { font-size: 18px; }

      /* Hide week arrows on small phones; mobile day nav handles it */
      .cal-controls { display: none; }
      header.top-nav #today-btn { margin-left: auto; }
    }

    /* ──────────────────────────────────────────
       Touch feedback
    ────────────────────────────────────────── */
    @media (hover: none) and (pointer: coarse) {
      .mobile-day-arrow:active {
        background: rgba(var(--accent-rgb), 0.2);
        border-color: rgba(var(--accent-rgb), 0.4);
      }
      .block-chip:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
      }
      .work-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
      }
    }