/* --------------------------------------------------
   GLOBAL RESET + BASE - aim.css
-------------------------------------------------- */
/* ============================================================
   AI DIRECTIVE — AIM GLOBAL CSS (TIMELINE + MODAL RENDERING)
   ============================================================
   This stylesheet defines global layout, timeline metrics, modal
   rendering rules, and overlay diagnostic layers. Cursor must
   treat this file as a protected UI-only styling layer.

   CRITICAL INVARIANTS:
   - This file MUST NOT contain logic or structural refactors.
   - Class names MUST remain unchanged; JS relies on them for
     coordinate math, visibility toggles, and overlay behavior.
   - The timeline height invariant MUST remain:
       1 minute = 1 pixel (60px per hour)
     Do NOT modify .day-hour or #day-blocks heights.
   - .timeline-block MUST retain position:absolute for correct
     chronological placement.
   - .aim-overlay-filter MUST retain pointer-events:auto and
     absolute positioning for inline filter capture.
   - #aim-visibility-overlay MUST retain z-index:99999 and
     display:none; it is controlled exclusively by driverEngine.js.

   STRUCTURAL CONTRACT:
   - Do NOT rename, reorder, or remove:
       .day-hour
       #day-blocks
       .timeline-block
       .field-with-filter
       .aim-overlay-filter
       #aim-visibility-overlay
   - Timeline physics currently implemented in aim.js.
     timelineEngine.js is future-phase and not yet active.
   - These selectors are tightly coupled to aim.js (timeline),
     inlineFilter.js, and driverEngine.js.

   SAFE EDIT ZONE:
   - Colors, spacing, borders, padding, typography.
   - Adding new non-functional CSS classes.
   - Adding theme variants (light/dark).
   - Adding ARIA or accessibility styling.

   DO NOT TOUCH ZONES:
   - Timeline height metrics.
   - Absolute positioning rules for timeline blocks.
   - Overlay positioning and pointer-event rules.
   - Visibility overlay container.
   - Any selector used by JS for coordinate math.

   If a requested change requires modifying protected selectors
   or timeline metrics, Cursor must STOP and ask for explicit
   approval.
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

body {
  background: #f5f5f7;
  color: #222;
  padding: 20px;
  line-height: 1.4;
}

/* Utility */
.hidden {
  display: none !important;
}

/* --------------------------------------------------
   HEADER + STICKY APP CHROME
-------------------------------------------------- */

.app-sticky-chrome {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #f5f5f7;
  padding-bottom: 8px;
  margin: -20px -20px 12px;
  padding: 20px 20px 8px;
  border-bottom: 1px solid #e5e7eb;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

header button {
  padding: 10px 16px;
  background: #4a6cf7;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

header button:hover {
  background: #3a57d8;
}

/* --------------------------------------------------
   UNSCHEDULED BLOCKS — sticky header panel
-------------------------------------------------- */

.unscheduled-blocks-panel {
  margin-top: 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  overflow: hidden;
}

.unscheduled-blocks-panel.hidden {
  display: none;
}

.unscheduled-blocks-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #312e81;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}

.unscheduled-blocks-toggle:hover {
  background: rgba(99, 102, 241, 0.08);
}

.unscheduled-blocks-toggle-label {
  flex-shrink: 0;
}

.unscheduled-blocks-summary {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: #4338ca;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unscheduled-blocks-chevron {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #6366f1;
}

.unscheduled-blocks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px;
}

.unscheduled-blocks-list.hidden {
  display: none;
}

.unscheduled-block-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px 8px 12px;
  border: 1px solid #c7d2fe;
  border-left: 4px solid var(--unscheduled-accent, #6366f1);
  border-radius: 6px;
  background: #fff;
  color: #1e1b4b;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.unscheduled-block-row:hover {
  background: #f8fafc;
}

.unscheduled-block-row-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unscheduled-blocks-panel--collapsed .unscheduled-blocks-toggle {
  padding-bottom: 10px;
}

@media (max-width: 640px) {
  .unscheduled-blocks-summary {
    font-size: 0.82rem;
  }

  .unscheduled-block-row-label {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* --------------------------------------------------
   DAY VIEW (placeholder)
-------------------------------------------------- */

#day-view {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
}

#day-view h2 {
  font-size: 1.4rem;
  margin: 0;
}

.compact-view-heading {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.compact-view-heading-text--short {
  display: none;
}

.compact-view-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.compact-view-header-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.compact-view-header-actions.hidden {
  display: none;
}

.compact-view-empty-hint {
  margin: 0;
  padding: 8px 4px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #64748b;
}

#timeline-container {
  --compact-scroll-pad-x: 20px;
  --compact-scroll-pad-bottom: 20px;
  min-height: 300px;
  max-height: 70vh; /* NEW: makes the box scrollable */
  overflow-y: auto; /* NEW: enables scrolling inside the box */
  border: 1px dashed #ccc;
  border-radius: 8px;
  background: #fafafa;
  /* No top padding — blocks were scrolling into that strip above sticky dates */
  padding: 0 var(--compact-scroll-pad-x) var(--compact-scroll-pad-bottom);
  scroll-behavior: smooth; /* NEW: smooth scroll for scrollToToday() */
}

.block-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--nested-display-bg, #eef2ff);
  border: 1px solid var(--nested-display-border, #cdd4ff);
  border-left: 3px solid var(--nested-display-accent, #6366f1);
  border-radius: 6px;
}

.block-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

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

.block-item--nested-collapsed .block-item-nested-list {
  display: none;
}

.block-item-nested-toggle {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.block-item-nested-toggle:hover {
  background: #f1f5f9;
  border-color: #64748b;
}

.compact-day-section {
  margin-bottom: 4px;
}

.compact-day-header-row {
  position: sticky;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 calc(-1 * var(--compact-scroll-pad-x, 20px)) 10px;
  padding: 6px var(--compact-scroll-pad-x, 20px) 6px;
  top: 0;
  z-index: 4;
  background: #fafafa;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

/* Small bleed cover only — 100vh ::before inflated scroll height (empty gaps) */
.compact-day-header-row::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--compact-scroll-pad-x, 20px));
  right: calc(-1 * var(--compact-scroll-pad-x, 20px));
  bottom: 100%;
  height: 12px;
  background: #fafafa;
  pointer-events: none;
}

.compact-day-section + .compact-day-section .compact-day-header-row {
  padding-top: 10px;
  box-shadow:
    0 -1px 0 rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(15, 23, 42, 0.08);
}

.compact-day-section:first-child .compact-day-header-row {
  padding-top: 4px;
}

.compact-day-header-row .day-header {
  margin: 0;
  font-weight: bold;
  font-size: 1.1rem;
  flex: 1;
  min-width: 0;
}

.day-header-text--short {
  display: none;
}

.block-item-action-text--short {
  display: none;
}

.compact-day-header-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.compact-day-action-btn {
  padding: 3px 8px;
  font-size: 0.78rem;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}

.compact-day-action-btn:hover {
  background: #f1f5f9;
  border-color: #64748b;
}

.block-item-nested-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 4px;
}

