* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #111827;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ================= HEADER ================= */

.smatl-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #0f172a;
  color: white;
  box-shadow: 0 2px 6px rgba(15,23,42,0.5);
}

.smatl-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.smatl-logo {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 18px;
}

.smatl-nav a {
  color: #e5e7eb;
  margin-right: 12px;
  font-size: 14px;
}

.smatl-nav a:hover {
  color: white;
}

.smatl-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.smatl-user-name {
  color: #e5e7eb;
}

/* Main container under header */
/* ===== Project Timeline: full-width workspace ===== */

/* Default pages stay centered at 1100px via .smatl-main */
.smatl-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* But allow specific pages (timeline) to break out of the 1100px container */
.page-card--wide {
  max-width: none;               /* remove the cap */
  width: 100%;
  padding: 20px;                 /* tighter than 80px */
  text-align: left;
}

/* Make timeline page visually "full bleed" even inside centered container */
.page-card--wide {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;                  /* full viewport width */
  border-radius: 0;              /* optional: looks more app-like */
}

/* Give breathing room on large screens, but still aligned */
.page-card--wide .timeline-wrapper,
.page-card--wide .timeline-toolbar,
.page-card--wide .project-header,
.page-card--wide .hint {
  max-width: 1400px;             /* content width inside full-bleed */
  margin-left: auto;
  margin-right: auto;
}

/* Make timeline taller so it feels like an app */
.page-card--wide .timeline-scroller {
  max-height: 650px;
}


/* ================= FOOTER ================= */

.smatl-footer {
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 13px;
  background: #f3f4f6;
}

.smatl-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  text-align: center;
}

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-ghost {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(209,213,219,0.3);
}

.btn-ghost:hover {
  background: rgba(15,23,42,0.4);
}

.btn-small {
  padding: 4px 10px;
  font-size: 13px;
}

/* ================= FORMS ================= */

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;          /* taller, more modern inputs */
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  background-color: #ffffff;
}

.form-inline {
  display: flex;
  gap: 16px;
}

.form-inline .form-group {
  flex: 1;
}

/* ================= AUTH / PAGE CARDS ================= */

/* Login / Register / Page cards – unified big scale (same as empty state) */
.auth-card,
.page-card {
  max-width: 900px;                 /* match empty-state width */
  width: 100%;
  margin: 40px auto;
  padding: 80px 60px;               /* match empty-state padding */
  border-radius: 26px;
  background: #ffffff;
  text-align: center;
  box-shadow:
    0 30px 60px rgba(15,23,42,0.12),
    0 10px 20px rgba(15,23,42,0.08);
}


.page-card--left h1,
.page-card--left h2,
.page-card--left p {
  text-align: left;
}

/* Give the timeline a larger visible area */
.timeline-scroller {
  max-height: 620px;          /* was 420px -> feels cramped */
}

/* Make toolbar breathe + wrap nicely on smaller screens */
.timeline-toolbar {
  padding: 10px 0 14px;
  align-items: flex-end;
  gap: 12px;
}

.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-end;
}

.toolbar-left h2 {
  margin: 0;
  font-size: 18px;
}

/* Softer borders, more premium timeline container */
.timeline-wrapper {
  border-radius: 16px;
  border: 1px solid #e6eaf2;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* Activity column feels heavy; tighten it a bit */
.lane-label-header,
.lane-label {
  width: 220px;               /* gives activity names room */
}

/* Less dense row separators */
.lane-row {
  border-bottom: 1px solid #eef2f7;
}


.auth-card h1,
.page-card h1 {
  margin-top: 0;
  margin-bottom: 28px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.6px;
  text-align: center;
}

.auth-switch {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
}

/* Make primary button on auth screens big and full-width */
.auth-card .btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  margin-top: 22px;
  border-radius: 14px;
}

/* ================= ALERTS ================= */

.alert {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ================= DASHBOARD ================= */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dashboard-header h1 {
  margin: 0 0 4px;
}

/* Centered greeting block (Hi + Create Project) */
.dashboard-hero {
  text-align: center;
  margin-bottom: 24px;
}

.dashboard-hero h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
}

.dashboard-hero .btn-primary {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
}

.muted {
  font-size: 13px;
  color: #6b7280;
}

/* BIG, premium empty state card */
.empty-state {
  max-width: 900px;
  width: 100%;
  margin: 40px auto;
  padding: 80px 60px;
  border-radius: 26px;
  background: #ffffff;
  text-align: center;
  box-shadow:
    0 30px 60px rgba(15,23,42,0.12),
    0 10px 20px rgba(15,23,42,0.08);
}

.empty-state h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 17px;
  color: #6b7280;
  margin-bottom: 28px;
}

.empty-state .btn {
  padding: 14px 26px;
  font-size: 16px;
  font-weight: 600;
}

/* Project grid: centered cards, up to 3 per row */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;          /* center 1, 2, or 3 cards */
}

/* Individual project cards */
.project-card {
  flex: 0 1 320px;                  /* base width for card */
  max-width: 360px;
  padding: 28px 28px 32px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow:
    0 18px 36px rgba(15,23,42,0.12),
    0 6px 14px rgba(15,23,42,0.08);
  display: flex;
  flex-direction: column;
}

.project-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.project-desc {
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
  margin: 0 0 12px;
}

.project-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.project-progress {
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 12px;
  color: #4b5563;
}

.project-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

