:root {
  color-scheme: dark;
  --bg: #0b1120;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --primary: #1d4ed8;
  --secondary: #38bdf8;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.45);
  --year-alt: rgba(148, 163, 184, 0.08);
}

* {
  box-sizing: border-box;
}

/* Login Screen */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-screen.hidden {
  display: none;
}

.login-container {
  background: var(--card);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  margin: 0 auto 20px;
}

.login-container h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--text);
}

.login-container > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  text-align: left;
}

.login-field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}

.login-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 8px;
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
}

.login-error.hidden {
  display: none;
}

/* User menu in topbar */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.current-user {
  font-size: 13px;
  color: var(--muted);
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 18px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sync status indicator */
.sync-status {
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: help;
  transition: all 0.3s ease;
}

.sync-ready {
  color: #60a5fa;
}

.sync-syncing {
  color: #fbbf24;
  animation: spin 1s linear infinite;
}

.sync-synced {
  color: #34d399;
}

.sync-offline {
  color: #9ca3af;
}

.sync-error {
  color: #f87171;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.btn.secondary {
  background: var(--secondary);
}

.btn.danger {
  background: var(--danger);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toolbar {
  background: var(--card);
  padding: 10px 24px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}

.tab {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.role-toggle {
  display: flex;
  gap: 4px;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.role-btn {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.15s ease;
}

.role-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.role-btn.active {
  background: var(--secondary);
  color: #fff;
  border-color: transparent;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.controls label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: var(--muted);
  gap: 4px;
  min-width: 100px;
}

.controls select,
.controls input {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0f172a;
  font-size: 12px;
  color: var(--text);
}

.content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 24px;
  gap: 0;
}

.grid-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--card);
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.grid-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 20;
  background: var(--card);
  border-radius: 12px 12px 0 0;
}

.grid-header-left {
  padding: 10px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 80px;
}

.grid-header-left h2 {
  margin: 0;
  font-size: 16px;
}

.grid-header-right {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.grid-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px max-content;
  align-content: start;
  cursor: crosshair;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  user-select: none;
  -webkit-user-select: none;
}

.grid-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.grid-body::-webkit-scrollbar-track {
  background: transparent;
}

.grid-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.grid-body::-webkit-scrollbar-corner {
  background: transparent;
}

.grid-body.dragging {
  cursor: crosshair;
}

.sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-actions .btn {
  padding: 5px 10px;
  font-size: 11px;
}

.ship-header-left,
.ship-header-right {
  height: 36px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ship-header-left {
  position: sticky;
  left: 0;
  z-index: 10;
  padding: 0 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  justify-content: space-between;
  cursor: pointer;
}

.ship-header-left:hover {
  filter: brightness(1.1);
}

.ship-header-right {
  padding: 0 12px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  background-image: repeating-linear-gradient(to right, rgba(148, 163, 184, 0.12) 0, rgba(148, 163, 184, 0.12) 1px, transparent 1px, transparent var(--col-width, 40px));
}

.ship-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.ship-header-left:hover .ship-actions {
  opacity: 1;
}

.ship-action-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
}

.ship-action-btn:hover {
  background: rgba(255,255,255,0.25);
}

.ship-action-btn.danger:hover {
  background: rgba(220, 38, 38, 0.5);
}

.person-name-cell {
  position: sticky;
  left: 0;
  z-index: 5;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.12);
}

.person-name-cell.active {
  background: rgba(59, 130, 246, 0.25) !important;
}

.role-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-right: 6px;
}

.role-badge.manager {
  background: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.role-badge.assistant {
  background: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.person-timeline-cell {
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  min-height: 40px;
}

.timeline-body {
  flex: 1;
  overflow: auto;
  position: relative;
  background: #0f172a;
}

.timeline-grid {
  position: relative;
  min-height: 100%;
  background-image: repeating-linear-gradient(
    to right,
    rgba(148, 163, 184, 0.12) 0,
    rgba(148, 163, 184, 0.12) 1px,
    transparent 1px,
    transparent var(--col-width, 40px)
  );
}

.ship-row {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.ship-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.year-bands {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.year-band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: transparent;
}

.year-band.year-alt {
  background: var(--year-alt);
}

.row {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--col-width, 40px);
  border-bottom: 1px solid var(--border);
  min-height: 56px;
  z-index: 1;
}

.row-label {
  position: sticky;
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 5;
}

.block {
  position: absolute;
  top: 4px;
  height: 32px;
  border-radius: 6px;
  padding: 2px 10px;
  color: #fff;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
  cursor: grab;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.5);
  overflow: hidden;
}

.block.selected {
  outline: 2px solid #111827;
}

.block.preview {
  opacity: 0.5;
  pointer-events: none;
}

.block .handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 100%;
  background: transparent;
  cursor: ew-resize;
  z-index: 10;
}

.block .handle[data-handle="start"] {
  left: 0;
  border-radius: 4px 0 0 4px;
}

.block .handle[data-handle="end"] {
  right: 0;
  border-radius: 0 4px 4px 0;
}

.block:hover .handle {
  background: rgba(255, 255, 255, 0.3);
}

.block .handle:hover {
  background: rgba(255, 255, 255, 0.6);
}

