    /* ── Shifts Section ── */
    .shifts-section {
      margin-bottom: 20px;
      padding: 18px;
      border-radius: 22px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)), #14141b;
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
      overflow: visible;
    }

    #homeShiftsList,
    #shiftsList {
      display: grid;
      gap: 12px;
    }

    .section-header {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(238, 242, 248, 0.72);
      margin-bottom: 14px;
    }

    /* ── Shifts overview chips ── */
    .shifts-overview {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 16px;
    }

    .shifts-overview-chip {
      background: #181821;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
      padding: 12px 13px;
      display: grid;
      gap: 4px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .shifts-overview-chip::before { content: none; }

    .shifts-overview-label {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: rgba(136, 146, 164, 0.86);
    }

    .shifts-overview-value {
      font-family: 'Golos Text', system-ui, sans-serif;
      font-size: clamp(15px, 4.8vw, 20px);
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: -0.02em;
      color: var(--text);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ── Empty state ── */
    .shifts-empty {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)), var(--card-hi);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 30px 18px;
      text-align: center;
      color: var(--sub);
      font-size: 14px;
      line-height: 1.55;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
      max-width: 360px;
      margin: 0 auto;
      text-wrap: balance;
    }

    /* ── Rest gap indicator ── */
    .shift-rest-gap {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 10px 4px 10px;
      color: rgba(160, 169, 183, 0.88);
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0.01em;
      font-variant-numeric: tabular-nums;
      pointer-events: none;
      user-select: none;
    }

    .shift-rest-gap-line {
      flex: 1;
      min-width: 14px;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    }

    .shift-rest-gap-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      padding: 4px 10px;
      border-radius: var(--r-pill);
      border: 1px solid rgba(255, 255, 255, 0.09);
      background: #181821;
      color: rgba(136, 146, 164, 0.94);
      box-shadow: none;
    }

    .shift-rest-gap.is-short .shift-rest-gap-label {
      color: rgba(255, 221, 165, 0.92);
      border-color: rgba(255, 190, 108, 0.22);
      background: rgba(255, 190, 108, 0.08);
    }

    .shift-rest-gap.is-problem .shift-rest-gap-label {
      color: rgba(255, 204, 204, 0.9);
      border-color: rgba(255, 142, 142, 0.20);
      background: rgba(255, 130, 130, 0.09);
    }

    .shift-rest-gap.is-muted .shift-rest-gap-label {
      color: var(--muted);
    }

    .shift-rest-gap.is-compact { font-size: 10px; margin: 10px 2px 10px; }
    .shift-rest-gap.is-compact .shift-rest-gap-label { padding: 2px 7px; }

    /* ── Shift item card ── */
    .shift-item {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)), #17171f;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: var(--r-card);
      padding: 16px;
      margin-bottom: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
      position: relative;
      box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
      overflow: hidden;
    }

    .shift-item::before { content: none; }
    .shift-item > * { position: relative; z-index: 1; }

    .shift-item[data-shift-open="1"] {
      cursor: pointer;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .shift-item[data-shift-open="1"]:active {
      border-color: var(--border-hi);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018)), var(--card);
      transform: translateY(1px);
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
    }

    .shift-item[data-shift-open="1"]:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .shift-item.is-shared-source-hidden {
      visibility: hidden;
      opacity: 0 !important;
      pointer-events: none !important;
    }

    /* Reveal animation */
    .shift-list-reveal .shift-item {
      opacity: 0;
      transform: translateY(10px);
      transition:
        opacity 200ms ease-out,
        transform 200ms ease-out;
      transition-delay: var(--shift-card-enter-delay, 0ms);
      will-change: opacity, transform;
    }

    .shift-list-reveal.is-visible .shift-item {
      opacity: 1;
      transform: translateY(0);
    }

    @media (prefers-reduced-motion: reduce) {
      .shift-list-reveal .shift-item {
        opacity: 1;
        transform: none;
        transition: none;
      }
    }

    /* Duration-level border tinting (relative to monthly average) */
    .shift-item.duration-high {
      border-color: rgba(56, 189, 248, 0.24);
      box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.08);
    }

    .shift-item.duration-low {
      border-color: rgba(244, 114, 182, 0.26);
      box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.08);
    }

    .shift-item.duration-high .shift-duration {
      color: var(--accent);
    }

    .shift-item.duration-high .shift-duration-icon {
      color: var(--accent);
    }

    .shift-item.duration-low .shift-duration {
      color: var(--holiday);
    }

    .shift-item.duration-low .shift-duration-icon {
      color: var(--holiday);
    }

    .shift-item.is-journal-focus-target {
      border-color: rgba(56, 189, 248, 0.44);
      box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22), 0 14px 30px rgba(0, 0, 0, 0.16);
      animation: shiftJournalFocusPulse 1.3s ease-out 1;
    }

    @keyframes shiftJournalFocusPulse {
      0% {
        transform: translateY(0) scale(0.992);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.34), 0 14px 30px rgba(0, 0, 0, 0.16);
      }
      45% {
        transform: translateY(-1px) scale(1);
        box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.06), 0 18px 34px rgba(0, 0, 0, 0.18);
      }
      100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22), 0 14px 30px rgba(0, 0, 0, 0.16);
      }
    }

    /* ── Shift card layout ── */
    .shift-info { flex: 1; min-width: 0; }

    .shift-card-top {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 10px;
      min-width: 0;
    }

    .shift-card-body {
      display: grid;
      gap: 8px;
      padding-bottom: 0;
    }

    .shift-type {
      font-size: 15px;
      font-weight: 750;
      line-height: 1.2;
      color: rgba(244, 247, 252, 0.98);
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .shift-type-content {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      max-width: 100%;
    }

    .shift-type-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      flex-shrink: 0;
      border-radius: 8px;
      background: rgba(56, 189, 248, 0.09);
      color: var(--accent);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .shift-type-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .shift-title-col {
      display: grid;
      gap: 4px;
      min-width: 0;
      flex: 1;
    }

    .shift-title-row {
      display: flex;
      align-items: center;
      min-width: 0;
    }

    .shift-top-right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0;
      min-width: 0;
    }

    .shift-direction-row {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      line-height: 1.3;
      color: rgba(172, 180, 194, 0.88);
      font-weight: 500;
      min-width: 0;
    }

    .shift-direction-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: rgba(126, 137, 154, 0.82);
    }

    .shift-direction-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .shift-main-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: nowrap;
      gap: 10px;
      min-width: 0;
    }

    .shift-datetime-line {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 5px;
      min-width: 0;
      font-family: 'Golos Text', system-ui, sans-serif;
      font-size: 12px;
      line-height: 1.35;
      color: rgba(192, 200, 212, 0.9);
      font-variant-numeric: tabular-nums;
    }

    .shift-datetime-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: rgba(126, 137, 154, 0.84);
    }

    .shift-datetime-text {
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .shift-duration {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
      margin-left: auto;
      text-align: right;
      font-family: 'Golos Text', system-ui, sans-serif;
      font-size: 12px;
      font-weight: 600;
      color: rgba(168, 178, 193, 0.88);
      line-height: 1.3;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
      padding: 0;
      border-radius: 0;
      background: transparent;
      border: 0;
      box-shadow: none;
    }

    .shift-duration-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: rgba(126, 137, 154, 0.76);
    }

    .shift-duration-text { white-space: nowrap; }

    .shift-tech-line {
      display: grid;
      gap: 4px;
      font-size: 11px;
      line-height: 1.4;
      color: rgba(144, 154, 170, 0.78);
      min-width: 0;
      font-variant-numeric: tabular-nums;
      padding-top: 2px;
    }

    .shift-tech-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      column-gap: 5px;
      row-gap: 4px;
      min-width: 0;
    }

    .shift-tech-part {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      min-width: 0;
      max-width: 100%;
    }

    .shift-tech-part-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: rgba(126, 137, 154, 0.76);
    }

    .shift-tech-part-text {
      min-width: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .shift-fuel-note {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      font-size: 11px;
      line-height: 1.35;
      color: rgba(144, 154, 170, 0.76);
      font-variant-numeric: tabular-nums;
      margin-top: 1px;
    }

    .shift-fuel-note-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: rgba(126, 137, 154, 0.74);
    }

    .shift-fuel-note-text { min-width: 0; }

    .shift-fuel-note strong {
      color: rgba(184, 192, 204, 0.9);
      font-family: 'Golos Text', system-ui, sans-serif;
      font-weight: 600;
      margin-left: 0;
    }

    .shift-tech-sep {
      color: rgba(116, 126, 142, 0.62);
      line-height: 1;
      flex-shrink: 0;
    }

    .shift-inline-icon {
      width: 13px;
      height: 13px;
      display: block;
      flex-shrink: 0;
    }

    /* ── Shift income row ── */
    .shift-income-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      padding-top: 12px;
      margin-top: 4px;
      min-width: 0;
    }

    .shift-card-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      border-top: 1px solid var(--border);
      padding-top: 10px;
      margin-top: 2px;
      min-width: 0;
    }

    .shift-card-action-btn {
      appearance: none;
      border: 1px solid var(--border);
      border-radius: var(--r-inner);
      height: 42px;
      padding: 0 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-family: 'Golos Text', system-ui, sans-serif;
      font-size: 14px;
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      background: var(--card-hi);
      color: var(--sub);
      transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
    }

    .shift-card-action-btn:active {
      transform: translateY(1px);
    }

    .shift-card-edit-btn {
      flex: 1;
      justify-content: flex-start;
      color: var(--warn);
      border-color: rgba(247, 185, 85, 0.35);
      background: rgba(247, 185, 85, 0.14);
    }

    .shift-card-edit-btn:active {
      border-color: rgba(247, 185, 85, 0.5);
      background: rgba(247, 185, 85, 0.22);
      color: #ffd796;
    }

    .shift-card-delete-btn {
      color: var(--danger);
      border-color: rgba(244, 63, 94, 0.32);
      background: rgba(244, 63, 94, 0.12);
      min-width: 138px;
    }

    .shift-card-delete-btn:active {
      border-color: rgba(244, 63, 94, 0.52);
      background: rgba(244, 63, 94, 0.22);
      color: #fecdd3;
    }

    .shift-card-action-icon {
      width: 16px;
      height: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .shift-card-action-icon svg {
      width: 15px;
      height: 15px;
      display: block;
    }

    .shift-income-row-label {
      font-size: 10px;
      color: rgba(136, 146, 164, 0.82);
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .shift-income-row-label-content {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      min-width: 0;
    }

    .shift-income-row-label-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: rgba(126, 137, 154, 0.72);
    }

    .shift-income-row-label-text {
      min-width: 0;
      white-space: nowrap;
      color: rgba(162, 171, 184, 0.88);
    }

    /* Income value — always green */
    .shift-income-chip {
      font-family: 'Golos Text', system-ui, sans-serif;
      font-size: 18px;
      font-weight: 700;
      color: var(--green);
      line-height: 1.2;
      letter-spacing: -0.01em;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
      background: none;
      border: none;
      padding: 0;
    }

    .shift-income-chip--empty { color: var(--muted); }
    .shift-income-chip--low   { color: rgba(74, 222, 128, 0.7); }
    .shift-income-chip--medium { color: var(--green); }
    .shift-income-chip--high  { color: var(--green); }

    /* ── Shift title (detail view) ── */
    .shift-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.25;
      color: var(--text);
      margin-bottom: 0;
      min-width: 0;
      flex: 1;
    }

    .shift-title-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .shift-title-icon {
      width: 18px;
      height: 18px;
      border-radius: 6px;
      background: var(--accent-dim);
      color: var(--accent);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 10px;
    }

    .shift-item.has-trip .shift-title-icon {
      background: var(--accent-dim);
      color: var(--accent);
    }

    .shift-kind-line {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 0;
    }

    .shift-kind-badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: var(--r-pill);
      background: var(--accent-dim);
      border: 1px solid rgba(56, 189, 248, 0.15);
      color: var(--accent);
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0.01em;
    }

    .shift-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 0;
      padding-bottom: 4px;
    }

    .shift-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 9px;
      border-radius: var(--r-pill);
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.04);
      color: rgba(238, 242, 248, 0.66);
      font-size: 11px;
      line-height: 1;
      white-space: nowrap;
    }

    .shift-note {
      font-size: 12px;
      color: rgba(238, 242, 248, 0.58);
      line-height: 1.45;
      margin-top: 6px;
    }

    /* ── Shift actions trigger ── */
    .shift-actions-wrap {
      position: relative;
      z-index: 2;
      display: grid;
      justify-items: end;
      align-self: start;
      width: auto;
    }

    .shift-actions-trigger {
      appearance: none;
      background: transparent;
      border: 1px solid transparent;
      color: var(--sub);
      width: 34px;
      height: 34px;
      border-radius: 12px;
      cursor: pointer;
      display: grid;
      place-items: center;
      flex-shrink: 0;
      box-shadow: none;
      transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
      -webkit-tap-highlight-color: transparent;
      font-size: 0;
      line-height: 0;
    }

    .shift-actions-trigger:active {
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      border-color: rgba(255, 255, 255, 0.12);
      transform: translateY(1px);
    }

    .shift-actions-trigger.is-open {
      background: var(--accent-dim);
      color: var(--accent);
      border-color: rgba(56, 189, 248, 0.2);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
      transform: none;
    }

    .shift-actions-trigger:focus-visible {
      outline: 2px solid rgba(91, 210, 255, 0.9);
      outline-offset: 2px;
    }

    .shift-actions-trigger-icon {
      width: 16px;
      height: 16px;
      display: block;
      fill: currentColor;
    }

    /* ── Shift actions menu ── */
    .shift-actions-menu {
      position: fixed;
      left: var(--shift-menu-left, 0px);
      top: var(--shift-menu-top, 0px);
      min-width: 160px;
      padding: 6px;
      border-radius: var(--r-card);
      background: var(--card);
      border: 1px solid var(--border-hi);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
      display: grid;
      gap: 2px;
      z-index: 3;
      pointer-events: auto;
      transform: translateZ(0);
    }

    @keyframes shiftMenuIn {
      from { opacity: 0; transform: scale(0.92); }
      to   { opacity: 1; transform: scale(1); }
    }
    @keyframes shiftMenuOut {
      from { opacity: 1; transform: scale(1); }
      to   { opacity: 0; transform: scale(0.92); }
    }

    .shift-actions-menu.hidden { display: none; }

    .shift-actions-menu.is-entering {
      animation: shiftMenuIn 180ms cubic-bezier(0.34, 1.2, 0.64, 1) both;
    }

    .shift-actions-menu.is-leaving {
      display: grid;
      animation: shiftMenuOut 120ms ease-in both;
      pointer-events: none;
    }

    .shift-actions-menu[data-placement="top"]    { transform-origin: bottom right; }
    .shift-actions-menu[data-placement="bottom"] { transform-origin: top right; }

    .shift-actions-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 40px;
      appearance: none;
      border: none;
      background: transparent;
      color: var(--text);
      padding: 10px 12px;
      border-radius: var(--r-inner);
      text-align: left;
      font-family: 'Golos Text', system-ui, sans-serif;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.12s;
      -webkit-tap-highlight-color: transparent;
    }

    .shift-actions-item + .shift-actions-item {
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .shift-actions-item-icon {
      width: 16px;
      height: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: currentColor;
    }

    .shift-actions-item-icon svg {
      width: 16px;
      height: 16px;
      display: block;
    }

    .shift-actions-item-label {
      min-width: 0;
      flex: 1;
    }

    .shift-actions-item:hover,
    .shift-actions-item:active { background: var(--card-hi); }

    .shift-actions-item.is-poekhali {
      color: var(--accent);
    }

    .shift-actions-item.is-poekhali:hover,
    .shift-actions-item.is-poekhali:active {
      background: var(--accent-dim);
    }

    /* Same edit accent as .btn-edit-action (#fbbf24 + amber tint) */
    .shift-actions-item.is-edit {
      color: #fbbf24;
    }

    .shift-actions-item.is-edit:hover,
    .shift-actions-item.is-edit:active {
      background: rgba(245, 158, 11, 0.14);
    }

    .shift-actions-item.is-danger { color: var(--danger); }
    .shift-actions-item.is-danger:hover { background: rgba(244, 63, 94, 0.08); }

    /* ── Compact shift variant ── */
    .compact-shift .shift-income-row { padding-top: 8px; }
    .compact-shift .shift-income-row-label { font-size: 11px; }
    .compact-shift .shift-income-chip { font-size: 14px; }
    .compact-shift .shift-card-top { gap: 8px; }
    .compact-shift .shift-type { font-size: 14px; }
    .compact-shift .shift-type-content { gap: 5px; }
    .compact-shift .shift-direction-row { font-size: 11px; gap: 4px; }
    .compact-shift .shift-main-row { gap: 8px; }
    .compact-shift .shift-datetime-line { font-size: 11px; }
    .compact-shift .shift-duration { font-size: 11px; }
    .compact-shift .shift-card-actions { gap: 8px; padding-top: 8px; }
    .compact-shift .shift-card-action-btn { height: 36px; font-size: 13px; padding: 0 12px; }
    .compact-shift .shift-card-delete-btn { min-width: 118px; }
    .compact-shift .shift-tech-line { font-size: 10px; }
    .compact-shift .shift-tech-row { row-gap: 3px; }
    .compact-shift .shift-fuel-note { font-size: 10px; }
    .compact-shift .shift-inline-icon { width: 12px; height: 12px; }
    .compact-shift .shift-actions-trigger { width: 30px; height: 30px; }
    .compact-shift .shift-top-right { gap: 6px; }

    /* ── Pending shift badge ── */
    .shift-pending-line,
    .shift-sync-inline {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: var(--r-pill);
      color: #F59E0B;
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.28);
    }

    .shift-pending-line {
      margin: 2px 0 2px;
    }

    .shift-sync-inline {
      margin-left: 2px;
      flex-shrink: 0;
    }

    .shift-pending-line svg,
    .shift-sync-inline svg {
      width: 11px;
      height: 11px;
      display: block;
    }

    .shift-pending-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      width: fit-content;
      padding: 4px 8px;
      border-radius: var(--r-pill);
      border: 1px solid rgba(247, 185, 85, 0.3);
      background: rgba(247, 185, 85, 0.1);
      color: var(--warn);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.04em;
      line-height: 1;
    }

    .shift-item.is-pending {
      border-color: rgba(247, 185, 85, 0.3);
    }

    .shift-pending-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      border-radius: var(--r-pill);
      background: rgba(247, 185, 85, 0.1);
      border: 1px solid rgba(247, 185, 85, 0.2);
      color: var(--warn);
      font-size: 10px;
      font-weight: 700;
    }

    /* ── Shift detail overlay (JS-generated) ── */
    .shift-detail-overlay {
      position: fixed;
      inset: 0;
      z-index: var(--layer-overlay);
      background: var(--bg);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transform: translateY(100%);
      transition: transform 0.3s cubic-bezier(0.25, 1, 0.35, 1);
    }

    .shift-detail-overlay.is-open,
    .shift-detail-overlay.is-visible {
      transform: translateY(0);
    }

    .shift-detail-surface {
      display: flex;
      flex-direction: column;
      min-height: 0;
      flex: 1;
      background: var(--bg);
    }

    .shift-detail-header {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012)), var(--card);
      border-bottom: 1px solid var(--border);
      padding:
        max(10px, env(safe-area-inset-top), var(--safe-top))
        calc(14px + env(safe-area-inset-right))
        10px
        calc(14px + env(safe-area-inset-left));
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .shift-detail-close,
    .shift-detail-back-btn {
      appearance: none;
      -webkit-appearance: none;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.10);
      color: var(--text);
      width: 34px;
      min-width: 34px;
      height: 34px;
      border-radius: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
      transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
    }

    .shift-detail-close:active,
    .shift-detail-back-btn:active {
      transform: scale(0.98);
      background: rgba(255, 255, 255, 0.10);
      border-color: rgba(255, 255, 255, 0.20);
      color: var(--accent);
    }

    .shift-detail-back-btn svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .shift-detail-header-main {
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .shift-detail-header-kicker {
      font-size: 11px;
      color: rgba(238, 242, 248, 0.56);
      letter-spacing: 0.03em;
      text-transform: uppercase;
      font-weight: 700;
      line-height: 1.1;
    }

    .shift-detail-header-title {
      font-size: 20px;
      line-height: 1.15;
      font-weight: 800;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .shift-detail-body,
    .shift-detail-scroll {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding:
        12px
        calc(14px + env(safe-area-inset-right))
        calc(18px + env(safe-area-inset-bottom))
        calc(14px + env(safe-area-inset-left));
    }

    .shift-detail-hero-slot {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }

    .shift-detail-content {
      display: grid;
      gap: 12px;
      opacity: 0;
      transform: translateY(6px);
      transition: opacity 180ms ease-out, transform 180ms ease-out;
    }

    .shift-detail-content.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .shift-detail-section {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--r-card);
      padding: 15px 14px;
    }

    .shift-detail-section-main {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
        var(--card);
    }

    .shift-detail-section-poekhali {
      border-color: rgba(56, 189, 248, 0.20);
      background:
        linear-gradient(180deg, rgba(56, 189, 248, 0.065), rgba(56, 189, 248, 0.018)),
        var(--card);
    }

    .shift-detail-poekhali-action-section {
      padding: 0;
      overflow: hidden;
    }

    .shift-detail-poekhali-btn {
      appearance: none;
      -webkit-appearance: none;
      width: 100%;
      min-height: 58px;
      border: 0;
      background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.20), rgba(34, 197, 94, 0.16)),
        rgba(15, 23, 42, 0.44);
      color: var(--text);
      display: grid;
      justify-items: start;
      gap: 4px;
      padding: 13px 14px;
      text-align: left;
      font-family: inherit;
      cursor: pointer;
    }

    .shift-detail-poekhali-btn:active {
      transform: scale(0.99);
      filter: brightness(1.08);
    }

    .shift-detail-poekhali-btn-main {
      color: var(--accent);
      font-size: 15px;
      font-weight: 900;
      line-height: 1.15;
    }

    .shift-detail-poekhali-btn-sub {
      color: rgba(238, 242, 248, 0.70);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.25;
      max-width: 100%;
      overflow-wrap: anywhere;
    }

    .shift-detail-section-title {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.045em;
      color: rgba(165, 189, 220, 0.86);
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .shift-detail-list {
      display: grid;
      gap: 0;
    }

    .shift-detail-row {
      display: grid;
      grid-template-columns: minmax(96px, 0.82fr) minmax(0, 1.28fr);
      align-items: start;
      gap: 12px;
      padding: 10px 0;
      border-top: 1px solid rgba(255, 255, 255, 0.055);
    }

    .shift-detail-row:first-child {
      border-top: 0;
      padding-top: 0;
    }

    .shift-detail-row:last-child {
      padding-bottom: 0;
    }

    .shift-detail-row.is-stacked {
      grid-template-columns: 1fr;
      gap: 7px;
      padding: 12px 0;
    }

    .shift-detail-key {
      color: var(--sub);
      font-size: 14px;
      line-height: 1.3;
      min-width: 0;
    }

    .shift-detail-row.is-stacked .shift-detail-key {
      color: rgba(165, 189, 220, 0.86);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.035em;
      line-height: 1.15;
      text-transform: uppercase;
    }

    .shift-detail-value {
      color: var(--text);
      font-size: 14px;
      font-weight: 750;
      line-height: 1.35;
      text-align: right;
      min-width: 0;
      overflow-wrap: anywhere;
      font-variant-numeric: tabular-nums;
    }

    .shift-detail-row.is-stacked .shift-detail-value {
      display: block;
      width: 100%;
      padding: 10px 11px;
      border: 1px solid rgba(255, 255, 255, 0.065);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.035);
      text-align: left;
      line-height: 1.38;
    }

    .shift-detail-value-lines {
      display: grid;
      gap: 0;
      min-width: 0;
    }

    .shift-detail-value-line {
      display: block;
      min-width: 0;
      color: rgba(238, 242, 248, 0.72);
      overflow-wrap: anywhere;
    }

    .shift-detail-value-line + .shift-detail-value-line {
      margin-top: 6px;
      padding-top: 6px;
      border-top: 1px solid rgba(255, 255, 255, 0.055);
    }

    .shift-detail-value-line.is-primary {
      color: var(--text);
      font-size: 15px;
      font-weight: 900;
    }

    .shift-detail-value.is-empty {
      color: var(--sub);
      font-weight: 500;
    }

    .shift-detail-metrics {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px 14px;
      padding-bottom: 12px;
      margin-bottom: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .shift-detail-metric {
      min-width: 0;
      display: grid;
      gap: 3px;
    }

    .shift-detail-metric-label {
      color: rgba(144, 154, 170, 0.82);
      font-size: 11px;
      font-weight: 800;
      line-height: 1.15;
      text-transform: uppercase;
    }

    .shift-detail-metric-value {
      color: var(--text);
      font-size: 17px;
      font-weight: 900;
      line-height: 1.15;
      overflow-wrap: anywhere;
      font-variant-numeric: tabular-nums;
    }

    .shift-detail-metric.is-accent .shift-detail-metric-value { color: var(--accent); }
    .shift-detail-metric.is-success .shift-detail-metric-value { color: var(--success); }

    .shift-detail-disclosure {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--r-card);
      overflow: hidden;
    }

    .shift-detail-disclosure-summary {
      min-height: 50px;
      padding: 13px 14px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto 18px;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      list-style: none;
      -webkit-tap-highlight-color: transparent;
    }

    .shift-detail-disclosure-summary::-webkit-details-marker { display: none; }

    .shift-detail-disclosure-title {
      color: rgba(165, 189, 220, 0.92);
      font-size: 12px;
      font-weight: 850;
      letter-spacing: 0.045em;
      line-height: 1.15;
      text-transform: uppercase;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .shift-detail-disclosure-hint {
      color: rgba(144, 154, 170, 0.78);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.15;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .shift-detail-disclosure-icon {
      position: relative;
      width: 18px;
      height: 18px;
      color: rgba(165, 189, 220, 0.86);
      transition: transform 0.18s ease;
    }

    .shift-detail-disclosure-icon::before,
    .shift-detail-disclosure-icon::after {
      content: "";
      position: absolute;
      inset: 8px 3px auto;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
    }

    .shift-detail-disclosure-icon::after {
      transform: rotate(90deg);
      transition: opacity 0.18s ease;
    }

    .shift-detail-disclosure[open] .shift-detail-disclosure-summary {
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.018);
    }

    .shift-detail-disclosure[open] .shift-detail-disclosure-icon {
      transform: rotate(180deg);
    }

    .shift-detail-disclosure[open] .shift-detail-disclosure-icon::after {
      opacity: 0;
    }

    .shift-detail-disclosure-body {
      padding: 0 14px 14px;
    }

    .shift-detail-subsection + .shift-detail-subsection {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .shift-detail-subsection-title {
      color: rgba(165, 189, 220, 0.86);
      font-size: 11px;
      font-weight: 850;
      letter-spacing: 0.045em;
      line-height: 1.15;
      text-transform: uppercase;
      margin: 0 0 8px;
    }

    @media (max-width: 380px) {
      .shift-detail-row {
        grid-template-columns: 1fr;
        gap: 5px;
      }

      .shift-detail-value {
        text-align: left;
      }

      .shift-detail-disclosure-summary {
        grid-template-columns: minmax(0, 1fr) 18px;
      }

      .shift-detail-disclosure-hint {
        display: none;
      }
    }

    .shift-detail-note {
      margin-top: 10px;
      color: var(--sub);
      font-size: 12px;
      line-height: 1.45;
    }

    /* ── Docs viewer overlay ── */
    .docs-viewer-overlay {
      position: fixed;
      inset: 0;
      z-index: calc(var(--layer-scrim) + 20);
      background: var(--bg);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      overscroll-behavior: contain;
      touch-action: auto;
      isolation: isolate;
    }

    body.docs-viewer-open .app-content {
      overflow: hidden !important;
    }

    .docs-viewer-header {
      position: sticky;
      top: 0;
      z-index: 5;
      padding:
        max(10px, env(safe-area-inset-top), var(--safe-top))
        calc(14px + env(safe-area-inset-right))
        12px
        calc(14px + env(safe-area-inset-left));
      display: grid;
      grid-template-columns: minmax(112px, 1fr) minmax(0, 1.6fr) minmax(112px, 1fr);
      align-items: center;
      gap: 12px;
      flex-shrink: 0;
      min-height: 72px;
      background: linear-gradient(180deg, rgba(21, 26, 40, 0.96), rgba(14, 18, 30, 0.92));
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }

    .docs-viewer-header-side {
      min-width: 0;
      display: flex;
      align-items: center;
    }

    .docs-viewer-header-side-left {
      justify-content: flex-start;
    }

    .docs-viewer-header-side-right {
      justify-content: flex-end;
    }

    .docs-viewer-back {
      width: 42px;
      min-width: 42px;
      height: 42px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      border-color: rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.045);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .docs-viewer-back svg {
      width: 18px;
      height: 18px;
      display: block;
      stroke: currentColor;
    }

    .docs-viewer-header-main {
      min-width: 0;
      display: grid;
      gap: 4px;
      justify-items: center;
      text-align: center;
      padding: 2px 0;
    }

    .docs-viewer-kicker {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(238, 242, 248, 0.42);
      line-height: 1;
    }

    .docs-viewer-title {
      width: 100%;
      min-width: 0;
      font-size: 18px;
      font-weight: 760;
      line-height: 1.2;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      letter-spacing: -0.02em;
    }

    .docs-viewer-status {
      min-width: 0;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 8px;
    }

    .docs-viewer-status:empty {
      display: none;
    }

    .docs-viewer-status-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      padding: 6px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.045);
      border: 1px solid rgba(255, 255, 255, 0.06);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
      font-variant-numeric: tabular-nums;
      color: rgba(238, 242, 248, 0.74);
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
    }

    .docs-viewer-body {
      flex: 1;
      min-height: 0;
      min-width: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      position: relative;
      background: #0b0e18;
    }

    .docs-viewer-media-wrap {
      flex: 1;
      min-height: 0;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      display: flex;
      align-items: center;
      justify-content: center;
      padding:
        12px
        calc(12px + env(safe-area-inset-right))
        calc(18px + env(safe-area-inset-bottom))
        calc(12px + env(safe-area-inset-left));
    }

    .docs-image-scroll {
      flex: 1;
      min-height: 0;
      min-width: 0;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-y: contain;
      overscroll-behavior-x: contain;
      touch-action: pan-x pan-y pinch-zoom;
      padding:
        12px
        calc(12px + env(safe-area-inset-right))
        calc(20px + env(safe-area-inset-bottom))
        calc(12px + env(safe-area-inset-left));
      background: #0b0e18;
    }

    .docs-image-scale-wrap {
      position: relative;
      width: 100%;
      min-width: 100%;
      min-height: 100%;
    }

    .docs-docx-scroll {
      flex: 1;
      min-height: 0;
      min-width: 0;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-y: contain;
      overscroll-behavior-x: contain;
      touch-action: pan-x pan-y pinch-zoom;
      padding:
        12px
        calc(12px + env(safe-area-inset-right))
        calc(20px + env(safe-area-inset-bottom))
        calc(12px + env(safe-area-inset-left));
      background: #e8edf4;
    }

    .docs-docx-scale-wrap {
      position: relative;
      width: 100%;
      min-width: 100%;
      min-height: 100%;
    }

    .docs-docx-page {
      width: min(100%, 840px);
      min-height: 100%;
      margin: 0 auto;
      padding: clamp(18px, 5vw, 44px);
      color: #171c2b;
      background: #ffffff;
      border: 1px solid rgba(20, 25, 42, 0.12);
      border-radius: 8px;
      box-shadow: 0 12px 34px rgba(10, 16, 30, 0.16);
      font-family: "Times New Roman", Georgia, serif;
      font-size: 16px;
      line-height: 1.45;
      transform-origin: 0 0;
    }

    .docs-docx-page.is-live-zoom {
      will-change: transform;
    }

    .docs-docx-paragraph {
      margin: 0 0 10px;
      color: inherit;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .docs-docx-paragraph.is-heading {
      margin-top: 16px;
      margin-bottom: 12px;
      font-size: 18px;
      font-weight: 700;
    }

    .docs-docx-paragraph.is-centered {
      text-align: center;
    }

    .docs-docx-paragraph.is-right {
      text-align: right;
    }

    .docs-docx-paragraph.is-numbered {
      margin-top: 8px;
    }

    .docs-docx-gap {
      height: 10px;
    }

    .docs-docx-underline {
      text-decoration: underline;
    }

    .docs-docx-tab {
      display: inline-block;
      width: 2em;
    }

    .docs-docx-table-wrap {
      width: 100%;
      overflow-x: auto;
      margin: 12px 0;
    }

    .docs-docx-table {
      width: 100%;
      border-collapse: collapse;
      color: #171c2b;
      font-size: 15px;
      line-height: 1.35;
    }

    .docs-docx-table td {
      border: 1px solid rgba(20, 25, 42, 0.34);
      padding: 7px 8px;
      vertical-align: top;
    }

    .docs-docx-table .docs-docx-paragraph {
      margin-bottom: 6px;
    }

    .docs-docx-table .docs-docx-paragraph:last-child {
      margin-bottom: 0;
    }

    .docs-pdf-scroll {
      flex: 1;
      min-height: 0;
      min-width: 0;
      overflow-y: auto;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-y: contain;
      overscroll-behavior-x: contain;
      touch-action: pan-x pan-y pinch-zoom;
      padding:
        12px
        calc(12px + env(safe-area-inset-right))
        calc(18px + env(safe-area-inset-bottom))
        calc(12px + env(safe-area-inset-left));
    }

    .docs-pdf-list {
      display: grid;
      gap: 12px;
      width: 100%;
      min-width: 100%;
      align-content: start;
      transform-origin: 0 0;
    }

    .docs-pdf-list.is-live-zoom {
      will-change: transform;
    }

    .docs-pdf-page {
      width: 100%;
      position: relative;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.10);
      background: rgba(18, 21, 43, 0.48);
      overflow: hidden;
      min-height: 180px;
      box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
    }

    .docs-pdf-canvas-wrap {
      width: 100%;
      display: none;
      justify-content: center;
      align-items: flex-start;
      background: #ffffff;
    }

    .docs-pdf-page.is-rendered .docs-pdf-canvas-wrap {
      display: flex;
    }

    .docs-viewer-canvas {
      display: block;
      width: 100%;
      height: auto;
      flex: 0 0 auto;
      background: #ffffff;
      opacity: 0;
      transition: opacity 0.2s ease;
    }

    .docs-pdf-page.is-rendered .docs-viewer-canvas {
      opacity: 1;
    }

    .docs-pdf-placeholder {
      width: 100%;
      padding-top: 141.4%;
      background:
        linear-gradient(110deg, rgba(255,255,255,0.03) 28%, rgba(255,255,255,0.1) 44%, rgba(255,255,255,0.03) 60%),
        rgba(14, 16, 36, 0.74);
      background-size: 200% 100%;
      animation: docs-pdf-shimmer 1.2s linear infinite;
    }

    @keyframes docs-pdf-shimmer {
      to { background-position: -200% 0; }
    }

    .docs-pdf-page.is-rendered .docs-pdf-placeholder {
      display: none;
    }

    .docs-pdf-page-error {
      display: none;
      padding: 12px 14px;
      color: #ff8d8d;
      font-size: 13px;
      line-height: 1.45;
      background: rgba(255, 120, 120, 0.08);
      border-top: 1px solid rgba(255, 120, 120, 0.16);
    }

    .docs-pdf-page.is-error .docs-pdf-placeholder {
      display: none;
    }

    .docs-pdf-page.is-error .docs-pdf-page-error {
      display: block;
    }

    .docs-viewer-image {
      display: block;
      max-width: 100%;
      height: auto;
      border-radius: 10px;
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
      background: #ffffff;
    }

    .docs-viewer-image-zoomable {
      width: min(100%, 1200px);
      margin: 0 auto;
      transform-origin: 0 0;
      will-change: transform;
    }

    .docs-viewer-loading-block {
      width: min(100%, 320px);
      margin: auto;
      display: grid;
      gap: 12px;
      justify-items: center;
    }

    .docs-viewer-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: var(--sub);
      font-size: 14px;
      text-align: center;
    }

    .docs-viewer-loading-progress {
      position: relative;
      width: 100%;
      height: 6px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .docs-viewer-loading-progress span {
      display: block;
      width: 42%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, rgba(56, 189, 248, 0.38), rgba(56, 189, 248, 0.95));
      box-shadow: 0 0 14px rgba(56, 189, 248, 0.24);
      animation: docsViewerProgressSlide 1.15s ease-in-out infinite;
    }

    .docs-viewer-loading-note {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
      text-align: center;
      text-wrap: balance;
      max-width: 28ch;
      margin: 0 auto;
      justify-self: center;
    }

    @keyframes docsViewerProgressSlide {
      0% {
        transform: translateX(-115%);
      }
      100% {
        transform: translateX(250%);
      }
    }

    .docs-viewer-error {
      color: #ff8888;
      font-size: 14px;
      font-weight: 600;
      text-align: center;
      margin: auto;
      padding: 20px;
      line-height: 1.45;
      max-width: 320px;
      background: rgba(255, 120, 120, 0.08);
      border: 1px solid rgba(255, 120, 120, 0.2);
      border-radius: 14px;
      text-wrap: balance;
    }

    @media (max-width: 640px) {
      .docs-viewer-header {
        padding:
          max(8px, env(safe-area-inset-top), var(--safe-top))
          calc(12px + env(safe-area-inset-right))
          10px
          calc(12px + env(safe-area-inset-left));
        gap: 10px;
        min-height: 66px;
        grid-template-columns: minmax(64px, auto) minmax(0, 1fr) minmax(86px, auto);
      }

      .docs-viewer-back {
        width: 40px;
        min-width: 40px;
        height: 40px;
      }

      .docs-viewer-kicker {
        font-size: 9px;
      }

      .docs-viewer-title {
        font-size: 16px;
      }

      .docs-viewer-status {
        gap: 6px;
      }

      .docs-viewer-status-pill {
        min-height: 30px;
        padding: 5px 10px;
        font-size: 11px;
      }
    }

    .docs-viewer-error-meta {
      display: block;
      margin-top: 8px;
      font-size: 12px;
      opacity: 0.75;
      font-weight: 500;
      word-break: break-word;
    }

    @media (max-width: 480px) {
      .docs-docx-scroll {
        padding-left: calc(10px + env(safe-area-inset-left));
        padding-right: calc(10px + env(safe-area-inset-right));
      }

      .docs-docx-page {
        padding: 16px;
        font-size: 15px;
      }

      .docs-pdf-scroll {
        padding-left: calc(10px + env(safe-area-inset-left));
        padding-right: calc(10px + env(safe-area-inset-right));
      }

      .docs-pdf-list {
        gap: 10px;
      }
    }

    /* ── Docs items ── */
    .docs-item {
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008)), var(--card);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
      padding: 13px 15px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s, background 0.16s ease, color 0.16s ease;
      box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
      -webkit-tap-highlight-color: transparent;
    }

    .docs-item:hover {
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
      transform: translateY(-1px);
    }

    .docs-item:active {
      border-color: var(--border-hi);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0.016)), var(--card);
      transform: translateY(1px);
    }

    .docs-item:focus-visible {
      outline: 2px solid rgba(91, 210, 255, 0.9);
      outline-offset: 2px;
      border-color: rgba(91, 210, 255, 0.28);
      box-shadow: 0 0 0 1px rgba(91, 210, 255, 0.1), 0 10px 22px rgba(0, 0, 0, 0.14);
    }

    .docs-item.is-loading {
      pointer-events: none;
      opacity: 0.78;
      cursor: progress;
      border-color: rgba(91, 210, 255, 0.22);
      box-shadow: 0 0 0 1px rgba(91, 210, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.14);
    }

    .docs-item.is-downloaded {
      border-color: rgba(74, 222, 128, 0.28);
    }

    .docs-item.is-downloaded .docs-item-action {
      color: #4ADE80;
    }

    .docs-item.is-online-only .docs-item-action {
      color: #F59E0B;
    }

    .docs-item-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .file-icon-wrap {
      width: 48px;
      height: 48px;
      border-radius: 13px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .icon-pdf     { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.20); }
    .icon-doc     { background: rgba(56, 189, 248, 0.10); border: 1px solid rgba(56, 189, 248, 0.18); }
    .icon-xls     { background: rgba(74, 222, 128, 0.10); border: 1px solid rgba(74, 222, 128, 0.18); }
    .icon-img     { background: rgba(167, 139, 250, 0.10); border: 1px solid rgba(167, 139, 250, 0.18); }
    .icon-default { background: rgba(136, 146, 164, 0.08); border: 1px solid rgba(136, 146, 164, 0.14); }

    .docs-item-body,
    .docs-item-info {
      flex: 1;
      min-width: 0;
    }

    .docs-item-title,
    .docs-item-name {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 3px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: normal;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.35;
      max-height: calc(1.35em * 2);
    }

    .docs-item-subtitle {
      font-size: 12px;
      line-height: 1.4;
      color: rgba(238, 242, 248, 0.7);
      margin-bottom: 5px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: normal;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    .docs-item-meta {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-wrap: wrap;
      font-size: 11px;
      color: rgba(238, 242, 248, 0.54);
      line-height: 1.35;
    }

    .docs-item-meta > span {
      white-space: nowrap;
    }

    .docs-download-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      padding: 0;
      border-radius: var(--r-pill);
      border: 1px solid transparent;
    }

    .docs-download-icon svg {
      width: 13px;
      height: 13px;
      display: block;
    }

    .docs-download-icon.is-downloaded {
      color: #4ADE80;
      background: rgba(74, 222, 128, 0.12);
      border: 1px solid rgba(74, 222, 128, 0.28);
    }

    .docs-download-icon.is-online-only {
      color: #F59E0B;
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.28);
    }

    .file-size {
      font-variant-numeric: tabular-nums;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 2px 7px;
      border-radius: var(--r-pill);
      font-size: 10px;
      font-weight: 700;
      font-family: 'Golos Text', system-ui, sans-serif;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .badge-pdf     { background: rgba(239, 68, 68, 0.12); color: #F87171; }
    .badge-doc     { background: rgba(56, 189, 248, 0.10); color: #38BDF8; }
    .badge-xls     { background: rgba(74, 222, 128, 0.10); color: #4ADE80; }
    .badge-img     { background: rgba(167, 139, 250, 0.10); color: #A78BFA; }
    .badge-default { background: rgba(136, 146, 164, 0.08); color: #8892A4; }

    .docs-item-action {
      color: rgba(238, 242, 248, 0.56);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: transform 0.16s ease, color 0.16s ease, opacity 0.16s ease;
    }

    .docs-item:hover .docs-item-action,
    .docs-item:focus-visible .docs-item-action {
      color: rgba(238, 242, 248, 0.82);
      transform: translateX(2px);
    }

    .docs-item.is-downloaded:focus-visible .docs-item-action {
      color: #4ADE80;
    }

    .docs-item.is-loading .docs-item-action {
      opacity: 0.72;
      animation: docsItemArrowPulse 0.8s ease-in-out infinite alternate;
    }

    .docs-item-action svg {
      width: 16px;
      height: 16px;
      display: block;
    }

    @keyframes docsItemArrowPulse {
      from { transform: translateX(0); }
      to { transform: translateX(3px); }
    }

    .docs-loading,
    .docs-empty-state {
      padding: 32px 18px;
      text-align: center;
      color: var(--sub);
      font-size: 14px;
      line-height: 1.55;
      border-radius: 18px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.01)), var(--card-hi);
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
      max-width: 360px;
      margin: 0 auto;
      text-wrap: balance;
    }

    .docs-empty-icon {
      width: 44px;
      height: 44px;
      margin: 0 auto 12px;
      color: rgba(136, 146, 164, 0.7);
    }

    .docs-empty-icon svg {
      display: block;
      width: 100%;
      height: 100%;
    }

    .docs-loading {
      display: grid;
      justify-items: center;
      gap: 10px;
      color: rgba(238, 242, 248, 0.72);
    }

    .docs-loading-spinner {
      width: 20px;
      height: 20px;
      border-radius: 999px;
      border: 2px solid rgba(56, 189, 248, 0.14);
      border-top-color: rgba(56, 189, 248, 0.96);
      animation: docsListSpinner 0.9s linear infinite;
      flex-shrink: 0;
    }

    .docs-empty-state-muted {
      padding-top: 24px;
      padding-bottom: 24px;
    }

    .docs-empty-title {
      font-weight: 700;
      color: var(--text);
      margin-bottom: 6px;
    }

    .docs-empty-text {
      color: rgba(238, 242, 248, 0.66);
      max-width: 30ch;
      margin: 0 auto;
      text-wrap: balance;
    }

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

    .docs-upload-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      height: 44px;
      padding: 0 16px;
      border-radius: var(--r-inner);
      background: var(--accent-dim);
      border: 1px solid rgba(56, 189, 248, 0.2);
      color: var(--accent);
      font-family: 'Golos Text', system-ui, sans-serif;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      margin-top: 14px;
      -webkit-tap-highlight-color: transparent;
    }

    /* ── Toast ── */
    .app-toast {
      --toast-border: rgba(82, 215, 130, 0.42);
      --toast-bg: rgba(12, 20, 30, 0.96);
      --toast-color: #e9fff0;
      --toast-icon-border: rgba(102, 235, 146, 0.62);
      --toast-icon-bg: rgba(72, 196, 114, 0.22);
      --toast-icon-color: #7cffae;
      position: fixed;
      top: calc(var(--safe-top) + 12px);
      left: 50%;
      transform: translateX(-50%) translateY(-12px);
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 14px;
      border-radius: 999px;
      border: 1px solid var(--toast-border);
      background: var(--toast-bg);
      color: var(--toast-color);
      font-size: 13px;
      font-weight: 700;
      line-height: 1.25;
      letter-spacing: 0.01em;
      opacity: 0;
      pointer-events: none;
      white-space: normal;
      max-width: min(94vw, 360px);
      text-align: center;
      box-shadow: 0 8px 26px rgba(0, 0, 0, 0.38);
      transition: opacity 0.22s ease, transform 0.22s ease;
      z-index: calc(var(--layer-overlay) + 3);
    }

    .app-toast.is-visible {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .app-toast-icon {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--toast-icon-border);
      background: var(--toast-icon-bg);
      color: var(--toast-icon-color);
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
    }

    .app-toast.app-toast-tone-success {
      --toast-border: rgba(82, 215, 130, 0.42);
      --toast-icon-border: rgba(102, 235, 146, 0.62);
      --toast-icon-bg: rgba(72, 196, 114, 0.22);
      --toast-icon-color: #7cffae;
      --toast-color: #e9fff0;
    }

    .app-toast.app-toast-tone-info {
      --toast-border: rgba(56, 189, 248, 0.42);
      --toast-icon-border: rgba(56, 189, 248, 0.58);
      --toast-icon-bg: rgba(56, 189, 248, 0.2);
      --toast-icon-color: #6ad9ff;
      --toast-color: #e6f7ff;
    }

    .app-toast.app-toast-tone-neutral {
      --toast-border: rgba(148, 163, 184, 0.42);
      --toast-icon-border: rgba(148, 163, 184, 0.6);
      --toast-icon-bg: rgba(148, 163, 184, 0.2);
      --toast-icon-color: #d6dee8;
      --toast-color: #f1f5f9;
    }

    .app-toast.app-toast-tone-danger {
      --toast-border: rgba(248, 113, 113, 0.44);
      --toast-icon-border: rgba(248, 113, 113, 0.62);
      --toast-icon-bg: rgba(248, 113, 113, 0.22);
      --toast-icon-color: #ffaaaa;
      --toast-color: #ffe8e8;
    }

    .docs-toast {
      position: fixed;
      bottom: calc(var(--bottom-nav-height) + 16px);
      left: 50%;
      transform: translateX(-50%) translateY(12px);
      background: var(--card-hi);
      border: 1px solid var(--border-hi);
      border-radius: var(--r-pill);
      padding: 8px 16px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s, transform 0.2s;
      z-index: var(--layer-overlay);
    }

    .docs-toast.is-visible,
    .docs-toast.docs-toast-show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .docs-toast.docs-toast-ok {
      border-color: rgba(82, 215, 130, 0.4);
      background: rgba(20, 40, 30, 0.96);
    }

/* Shifts / edit sheets */
.shifts-sheet {
  display: grid;
  gap: 0;
  padding-top: 10px;
}

.edit-shift-sheet {
  display: grid;
  gap: 0;
  padding-top: 10px;
}

.edit-shift-handle-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0 12px;
  margin-bottom: 2px;
  pointer-events: none;
}

.edit-shift-handle {
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.edit-shift-mount > .form-section {
  margin-bottom: 0;
}

.shifts-sheet-handle-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0 12px;
  margin-bottom: 2px;
  pointer-events: none;
}

.shifts-sheet-handle {
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.shifts-month-nav {
  margin-bottom: 18px;
}

.shifts-sheet-actions {
  display: flex;
  justify-content: center;
  padding: 4px 0 calc(8px + var(--safe-bottom));
}

.shifts-sheet-close-btn {
  width: min(100%, 420px);
}