.block-item-nested-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--nested-display-border, #dbeafe);
  border-left: 3px solid var(--nested-display-accent, #6366f1);
  border-radius: 0 6px 6px 0;
  background: var(--nested-display-bg, #f5f7ff);
  overflow: hidden;
}

.block-item-nested-accent {
  display: none;
}

.block-item-nested-summary {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  padding: 5px 8px;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #334155;
  background: var(--nested-display-band, var(--nested-display-bg, #eef2ff));
}

.compact-nested-inline-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.compact-nested-inline-tracking {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.compact-nested-intended-segment {
  color: #1d4ed8;
}

.compact-nested-actual-segment {
  color: #047857;
}

.compact-nested-axis-label {
  font-weight: 700;
}

.compact-nested-intended-times {
  font-variant-numeric: tabular-nums;
}

.compact-nested-actual-time {
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.compact-nested-actual-time.is-placeholder {
  opacity: 0.75;
  font-style: italic;
  text-transform: lowercase;
}

.compact-nested-actual-time:hover {
  text-decoration-style: solid;
}

.compact-nested-duration {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.compact-nested-inline-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.compact-nested-entity-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}

.compact-nested-open-abc {
  flex-shrink: 0;
  padding: 1px 6px;
  font-size: 0.78rem;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.compact-nested-open-abc:hover {
  background: #f8fafc;
  border-color: #64748b;
}

.analog-time-picker-quick {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px 8px;
}

.analog-time-quick-btn {
  padding: 6px 12px;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  cursor: pointer;
}

.analog-time-quick-btn:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

.block-item-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.block-item-action-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 0.82rem;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.block-item-action-btn:hover {
  background: #f1f5f9;
  border-color: #64748b;
}

.block-item-delete-btn {
  color: #991b1b;
  border-color: #fca5a5;
}

.block-item-delete-btn:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

/* --------------------------------------------------
   MODAL BACKDROP
-------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 5vh 16px 16px;
  overflow-y: auto;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------
   MODAL WINDOW
-------------------------------------------------- */

.modal-content {
  background: white;
  width: 420px;
  max-width: 90%;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.25s ease-out;
  max-height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 600;
}

/* --------------------------------------------------
   FORM ELEMENTS
-------------------------------------------------- */

label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 500;
}

select,
input[type="date"],
input[type="text"],
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
}

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

/* Time picker container placeholder */
.time-picker {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
  margin-bottom: 5px;

  display: flex;
  gap: 8px;
  align-items: center;
}

/* --------------------------------------------------
   MODAL BUTTONS
-------------------------------------------------- */

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
}

.modal-buttons button {
  flex: 1;
  padding: 10px 14px;
  margin-right: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.modal-buttons button:last-child {
  margin-right: 0;
}

#block-launch-widget {
  background: #6c5ce7;
  color: white;
}

#block-launch-widget:hover {
  background: #5948d4;
}

.block-modal-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
  flex-wrap: wrap;
}

.block-modal-top-actions-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.block-modal-top-actions .reset-btn {
  padding: 8px 12px;
  font-size: 0.88rem;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.block-modal-top-actions .reset-btn:hover {
  background: #f1f5f9;
  border-color: #64748b;
}

.block-modal-save-btn,
#block-save {
  background: #4caf50;
  color: white;
}

.block-modal-save-btn:hover:not(:disabled),
#block-save:hover:not(:disabled) {
  background: #3e8f41;
}

.block-modal-cancel-btn,
#block-cancel {
  background: #ddd;
}

.block-modal-cancel-btn:hover,
#block-cancel:hover {
  background: #c8c8c8;
}

.block-modal-top-actions .block-modal-save-btn,
.block-modal-top-actions .block-modal-cancel-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  min-height: 40px;
}

.time-wheel {
  width: 55px;
  padding: 8px;
  text-align: center;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

.time-ampm {
  width: 70px;
}

.time-separator {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0 4px;
}
/* --------------------------------------------------
   single day view 
-------------------------------------------------- */

#single-day-view {
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  height: 40vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

#day-timeline {
  display: grid;
  grid-template-columns: 60px 1fr;
  position: relative;
}

#day-hours {
  border-right: 1px solid #ddd;
  background: #f5f5f5;
}

.day-hour {
  height: 60px; /* 1 hour = 60px (1 min = 1px) */
  border-bottom: 1px solid #eee;
  padding-left: 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
  color: #666;
}

#day-blocks {
  position: relative;
  height: calc(24 * 60px); /* 24 hours */
}

.timeline-current-time-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ef4444;
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25);
}

.timeline-current-time-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
}

/* --------------------------------------------------
   AIM block formatting
-------------------------------------------------- */

.timeline-block {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 6px;
  background: #eef2ff;
  border-width: 4px;
  border-style: solid;
  border-color: transparent; /* allows JS to override */
  overflow: hidden;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.timeline-block-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  z-index: 3;
  cursor: ns-resize;
  touch-action: none;
  background: linear-gradient(
    to bottom,
    rgba(79, 70, 229, 0.08),
    rgba(79, 70, 229, 0.28)
  );
  border-top: 1px solid rgba(79, 70, 229, 0.35);
}

.timeline-block-resize-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 4px;
  margin-left: -14px;
  margin-top: -2px;
  border-radius: 2px;
  background: rgba(79, 70, 229, 0.55);
  box-shadow:
    0 -3px 0 rgba(79, 70, 229, 0.35),
    0 3px 0 rgba(79, 70, 229, 0.35);
}

.timeline-block:hover .timeline-block-resize-handle,
.timeline-block-resize-handle:hover {
  background: linear-gradient(
    to bottom,
    rgba(79, 70, 229, 0.12),
    rgba(79, 70, 229, 0.4)
  );
}

.timeline-block-header,
.timeline-block-meta {
  flex: 0 0 auto;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-block-meta {
  font-weight: normal;
  font-size: 0.65rem;
  opacity: 0.85;
  border-bottom: none;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timeline-block-columns {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.timeline-block-nested-viz {
  position: relative;
  min-height: 0;
  height: 100%;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.timeline-block-parent-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--nested-display-bg, rgba(0, 0, 0, 0.03));
  border-left: 3px solid var(--nested-display-accent, transparent);
}

.timeline-block-parent-info .timeline-block-header {
  background: var(--nested-display-band, rgba(0, 0, 0, 0.05));
}

.timeline-block-parent-info .timeline-block-meta {
  background: transparent;
}

.timeline-block-body {
  padding: 6px;
  font-size: 0.75rem;
  color: #333;
}

.timeline-block-treemap {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  position: relative;
}

.timeline-block-nested-viz--scheduled {
  display: block;
  background: rgba(255, 255, 255, 0.35);
}

.timeline-block-nested-viz--allocated {
  display: block;
  position: relative;
  height: 100%;
  padding: 2px;
  box-sizing: border-box;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.025),
    rgba(0, 0, 0, 0.025) 3px,
    transparent 3px,
    transparent 7px
  );
}

.timeline-block-nested-viz--mixed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.timeline-block-nested-viz-scheduled-pane {
  position: relative;
  min-height: 0;
  height: 100%;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.timeline-block-nested-viz-allocated-pane {
  position: relative;
  min-height: 0;
  height: 100%;
  padding: 2px;
  box-sizing: border-box;
  overflow: hidden;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.025),
    rgba(0, 0, 0, 0.025) 3px,
    transparent 3px,
    transparent 7px
  );
}

.treemap-primary-rect {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
  font-weight: 600;
  opacity: 0.9;
  padding: 4px;
  text-align: center;
}

.treemap-nested-rect {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.9;
  padding: 2px 3px;
  text-align: center;
  line-height: 1.15;
}

