/* === CSS Variables === */
:root {
  /* Wrike-like light theme */
  --bg-primary: #f6f7fb;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f2f4f8;
  --bg-input: #ffffff;
  
  /* Gantt chart */
  --gantt-designer-width: 80px;
  
  --text-primary: #1f2328;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  
  --accent-blue: #2f67ff;
  --accent-blue-glow: rgba(47, 103, 255, 0.10);
  --accent-orange: #f59e0b;
  --accent-orange-glow: rgba(245, 158, 11, 0.12);
  --accent-green: #16a34a;
  --accent-green-glow: rgba(22, 163, 74, 0.12);
  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.10);
  --accent-red: #dc2626;
  
  --border: #e5e7eb;
  --border-light: #d1d5db;
  
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 10px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 24px rgba(16, 24, 40, 0.12);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  --sidebar-width: 260px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* No background pattern in light mode */
body::before { content: none; }

/* === App Layout === */
.app {
  display: flex;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-blue);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(47, 103, 255, 0.25);
}

.logo span {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(47, 103, 255, 0.10);
  color: var(--accent-blue);
}

.nav-item svg {
  flex-shrink: 0;
}

.sync-status {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sync-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
}

.sync-indicator.connected {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.sync-indicator.syncing {
  background: var(--accent-orange);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* === Main Content === */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px 32px;
  max-width: calc(100vw - var(--sidebar-width));
}

/* === Header === */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.header-right {
  display: flex;
  gap: 12px;
}

.btn-icon-only {
  padding: 10px 12px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
}

.btn-primary:hover {
  background: #3d8fef;
  box-shadow: 0 4px 16px rgba(77, 159, 255, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-danger {
  background: rgba(248, 113, 113, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

/* === Weekly report modal === */
.weekly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.weekly-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weekly-col-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.weekly-col-title {
  font-weight: 700;
  color: var(--text-primary);
}

.weekly-col-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.weekly-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.weekly-today-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  padding: 10px;
  min-height: 420px;
  overflow: auto;
}

.weekly-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.weekly-item + .weekly-item {
  margin-top: 10px;
}

.weekly-item-header {
  font-weight: 700;
  margin-bottom: 6px;
}

.weekly-item-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.weekly-item-meta .mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.weekly-note-wrap {
  margin-top: 8px;
}

.weekly-note-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.weekly-note {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg-input);
  resize: vertical;
  min-height: 58px;
}

.weekly-note:focus {
  outline: none;
  border-color: rgba(47, 103, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(47, 103, 255, 0.12);
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* === Timezone Card === */
.timezones-card .card-body {
  padding-top: 18px;
}

.tz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.tz-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(47, 103, 255, 0.06), rgba(255, 255, 255, 0));
  padding: 14px 16px;
}

.tz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tz-label {
  font-weight: 700;
  color: var(--text-primary);
}

.tz-badge {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.tz-time {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tz-date {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tz-converter {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 6px;
}

.tz-converter-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tz-converter-title {
  font-weight: 700;
}

.tz-converter-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tz-converter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
}

.tz-converter-output {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  padding: 12px 14px;
}

.tz-output-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.tz-output-value {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

@media (max-width: 768px) {
  .tz-grid {
    grid-template-columns: 1fr;
  }
  .tz-converter-row {
    grid-template-columns: 1fr;
  }
}

/* === Team Schedule View === */
.team-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}

.team-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 14px 16px;
}

.team-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.team-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  overflow: hidden;
}

.team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

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

.team-item-main {
  min-width: 0;
}

.team-item-name {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-item-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.team-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team-selected-title {
  font-weight: 800;
}

.team-selected-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

/* === Stats Grid === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue {
  background: var(--accent-blue-glow);
  color: var(--accent-blue);
}

.stat-icon.orange {
  background: var(--accent-orange-glow);
  color: var(--accent-orange);
}

.stat-icon.green {
  background: var(--accent-green-glow);
  color: var(--accent-green);
}

.stat-icon.purple {
  background: var(--accent-purple-glow);
  color: var(--accent-purple);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === Content Grid === */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body {
  padding: 20px 24px;
}

.badge {
  background: var(--accent-blue-glow);
  color: var(--accent-blue);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.link:hover {
  text-decoration: underline;
}

/* === Projects List === */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.project-item:hover {
  border-color: var(--border-light);
}

.project-info {
  flex: 1;
}

.project-name {
  font-weight: 500;
  margin-bottom: 4px;
}

.project-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
}

.project-deadline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.deadline-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}

.deadline-badge.urgent {
  background: rgba(248, 113, 113, 0.15);
  color: var(--accent-red);
}

.deadline-badge.soon {
  background: var(--accent-orange-glow);
  color: var(--accent-orange);
}

.deadline-badge.normal {
  background: var(--accent-green-glow);
  color: var(--accent-green);
}

.status-badge {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-blue-glow);
  color: var(--accent-blue);
}

/* Status Grouping Styles */
.status-group {
  margin-bottom: 24px;
}

.status-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-group-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.status-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-header-row {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 2fr 1fr 120px 120px;
  gap: 16px;
  padding: 10px 16px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.task-header-row .col-date,
.task-header-row .col-status {
  text-align: right;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-link:hover {
  text-decoration: underline;
}

.project-caret {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--text-muted);
}

.task-row-expand {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 12px 16px;
  background: #fff;
  margin-top: -8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-row-expand .btn {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.task-row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.task-row-estimate {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.estimate-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 600;
}

.estimate-label input {
  width: 100px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.estimate-summary {
  flex: 1 1 260px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.task-row.is-expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.task-row + .task-row-expand {
  margin-bottom: 8px;
}

.task-row {
  display: grid;
  grid-template-columns: 2fr 1fr 120px 120px;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  align-items: center;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.task-row:hover {
  border-color: var(--border-light);
  background: rgba(47, 103, 255, 0.06);
}

.task-location {
  font-weight: 500;
  color: var(--accent-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.task-name {
  color: var(--text-primary);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-align: right;
  color: var(--text-secondary);
}

.task-date.urgent { color: var(--accent-red); }
.task-date.soon { color: var(--accent-orange); }

.status-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: #f9fafb;
}

.status-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--text-muted);
}

.status-pill.active {
  border-color: rgba(47, 103, 255, 0.25);
  background: rgba(47, 103, 255, 0.10);
  color: #1d4ed8;
}
.status-pill.active::before { background: #1d4ed8; }

.status-pill.inprogress {
  border-color: rgba(245, 158, 11, 0.30);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}
.status-pill.inprogress::before { background: #f59e0b; }
}

/* === Deliveries List === */
.deliveries-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delivery-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-purple);
}

.delivery-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
}

.delivery-date .day {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

.delivery-date .month {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.delivery-info {
  flex: 1;
}

.delivery-project {
  font-weight: 500;
  margin-bottom: 2px;
}

.delivery-version {
  font-size: 0.85rem;
  color: var(--accent-purple);
}

.delivery-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: var(--transition);
}

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

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-icon.delete:hover {
  background: rgba(248, 113, 113, 0.1);
  color: var(--accent-red);
  border-color: rgba(248, 113, 113, 0.3);
}

/* === Views === */
.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

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

/* === Forms === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-blue);
}

/* === Timelog Card === */
.timelog-card {
  max-width: 500px;
}

.timelog-form {
  padding-top: 8px;
}

/* === Settings === */
.settings-section {
  margin-bottom: 32px;
}

.settings-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-label {
  font-weight: 500;
}

.setting-value {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.setting-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-hover);
  border-radius: 26px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--text-primary);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-blue);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* === Modal === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

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

/* === Toast === */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  min-width: 280px;
}

.toast.success {
  border-left: 3px solid var(--accent-green);
}

.toast.error {
  border-left: 3px solid var(--accent-red);
}

.toast.info {
  border-left: 3px solid var(--accent-blue);
}

.toast.loading {
  border-left: 3px solid var(--accent-blue);
}

.toast-icon .spin {
  animation: spin 1s linear infinite;
}

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

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
}

/* === Loading Skeleton === */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-item {
  height: 60px;
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-hover) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

/* === Deliveries Manager === */
.deliveries-manager {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-deliveries {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.project-deliveries-header h4 {
  font-weight: 500;
}

.project-deliveries-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.delivery-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.delivery-row-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent-blue);
  min-width: 100px;
}

.delivery-row-version {
  flex: 1;
  font-weight: 500;
}

.delivery-row-notes {
  flex: 2;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.delivery-row-actions {
  display: flex;
  gap: 8px;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* === Gantt Chart Redesign (Excel-like Single Row) === */
.gantt-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: auto; /* 전체 가로/세로 스크롤 */
  max-height: calc(100vh - 220px);
  position: relative;
}

.gantt-main-wrapper {
  min-width: max-content;
  display: flex;
  flex-direction: column;
}

/* Header & Row Layout */
.gantt-header-row,
.gantt-row-wrapper {
  display: flex;
  min-height: 40px;
  border-bottom: 1px solid var(--border);
}

.gantt-header-row {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-hover);
  height: 56px;
}

/* Fixed Columns (Sticky Left) */
.gantt-header-fixed,
.gantt-row-fixed {
  position: sticky;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  width: var(--gantt-panel-width, 420px);
  flex-shrink: 0;
  background: inherit;
  border-right: 2px solid var(--border);
  box-sizing: border-box;
}

.gantt-row-fixed {
  background: var(--bg-card);
}

.gantt-row-wrapper:hover .gantt-row-fixed {
  background: var(--bg-hover);
}

/* Column Widths inside Fixed */
.gantt-col-assign { 
  width: var(--gantt-assign-width, 120px); 
  flex-shrink: 0; 
  padding: 0 8px; 
  height: 100%; 
  display: flex; 
  align-items: center; 
  font-size: 0.8rem; 
  font-weight: 500; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
}
.gantt-col-owner { 
  width: var(--gantt-owner-width, 100px); 
  flex-shrink: 0; 
  padding: 0 8px; 
  height: 100%; 
  display: flex; 
  align-items: center; 
  font-size: 0.8rem; 
  font-weight: 500; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
}
.gantt-col-project { 
  flex: 1; 
  padding: 0 12px; 
  font-size: 0.85rem; 
  font-weight: 500; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
  display: flex; 
  align-items: center; 
  min-width: 100px; 
  gap: 4px;
}
.gantt-col-project span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-hide-btn {
  opacity: 0;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.gantt-row-wrapper:hover .gantt-hide-btn {
  opacity: 1;
}
.gantt-hide-btn:hover {
  background: var(--danger);
  color: white;
}

/* Owner dropdown in gantt rows */
.gantt-col-owner {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gantt-owner-select {
  flex: 1;
  padding: 4px 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
}
.gantt-owner-select:hover {
  border-color: var(--accent-blue);
}
.gantt-owner-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px var(--accent-blue-glow);
}
.gantt-owner-save-btn {
  padding: 4px 8px;
  font-size: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.gantt-owner-save-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* Column Resizer Handle */
.gantt-col-resizer {
  width: 6px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  transition: background 0.2s;
}
.gantt-col-resizer::after {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 2px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.2s;
}
.gantt-col-resizer:hover {
  background: rgba(77, 159, 255, 0.1);
}
.gantt-col-resizer:hover::after {
  background: var(--accent-blue);
}
.gantt-col-resizer.dragging {
  background: rgba(77, 159, 255, 0.2);
}
.gantt-col-resizer.dragging::after {
  background: var(--accent-blue);
}

/* Fixed panel width controls */
.gantt-resize-controls {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.gantt-resize-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
  cursor: pointer;
  color: var(--text-muted);
}
.gantt-resize-btn:hover {
  background: var(--accent-blue-glow);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Timeline Part */
.gantt-header-timeline,
.gantt-row-timeline {
  display: flex;
  flex: 1;
  position: relative;
}

.gantt-header-timeline {
  height: 56px;
}

.gantt-row-timeline {
  height: 40px;
}

/* Dates */
.gantt-date-cell {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
  box-sizing: border-box;
  position: relative;
}

/* Month/day format on 1st of each month */
.gantt-date-cell .day-num .month-day {
  font-size: 10px;
}

/* Holiday indicator bar */
.gantt-date-cell .holiday-bar {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 3px;
  border-radius: 2px;
  cursor: pointer;
}

.gantt-date-cell .holiday-bar.holiday-bar-kr {
  background-color: #dc2626;
}

.gantt-date-cell .holiday-bar.holiday-bar-us {
  background-color: #c084fc;
}

.gantt-date-cell.holiday-both {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(220, 38, 38, 0.10) 0px,
      rgba(220, 38, 38, 0.10) 4px,
      rgba(220, 38, 38, 0.03) 4px,
      rgba(220, 38, 38, 0.03) 8px
    );
}

.gantt-date-cell .holiday-bar.holiday-bar-single {
  bottom: 2px;
}

.gantt-date-cell .holiday-bar.holiday-bar-top {
  bottom: 6px;
}

.gantt-date-cell .holiday-bar.holiday-bar-bottom {
  bottom: 2px;
}

.gantt-date-cell .holiday-bar .holiday-tooltip {
  display: none;
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 100;
}

.gantt-date-cell .holiday-bar:hover .holiday-tooltip {
  display: block;
}

/* Timeline Cells in Rows */
.gantt-timeline-cell {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  flex-shrink: 0;
  height: 100%;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  position: relative;
  cursor: pointer;
}

.gantt-timeline-cell:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Milestone marker - rendered at timeline level, above bars but below modals */
.gantt-marker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #facc15;
  border-radius: 50%;
  border: 2px solid #fef08a;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.9);
  pointer-events: none;
  z-index: 10;
}

/* Marker status colors */
.gantt-marker.marker-default,
.gantt-marker.marker-incomplete {
  background: #facc15;
  border-color: #fef08a;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.9);
}
.gantt-marker.marker-complete {
  background: #22c55e;
  border-color: #86efac;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.9);
}
.gantt-marker.marker-closed {
  background: #9ca3af;
  border-color: #d1d5db;
  box-shadow: 0 0 6px rgba(156, 163, 175, 0.9);
}

.gantt-timeline-cell.has-marker {
  background: rgba(245, 158, 11, 0.08);
}

.gantt-timeline-cell.weekend-sat { background: rgba(47, 103, 255, 0.03); }
.gantt-timeline-cell.weekend-sun { background: rgba(220, 38, 38, 0.03); }
.gantt-timeline-cell.holiday-us { background: rgba(192, 132, 252, 0.08); }
.gantt-timeline-cell.holiday-both {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(220, 38, 38, 0.08) 0px,
      rgba(220, 38, 38, 0.08) 4px,
      rgba(220, 38, 38, 0.02) 4px,
      rgba(220, 38, 38, 0.02) 8px
    );
}

/* Header weekend colors */
.gantt-date-cell.weekend-sat .day-num,
.gantt-date-cell.weekend-sat .day-name { color: #2f67ff; }
.gantt-date-cell.weekend-sun .day-num,
.gantt-date-cell.weekend-sun .day-name { color: #dc2626; }

.gantt-timeline-cell.today { background: rgba(47, 103, 255, 0.08); border-left: 2px solid var(--accent-blue); border-right: 2px solid var(--accent-blue); z-index: 1; }

/* Effort Heatmap - background color based on effort hours (orange to crimson) */
.gantt-timeline-cell.effort-level-1 { background-color: rgba(255, 140, 0, 0.35); }
.gantt-timeline-cell.effort-level-2 { background-color: rgba(255, 100, 50, 0.45); }
.gantt-timeline-cell.effort-level-3 { background-color: rgba(220, 60, 80, 0.50); }
.gantt-timeline-cell.effort-level-4 { background-color: rgba(200, 30, 80, 0.55); }
.gantt-timeline-cell.effort-level-5 { background-color: rgba(180, 0, 80, 0.65); }

/* Effort Summary Row */
.effort-summary-wrapper {
  min-height: 20px !important;
  border-top: 2px solid var(--border);
}

.effort-summary-wrapper .gantt-row-fixed,
.effort-summary-wrapper .gantt-row-timeline {
  height: 20px;
}

.effort-summary-label {
  justify-content: flex-end !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
}

.effort-summary-timeline {
  overflow: hidden;
}

.effort-summary-cell {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 500;
  color: var(--text-secondary);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.effort-summary-cell.effort-level-1 { background-color: rgba(255, 140, 0, 0.35); color: #333; }
.effort-summary-cell.effort-level-2 { background-color: rgba(255, 100, 50, 0.45); color: #333; }
.effort-summary-cell.effort-level-3 { background-color: rgba(220, 60, 80, 0.50); color: #fff; }
.effort-summary-cell.effort-level-4 { background-color: rgba(200, 30, 80, 0.55); color: #fff; }
.effort-summary-cell.effort-level-5 { background-color: rgba(180, 0, 80, 0.65); color: #fff; }

/* Gantt Toolbar */
.gantt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.gantt-filters {
  display: flex;
  align-items: flex-end;
  gap: 4px; /* 기본 간격 좁게 */
}

.gantt-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gantt-filters .filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.gantt-filters .filter-group select {
  padding: 6px 10px;
  font-size: 0.85rem;
  min-width: 100px;
}

/* 담당자 - 상태 사이 벌림 */
.gantt-filters .filter-group:nth-child(1) {
  margin-right: 20px;
}

/* 상태 - 종료 사이 벌림 */
.gantt-filters .filter-group:nth-child(2) {
  margin-right: 20px;
}

/* 버튼 그룹 간격 */
.gantt-actions {
  display: flex;
  gap: 12px;
}

/* Bars & Events */
.gantt-bar {
  position: absolute;
  top: 8px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  cursor: pointer;
  z-index: 5;
  white-space: nowrap;
  background: var(--accent-blue);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Designer-specific bar colors */
.gantt-bar.kyunghwan { background: #3b82f6; }
.gantt-bar.tommy { background: #a855f7; }
.gantt-bar.other { background: #8b5cf6; }
.gantt-bar.manual { background: #f59e0b; }
.gantt-bar.completed { 
  filter: saturate(0.3) brightness(1.2);
  opacity: 0.7;
}
.gantt-bar:hover { filter: brightness(1.1); }
.gantt-bar.completed:hover { filter: saturate(0.5) brightness(1.2); }

/* Completed row styling */
.gantt-row-wrapper.completed {
  opacity: 0.7;
}
.gantt-row-wrapper.completed .gantt-col-project {
  text-decoration: line-through;
  color: var(--text-muted);
}

.gantt-events-row-wrapper { background: var(--bg-hover); font-size: 0.75rem; color: var(--text-muted); }
.gantt-events-label .gantt-col-designer { font-weight: 600; }

.gantt-event {
  position: absolute;
  top: 10px;
  height: 20px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 4px;
  z-index: 5;
  white-space: nowrap;
}

/* Add Row */
.gantt-add-row-wrapper { border-bottom: none; }
.gantt-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
}
.gantt-add-btn:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: var(--accent-blue-glow); }

/* === Responsive === */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: var(--transition);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main {
    margin-left: 0;
    padding: 16px;
    max-width: 100vw;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .header-left {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  #pageTitle {
    margin-top: 2px;
  }
  
  .header-right {
    width: 100%;
  }
  
  .header-right .btn {
    flex: 1;
    justify-content: center;
  }

  /* Project list as horizontal-scroll table on mobile */
  .projects-list {
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .task-header-row,
  .task-row {
    min-width: 720px;
  }
  .task-row-expand {
    min-width: 720px;
    flex-wrap: wrap;
  }
}

/* Gantt Tooltip */
.gantt-tooltip {
  position: fixed;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gantt-tooltip .tooltip-date {
  font-weight: 600;
  margin-bottom: 2px;
}

.gantt-tooltip .tooltip-effort {
  color: #fbbf24;
}

.gantt-tooltip .tooltip-milestone {
  color: #60a5fa;
}

/* Cell Modal Styles */
.cell-modal-date {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cell-section {
  margin-bottom: 12px;
}

.cell-section-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.cell-section-value {
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.cell-section-value:empty::before,
.cell-section-value:has(:-moz-only-whitespace)::before {
  content: '-';
  color: var(--text-muted);
}

#cellReadMode, #cellEditMode {
  min-height: 120px;
}

/* Dashboard Projects List */
.dashboard-project-header,
.dashboard-project-row {
  display: grid;
  grid-template-columns: 1fr 120px 100px 32px;
  gap: 12px;
  padding: 10px 12px;
  align-items: center;
}

.dashboard-project-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
  border-radius: 6px 6px 0 0;
}

.dashboard-project-row {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.dashboard-project-row:last-child {
  border-bottom: none;
}

.dashboard-project-row:hover {
  background: var(--bg-hover);
}

.dashboard-project-name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-project-designer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-project-deadline {
  font-size: 0.85rem;
  font-weight: 500;
}

.dashboard-project-deadline.normal {
  color: var(--text-secondary);
}

.dashboard-project-deadline.soon {
  color: var(--accent-orange);
}

.dashboard-project-deadline.urgent {
  color: var(--accent-red);
}

.dashboard-project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.dashboard-project-link:hover {
  opacity: 1;
  color: var(--accent-blue);
}

@media (max-width: 768px) {
  .dashboard-project-header,
  .dashboard-project-row {
    grid-template-columns: 1fr 80px 80px 24px;
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}
