    /* ── Shifts Section ── */
    .shifts-section {
      margin-bottom: 20px;
      padding: 16px;
      border-radius: var(--r-card);
      background: var(--card);
      border: 1px solid var(--border);
      overflow: visible;
    }

    #shiftsList {
      display: grid;
      gap: 10px;
    }

    .section-header {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 12px;
    }

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

    .shifts-overview-chip {
      background: var(--card-hi);
      border: 1px solid var(--border);
      border-radius: var(--r-inner);
      padding: 10px 12px;
      display: grid;
      gap: 3px;
    }

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

    .shifts-overview-label {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .shifts-overview-value {
      font-family: 'JetBrains Mono', monospace;
      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: var(--card-hi);
      border: 1px solid var(--border);
      border-radius: var(--r-inner);
      padding: 32px 18px;
      text-align: center;
      color: var(--sub);
      font-size: 14px;
    }

    /* ── Rest gap indicator ── */
    .shift-rest-gap {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 10px 4px 10px;
      color: var(--sub);
      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, var(--border), transparent);
    }

    .shift-rest-gap-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      padding: 3px 8px;
      border-radius: var(--r-pill);
      border: 1px solid var(--border);
      background: var(--card-hi);
      color: var(--sub);
    }

    .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: var(--card);
      border: 1px solid var(--border);
      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;
      position: relative;
      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);
    }

    .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 card layout ── */
    .shift-info { flex: 1; min-width: 0; }

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

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

    .shift-type {
      font-size: 15px;
      font-weight: 700;
      line-height: 1.2;
      color: var(--text);
      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;
      flex-shrink: 0;
      color: var(--sub);
    }

    .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: var(--sub);
      font-weight: 500;
      min-width: 0;
    }

    .shift-direction-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--muted);
    }

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

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

    .shift-datetime-line {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 5px;
      min-width: 0;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      line-height: 1.35;
      color: var(--sub);
      font-variant-numeric: tabular-nums;
    }

    .shift-datetime-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--muted);
    }

    .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;
      gap: 4px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 600;
      color: var(--sub);
      line-height: 1.3;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
      padding: 0;
      border-radius: 0;
      background: none;
      border: none;
    }

    .shift-duration-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--muted);
    }

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

    .shift-tech-line {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      column-gap: 5px;
      row-gap: 3px;
      font-size: 11px;
      line-height: 1.4;
      color: var(--muted);
      min-width: 0;
      font-variant-numeric: tabular-nums;
    }

    .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: var(--muted);
    }

    .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: var(--muted);
      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: var(--muted);
    }

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

    .shift-fuel-note strong {
      color: var(--sub);
      font-family: 'JetBrains Mono', monospace;
      font-weight: 600;
      margin-left: 0;
    }

    .shift-tech-sep {
      color: var(--muted);
      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 var(--border);
      padding-top: 10px;
      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: 'Manrope', 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: 11px;
      color: var(--sub);
      font-weight: 600;
      letter-spacing: 0.01em;
    }

    .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: var(--muted);
    }

    .shift-income-row-label-text {
      min-width: 0;
      white-space: nowrap;
    }

    /* Income value — always green */
    .shift-income-chip {
      font-family: 'JetBrains Mono', monospace;
      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-schedule {
      display: grid;
      justify-items: center;
      gap: 5px;
      padding: 2px 0 0;
      background: transparent;
      border: none;
    }

    .shift-schedule-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-width: 0;
    }

    .shift-schedule-main { justify-content: center; }

    .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: var(--card-hi);
      color: var(--sub);
      font-size: 11px;
      line-height: 1;
      white-space: nowrap;
    }

    .shift-note {
      font-size: 12px;
      color: var(--sub);
      line-height: 1.35;
      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;
      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);
      transform: none;
    }

    .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: 'Manrope', 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-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-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: 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: var(--card-hi);
      border: 1px solid var(--border);
      color: var(--sub);
      width: 34px;
      min-width: 34px;
      height: 34px;
      border-radius: var(--r-inner);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
      transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    }

    .shift-detail-close:active,
    .shift-detail-back-btn:active {
      transform: translateY(1px);
      background: rgba(255, 255, 255, 0.10);
      border-color: var(--border-hi);
    }

    .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: var(--sub);
      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: 14px;
    }

    .shift-detail-section-title {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.03em;
      color: var(--sub);
      text-transform: uppercase;
      margin-bottom: 10px;
    }

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

    .shift-detail-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      padding: 1px 0;
    }

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

    .shift-detail-value {
      color: var(--text);
      font-size: 14px;
      font-weight: 600;
      line-height: 1.3;
      text-align: right;
      flex: 1;
      min-width: 0;
      word-break: break-word;
    }

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

    .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: rgba(7, 8, 20, 0.985);
      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;
      background:
        linear-gradient(180deg, rgba(16, 19, 38, 0.96), rgba(13, 16, 32, 0.94)),
        rgba(11, 13, 28, 0.92);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      padding:
        max(10px, env(safe-area-inset-top), var(--safe-top))
        calc(12px + env(safe-area-inset-right))
        10px
        calc(12px + env(safe-area-inset-left));
      display: flex;
      align-items: center;
      gap: 12px;
      flex-shrink: 0;
      min-height: 56px;
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }

    .docs-viewer-close {
      appearance: none;
      -webkit-appearance: none;
      width: 34px;
      min-width: 34px;
      height: 34px;
      border-radius: 11px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.08);
      color: var(--text);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    }

    .docs-viewer-close:active {
      transform: translateY(1px);
      background: rgba(255, 255, 255, 0.16);
      border-color: rgba(255, 255, 255, 0.24);
    }

    .docs-viewer-close svg {
      width: 17px;
      height: 17px;
      stroke: currentColor;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .docs-viewer-title {
      flex: 1;
      min-width: 0;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.2;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      letter-spacing: -0.01em;
    }

    .docs-viewer-status {
      min-width: 62px;
      text-align: right;
      font-size: 12px;
      font-weight: 600;
      color: rgba(238, 242, 248, 0.66);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    .docs-viewer-status:empty {
      visibility: hidden;
    }

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

    .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(16px + env(safe-area-inset-bottom))
        calc(12px + env(safe-area-inset-left));
    }

    .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-loading {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--sub);
      font-size: 14px;
      margin: auto;
    }

    .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;
    }

    .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-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: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--r-inner);
      padding: 14px 16px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: border-color 0.15s;
      -webkit-tap-highlight-color: transparent;
    }

    .docs-item:active { border-color: var(--border-hi); }

    .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: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .docs-item-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      font-size: 11px;
      color: var(--sub);
    }

    .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: 'Manrope', 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: var(--sub);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

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

    .docs-empty-state {
      padding: 32px 18px;
      text-align: center;
      color: var(--sub);
      font-size: 14px;
    }

    .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: 'Manrope', 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;
      letter-spacing: 0.01em;
      opacity: 0;
      pointer-events: none;
      white-space: nowrap;
      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);
    }