.block-label {
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.block-duration {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 500;
}

.block-dates {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.85);
}

.row-gaps {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--col-width, 40px);
  pointer-events: none;
}

.gap-cell {
  background: rgba(220, 38, 38, 0.12);
}

.settings-panel {
  position: fixed;
  top: 60px;
  right: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  z-index: 50;
  min-width: 280px;
  max-width: 320px;
  display: none;
}

.settings-panel.open {
  display: block;
}

.settings-panel h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-panel .btn-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.settings-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.settings-grid label,
.checkbox {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bulk-actions {
  display: grid;
  gap: 8px;
}

.bulk-actions .btn {
  width: 100%;
}

.context-menu {
  position: fixed;
  background: #0f172a;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 100;
}

.context-menu.hidden {
  display: none;
}

.context-menu button {
  background: none;
  border: none;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}

.context-menu button:hover {
  background: rgba(148, 163, 184, 0.15);
}

.context-menu button.danger {
  color: var(--danger);
}

.context-menu button.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.context-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.month-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--col-width, 40px);
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.month-cell {
  padding: 10px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.month-cell.month-start {
  border-left: 2px solid var(--border);
}

.month-cell.year-alt {
  background: rgba(148, 163, 184, 0.08);
}

.week-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--col-width, 40px);
  align-items: stretch;
}

.week-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 6px;
  min-height: 56px;
  border-right: 1px solid var(--border);
}

.week-cell.year-start {
  border-left: 3px solid var(--primary);
}

.week-cell.year-alt {
  background: rgba(148, 163, 184, 0.08);
}

.week-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.week-date {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
}

@media (max-width: 980px) {
  .content {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-content.modal-small {
  max-width: 400px;
}

.drag-action-body {
  padding: 20px;
  text-align: center;
}

.drag-action-body p {
  margin: 0 0 20px 0;
  color: var(--text);
  font-size: 14px;
}

.drag-action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.drag-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 30px;
  min-width: 140px;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.drag-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.drag-action-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.drag-action-label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.drag-action-desc {
  font-size: 11px;
  opacity: 0.7;
  font-weight: normal;
}

.roster-modal {
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text);
}

.roster-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.roster-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  border-bottom: 2px solid transparent;
}

.roster-tab.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.roster-actions {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.roster-modal-search {
  flex: 1;
  min-width: 150px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  font-size: 13px;
}

.roster-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  max-height: 400px;
}

.roster-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.roster-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

.roster-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.roster-item-info {
  flex: 1;
}

.roster-item-name {
  font-weight: 500;
}

.roster-item-id {
  font-size: 12px;
  color: var(--muted);
}

.roster-item-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.roster-item:hover .roster-item-actions {
  opacity: 1;
}

.roster-item-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 4px;
  color: var(--text);
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.roster-item-btn:hover {
  background: rgba(255,255,255,0.2);
}

.roster-item-btn.danger:hover {
  background: rgba(220, 38, 38, 0.5);
}

.roster-footer, .modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.add-person-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  max-height: 350px;
}

.roster-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.in-schedule {
  background: rgba(34, 197, 94, 0.15);
}

.in-schedule .roster-item-id::after {
  content: " (in schedule)";
  color: rgb(34, 197, 94);
}

/* Roster View (Full Screen) */
.roster-view {
  padding: 16px 24px;
}

.roster-view.hidden {
  display: none;
}

.roster-view-container {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.roster-view-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.roster-view-header h2 {
  margin: 0;
  font-size: 18px;
}

.roster-view-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.roster-search {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  font-size: 13px;
  min-width: 250px;
}

.roster-table-wrapper {
  flex: 1;
  overflow: auto;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.roster-table th,
.roster-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.roster-table th {
  background: rgba(0, 0, 0, 0.2);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 10;
}

.roster-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.roster-table .in-schedule-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  background: rgba(34, 197, 94, 0.2);
  color: rgb(34, 197, 94);
}

.roster-table .not-in-schedule-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  background: rgba(148, 163, 184, 0.2);
  color: var(--muted);
}

.roster-table .actions-cell {
  display: flex;
  gap: 6px;
}

.roster-table .action-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 11px;
  background: var(--border);
  color: var(--text);
}

.roster-table .action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.roster-table .action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.roster-table .action-btn.primary {
  background: var(--primary);
}

.roster-table .role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.roster-table .role-badge.manager {
  background: rgba(59, 130, 246, 0.2);
  color: rgb(96, 165, 250);
}

.roster-table .role-badge.assistant {
  background: rgba(168, 85, 247, 0.2);
  color: rgb(192, 132, 252);
}

/* Date Modal for adding blocks */
.date-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.date-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  min-width: 320px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.date-modal h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--text);
}

.date-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.date-modal-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.date-modal-fields input,
.date-modal-fields select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f172a;
  font-size: 14px;
  color: var(--text);
}

.date-modal-fields input:focus,
.date-modal-fields select:focus {
  outline: none;
  border-color: var(--primary);
}

.date-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-picker-row input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.color-picker-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

.color-picker-row input[type="color"]::-webkit-color-swatch {
  border-radius: 4px;
  border: none;
}

.color-preview {
  display: inline-block;
  width: 100px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
