    :root {
      --safe-top: max(
        env(safe-area-inset-top, 0px),
        var(--tg-content-safe-area-inset-top, 0px),
        var(--tg-safe-area-inset-top, 0px),
        var(--tg-js-safe-top, 0px)
      );
      --safe-bottom: max(
        env(safe-area-inset-bottom, 0px),
        var(--tg-content-safe-area-inset-bottom, 0px),
        var(--tg-safe-area-inset-bottom, 0px),
        var(--tg-js-safe-bottom, 0px)
      );
      --safe-left: max(
        env(safe-area-inset-left, 0px),
        var(--tg-content-safe-area-inset-left, 0px),
        var(--tg-safe-area-inset-left, 0px),
        var(--tg-js-safe-left, 0px)
      );
      --safe-right: max(
        env(safe-area-inset-right, 0px),
        var(--tg-content-safe-area-inset-right, 0px),
        var(--tg-safe-area-inset-right, 0px),
        var(--tg-js-safe-right, 0px)
      );
    }
    :root, [data-theme="light"], .light {
      --brand: #32a934;
      --brand-hover: #278829;
      --brand-light: rgba(50, 169, 52, 0.09);
      --brand-border: rgba(50, 169, 52, 0.22);
      --bg: #f8f9fa;
      --card-bg: #ffffff;
      --border: #eaecf0;
      --text-primary: #101828;
      --text-secondary: #475467;
      --text-muted: #98a2b3;
      --gray-surface: #f2f4f7;
      --danger: #ff3b30;
      --danger-light: rgba(255, 59, 48, 0.1);
      --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.05), 0 1px 2px rgba(16, 24, 40, 0.03);
    }
    :root[data-theme="dark"], :root.dark, [data-theme="dark"], .dark {
      --brand: #32a934;
      --brand-hover: #278829;
      --brand-light: rgba(50, 169, 52, 0.15);
      --brand-border: rgba(50, 169, 52, 0.35);
      --bg: #121316;
      --card-bg: #1c1d22;
      --border: rgba(255, 255, 255, 0.08);
      --text-primary: #ffffff;
      --text-secondary: rgba(235, 235, 245, 0.65);
      --text-muted: rgba(235, 235, 245, 0.35);
      --gray-surface: #25262c;
      --danger: #ff453a;
      --danger-light: rgba(255, 69, 58, 0.15);
      --shadow-sm: none;
    }
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    body {
      background-color: var(--bg);
      color: var(--text-primary);
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      height: 100vh;
      height: 100dvh;
      overflow: hidden;
      box-sizing: border-box;
      transition: background-color 0.2s ease, color 0.2s ease;
    }
    .top-pinned-bar {
      padding-top: calc(52px + var(--safe-top));
      padding-left: calc(16px + var(--safe-left));
      padding-right: calc(16px + var(--safe-right));
      padding-bottom: 12px;
      background-color: var(--bg);
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      z-index: 10;
    }
    .header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .title {
      font-size: 21px;
      font-weight: 700;
      letter-spacing: -0.4px;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .add-circle-btn {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--brand);
      color: #ffffff;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(50, 169, 52, 0.3);
      flex-shrink: 0;
      transition: transform 0.08s, background-color 0.15s;
    }
    .add-circle-btn:active {
      transform: scale(0.92);
      background: var(--brand-hover);
    }
    .add-circle-btn:disabled,
    .add-circle-btn.disabled {
      opacity: 0.35;
      cursor: not-allowed;
      pointer-events: none;
      box-shadow: none;
    }
    .add-circle-btn.shimmer-effect {
      box-shadow: none;
      border: none;
      pointer-events: none;
      cursor: wait;
    }
    .add-circle-btn.shimmer-effect svg {
      opacity: 0;
    }
    .add-circle-btn svg {
      width: 18px;
      height: 18px;
      stroke: #ffffff;
      fill: none;
    }
    .scrollable-content {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-y: contain;
      padding: 14px 12px;
      padding-bottom: 24px;
    }
    body.modal-open .scrollable-content {
      overflow: hidden !important;
      touch-action: none !important;
      pointer-events: none !important;
    }
    .card {
      background-color: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 20px 18px;
      box-shadow: var(--shadow-sm);
      margin-bottom: 14px;
      transition: background-color 0.2s ease, border-color 0.2s ease;
    }
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      background: var(--brand-light);
      color: var(--brand);
      border: 1px solid var(--brand-border);
      border-radius: 9999px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.2px;
      margin-bottom: 14px;
    }
    .badge-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--brand);
    }
    .content-text {
      font-size: 15px;
      line-height: 1.55;
      color: var(--text-secondary);
      font-weight: 400;
    }
    .choice-card {
      background-color: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px 16px;
      margin-bottom: 12px;
      box-shadow: var(--shadow-sm);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 14px;
      transition: transform 0.08s, border-color 0.12s, background-color 0.2s ease;
    }
    .choice-card:active {
      transform: scale(0.98);
      border-color: var(--brand);
      background-color: var(--brand-light);
    }
    .choice-card-skeleton {
      background-color: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px 16px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 14px;
      box-shadow: var(--shadow-sm);
    }
    .choice-icon {
      width: 32px;
      height: 32px;
      color: var(--brand);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .choice-icon svg {
      width: 28px;
      height: 28px;
      stroke: var(--brand);
      fill: none;
    }
    .choice-info {
      flex: 1;
      min-width: 0;
    }
    .choice-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 3px;
      letter-spacing: -0.2px;
    }
    .choice-desc {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.35;
    }
    .choice-arrow {
      color: var(--text-muted);
      display: flex;
      align-items: center;
    }
    .choice-arrow svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      fill: none;
    }
    .week-nav-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      padding: 2px 4px;
    }
    .week-title-wrap {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .week-range-text {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      letter-spacing: -0.2px;
    }
    .plan-status-pill {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 9999px;
      font-size: 11px;
      font-weight: 600;
    }
    .plan-status-pill.draft {
      background: rgba(255, 149, 0, 0.12);
      color: #ff9500;
      border: 1px solid rgba(255, 149, 0, 0.28);
    }
    .plan-status-pill.submitted {
      background: var(--brand-light);
      color: var(--brand);
      border: 1px solid var(--brand-border);
    }
    .week-progress-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 14px;
      margin-bottom: 14px;
    }
    .week-progress-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }
    .week-progress-label {
      font-size: 13.5px;
      font-weight: 600;
      color: var(--text-secondary);
    }
    .week-progress-count {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .week-progress-bar {
      height: 6px;
      border-radius: 9999px;
      background: var(--gray-surface);
      overflow: hidden;
    }
    .week-progress-fill {
      height: 100%;
      background: var(--brand);
      border-radius: 9999px;
      transition: width 0.3s ease;
    }
    .day-summary-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      padding: 2px 4px 10px;
    }
    .day-summary-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .day-summary-sub {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-muted);
    }
    .day-summary-sub.deficient {
      color: #ff9500;
    }
    .day-summary-sub.success {
      color: var(--brand);
    }
    .week-nav-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: var(--card-bg);
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background-color 0.1s, transform 0.08s;
    }
    .week-nav-btn:active {
      transform: scale(0.92);
      background: var(--gray-surface);
    }
    .week-nav-btn svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
    }
    .days-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 4px;
      width: 100%;
      margin-top: 2px;
      margin-bottom: 14px;
    }
    .day-pill {
      width: 100%;
      height: 58px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--card-bg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
      padding: 5px 1px;
      transition: transform 0.08s, background-color 0.15s, border-color 0.15s, color 0.15s;
    }
    .day-pill:active {
      transform: scale(0.94);
    }
    .day-pill.active {
      background: var(--brand);
      border-color: var(--brand);
      color: #ffffff !important;
      box-shadow: 0 3px 10px rgba(50, 169, 52, 0.3);
    }
    .day-pill.disabled {
      opacity: 0.3;
      pointer-events: none;
      background: var(--gray-surface);
      cursor: not-allowed;
      filter: grayscale(1);
    }
    .day-pill.shimmer-effect {
      border: 1px solid transparent;
      pointer-events: none;
      cursor: wait;
      box-shadow: none;
    }
    .day-pill-name {
      font-size: 10px;
      font-weight: 600;
      color: var(--text-muted);
      letter-spacing: -0.2px;
      margin-bottom: 2px;
    }
    .day-pill.active .day-pill-name {
      color: rgba(255, 255, 255, 0.9);
    }
    .day-pill-num {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .day-pill.active .day-pill-num {
      color: #ffffff;
    }
    .day-pill-dot {
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--brand);
      margin-top: 3px;
    }
    .day-pill.active .day-pill-dot {
      background: #ffffff;
    }
    .day-pill-dot.empty {
      opacity: 0;
    }
    .visits-card-group {
      background: var(--card-bg);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }
    .visit-card {
      background: transparent;
      border: none;
      padding: 14px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      cursor: pointer;
      transition: background-color 0.15s, opacity 0.15s;
    }
    .visit-card:active {
      background: var(--gray-surface);
    }
    .visit-card.is-deleting {
      opacity: 0.5;
      pointer-events: none;
      cursor: not-allowed;
    }
    .visit-card-divider {
      height: 1px;
      background: var(--border);
      margin-left: 16px;
    }
    .visit-card-info {
      flex: 1;
      min-width: 0;
    }
    .visit-card-farmer {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 3px;
    }
    .visit-card-purpose {
      font-size: 13px;
      color: var(--text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.35;
    }
    .visit-card-arrow {
      color: var(--text-muted);
      display: flex;
      align-items: center;
      flex-shrink: 0;
    }
    .visit-card-arrow svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      fill: none;
    }
    .visit-card-spinner {
      width: 18px;
      height: 18px;
      border: 2.5px solid rgba(0, 0, 0, 0.12);
      border-top-color: var(--brand);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      flex-shrink: 0;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    .btn-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255, 255, 255, 0.35);
      border-top-color: #ffffff;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      display: inline-block;
      vertical-align: middle;
      margin-right: 6px;
      flex-shrink: 0;
    }
    .btn-secondary .btn-spinner {
      border: 2px solid rgba(120, 120, 128, 0.25);
      border-top-color: var(--text-primary);
    }
    @keyframes shimmerWave {
      0% {
        background-position: -200% 0;
      }
      100% {
        background-position: 200% 0;
      }
    }
    .shimmer-effect {
      background: linear-gradient(
        90deg,
        var(--gray-surface) 0%,
        var(--border) 50%,
        var(--gray-surface) 100%
      );
      background-size: 200% 100%;
      animation: shimmerWave 1.4s ease-in-out infinite;
    }
    .skeleton-group {
      background-color: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 18px;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }
    .skeleton-row {
      padding: 14px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .skeleton-divider {
      height: 1px;
      background: var(--border);
      margin: 0 16px;
    }
    .skeleton-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .skeleton-line {
      height: 14px;
      border-radius: 6px;
    }
    .skeleton-line.title {
      width: 58%;
      height: 16px;
    }
    .skeleton-line.sub {
      width: 38%;
      height: 12px;
    }
    .skeleton-right {
      width: 14px;
      height: 14px;
      border-radius: 4px;
      flex-shrink: 0;
    }
    .today-header-card {
      background: transparent;
      border: none;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      padding: 4px 2px 16px 2px;
      margin-bottom: 4px;
      box-shadow: none;
    }
    .today-detail-header-card {
      background: transparent;
      border: none;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      padding: 4px 2px 16px 2px;
      margin-bottom: 16px;
      box-shadow: none;
    }
    .today-date-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .today-date-label {
      font-size: 15px;
      font-weight: 700;
      letter-spacing: -0.2px;
      color: var(--text-primary);
    }
    .today-progress-bar {
      width: 100%;
      height: 4px;
      background: var(--gray-surface);
      border-radius: 9999px;
      overflow: hidden;
      margin-bottom: 14px;
    }
    .today-progress-fill {
      height: 100%;
      background: var(--brand);
      border-radius: 9999px;
      transition: width 0.3s ease;
    }
    .today-stats-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      padding-top: 2px;
    }
    .today-stat-item {
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .today-stat-val {
      font-size: 20px;
      font-weight: 700;
      line-height: 1.2;
    }
    .today-stat-sub {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    .text-brand { color: var(--brand); }
    .text-planned { color: #3498db; }
    .today-visit-card {
      background: transparent;
      border: none;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
      padding: 14px 4px;
      margin-bottom: 0;
      box-shadow: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      cursor: pointer;
      transition: background 0.12s ease;
    }
    .today-visit-card:last-child {
      border-bottom: none;
    }
    .today-visit-card:active {
      background: rgba(142, 142, 147, 0.08);
      border-radius: 8px;
    }
    .today-visit-info {
      flex: 1;
      min-width: 0;
    }
    .today-visit-farmer {
      font-size: 15.5px;
      font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      letter-spacing: -0.2px;
    }
    .today-visit-purpose {
      font-size: 13px;
      color: var(--text-secondary);
      margin-top: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .today-visit-contact {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 4px;
    }
    .today-visit-right {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .today-visit-arrow {
      color: var(--text-muted);
      opacity: 0.5;
      display: flex;
      align-items: center;
    }
    .today-visit-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 0;
      background: transparent !important;
      border: none !important;
      font-size: 13px;
      font-weight: 500;
      flex-shrink: 0;
    }
    .today-visit-badge svg {
      flex-shrink: 0;
    }
    .today-visit-badge.done {
      color: #2ecc71;
    }
    .today-visit-badge.pending {
      color: #3498db;
    }
    .today-visit-badge.not_done {
      color: #e74c3c;
    }
    .today-visit-badge.moved {
      color: #f39c12;
    }
    .segmented-control {
      display: flex;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 3px;
      gap: 3px;
    }
    .segmented-btn {
      flex: 1;
      height: 34px;
      background: transparent;
      border: none;
      border-radius: 9px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    }
    .segmented-btn.active {
      background: var(--card-bg);
      color: var(--text-primary);
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }
    .condition-chips-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
    }
    .condition-chip {
      height: 36px;
      border: 1px solid var(--border);
      background: var(--gray-surface);
      border-radius: 10px;
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.15s;
    }
    .condition-chip.active {
      background: var(--brand-light);
      color: var(--brand);
      border-color: var(--brand);
    }
    .form-row-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .photo-upload-container {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .photo-add-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      height: 44px;
      background: var(--gray-surface);
      border: 1px dashed var(--border);
      border-radius: 12px;
      color: var(--text-primary);
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }
    .photo-add-btn:active {
      border-color: var(--brand);
      background: var(--brand-light);
    }
    .photo-add-btn svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
    }
    .photos-preview-strip {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding: 4px 0;
    }
    .photo-preview-item {
      position: relative;
      width: 72px;
      height: 72px;
      border-radius: 12px;
      overflow: hidden;
      flex-shrink: 0;
      border: 1px solid var(--border);
    }
    .photo-preview-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .photo-remove-btn {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.65);
      color: #ffffff;
      border: none;
      font-size: 11px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .sheet-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .sheet-icon-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.08s, background-color 0.15s;
    }
    .sheet-icon-btn:active {
      transform: scale(0.9);
      background: rgba(142, 142, 147, 0.2);
    }
    .sheet-icon-btn.danger {
      color: var(--danger);
      background: var(--danger-light);
      border-color: rgba(255, 59, 48, 0.2);
    }
    .sheet-icon-btn svg {
      width: 15px;
      height: 15px;
      stroke: currentColor;
      fill: none;
    }
    .detail-row {
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }
    .detail-row:last-child {
      border-bottom: none;
    }
    .detail-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.3px;
      margin-bottom: 4px;
    }
    .detail-value {
      font-size: 14.5px;
      color: var(--text-secondary);
      line-height: 1.4;
    }
    .detail-value-strong {
      font-size: 16px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .deficient-notice-box {
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px 14px;
    }
    .deficient-notice-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 2px;
    }
    .deficient-notice-sub {
      font-size: 12.5px;
      color: var(--text-secondary);
      margin-bottom: 6px;
    }
    .deficient-day-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 5px 0;
      font-size: 13px;
      border-top: 1px solid var(--border);
    }
    .deficient-day-name {
      font-weight: 600;
      color: var(--text-primary);
    }
    .deficient-day-count {
      color: var(--danger);
      font-weight: 600;
      font-size: 12.5px;
    }
    .form-textarea {
      width: 100%;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      font-size: 14px;
      color: var(--text-primary);
      outline: none;
      resize: none;
      font-family: inherit;
      box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .form-textarea:focus {
      border-color: var(--brand);
    }
    .form-input.readonly-field,
    .form-textarea.readonly-field {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
      cursor: default;
      -webkit-user-select: text;
      user-select: text;
    }
    .form-input.readonly-field:focus,
    .form-textarea.readonly-field:focus {
      border-color: rgba(255, 255, 255, 0.08);
      outline: none;
      box-shadow: none;
    }
    .condition-chips-grid.readonly-chips .condition-chip:not(.active) {
      opacity: 0.35;
    }
    .segmented-control.readonly-segment .segmented-btn:not(.active) {
      opacity: 0.35;
    }
    .label-req {
      font-size: 11.5px;
      font-weight: 500;
      color: var(--danger);
      margin-left: 4px;
    }
    .label-opt {
      font-size: 11.5px;
      font-weight: 500;
      color: var(--text-muted);
      margin-left: 4px;
    }
    .empty-state-box {
      text-align: center;
      padding: 44px 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .empty-state-icon {
      width: 52px;
      height: 52px;
      border-radius: 16px;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 12px;
      color: var(--text-muted);
    }
    .empty-state-icon svg {
      width: 26px;
      height: 26px;
      stroke: currentColor;
      fill: none;
    }
    .empty-state-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }
    .empty-state-sub {
      font-size: 13px;
      color: var(--text-muted);
      max-width: 250px;
      line-height: 1.4;
    }
    .bottom-pinned-bar {
      padding-top: 12px;
      padding-left: calc(16px + var(--safe-left));
      padding-right: calc(16px + var(--safe-right));
      padding-bottom: calc(14px + var(--safe-bottom));
      background-color: var(--bg);
      border-top: 1px solid var(--border);
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 10;
    }
    body.keyboard-open .bottom-pinned-bar {
      display: none !important;
    }
    .btn {
      width: 100%;
      height: 48px;
      min-height: 48px;
      flex-shrink: 0;
      background: var(--brand);
      color: #ffffff;
      border: none;
      border-radius: 9999px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background-color 0.15s, transform 0.08s;
      box-shadow: 0 2px 8px rgba(50, 169, 52, 0.22);
    }
    .btn:active {
      background: var(--brand-hover);
      transform: scale(0.98);
    }
    .btn:disabled, .btn.disabled {
      opacity: 0.35;
      cursor: not-allowed;
      pointer-events: none;
      background: var(--text-muted);
      box-shadow: none;
    }
    .btn-secondary {
      height: 48px;
      min-height: 48px;
      flex-shrink: 0;
      background: var(--gray-surface);
      color: var(--text-primary);
      border: 1px solid var(--border);
      box-shadow: none;
    }
    .btn-secondary:active {
      background: rgba(142, 142, 147, 0.2);
    }
    .action-pill-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: 9999px;
      font-size: 13px;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: background-color 0.12s, transform 0.08s;
    }
    .action-pill-btn:active {
      transform: scale(0.96);
    }
    .call-btn {
      background: rgba(50, 169, 52, 0.12);
      color: var(--brand);
      border: 1px solid rgba(50, 169, 52, 0.3);
    }
    .call-btn:active {
      background: var(--brand);
      color: #ffffff;
    }
    .call-circle-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #34c759;
      color: #ffffff;
      border: none;
      text-decoration: none;
      cursor: pointer;
      box-shadow: 0 3px 10px rgba(52, 199, 89, 0.35);
      transition: transform 0.12s ease, background 0.12s ease;
      flex-shrink: 0;
    }
    .call-circle-btn:active {
      transform: scale(0.92);
      background: #2cb34f;
    }
    .call-circle-btn svg {
      width: 20px;
      height: 20px;
      stroke: #ffffff;
    }
    .location-btn {
      background: rgba(0, 122, 255, 0.12);
      color: #007aff;
      border: 1px solid rgba(0, 122, 255, 0.3);
    }
    .location-btn:active {
      background: #007aff;
      color: #ffffff;
    }
    .location-circle-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--gray-surface);
      color: var(--text-primary);
      border: 1px solid var(--border);
      text-decoration: none;
      cursor: pointer;
      transition: transform 0.12s ease, background 0.12s ease;
      flex-shrink: 0;
    }
    .location-circle-btn:active {
      transform: scale(0.92);
      background: rgba(142, 142, 147, 0.2);
    }
    .location-circle-btn svg {
      width: 20px;
      height: 20px;
      stroke: var(--text-primary);
    }
    .btn-outline {
      background: transparent;
      color: var(--text-primary);
      border: 1px solid var(--border);
      box-shadow: none;
    }
    .btn-outline:active {
      background: var(--gray-surface);
    }
    .btn-outline-danger {
      background: transparent;
      color: var(--danger);
      border: 1px solid rgba(255, 59, 48, 0.35);
      box-shadow: none;
    }
    .btn-outline-danger:active {
      background: rgba(255, 59, 48, 0.12);
    }
    .btn-danger {
      background: var(--danger);
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(255, 59, 48, 0.25);
    }
    .btn-danger:active {
      background: #d32f2f;
    }
    .detail-sub-form-card {
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
    }
    .sub-form-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 12px;
    }
    .sheet-footer {
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 8px;
    }
    .meta-chip {
      display: inline-flex;
      align-items: center;
      padding: 6px 12px;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      font-size: 13px;
      color: var(--text-secondary);
      margin-top: 14px;
    }

    .sheet-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.45);
      z-index: 100;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateZ(0);
      will-change: opacity;
      touch-action: none;
      transition: opacity 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    }
    .sheet-backdrop.active {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    .sheet-modal {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--card-bg);
      border-top-left-radius: 24px;
      border-top-right-radius: 24px;
      border-top: 1px solid var(--border);
      padding: 12px calc(18px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(18px + var(--safe-left));
      z-index: 101;
      transform: translate3d(0, 100%, 0);
      -webkit-transform: translate3d(0, 100%, 0);
      will-change: transform;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      visibility: hidden;
      pointer-events: none;
      transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s cubic-bezier(0.32, 0.72, 0, 1);
      box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
      max-height: calc(100vh - 80px - var(--safe-top));
      max-height: calc(100dvh - 80px - var(--safe-top));
      display: flex;
      flex-direction: column;
      overscroll-behavior: contain;
      overscroll-behavior-y: contain;
    }
    .sheet-modal.active {
      transform: translate3d(0, 0, 0);
      -webkit-transform: translate3d(0, 0, 0);
      visibility: visible;
      pointer-events: auto;
    }
    .sheet-modal.dragging {
      transition: none !important;
    }
    .sheet-handle {
      width: 36px;
      height: 4px;
      border-radius: 9999px;
      background: var(--text-muted);
      opacity: 0.4;
      margin: 0 auto 12px;
      flex-shrink: 0;
      cursor: grab;
      touch-action: none;
    }
    .sheet-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
      flex-shrink: 0;
    }
    .sheet-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: -0.3px;
    }
    .sheet-close-btn {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .sheet-close-btn svg {
      width: 14px;
      height: 14px;
      stroke: currentColor;
      fill: none;
    }
    .sheet-body {
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      overscroll-behavior: contain;
      overscroll-behavior-y: contain;
      flex: 1 1 auto;
      min-height: 0;
      margin-bottom: 8px;
    }
    .form-group {
      margin-bottom: 14px;
      position: relative;
    }
    .form-label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 6px;
      letter-spacing: -0.1px;
    }
    .form-select, .form-input {
      width: 100%;
      height: 48px;
      min-height: 48px;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 0 14px;
      font-size: 14.5px;
      font-family: inherit;
      color: var(--text-primary);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
      -webkit-appearance: none;
      appearance: none;
      box-sizing: border-box;
    }
    input[type="date"].form-input {
      display: flex;
      align-items: center;
      line-height: 48px;
    }
    .form-select-trigger {
      width: 100%;
      height: 48px;
      min-height: 48px;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 0 14px;
      font-size: 14.5px;
      font-family: inherit;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      box-sizing: border-box;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .form-select-trigger:active {
      border-color: var(--brand);
    }
    .form-select-trigger svg {
      color: var(--text-muted);
    }
    .custom-calendar-card {
      margin-top: 8px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 14px;
      box-shadow: var(--shadow-sm);
    }
    .calendar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .calendar-month-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      letter-spacing: -0.2px;
    }
    .calendar-month-btn {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: var(--gray-surface);
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.08s;
    }
    .calendar-month-btn:active {
      transform: scale(0.92);
    }
    .calendar-month-btn svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
    }
    .calendar-weekdays {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      text-align: center;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-muted);
      margin-bottom: 6px;
    }
    .calendar-days-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 4px;
      text-align: center;
    }
    .cal-day-cell {
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: var(--text-primary);
      border-radius: 50%;
      cursor: pointer;
      transition: background-color 0.1s, transform 0.08s;
      user-select: none;
      -webkit-user-select: none;
    }
    .cal-day-cell:active:not(.disabled) {
      transform: scale(0.9);
    }
    .cal-day-cell.selected {
      background: var(--brand);
      color: #ffffff;
      font-weight: 600;
    }
    .cal-day-cell.disabled {
      color: var(--text-muted);
      opacity: 0.25;
      pointer-events: none;
      cursor: default;
    }
    .cal-day-cell.empty {
      pointer-events: none;
      cursor: default;
    }
    .form-select {
      padding-right: 36px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2398a2b3'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      background-size: 18px;
    }
    .form-select:focus, .form-input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--brand-light);
    }
    .multi-select-trigger {
      width: 100%;
      min-height: 48px;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: border-color 0.15s;
    }
    .multi-select-trigger:active {
      background: rgba(142, 142, 147, 0.15);
    }
    .multi-select-text {
      font-size: 14.5px;
      color: var(--text-primary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1;
      padding-right: 8px;
    }
    .multi-select-text.placeholder {
      color: var(--text-muted);
    }
    .chevron-icon {
      width: 20px;
      height: 20px;
      fill: var(--text-muted);
      flex-shrink: 0;
      transition: transform 0.2s ease;
    }
    .purposes-badge-container {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }
    .purpose-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 14px;
      background: var(--gray-surface);
      color: var(--text-primary);
      border: 1px solid var(--border);
      border-radius: 9999px;
      font-size: 13px;
      font-weight: 500;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      animation: chipFadeIn 0.15s ease;
    }
    @keyframes chipFadeIn {
      from { opacity: 0; transform: scale(0.92); }
      to { opacity: 1; transform: scale(1); }
    }
    .purpose-chip-remove {
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      font-size: 15px;
      font-weight: 400;
      line-height: 1;
      padding-left: 2px;
      transition: color 0.15s ease, transform 0.1s ease;
    }
    .purpose-chip-remove:active {
      color: var(--danger);
      transform: scale(0.9);
    }
    .lang-switch-btn {
      height: 30px;
      padding: 0 10px;
      border-radius: 9999px;
      background: var(--gray-surface);
      border: 1px solid var(--border);
      color: var(--text-primary);
      font-size: 11.5px;
      font-weight: 700;
      letter-spacing: 0.5px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      outline: none;
      transition: background 0.15s, border-color 0.15s;
    }
    .lang-switch-btn:active {
      background: rgba(142, 142, 147, 0.2);
    }
    .popup-dialog-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.72);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 300;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.22s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      box-sizing: border-box;
    }
    .popup-dialog-backdrop.active {
      opacity: 1;
      pointer-events: auto;
    }
    .popup-dialog-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 22px;
      padding: 22px 20px 18px;
      width: 100%;
      max-width: 340px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
      transform: scale(0.92);
      opacity: 0;
      transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.2s ease;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
    }
    .popup-dialog-backdrop.active .popup-dialog-card {
      transform: scale(1);
      opacity: 1;
    }
    .popup-dialog-title {
      font-size: 17px;
      font-weight: 700;
      color: var(--text);
      text-align: center;
      margin-bottom: 12px;
    }
    .popup-dialog-body {
      font-size: 14px;
      line-height: 1.5;
      color: var(--text);
      opacity: 0.92;
      text-align: center;
      margin-bottom: 20px;
      word-break: break-word;
    }
    .popup-dialog-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
    }
    .popup-dialog-actions .btn {
      height: 44px;
      min-height: 44px;
      border-radius: 12px;
      font-size: 15px;
      font-weight: 600;
    }
    .search-box-wrap {
      margin-bottom: 10px;
    }
    .search-input-group {
      background: var(--card-bg);
      border: none;
      border-radius: 14px;
      display: flex;
      align-items: center;
      padding: 0 12px;
      height: 46px;
      box-sizing: border-box;
      transition: background 0.15s ease;
    }
    .search-input-group:focus-within {
      background: var(--card-bg);
    }
    .search-icon {
      width: 18px;
      height: 18px;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .search-input {
      flex: 1;
      border: none;
      background: transparent;
      padding: 0 10px;
      font-size: 14.5px;
      font-family: inherit;
      color: var(--text);
      outline: none;
      box-sizing: border-box;
    }
    .search-clear-btn {
      border: none;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      padding: 0;
      flex-shrink: 0;
    }
    .search-clear-btn svg {
      width: 16px;
      height: 16px;
    }
    .farmers-count-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 8px 4px 10px;
    }
    .farmers-count-badge {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-muted);
    }
    .farmer-card {
      background: var(--card-bg);
      border: none;
      border-radius: 16px;
      padding: 14px 16px;
      margin-bottom: 9px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: transform 0.12s ease, background 0.12s ease;
      box-sizing: border-box;
    }
    .farmer-card:active {
      transform: scale(0.985);
      background: rgba(255, 255, 255, 0.04);
    }
    .farmer-card-main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .farmer-card-name {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .farmer-card-sub {
      font-size: 13px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .farmer-card-meta-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 4px;
      flex-wrap: wrap;
    }
    .farmer-territory-pill,
    .farmer-territory-text {
      font-size: 13px;
      font-weight: 400;
      color: var(--text-muted);
      padding: 0;
      background: none;
    }
    .farmer-status-pill {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 6px;
    }
    .farmer-status-pill.active {
      background: rgba(46, 204, 113, 0.15);
      color: #2ecc71;
    }
    .farmer-card-right {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: 10px;
      flex-shrink: 0;
    }
    .farmer-call-icon-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(46, 204, 113, 0.15);
      border: none;
      color: #2ecc71;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      transition: transform 0.12s ease;
      box-sizing: border-box;
    }
    .farmer-call-icon-btn svg {
      width: 17px;
      height: 17px;
    }
    .farmer-call-icon-btn:active {
      transform: scale(0.9);
    }
    .farmer-card-arrow {
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .farmer-card-arrow svg {
      width: 16px;
      height: 16px;
    }
    .farmer-detail-header-card {
      background: var(--card-bg);
      border: none;
      border-radius: 18px;
      padding: 16px 18px;
      margin-bottom: 12px;
    }
    .farmer-header-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .farmer-detail-name {
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.3;
    }
    .farmer-detail-territory {
      font-size: 13.5px;
      color: var(--text-muted);
      margin-top: 4px;
    }
    .farmer-info-card {
      background: var(--card-bg);
      border: none;
      border-radius: 18px;
      padding: 4px 18px;
      margin-bottom: 16px;
    }
    .farmer-info-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .farmer-info-row:last-child {
      border-bottom: none;
    }
    .farmer-info-icon {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.06);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      flex-shrink: 0;
    }
    .farmer-info-icon svg {
      width: 18px;
      height: 18px;
    }
    .farmer-info-content {
      flex: 1;
      min-width: 0;
    }
    .farmer-info-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
    }
    .farmer-info-value {
      font-size: 14.5px;
      font-weight: 600;
      color: var(--text);
      margin-top: 2px;
      word-break: break-word;
    }
    .farmer-history-section {
      margin-top: 16px;
    }
    .farmer-history-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
      padding: 0 4px;
    }
    .farmer-history-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
    }
    .farmer-history-count {
      font-size: 12.5px;
      color: var(--text-muted);
      font-weight: 500;
    }
    .history-item-card {
      background: var(--card-bg);
      border: none;
      border-radius: 18px;
      padding: 14px 18px;
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      box-sizing: border-box;
    }
    .history-item-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .history-item-date {
      font-size: 14.5px;
      font-weight: 600;
      color: var(--text);
    }
    .history-status-badge {
      font-size: 13px;
      font-weight: 500;
      padding: 0;
      background: transparent !important;
      border: none !important;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .history-status-badge svg {
      flex-shrink: 0;
    }
    .history-status-badge.done {
      color: #2ecc71;
    }
    .history-status-badge.moved {
      color: #f39c12;
    }
    .history-status-badge.cancelled {
      color: #e74c3c;
    }
    .history-status-badge.planned {
      color: #3498db;
    }
    .history-item-purpose {
      font-size: 13.5px;
      color: var(--text-muted);
    }
    .history-item-notes {
      font-size: 13px;
      color: var(--text-muted);
      background: none;
      padding: 0;
      margin-top: 2px;
    }