/* Project header */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.project-meta-inline {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ================= TIMELINE ================= */

/* Notes pill (outside the bar) */
.annotation-label {
  position: absolute;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #f97316;
  background: #fff7ed;
  color: #9a3412;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
  cursor: pointer;
}


.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.timeline-toolbar label {
  font-size: 13px;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-toolbar input[type="date"],
.timeline-toolbar select {
  padding: 4px 6px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: white;
}

/* Outer container – no overflow here, to keep sticky working */
.timeline-wrapper {
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

/* Scroll container – this is the ONLY horizontal/vertical scroll area */
.timeline-scroller {
  max-height: 420px;
  overflow: auto;
  position: relative;
}

/* Header row */
.timeline-header {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Sticky "Activity" header */
.lane-label-header {
  width: 180px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  border-right: 1px solid #e5e7eb;
  color: #6b7280;
  background: #f9fafb;
  flex-shrink: 0;
  position: sticky;
  left: 0;               /* freeze on horizontal scroll */
  z-index: 6;
  background-clip: padding-box;
}

.time-scale {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Month, Week, Day rows */
.month-row,
.week-row,
.day-row {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;           /* IMPORTANT: prevent wrapping (no vertical stacking) */
}

/* Cells for month, week, day */
.month-cell,
.week-cell,
.day-cell {
  flex: 0 0 auto;
  text-align: center;
  border-right: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.month-row {
  border-bottom: 1px solid #e5e7eb;
  background: #f3f4f6;
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  height: 20px;
}

.week-row {
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 10px;
  font-weight: 500;
  color: #6b7280;
  height: 18px;
}

.day-row {
  background: #f9fafb;
  font-size: 10px;
  color: #6b7280;
  height: 22px;
}

.day-cell {
  padding-top: 2px;
}

.timeline-body {
  position: relative;
}

.lane-row {
  display: flex;
  border-bottom: 1px solid #f3f4f6;
}

/* Sticky Activity cells (left column) */
.lane-label {
  width: 180px;
  padding: 6px 8px;
  font-size: 12px;
  border-right: 1px solid #f3f4f6;
  background: #f9fafb;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 6px;
  position: sticky;
  left: 0;               /* freeze on horizontal scroll */
  z-index: 3;
  background-clip: padding-box;
}

.lane-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lane-track {
  position: relative;
  flex: 0 0 auto;
}

.lane-track::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, #f3f4f6 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

/* Task bars */
.item {
  position: absolute;
  height: 28px;
  border-radius: 6px;
  background: #e0f2fe;
  border: 1px solid #38bdf8;
  padding: 4px 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  user-select: none;
  overflow: hidden;
  z-index: 2;
  cursor: grab;

  /* allow absolute-positioned handle inside */
  position: absolute;
}

.item.dragging {
  cursor: grabbing;
  opacity: 0.9;
}

.item.completed {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #6b7280;
}

.item-title {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding-right: 14px; /* space so text doesn't sit under the handle */
}

/* Right-edge resize handle inside bar */
/* Right-edge resize / drag handle */
.resize-handle {
  position: absolute;
  top: 3px;
  right: 2px;                  /* flush to the right edge */
  width: 8px;
  height: calc(100% - 6px);    /* almost full height of bar */
  border-radius: 999px;
  border: 1px solid #2563eb;
  background: #bfdbfe;
  cursor: ew-resize;
}

/* Hint text */
.hint {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

/* === SMATL task modal overlay & dialog === */

.modal-overlay {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(15, 23, 42, 0.45); /* dark translucent backdrop */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  background: #ffffff;
  padding: 24px 24px 28px;
  box-shadow:
    0 24px 48px rgba(15,23,42,0.25),
    0 8px 18px rgba(15,23,42,0.18);
  text-align: left;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.modal .form-group label {
  font-size: 13px;
}

.modal .form-inline {
  gap: 12px;
}

.modal .btn {
  border-radius: 999px;
}

/* Notes pill shown to the right of each task bar */
.note-pill {
  position: absolute;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #f97316;
  background: #fff7ed;
  color: #9a3412;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  z-index: 3;
}

.task-complete-toggle {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #9ca3af;
  margin-right: 4px;
  flex-shrink: 0;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #ffffff;
  color: #10b981;
}

.item.completed .task-complete-toggle {
  background: #bbf7d0;
  border-color: #10b981;
}

.resize-handle {
  width: 8px;
  height: 80%;
  margin-left: 4px;
  border-radius: 999px;
  border: 1px solid #0ea5e9;
  background: #bae6fd;
  cursor: ew-resize;
  flex-shrink: 0;
}

/* ===== Baseline toolbar ===== */
.baseline-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  flex-wrap: wrap;
}

.baseline-label {
  font-size: 13px;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.baseline-info {
  font-size: 12px;
  color: #4b5563;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Week row (Month -> Week -> Day) ===== */
.week-row {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  height: 18px;
}

.week-cell {
  flex: 0 0 auto;
  text-align: center;
  border-right: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ===== Sticky Activity column (reinforced) ===== */
.lane-label-header,
.lane-label {
  position: sticky;
  left: 0;
  background: #f9fafb;
}

.lane-label-header {
  z-index: 30;
  box-shadow: 2px 0 0 rgba(229,231,235,1);
}

.lane-label {
  z-index: 20;
  box-shadow: 2px 0 0 rgba(243,244,246,1);
}

/* ===== Diff bar (red underline segments) ===== */
.diff-bar {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  background: #ef4444;
  pointer-events: none;
  z-index: 3;
}

/* ===== Delay pills (outside bar, right side) ===== */
.delay-label {
  position: absolute;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #facc15;
  background: #fefce8;
  color: #854d0e;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
  cursor: default;
}

/* ===== Notes pill (outside bar, to the right) ===== */
.annotation-label {
  position: absolute;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #ef4444;
  background: #fff1f2;
  color: #9f1239;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
  cursor: pointer;
}

/* ===== Resize handle at right edge ===== */
.resize-handle {
  width: 8px;
  height: 80%;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid #0ea5e9;
  background: #bae6fd;
  cursor: ew-resize;
  flex: 0 0 auto;
}