.treemap-nested-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.treemap-nested-name {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.treemap-nested-name .nested-summary-mode-code {
  flex: 0 0 auto;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

.treemap-nested-name .nested-summary-aim-type {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treemap-nested-name .nested-summary-task {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treemap-nested-meta {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95em;
  opacity: 0.95;
}

.timeline-block-treemap--scheduled {
  display: block;
}

.treemap-nested-rect--scheduled {
  position: absolute;
  left: 0;
  right: 0;
  min-height: 2px;
  box-sizing: border-box;
  border-radius: 2px;
  overflow: hidden;
  white-space: normal;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.treemap-nested-rect--allocated {
  position: absolute;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 2px 3px;
  border-radius: 2px;
  overflow: hidden;
  white-space: normal;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.timeline-block-meta {
  font-size: 0.65rem;
  opacity: 0.7;
  padding: 2px 4px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nested-item-row {
  display: flex;
  gap: 6px;
  margin: 4px 0;
  align-items: center;
}

.nested-item-select {
  flex: 1;
  padding: 4px;
}

.nested-item-duration {
  width: 60px;
  padding: 4px;
}

.remove-nested-item-btn {
  background: #e33;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0 8px;
  cursor: pointer;
  font-weight: bold;
}

/* Arc 4 — container-first modal layout */
.block-container-section {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--nested-display-border, #dbeafe);
  border-left: 3px solid var(--nested-display-accent, #6366f1);
  border-radius: 8px;
  background: var(--nested-display-bg, #f8fbff);
}

.block-container-color-row label {
  align-self: center;
}

.block-container-abc-summary {
  display: none;
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 12px;
  text-align: left;
  border: 1px dashed #93c5fd;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 0.88rem;
  cursor: pointer;
}

.block-modal--nested-abc-focus .block-container-abc-summary {
  display: block;
}

.block-container-abc-summary:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.block-container-section--abc-collapsed .field-row,
.block-container-section--abc-collapsed .block-time-row,
.block-container-section--abc-collapsed .time-format-indicator,
.block-container-section--phone-collapsed .field-row,
.block-container-section--phone-collapsed .block-time-row,
.block-container-section--phone-collapsed .time-format-indicator {
  display: none;
}

.block-container-phone-summary {
  display: none;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 12px;
  min-height: 44px;
  text-align: left;
  border: 1px dashed #93c5fd;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 0.88rem;
  cursor: pointer;
}

.block-container-phone-summary:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

#block-modal.block-modal--phone-create .block-container-phone-summary {
  display: block;
}

.modal-section-heading {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #1e3a5f;
}

.field-optional {
  font-weight: 400;
  font-size: 0.85em;
  opacity: 0.75;
}

.block-actual-duration-readonly {
  background: #f1f5f9;
  color: #334155;
  cursor: default;
}

.block-actual-duration-readonly:focus {
  outline: none;
}

.time-format-indicator {
  opacity: 0.6;
  font-size: 0.8rem;
  margin: 4px 0 10px;
}

.block-legacy-entities-section {
  margin: 0 0 16px;
}

.block-legacy-toggle {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.88rem;
  cursor: pointer;
}

.block-legacy-toggle:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.block-legacy-entities-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.block-legacy-entities-panel.hidden {
  display: none;
}

.nested-blocks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.nested-blocks-header > label {
  margin: 0;
}

.nested-intended-allocation-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #64748b;
}

.nested-intended-allocation-hint--section {
  margin: 0 0 10px;
}

.nested-intended-allocation-hint--inline {
  flex: 1 1 12rem;
  min-width: 0;
}

.nested-intended-allocation-hint[data-balance-direction="over"] {
  color: #b45309;
}

.nested-intended-allocation-hint[data-balance-direction="under"] {
  color: #0369a1;
}

.nested-intended-allocation-hint[data-balance-direction="even"] {
  color: #15803d;
}

.nested-toggle-all-btn {
  border: 1px solid #9ca3af;
  background: #fff;
  color: #374151;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}

.nested-toggle-all-btn:hover {
  background: #f3f4f6;
}

.nested-add-btn {
  margin-top: 6px;
  padding: 4px 8px;
  background: #4b6ef5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.aimblockcore-duration-hint {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid #c9a227;
  background: #fff8e6;
  color: #5c4a00;
}

.aimblockcore-duration-hint[data-balance-direction="over"] {
  border-color: #c94a4a;
  background: #fdeeee;
  color: #6b1f1f;
}

.aimblockcore-row {
  background: var(--nested-display-bg, #f8fafc);
  border: 1px solid var(--nested-display-border, #e2e8f0);
  border-left: 3px solid var(--nested-display-accent, #cbd5e1);
  border-radius: 0 8px 8px 0;
  padding: 8px 10px 10px 10px;
  margin-bottom: 12px;
}

.aimblockcore-row-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--nested-display-border, #e2e8f0);
}

.aimblockcore-display-color-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.aimblockcore-display-color,
.aimblockcore-display-color-clear {
  min-width: 28px;
  height: 28px;
  padding: 0 4px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
}

.aimblockcore-display-color {
  padding: 3px;
}

.aimblockcore-display-color-swatch {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.aimblockcore-display-color-clear {
  font-size: 0.82rem;
  line-height: 26px;
}

.aimblockcore-display-color-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.block-container-display-color-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.aimblockcore-row-controls button {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
}

.aimblockcore-row:not(.collapsed) .aimblockcore-collapse {
  background: #475569;
  color: #fff;
  font-weight: 700;
  border-color: #475569;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.12);
}

.aimblockcore-row-summary {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 28px;
  padding-left: 4px;
  color: #333;
}

.nested-summary-mode-code {
  flex: 0 0 auto;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

.nested-summary-aim-type {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nested-summary-task {
  flex: 0 0 auto;
  white-space: nowrap;
}

.nested-summary-meta {
  flex: 0 0 auto;
  white-space: nowrap;
}

.scheduled-timing-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
}

.nested-scheduled-time-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.nested-scheduled-label {
  min-width: 52px;
  opacity: 0.7;
  font-size: 12px;
}

.nested-scheduled-time-display {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
}

.nested-scheduled-time-display:hover {
  text-decoration: underline;
  color: #4338ca;
}

.nested-scheduled-time-display.is-override {
  font-style: italic;
  color: #4338ca;
}

.nested-scheduled-time-editor {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.nested-scheduled-time-editor input[type="number"] {
  width: 3.2em;
  padding: 2px 4px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  background: #fff;
}

.nested-scheduled-time-editor select {
  margin-left: 4px;
  font-size: 12px;
}

.nested-scheduled-time-separator {
  font-weight: 600;
}

/* Tracking mode toggle (Manual / Dist) */
.aimblockcore-tracking {
  margin: 8px 0 10px;
}

.nested-tracking-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 6px 8px;
  background: var(--nested-display-band, #e5e7eb);
  border: 1px solid var(--nested-display-border, #cbd5e1);
  border-radius: 6px;
}

.mode-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 4px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.mode-btn:hover:not(.active) {
  color: #334155;
  background: rgba(255, 255, 255, 0.55);
}

.mode-btn.active {
  background: #475569;
  color: #fff;
  font-weight: 700;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.12);
}

.mode-btn:focus-visible {
  outline: 2px solid #4b6ef5;
  outline-offset: 1px;
}

.manual-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 12px;
  align-items: end;
}

.nested-tracking-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.nested-tracking-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
}

.nested-variance-hint {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: #666;
}

.nested-variance-hint[data-variance-direction="over"] {
  color: #b45309;
}

.nested-variance-hint[data-variance-direction="under"] {
  color: #0369a1;
}

.nested-variance-hint[data-variance-direction="even"] {
  color: #15803d;
}

.distribution-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 12px;
  align-items: end;
}

.dist-pool-hint-row {
  grid-column: 1 / -1;
  margin-top: -4px;
}

.nested-pool-hint {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}

.dist-variance-hint {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: #555;
}

.nested-time-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nested-tracking-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.actual-intended-btn {
  flex: 0 0 auto;
  font-size: 0.72rem;
  padding: 2px 7px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.actual-intended-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.actual-intended-btn.hidden {
  display: none;
}

.nested-time-input-row input[type="time"] {
  flex: 1 1 auto;
  min-width: 0;
}

.actual-now-btn {
  flex: 0 0 auto;
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  cursor: pointer;
}

.actual-now-btn:hover {
  background: #e2e8f0;
}

.actual-time-trigger,
.nested-scheduled-time-trigger {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

.actual-time-trigger.has-value,
.nested-scheduled-time-trigger.has-value {
  font-weight: 600;
  color: #0f172a;
}

/* Parent block start/end on one row */
.block-time-row.field-row {
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px 24px;
}

.block-time-row .block-time-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.block-time-row .block-time-label {
  width: auto;
  min-width: 36px;
  max-width: 44px;
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 600;
  flex-shrink: 0;
}

.block-time-label-line {
  display: block;
}

.block-time-picker.time-picker {
  border: none;
  padding: 0;
  background: transparent;
  margin-bottom: 0;
  flex: 0 1 auto;
}

.block-time-picker {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.block-time-picker .block-time-trigger {
  width: auto;
  min-width: 88px;
  max-width: 120px;
}

.block-time-row + .time-format-indicator {
  margin-top: -2px;
  padding-left: 0;
}

.analog-time-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 100060;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.analog-time-picker {
  width: min(100%, 320px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.analog-time-picker-header {
  padding: 14px 16px 0;
}

.analog-time-picker-header--with-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.analog-time-picker-title {
  font-size: 0.85rem;
  color: #64748b;
}

.analog-time-picker-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.78rem;
  color: #64748b;
}

.analog-time-picker-date-label {
  font-weight: 600;
  color: #0f766e;
}

.analog-time-picker-date-input {
  font-size: 0.78rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 6px;
  max-width: 9.5rem;
}

.analog-time-picker-display {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px 16px;
  background: #0f766e;
  color: #fff;
}

.analog-time-display-segment {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 2.4rem;
  font-weight: 300;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}

.analog-time-display-segment.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.analog-time-display-colon {
  font-size: 2rem;
  opacity: 0.9;
}

.analog-time-display-ampm {
  margin-left: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.analog-time-clock {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 12px auto 8px;
  border-radius: 50%;
  background: #e2e8f0;
  touch-action: none;
  user-select: none;
}

.analog-time-dial-value {
  position: absolute;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #334155;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
}

.analog-time-dial-value.active {
  background: #0f766e;
  color: #fff;
}

.analog-time-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 14px;
}

.analog-time-cancel,
.analog-time-ok {
  border: none;
  background: transparent;
  color: #0f766e;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  cursor: pointer;
}

.timer-session-summary {
  flex: 1 1 100%;
  font-size: 0.82rem;
  color: #334155;
}

.nested-start-display,
.nested-end-display,
.nested-duration-display {
  font-weight: 600;
}

.aimblockcore-row.collapsed .aimblockcore-entities,
.aimblockcore-row.collapsed .aimblockcore-tracking,
.aimblockcore-row.collapsed .aimblockcore-scheduling,
.aimblockcore-row.collapsed .manual-fields,
.aimblockcore-row.collapsed .distribution-fields,
.aimblockcore-row.collapsed .nested-unified-tracking-fields,
.aimblockcore-row.collapsed .nested-notes-field {
  display: none !important;
}

.nested-notes-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  min-width: 0;
}

.nested-notes-field .aimblockcore-notes {
  min-height: 52px;
  resize: vertical;
}

.block-modal-save-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.4;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.block-modal-save-status--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.duration-balance-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.duration-balance-dialog {
  max-width: 420px;
  width: 100%;
  background: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.duration-balance-dialog h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.duration-balance-dialog p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
}

.duration-balance-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.duration-balance-dialog-actions button {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.duration-balance-dialog-primary {
  background: #4b6ef5 !important;
  color: #fff !important;
  border-color: #4b6ef5 !important;
}

.duration-balance-dialog-cancel {
  background: #fff !important;
}

.view-control {
  margin: 10px 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
}

.driver-highlight {
  border: 2px solid var(--accent, #4da3ff);
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(77, 163, 255, 0.6);
  transition:
    box-shadow 0.2s ease,
    border 0.2s ease;
}

.aim-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

/* AIM driver highlight */
.aim-driver {
  outline: 2px solid var(--aim-accent, #4b9fff);
  border-radius: 4px;
  outline-offset: 2px;
}
.field-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.field-row label {
  width: 160px; /* consistent label width */
  font-weight: 600;
}

.field-with-filter {
  position: relative;
  display: inline-block;
}

.field-with-filter select {
  width: 240px;
  padding-left: 8px;
}

.field-with-filter .aim-overlay-filter {
  position: absolute;
  top: 0;
  left: 0;
  width: 95px;
  height: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  background: white;
  color: #111827;
  font-size: 0.9rem;
  box-sizing: border-box;
  pointer-events: auto;
  z-index: 2;
}

.field-with-filter.is-filter-open .aim-overlay-filter {
  z-index: 5;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1;
}

.field-with-filter.is-filter-open select {
  z-index: 1;
  margin-left: 95px;
  width: calc(100% - 95px);
  padding-left: 8px;
  height: auto;
}

#aim-visibility-overlay {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 260px;
  max-height: 400px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 99999;
  display: none; /* toggled by hotkey */
}

#aim-visibility-overlay .aim-vis-header {
  font-weight: bold;
  margin-bottom: 8px;
  text-align: center;
  font-size: 13px;
}

#aim-visibility-overlay .aim-vis-content {
  line-height: 1.4;
}

/*.field-with-filter .aim-overlay-filter:focus {
  outline: none;
}*/

/* When dropdown opens, hide the overlay */
/*.field-with-filter select:focus + .aim-overlay-filter {
  display: none;
}*/

/* Phase 20 — nested block entity fields (uniform width + inline filter) */
.aimblockcore-entities {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.nested-field-container {
  position: relative;
  display: block;
  width: 240px;
  max-width: 100%;
  flex: 0 0 auto;
}

.nested-floating-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nested-field-container select {
  width: 100%;
  min-height: 32px;
  margin-top: 0;
  padding: 6px 28px 6px 98px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font-size: 0.9rem;
  color: #374151;
}

.nested-field-container.has-selection select {
  padding-left: 8px;
  color: #111827;
}

.nested-field-entity-hint {
  position: absolute;
  top: 0;
  right: 28px;
  left: 98px;
  height: 32px;
  line-height: 32px;
  padding: 0 6px;
  color: #6b7280;
  font-size: 0.9rem;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}

.nested-field-container.has-selection .nested-field-entity-hint,
.nested-field-container.is-filter-open .nested-field-entity-hint {
  display: none;
}

.nested-field-container.is-filter-open select {
  position: relative;
  z-index: 3;
  margin-left: 95px;
  width: calc(100% - 95px);
  min-height: 32px;
  padding: 6px 8px;
  height: auto;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.nested-field-container.is-filter-open {
  z-index: 4;
  margin-bottom: 4px;
}

.nested-field-container .aim-overlay-filter {
  position: absolute;
  top: 0;
  left: 0;
  width: 95px;
  height: 32px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-right: 1px solid #d1d5db;
  border-radius: 4px 0 0 4px;
  background: #fff;
  color: #111827;
  font-size: 0.85rem;
  box-sizing: border-box;
  pointer-events: auto;
  z-index: 2;
}

.nested-field-container.is-filter-open .aim-overlay-filter {
  z-index: 5;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1;
}

.nested-field-container.has-selection .aim-overlay-filter {
  display: none;
}

.nested-entity-filter-bar {
  margin: 2px 0 8px;
}

.nested-entity-filter-hint {
  margin: 0 0 6px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #6b7280;
}

.nested-entity-filter-why {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #4f46e5;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.nested-entity-filter-why:hover {
  color: #3730a3;
}

.nested-entity-filter-why-panel {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f9fafb;
  font-size: 0.8rem;
  color: #374151;
}

.nested-entity-filter-why-panel ul {
  margin: 0;
  padding-left: 18px;
}

.nested-entity-filter-why-panel li + li {
  margin-top: 4px;
}

.nested-entity-filter-why-footnote {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.75rem;
  color: #9ca3af;
  font-style: italic;
}

.nested-browse-all-entities {
  font-size: 0.85rem;
  padding: 5px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

.nested-browse-all-entities:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.nested-browse-all-entities.active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #3730a3;
}

/* Phase 6 Step 7 — constraint violation indicators (diagnostic only) */
.constraint-violation-panel {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid #f0ad4e;
  border-radius: 6px;
  background: #fff8e8;
  color: #6b4e16;
  font-size: 0.9rem;
}

.constraint-violation-panel ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.timeline-block.has-constraint-violations,
.block-item.has-constraint-violations {
  box-shadow: inset 0 0 0 2px #f0ad4e;
}

.timeline-violation-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f0ad4e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.block-item .timeline-violation-indicator {
  position: static;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

/* Phase 6 Step 8 — soft enforcement (non-blocking) */
.soft-enforcement-hint {
  margin: 6px 0 0;
  opacity: 0.9;
}

.constraint-violation-panel .soft-enforcement-fixes {
  margin-top: 6px;
}

.soft-enforcement-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(640px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #f0ad4e;
  background: #fff8e8;
  color: #6b4e16;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 10000;
}

.soft-enforcement-banner--save {
  border-color: #e6a817;
  background: #fff3cd;
}

.soft-enforcement-banner--drag {
  border-color: #f0ad4e;
  background: #fff8e8;
}

.timeline-block.soft-drag-temporal-warning {
  box-shadow: inset 0 0 0 2px #ff9800, 0 0 0 2px rgba(255, 152, 0, 0.25);
}

/* Phase 6 Step 9 — hard enforcement (blocking) */
.constraint-violation-panel--error {
  border-color: #d9534f;
  background: #fff0f0;
  color: #842029;
}

.hard-enforcement-hint {
  margin: 6px 0 0;
}

.timeline-block.has-constraint-errors,
.block-item.has-constraint-errors {
  box-shadow: inset 0 0 0 2px #d9534f;
}

.timeline-block.hard-invalid-move {
  box-shadow: inset 0 0 0 2px #d9534f, 0 0 0 3px rgba(217, 83, 79, 0.35);
}

.timeline-violation-indicator--error {
  background: #d9534f;
}

.hard-enforcement-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(640px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  z-index: 10001;
}

.hard-enforcement-banner--move {
  border: 1px solid #d9534f;
  background: #fff0f0;
  color: #842029;
}

.block-modal-save-btn:disabled,
#block-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Phase 6 Step 11 — exemptions & overrides */
.constraint-exemption-panel {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid #5b9bd5;
  border-radius: 6px;
  background: #eef6ff;
  color: #1f4e79;
  font-size: 0.9rem;
}

.constraint-exemption-panel .constraint-exemption-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.constraint-override-banner,
.soft-enforcement-banner--override {
  border-color: #7e57c2;
  background: #f3ebff;
  color: #4a148c;
}

.timeline-block.has-constraint-exemptions,
.block-item.has-constraint-exemptions {
  box-shadow: inset 0 0 0 2px #5b9bd5;
}

.timeline-block.has-constraint-override,
.block-item.has-constraint-override {
  box-shadow: inset 0 0 0 2px #7e57c2;
}

.timeline-override-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #7e57c2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}

/* Phase 7 Step 1 — Smart Defaults (creation suggestions) */
.advisory-panel-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.advisory-panel--collapsed {
  padding: 8px 10px;
}

.advisory-panel--collapsed .advisory-panel-body {
  display: none;
}

.advisory-panel:not(.advisory-panel--collapsed) .advisory-panel-toggle {
  margin-bottom: 8px;
}

.smart-defaults-panel {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #2e7d6f;
  border-radius: 8px;
  background: #eefaf7;
  color: #1b4d44;
  font-size: 0.92rem;
}

.smart-defaults-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.smart-defaults-tag {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.75;
}

.smart-defaults-list {
  margin: 0;
  padding-left: 18px;
}

.smart-defaults-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.smart-defaults-apply-btn {
  border: 1px solid #2e7d6f;
  background: #fff;
  color: #1b4d44;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
}

/* Phase 7 Step 2 — Suggested Fixes (correction proposals) */
.correction-suggestions-panel {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #1565c0;
  border-radius: 8px;
  background: #eef4fc;
  color: #0d3b66;
  font-size: 0.92rem;
}

.correction-suggestions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.correction-suggestions-tag {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.75;
}

.correction-suggestions-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.correction-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(21, 101, 192, 0.15);
}

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

.correction-suggestions-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.correction-apply-btn {
  border: 1px solid #1565c0;
  background: #fff;
  color: #0d3b66;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.creation-suggestion-tooltip {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #2e7d6f;
  background: #eefaf7;
  color: #1b4d44;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 10002;
}

.correction-suggestion-tooltip {
  position: fixed;
  bottom: 72px;
  right: 20px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #1565c0;
  background: #eef4fc;
  color: #0d3b66;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 10001;
}

/* Phase 7 Step 4 — Scheduling Recommendations */
.scheduling-recommendations-panel {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #6a4c9c;
  border-radius: 8px;
  background: #f6f0fc;
  color: #3d245c;
  font-size: 0.92rem;
}

.scheduling-recommendations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.scheduling-recommendations-tag,
.scheduling-advisory-tag {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.75;
}

.scheduling-recommendations-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.scheduling-recommendation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(106, 76, 156, 0.15);
}

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

.scheduling-recommendations-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.scheduling-apply-btn {
  border: 1px solid #6a4c9c;
  background: #fff;
  color: #3d245c;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.scheduling-recommendation-tooltip {
  position: fixed;
  bottom: 124px;
  right: 20px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #6a4c9c;
  background: #f6f0fc;
  color: #3d245c;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 10000;
}

/* Phase 7 Step 5 — Auto-Fix panel + context menu */
.auto-fix-panel {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #2e7d32;
  border-radius: 8px;
  background: #eef8ee;
  color: #1b4d1f;
  font-size: 0.92rem;
}

.auto-fix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.auto-fix-tag {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.75;
}

.auto-fix-summary {
  margin: 0 0 8px;
}

.auto-fix-steps {
  margin: 0 0 12px;
  padding-left: 18px;
}

.auto-fix-source {
  display: inline-block;
  min-width: 5.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.7;
}

.auto-fix-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.auto-fix-apply-btn,
.auto-fix-context-apply {
  border: 1px solid #2e7d32;
  background: #fff;
  color: #1b4d1f;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
}

.auto-fix-context-menu {
  position: fixed;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2e7d32;
  background: #fff;
  color: #1b4d1f;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.auto-fix-context-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.auto-fix-context-steps {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 0.88rem;
}

/* Phase 7 Step 6 — Multi-day week optimization */
.week-optimization-modal .week-optimization-content {
  max-width: min(640px, calc(100vw - 32px));
}

.week-optimization-intro,
.week-optimization-hint,
.week-optimization-empty {
  font-size: 0.92rem;
  opacity: 0.85;
}

.week-optimization-day-label {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.week-optimization-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.week-optimization-item {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #d8c8ef;
  font-size: 0.92rem;
}

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

.week-optimization-type {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: #5b3f8f;
}

.week-optimization-advisory {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6a4c9c;
  white-space: nowrap;
}

.week-optimization-tooltip {
  position: fixed;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #6a4c9c;
  background: #f6f0fc;
  color: #3d245c;
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.week-optimization-tooltip-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.week-optimization-tooltip-empty,
.week-optimization-tooltip-more {
  margin: 0;
  opacity: 0.85;
}

.week-optimization-tooltip-list {
  margin: 0 0 10px;
  padding-left: 18px;
}

.week-optimization-open-modal {
  margin-top: 4px;
  border: 1px solid #6a4c9c;
  background: #fff;
  color: #3d245c;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
}

#optimize-week-btn {
  margin-left: 10px;
  border: 1px solid #6a4c9c;
  background: #f6f0fc;
  color: #3d245c;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

#generate-weekly-layout-btn {
  margin-left: 10px;
  border: 1px solid #2e6b4f;
  background: #eef8f2;
  color: #1b4d34;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Phase 7 Step 7 — Weekly auto-layout modal */
.weekly-layout-modal .weekly-layout-content {
  width: min(760px, calc(100vw - 32px));
}

.weekly-layout-intro,
.weekly-layout-empty,
.weekly-layout-reasoning-empty {
  font-size: 0.92rem;
  opacity: 0.85;
}

.weekly-layout-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.weekly-layout-severity {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.weekly-layout-day {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dce8df;
}

.weekly-layout-day h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.weekly-layout-block-list {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.weekly-layout-block-item {
  padding: 6px 0;
}

.weekly-layout-block-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.weekly-layout-block-item--proposed {
  opacity: 0.75;
}

.weekly-layout-proposed-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2e6b4f;
}

.weekly-layout-reasoning summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 6px;
}

.weekly-layout-reasoning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-size: 0.88rem;
}

.weekly-layout-reasoning-grid h4 {
  margin: 0 0 4px;
  font-size: 0.82rem;
}

.weekly-layout-reasoning-grid ul {
  margin: 0;
  padding-left: 18px;
}

.weekly-layout-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.weekly-layout-actions button {
  cursor: pointer;
}

.weekly-layout-status {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #1b4d34;
}

.weekly-layout-status--error {
  color: #8b1e1e;
}

/* Arc 2 — Entity Management panel */
.entity-management-content {
  width: min(920px, 96vw);
  max-height: 96vh;
  overflow: auto;
  padding: 16px 18px;
}

.entity-management-content h2 {
  margin-bottom: 0;
}

.entity-management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.entity-management-header h2 {
  margin: 0;
}

.entity-modal-close {
  flex-shrink: 0;
  border: 1px solid #9ca3af;
  background: #fff;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

.entity-modal-close:hover {
  background: #f3f4f6;
}

.entity-editor-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.entity-browser {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
}

.entity-browser-list {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}

.entity-browser-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  font-size: 0.88rem;
}

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

.entity-browser-item:hover {
  background: #f3f4f6;
}

.entity-browser-item.is-active {
  background: #e0e7ff;
  font-weight: 600;
}

.entity-browser-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-new-btn {
  width: 100%;
  border: 1px dashed #6366f1;
  background: #fff;
  color: #4338ca;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 600;
}

.entity-new-btn:hover {
  background: #eef2ff;
}

.entity-detail {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  min-height: 0;
  background: #fff;
}

.entity-detail-empty {
  color: #6b7280;
  font-size: 0.92rem;
  padding: 24px 8px;
}

.entity-detail-form.hidden,
.entity-detail-empty.hidden {
  display: none;
}

.entity-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.entity-detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.entity-detail-header h3 {
  margin: 0;
  font-size: 1.05rem;
  word-break: break-word;
}

.entity-detail-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.entity-detail-meta .field-row {
  margin: 0;
}

.entity-field-hint {
  margin: 4px 0 0;
  font-size: 0.82rem;
  opacity: 0.75;
}

.entity-detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.entity-archive-btn,
.entity-restore-btn {
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.84rem;
  cursor: pointer;
}

.entity-archive-btn {
  border: 1px solid #d97706;
  background: #fff7ed;
  color: #9a3412;
}

.entity-restore-btn {
  border: 1px solid #059669;
  background: #ecfdf5;
  color: #065f46;
}

.entity-browser-show-archived-row {
  margin-top: 4px;
}

.entity-browser-show-archived {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
}

.entity-browser-item.is-archived {
  opacity: 0.82;
}

.entity-source-badge[data-source="archived"] {
  color: #7c2d12;
  background: #ffedd5;
  border-color: #fdba74;
}

.entity-source-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.entity-source-badge[data-source="bundled"] {
  color: #374151;
  background: #f3f4f6;
  border-color: #d1d5db;
}

.entity-source-badge[data-source="added"] {
  color: #1e40af;
  background: #dbeafe;
  border-color: #93c5fd;
}

.entity-source-badge[data-source="patched"] {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}

.entity-source-badge[data-source="new"] {
  color: #065f46;
  background: #d1fae5;
  border-color: #6ee7b7;
}

.entity-management-intro {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #374151;
}

.entity-crosslink-row {
  margin: 6px 0;
}

.entity-crosslink-row label.entity-crosslink-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 3px;
}

.entity-crosslink-choices {
  --entity-crosslink-row-height: 1.0625rem;
  max-height: calc(var(--entity-crosslink-row-height) * 4 + 6px);
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 2px 6px;
  background: #fff;
}

.entity-crosslink-choice {
  display: flex;
  align-items: center;
  gap: 5px;
  height: var(--entity-crosslink-row-height);
  margin: 0;
  padding: 0 2px;
  font-size: 0.84rem;
  cursor: pointer;
  line-height: 1;
}

.entity-crosslink-choice span {
  line-height: 1;
}

.entity-crosslink-choice:hover {
  background: #f9fafb;
  border-radius: 4px;
}

.entity-crosslink-choice input {
  margin: 0;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

.entity-default-row {
  margin-top: 4px;
}

.entity-default-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: #374151;
}

.entity-default-row select {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 0.84rem;
}

.entity-crosslink-row select {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 0.84rem;
}

.entity-crosslink-hint {
  margin: 2px 0 0;
  font-size: 0.78rem;
  line-height: 1.25;
  color: #6b7280;
}

.entity-management-status {
  min-height: 1rem;
  margin: 8px 0 0;
  font-size: 0.88rem;
}

.entity-management-status[data-status-type="error"] {
  color: #8b1e1e;
}

.entity-management-status[data-status-type="success"] {
  color: #1b5e20;
}

.entity-management-actions {
  margin-top: 8px;
}

.entity-overlay-summary {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.entity-overlay-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.entity-overlay-list {
  margin: 0;
  font-size: 0.88rem;
  color: #374151;
}

.entity-reset-btn {
  border: 1px solid #9ca3af;
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}

.entity-management-status[data-status-type="warn"] {
  color: #92400e;
}

@media (max-width: 720px) {
  .entity-editor-layout {
    grid-template-columns: 1fr;
  }

  .entity-browser-list {
    max-height: 200px;
  }
}

/* Arc 5 Part 4 — Quick Create (phone + desktop; same template library) */
#open-quick-create {
  background: #0f766e;
  color: #fff;
  border: 1px solid #0f766e;
  font-weight: 600;
}

#open-quick-create:hover {
  background: #0d9488;
}

/* --------------------------------------------------
   Arc 5 Part 3 — Phone day view shell (≤640px)
   Compact multi-row cards are the primary phone layout.
-------------------------------------------------- */

@media (max-width: 640px) {
  html.phone-layout,
  html.phone-layout body {
    overflow-x: hidden;
  }

  html.phone-layout body {
    padding: 10px;
  }

  html.phone-layout .app-sticky-chrome {
    margin: -10px -10px 8px;
    padding: 10px 10px 8px;
  }

  html.phone-layout header {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 8px;
  }

  html.phone-layout header h1 {
    flex: 1 1 100%;
    font-size: 1.25rem;
    margin-bottom: 0;
  }

  html.phone-layout header button {
    min-height: 44px;
    padding: 10px 14px;
  }

  html.phone-layout #open-block-modal,
  html.phone-layout #open-quick-create {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  html.phone-layout #open-quick-create {
    display: inline-block;
    background: #0f766e;
    color: #fff;
    border: 1px solid #0f766e;
    font-weight: 600;
  }

  /* Planning / desktop-only chrome — Arc 5 phone scope */
  html.phone-layout #open-entity-management,
  html.phone-layout #optimize-week-btn,
  html.phone-layout #generate-weekly-layout-btn,
  html.phone-layout #treemap-dimension-selector,
  html.phone-layout #single-day-view {
    display: none;
  }

  html.phone-layout #app-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
  }

  html.phone-layout #day-view {
    order: -1;
    margin-bottom: 12px;
    padding: 12px;
    min-width: 0;
  }

  html.phone-layout #day-view h2.compact-view-heading {
    font-size: 0.95rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  html.phone-layout .compact-view-header-row {
    margin-bottom: 8px;
    align-items: flex-start;
  }

  /* Prefer full title; narrow phones fall back to “Compact View”. */
  @media (max-width: 380px) {
    html.phone-layout .compact-view-heading-text--full {
      display: none;
    }

    html.phone-layout .compact-view-heading-text--short {
      display: inline;
    }
  }

  html.phone-layout .compact-view-header-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  html.phone-layout .compact-view-header-actions button,
  html.phone-layout .compact-day-header-actions button {
    touch-action: manipulation;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  html.phone-layout .compact-day-header-row {
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 8px;
    /* sticky + background inherited from base .compact-day-header-row */
  }

  html.phone-layout .compact-day-header-row .day-header {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
  }

  html.phone-layout .day-header-text--full {
    display: none;
  }

  html.phone-layout .day-header-text--short {
    display: inline;
  }

  html.phone-layout .compact-day-header-actions {
    flex-shrink: 0;
    gap: 4px;
  }

  html.phone-layout #timeline-container {
    --compact-scroll-pad-x: 10px;
    --compact-scroll-pad-bottom: 10px;
    max-height: min(72vh, calc(100dvh - 11rem));
    min-height: 42vh;
    padding: 0 var(--compact-scroll-pad-x) var(--compact-scroll-pad-bottom);
    -webkit-overflow-scrolling: touch;
    min-width: 0;
  }

  html.phone-layout .block-item,
  html.phone-layout .unscheduled-block-row,
  html.phone-layout .compact-nested-actual-time,
  html.phone-layout .compact-nested-open-abc {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.12);
  }

  html.phone-layout .block-item-header {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    row-gap: 6px;
    align-items: center;
  }

  html.phone-layout .block-item-label {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  html.phone-layout .block-item-nested-toggle {
    grid-column: 1;
    grid-row: 1;
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  html.phone-layout .block-item-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
  }

  html.phone-layout .block-item-header:not(:has(.block-item-nested-toggle)) .block-item-actions {
    grid-column: 1 / -1;
  }

  html.phone-layout .block-item-header:not(:has(.block-item-nested-toggle)) .block-item-label {
    grid-row: 2;
  }

  html.phone-layout .block-item-action-btn {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  html.phone-layout .block-item-action-text--full {
    display: none;
  }

  html.phone-layout .block-item-action-text--short {
    display: inline;
  }

  html.phone-layout .block-item-nested-summary {
    font-size: 0.84rem;
  }

  html.phone-layout .compact-nested-inline-tracking {
    gap: 6px;
  }

  html.phone-layout .compact-nested-entity-label {
    white-space: normal;
    line-height: 1.3;
  }

  html.phone-layout .compact-nested-actual-time {
    min-height: 44px;
    padding: 8px 4px;
    display: inline-flex;
    align-items: center;
  }

  html.phone-layout .compact-nested-open-abc {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  html.phone-layout .compact-day-action-btn,
  html.phone-layout .compact-day-expand-all-btn,
  html.phone-layout .compact-day-collapse-all-btn {
    min-height: 44px;
    padding: 8px 12px;
  }

  /* Modals — scroll + tap targets (3.4) */
  html.phone-layout .modal {
    padding: 8px;
    align-items: flex-start;
  }

  html.phone-layout .modal-content {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: 0 auto;
    padding: 16px;
    border-radius: 10px;
  }

  html.phone-layout .modal-buttons {
    flex-direction: column;
    gap: 8px;
  }

  html.phone-layout .modal-buttons button {
    min-height: 44px;
    margin-right: 0;
    width: 100%;
  }

  html.phone-layout .field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  html.phone-layout .field-row label {
    width: auto;
    margin-top: 0;
  }

  html.phone-layout .field-with-filter select {
    width: 100%;
  }

  html.phone-layout .block-time-row.field-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  html.phone-layout .block-time-row .block-time-field {
    flex: 1 1 100%;
  }

  html.phone-layout .nested-field-container {
    width: 100%;
  }

  html.phone-layout .aimblockcore-header button,
  html.phone-layout #add-nested-item-btn,
  html.phone-layout .block-legacy-toggle,
  html.phone-layout .block-container-abc-summary {
    min-height: 44px;
  }

  html.phone-layout .analog-time-quick-btn {
    min-height: 44px;
    padding: 10px 14px;
  }

  html.phone-layout .duration-balance-dialog-actions button {
    min-height: 44px;
    padding: 12px 14px;
  }

  html.phone-layout .actual-time-trigger,
  html.phone-layout .block-time-trigger {
    min-height: 44px;
  }

  html.phone-layout .nested-add-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
  }

  html.phone-layout .block-modal-top-actions .reset-btn,
  html.phone-layout .block-modal-top-actions .block-modal-save-btn,
  html.phone-layout .block-modal-top-actions .block-modal-cancel-btn {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Native color input must receive the tap (iOS blocks programmatic .click()). */
  html.phone-layout .aimblockcore-display-color-wrap,
  html.phone-layout .block-container-display-color-wrap {
    position: relative;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
  }

  html.phone-layout .aimblockcore-display-color-input,
  html.phone-layout .block-container-display-color-input {
    position: absolute;
    left: 0;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    opacity: 0.01;
    pointer-events: auto;
    cursor: pointer;
    border: none;
    z-index: 2;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
  }

  html.phone-layout .block-container-display-color,
  html.phone-layout .aimblockcore-display-color {
    pointer-events: none;
    position: relative;
    z-index: 1;
  }

  html.phone-layout .block-container-display-color-clear,
  html.phone-layout .aimblockcore-display-color-clear {
    position: relative;
    z-index: 3;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  html.phone-layout #block-modal .modal-section {
    margin-top: 4px;
  }

  html.phone-layout #block-modal .nested-blocks-header label {
    font-size: 1rem;
    font-weight: 600;
  }

  html.phone-layout .aimblockcore-collapse {
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }

  html.phone-layout .phone-day-remaining-hint {
    margin: 0 0 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    color: #334155;
    background: #f1f5f9;
    border-radius: 8px;
    line-height: 1.35;
  }

  html.phone-layout .phone-day-remaining-hint.hidden {
    display: none;
  }
}

/* Touch devices — native color input over swatch (iOS ignores programmatic .click()) */
@media (pointer: coarse) {
  .aimblockcore-display-color-wrap,
  .block-container-display-color-wrap {
    position: relative;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
  }

  .aimblockcore-display-color-input,
  .block-container-display-color-input {
    position: absolute;
    left: 0;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    opacity: 0.01;
    pointer-events: auto;
    cursor: pointer;
    border: none;
    z-index: 2;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
  }

  .block-container-display-color,
  .aimblockcore-display-color {
    pointer-events: none;
    position: relative;
    z-index: 1;
  }

  .block-container-display-color-clear,
  .aimblockcore-display-color-clear {
    position: relative;
    z-index: 3;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }
}

/* Local dev — LAN URL for phone (hidden on phone-layout + non-private hosts) */
.dev-phone-link-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #0f172a;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.dev-phone-link-hint-note {
  flex: 1 1 100%;
  font-size: 0.78rem;
  color: #047857;
  line-height: 1.35;
}

.dev-phone-link-hint-note.hidden {
  display: none;
}

.dev-phone-link-hint.hidden {
  display: none;
}

.dev-phone-link-hint-label {
  font-weight: 600;
  flex: 0 0 auto;
}

.dev-phone-link-hint-url {
  flex: 1 1 12rem;
  min-width: 0;
  word-break: break-all;
  color: #047857;
}

.dev-phone-link-hint-copy {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 0.78rem;
  border: 1px solid #6ee7b7;
  border-radius: 6px;
  background: #fff;
  color: #047857;
  cursor: pointer;
}

.dev-phone-link-hint-copy:hover {
  background: #d1fae5;
}

.dev-persistence-backup-actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dev-persistence-backup-btn {
  padding: 4px 8px;
  font-size: 0.76rem;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.dev-persistence-backup-btn:hover {
  background: #f1f5f9;
}

html.phone-layout .dev-phone-link-hint .dev-phone-link-hint-label,
html.phone-layout .dev-phone-link-hint .dev-phone-link-hint-url,
html.phone-layout .dev-phone-link-hint .dev-phone-link-hint-copy,
html.phone-layout .dev-phone-link-hint .dev-phone-link-hint-note,
html.phone-layout .dev-phone-link-hint #dev-download-backup-btn,
html.phone-layout .dev-phone-link-hint #dev-restore-local-backup-btn {
  display: none !important;
}

.dev-phone-import-lead {
  display: none;
  flex: 1 1 100%;
  font-size: 0.78rem;
  font-weight: 600;
  color: #047857;
}

html.phone-layout .dev-phone-import-lead {
  display: block;
}

/* Arc 6 Part 5 — offline / update status (non-blocking) */
.aim-connectivity-status {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.4;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aim-connectivity-status--hidden {
  display: none !important;
}

.aim-connectivity-status--offline {
  color: #78350f;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.aim-connectivity-status--update {
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.aim-connectivity-status-main {
  font-weight: 600;
}

.aim-connectivity-status-help {
  font-size: 0.76rem;
  font-weight: 400;
  color: #92400e;
  line-height: 1.35;
}

.aim-connectivity-status--update .aim-connectivity-status-help {
  color: #1d4ed8;
}

/* Arc 7B — cloud sync panel */
.aim-cloud-sync-panel {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.aim-cloud-sync-status {
  margin: 0 0 8px;
  font-weight: 600;
  white-space: normal;
  line-height: 1.45;
  max-width: 52rem;
}

.aim-cloud-sync-status[data-kind="error"] {
  color: #991b1b;
}

.aim-cloud-sync-status[data-kind="ok"] {
  color: #047857;
}

.aim-cloud-sync-status[data-kind="warn"] {
  color: #92400e;
}

.aim-cloud-sync-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.aim-cloud-sync-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
}

.aim-cloud-sync-field input {
  min-width: 160px;
  padding: 4px 8px;
  font-size: 0.82rem;
}

.aim-cloud-sync-btn {
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.aim-cloud-sync-btn--secondary {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

.aim-cloud-sync-signed-in {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.aim-cloud-sync-user-email {
  font-size: 0.78rem;
  color: #475569;
}

html.phone-layout .aim-cloud-sync-form {
  flex-direction: column;
  align-items: stretch;
}

.aim-pwa-offline-ready-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #5b21b6;
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
}

.aim-pwa-offline-ready-hint.hidden {
  display: none !important;
}

.dev-phone-https-label {
  flex: 1 1 100%;
  margin-top: 4px;
}

/* Arc 5 Part 4 — quick create sheet (bottom sheet on phone, centered on desktop) */
.phone-day-remaining-hint {
  margin: 0 0 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  color: #334155;
  background: #f1f5f9;
  border-radius: 8px;
  line-height: 1.35;
}

.phone-day-remaining-hint.hidden {
  display: none;
}

.phone-quick-create-sheet {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 641px) {
  .phone-quick-create-sheet:not(.hidden) {
    align-items: center;
    padding: 24px;
  }

  .phone-quick-create-panel {
    border-radius: 14px;
    max-height: min(80vh, 560px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
  }
}

.phone-quick-create-sheet.hidden {
  display: none;
}

.phone-quick-create-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.phone-quick-create-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(85dvh, 520px);
  overflow: auto;
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
}

.phone-quick-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.phone-quick-create-title {
  margin: 0;
  font-size: 1.15rem;
}

.phone-quick-create-close {
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.phone-quick-create-remaining {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #475569;
}

.phone-quick-create-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-quick-create-template-btn {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.phone-quick-create-create-template {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

html.phone-layout .block-item-template-btn {
  color: #0f766e;
  border-color: #5eead4;
  background: #f0fdfa;
  font-size: 0.82rem;
}

.phone-quick-create-template-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-quick-create-template-actions.hidden,
#phone-quick-create-main.hidden {
  display: none;
}

.phone-quick-create-back {
  align-self: flex-start;
  min-height: 44px;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.phone-quick-create-template-actions-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.phone-quick-create-action-primary,
.phone-quick-create-action {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
}

.phone-quick-create-action-primary {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}

.phone-quick-create-action {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-weight: 500;
}

.phone-quick-create-empty {
  padding: 10px 12px;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.4;
}

.phone-quick-create-footnote {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

body.phone-quick-create-open {
  overflow: hidden;
}
