﻿    /* ── Stats Grid ── */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 20px;
    }

    .stat-card {
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(17, 20, 39, 0.66);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 20px;
      padding: 14px 14px 12px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      box-shadow: 0 14px 28px rgba(6, 9, 18, 0.22), inset 0 1px 0 rgba(255,255,255,0.05);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      overflow: visible;
    }

    .stat-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 16px 34px rgba(6, 9, 18, 0.28), inset 0 1px 0 rgba(255,255,255,0.07);
    }

    .stat-label {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 500;
    }

    .stat-value {
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.2;
    }

    .stat-value.overtime { color: var(--warn); }
    .stat-value.ok { color: var(--success); }
    .stat-value.remaining { color: var(--text-muted); }
    .stat-value.night { color: var(--accent); }
    .stat-value.holiday { color: var(--success); }

    /* ── Form ── */
    .form-section {
      background:
        radial-gradient(circle at 14% 0%, rgba(82, 215, 255, 0.08), transparent 24%),
        radial-gradient(circle at 92% 8%, rgba(234, 114, 255, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(17, 20, 39, 0.64);
      backdrop-filter: blur(26px);
      -webkit-backdrop-filter: blur(26px);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 32px;
      padding: 24px 20px 20px;
      margin-bottom: 18px;
      box-shadow:
        0 24px 54px rgba(6, 9, 18, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
      transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
      overflow: visible;
    }

    .form-section.is-adding {
      border-color: rgba(124, 109, 240, 0.42);
      box-shadow: 0 0 0 1px rgba(124, 109, 240, 0.14), 0 18px 38px rgba(124, 109, 240, 0.08), 0 24px 54px rgba(6, 9, 18, 0.30);
    }

    .form-section.is-editing {
      border-color: rgba(247, 185, 85, 0.7);
      box-shadow: 0 0 0 1px rgba(247, 185, 85, 0.16), 0 18px 38px rgba(247, 185, 85, 0.08), 0 24px 54px rgba(6, 9, 18, 0.30);
    }

    .form-section.add-pulse {
      animation: addPulse 0.7s ease;
    }

    .form-title {
      font-size: 18px;
      font-weight: 900;
      margin-bottom: 4px;
      letter-spacing: -0.03em;
      line-height: 1.15;
    }

    .form-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 6px;
    }

    .form-stage {
      background:
        radial-gradient(circle at 12% 0%, rgba(141, 124, 255, 0.10), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
        rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 26px;
      padding: 16px;
      margin-bottom: 14px;
      display: grid;
      gap: 14px;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 10px 28px rgba(6, 9, 18, 0.14);
    }

    .form-stage-head {
      display: grid;
      gap: 4px;
      margin-bottom: 14px;
    }

    .form-stage-kicker {
      font-size: 16px;
      font-weight: 800;
      color: var(--text);
      line-height: 1.3;
    }

    .form-stage-title {
      font-size: 12px;
      font-weight: 400;
      color: rgba(244, 247, 255, 0.58);
      line-height: 1.35;
    }

    .edit-badge {
      display: none;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      color: #ffe1a0;
      background: linear-gradient(135deg, rgba(247, 185, 85, 0.18), rgba(255,255,255,0.04));
      border: 1px solid rgba(247, 185, 85, 0.22);
      white-space: nowrap;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    }

    .edit-badge.visible { display: inline-flex; }

    .form-hint {
      font-size: 12px;
      color: rgba(244, 247, 255, 0.62);
      margin-bottom: 16px;
      line-height: 1.55;
    }

    .field {
      margin-bottom: 0;
      padding: 0;
      border-radius: 0;
      background: transparent;
      border: none;
      box-shadow: none;
      display: grid;
      gap: 8px;
    }

    .field label {
      display: block;
      font-size: 13px;
      color: rgba(244, 247, 255, 0.68);
      margin-bottom: 0;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 700;
    }

    .datetime-row {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 12px;
    }

    .field input[type="date"],
    .field input[type="time"] {
      width: 100%;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
        rgba(18, 21, 43, 0.70);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 18px;
      color: var(--text);
      font-size: 15px;
      padding: 13px 14px;
      outline: none;
      -webkit-appearance: none;
      appearance: none;
      transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
      min-height: 44px;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 10px 18px rgba(6, 9, 18, 0.12);
    }

    .field input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(141, 124, 255, 0.18), 0 14px 24px rgba(141, 124, 255, 0.08);
      transform: translateY(-1px);
    }

    input,
    textarea,
    select {
      scroll-margin-top: 16px;
      scroll-margin-bottom: var(--keyboard-focus-scroll-bottom);
    }

    .field input::-webkit-calendar-picker-indicator {
      filter: invert(0.6);
      cursor: pointer;
    }

    .field-error {
      font-size: 12px;
      color: var(--danger);
      margin-top: 4px;
      min-height: 0;
    }

    .field-error:empty { display: none; }

    .input-error { border-color: var(--danger) !important; }

    .draft-stats-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0;
      margin: 0;
      padding: 10px 14px 12px;
      border-radius: 22px;
      background:
        radial-gradient(circle at 14% 0%, rgba(141, 124, 255, 0.10), transparent 24%),
        radial-gradient(circle at 90% 100%, rgba(82, 215, 255, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)),
        rgba(18, 21, 43, 0.68);
      border: 1px solid rgba(255,255,255,0.08);
      backdrop-filter: blur(22px);
      -webkit-backdrop-filter: blur(22px);
      box-shadow: 0 18px 36px rgba(6, 9, 18, 0.22), inset 0 1px 0 rgba(255,255,255,0.05);
    }

    .form-stage-summary {
      margin-bottom: 16px;
    }

    .form-actions {
      display: grid;
      gap: 10px;
      margin-top: 18px;
    }

    .form-actions .btn-link {
      width: auto;
      margin-top: 0;
      padding-top: 4px;
    }

    .draft-stat {
      position: relative;
      padding: 6px 10px 7px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      min-height: 66px;
      min-width: 0;
    }

    .draft-stat + .draft-stat {
      padding-left: 14px;
    }

    .draft-stat + .draft-stat::before {
      content: '';
      position: absolute;
      left: 0;
      top: 12px;
      bottom: 12px;
      width: 1px;
      background: linear-gradient(180deg, transparent, rgba(255,255,255,0.08), transparent);
    }

    .draft-stat-value {
      font-size: clamp(17px, 4.6vw, 22px);
      font-weight: 900;
      line-height: 1;
      letter-spacing: -0.03em;
      color: #fff;
      min-width: 0;
      max-width: 100%;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: clip;
      font-variant-numeric: tabular-nums;
      text-shadow: 0 10px 28px rgba(0, 0, 0, 0.20);
    }

    .draft-stat-value.night { color: #c6a4ff; }
    .draft-stat-value.holiday { color: #7ef0cf; }

    .draft-stats-grid .stat-label {
      font-size: 11px;
      color: rgba(244, 247, 255, 0.58);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 700;
      text-align: center;
    }

    .optional-section-title {
      font-size: 12px;
      color: rgba(244, 247, 255, 0.6);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 700;
      margin: 6px 0 12px;
    }

    .optional-card {
      background:
        radial-gradient(circle at 12% 0%, rgba(141, 124, 255, 0.10), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
        rgba(18, 21, 43, 0.68);
      backdrop-filter: blur(22px);
      -webkit-backdrop-filter: blur(22px);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 24px;
      margin-bottom: 12px;
      overflow: visible;
      position: relative;
      box-shadow:
        0 16px 32px rgba(6, 9, 18, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.05);
    }

    .optional-details {
      display: block;
    }

    .optional-summary {
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 15px 16px;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }

    .optional-summary::-webkit-details-marker {
      display: none;
    }

    .optional-summary-main {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .optional-summary-title {
      font-size: 16px;
      font-weight: 800;
      line-height: 1.3;
    }

    .optional-summary-subtitle {
      font-size: 12px;
      color: rgba(244, 247, 255, 0.58);
      line-height: 1.35;
    }

    .optional-summary-chevron {
      flex-shrink: 0;
      color: rgba(244, 247, 255, 0.58);
      transition: transform 0.18s ease;
      font-size: 18px;
      line-height: 1;
    }

    .optional-card[open] .optional-summary-chevron {
      transform: rotate(180deg);
    }

    @keyframes optionalExpand {
      from { opacity: 0; transform: translateY(-6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes optionalCollapse {
      from { opacity: 1; transform: translateY(0); }
      to { opacity: 0; transform: translateY(-6px); }
    }

    .optional-card[open] .optional-card-body {
      animation: optionalExpand 0.22s ease forwards;
    }
    .optional-card.is-closing .optional-card-body {
      animation: optionalCollapse 0.18s ease forwards;
      pointer-events: none;
    }

    .optional-card-body {
      padding: 0 16px 16px;
      position: relative;
      z-index: 1;
    }

    #optionalRouteCard .optional-card-body {
      padding: 12px 16px 16px;
    }

    .optional-grid {
      display: grid;
      gap: 10px;
      padding-top: 10px;
    }

    .optional-card[open] .optional-summary {
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .optional-grid-two {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-segmented {
      margin-top: 12px;
      margin-bottom: 12px;
      padding: 4px;
      gap: 4px;
      border-radius: 16px;
    }

    .route-segmented .segmented-btn {
      padding: 10px 12px;
      border-radius: inherit;
    }

    .route-segmented .segmented-btn + .segmented-btn {
      border-left: none;
    }

    .route-segmented .segmented-btn.active {
      border-radius: inherit;
    }

    .glass-select {
      position: relative;
      min-width: 0;
      overflow: visible;
      z-index: var(--layer-surface);
    }

    .glass-select-trigger {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03)),
        rgba(18, 21, 43, 0.72);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 18px;
      color: var(--text);
      font-size: 15px;
      min-height: 48px;
      padding: 13px 14px;
      cursor: pointer;
      text-align: left;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 10px 18px rgba(6, 9, 18, 0.10);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    }

    .glass-select-trigger:active {
      transform: translateY(1px);
    }

    .glass-select-trigger.is-open {
      border-color: rgba(141, 124, 255, 0.34);
      box-shadow:
        0 0 0 3px rgba(141, 124, 255, 0.14),
        0 16px 24px rgba(141, 124, 255, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.06);
    }

    .glass-select-value {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 600;
      color: var(--text);
    }

    .glass-select-value.is-placeholder {
      color: var(--text-muted);
      font-weight: 500;
    }

    .glass-select-chevron {
      flex-shrink: 0;
      color: rgba(244, 247, 255, 0.62);
      font-size: 18px;
      line-height: 1;
      transition: transform 0.18s ease, color 0.18s ease;
    }

    .glass-select-trigger.is-open .glass-select-chevron {
      transform: rotate(180deg);
      color: rgba(255,255,255,0.85);
    }

    .glass-select-menu {
      position: fixed;
      left: var(--select-left, 0);
      top: var(--select-top, 0);
      width: var(--select-width, 100%);
      z-index: var(--layer-overlay);
      display: grid;
      gap: 6px;
      padding: 8px;
      border-radius: 20px;
      background:
        radial-gradient(circle at 12% 0%, rgba(141, 124, 255, 0.10), transparent 28%),
        linear-gradient(180deg, rgba(16, 19, 34, 0.96), rgba(13, 16, 29, 0.96));
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow:
        0 24px 44px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.04);
      backdrop-filter: blur(28px) saturate(135%);
      -webkit-backdrop-filter: blur(28px) saturate(135%);
      max-height: var(--select-max-height, 256px);
      overflow: auto;
      transform: translateZ(0);
      pointer-events: auto;
    }

    .glass-select-menu[data-placement="top"] {
      transform-origin: bottom center;
    }

    .glass-select-menu[data-placement="bottom"] {
      transform-origin: top center;
    }

    .glass-select-option {
      border: none;
      background: transparent;
      color: var(--text);
      text-align: left;
      padding: 12px 12px;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s, transform 0.15s, color 0.15s;
    }

    .glass-select-option:hover,
    .glass-select-option.is-active {
      background: rgba(141, 124, 255, 0.14);
      color: #fff;
    }

    .glass-select-option:active {
      transform: translateY(1px);
    }

    .glass-select-option[data-empty="true"] {
      color: var(--text-muted);
      font-weight: 500;
      cursor: default;
      pointer-events: none;
      background: transparent;
    }

    .optional-control {
      width: 100%;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
        rgba(18, 21, 43, 0.70);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 18px;
      color: var(--text);
      font-size: 15px;
      padding: 13px 14px;
      outline: none;
      min-height: 44px;
      -webkit-appearance: none;
      appearance: none;
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 10px 18px rgba(6, 9, 18, 0.10);
    }

    select.optional-control,
    .optional-select {
      padding-right: 40px;
      background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%),
        linear-gradient(to right, transparent, transparent);
      background-position:
        calc(100% - 18px) 56%,
        calc(100% - 12px) 56%,
        calc(100% - 44px) 0.5em;
      background-size: 6px 6px, 6px 6px, 1px 1.8em;
      background-repeat: no-repeat;
    }

    select.optional-control.is-placeholder,
    .optional-select.is-placeholder {
      color: var(--text-muted);
      font-weight: 500;
    }

    select.optional-control:not(.is-placeholder),
    .optional-select:not(.is-placeholder) {
      color: var(--text);
    }

    .optional-control:focus {
      border-color: var(--accent);
      box-shadow:
        0 0 0 3px rgba(141, 124, 255, 0.18),
        0 12px 24px rgba(141, 124, 255, 0.08);
    }

    .optional-card[open] .optional-summary {
      background: rgba(255,255,255,0.03);
    }

    .optional-note {
      margin-top: 10px;
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.45;
    }

    .btn-primary {
      width: 100%;
      background: linear-gradient(135deg, #8d7cff 0%, #ea72ff 100%);
      color: #fff;
      border: none;
      border-radius: 18px;
      font-size: 16px;
      font-weight: 900;
      padding: 15px 16px;
      cursor: pointer;
      min-height: 52px;
      transition: box-shadow 0.18s, transform 0.14s;
      box-shadow:
        0 18px 36px rgba(141, 124, 255, 0.34),
        0 0 0 1px rgba(255,255,255,0.12),
        0 0 30px rgba(234, 114, 255, 0.20);
      letter-spacing: 0.01em;
      -webkit-tap-highlight-color: transparent;
    }

    .btn-primary:active {
      transform: translateY(1px) scale(0.99);
      box-shadow: 0 10px 24px rgba(141, 124, 255, 0.22);
    }
    .btn-primary:disabled { opacity: 0.45; pointer-events: none; }

    .form-success {
      text-align: center;
      color: var(--success);
      font-size: 13px;
      margin-top: 8px;
      min-height: 0;
    }

    .form-success:empty { display: none; }

