/* SprintSync – Light Theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #2563EB;
  --primary-dark:   #1D4ED8;
  --primary-light:  #DBEAFE;
  --primary-xlight: #EFF6FF;
  --bg:             #F1F5F9;
  --card:           #FFFFFF;
  --text:           #0F172A;
  --text-2:         #475569;
  --text-3:         #94A3B8;
  --border:         #E2E8F0;
  --border-focus:   #93C5FD;
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.05);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --radius:         8px;
  --radius-lg:      12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

html { font-size: 15px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.5; }

/* ── Typography ── */
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p  { color: var(--text-2); }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Navbar ── */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.navbar-brand .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: .9rem;
  font-weight: 800;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.navbar-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text-2);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Main Content ── */
.main { flex: 1; padding: 2rem; max-width: 1200px; margin: 0 auto; width: 100%; }
.main-wide { flex: 1; padding: 2rem; max-width: 1400px; margin: 0 auto; width: 100%; }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--text); }

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: .8rem; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .35rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-sub   { font-size: .8rem; color: var(--text-3); margin-top: .25rem; }
.stat-card.blue   .stat-value { color: var(--primary); }
.stat-card.green  .stat-value { color: var(--success); }
.stat-card.yellow .stat-value { color: var(--warning); }
.stat-card.red    .stat-value { color: var(--danger); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover   { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover   { background: #059669; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover    { background: #DC2626; }
.btn-ghost     { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover     { background: var(--bg); color: var(--text); }
.btn-sm        { padding: .35rem .75rem; font-size: .8rem; }
.btn-lg        { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-icon      { padding: .45rem; border-radius: var(--radius); }

/* ── Forms ── */
.form-group   { margin-bottom: 1.1rem; }
.form-label   { display: block; font-size: .875rem; font-weight: 500; color: var(--text); margin-bottom: .4rem; }
.form-label .req { color: var(--danger); margin-left: .15rem; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: .55rem .8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--text);
  background: var(--card);
  transition: border-color .15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-input::placeholder { color: var(--text-3); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: .78rem; color: var(--text-3); margin-top: .3rem; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: .3rem; }
.field-error { border-color: var(--danger) !important; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: var(--bg);
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--primary-xlight); }
tbody td { padding: .7rem 1rem; color: var(--text); vertical-align: middle; }
.td-muted { color: var(--text-3); font-size: .8rem; }

/* ── Dynamic row tables ── */
.row-table { width: 100%; border-collapse: collapse; }
.row-table th {
  background: var(--bg);
  padding: .5rem .6rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid var(--border);
  text-align: left;
}
.row-table td {
  border: 1px solid var(--border);
  padding: .3rem .3rem;
  vertical-align: middle;
}
.row-table .form-input,
.row-table .form-select { border: none; border-radius: 4px; padding: .4rem .5rem; font-size: .85rem; }
.row-table .form-input:focus,
.row-table .form-select:focus { border: 1.5px solid var(--primary); }
.row-table .col-id    { width: 110px; }
.row-table .col-pts   { width: 90px; }
.row-table .col-status{ width: 140px; }
.row-table .col-eta   { width: 120px; }
.row-table .col-action{ width: 40px; text-align: center; }

/* ── Tabs ── */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .6rem 1.2rem;
  border: none;
  background: transparent;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tab-btn:hover { color: var(--primary); background: var(--primary-xlight); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-xlight); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green   { background: var(--success-light); color: #065F46; }
.badge-yellow  { background: var(--warning-light); color: #92400E; }
.badge-red     { background: var(--danger-light); color: #991B1B; }
.badge-blue    { background: var(--primary-light); color: #1E40AF; }
.badge-gray    { background: #F1F5F9; color: var(--text-2); }
.badge-indigo  { background: #EEF2FF; color: #3730A3; }

/* ── Step Wizard ── */
.wizard-container { max-width: 860px; margin: 0 auto; }
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: var(--border);
  z-index: 0;
  transition: background .3s;
}
.step-item.completed:not(:last-child)::after,
.step-item.active:not(:last-child)::after { background: var(--primary-light); }
.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-3);
  transition: all .3s;
  z-index: 1;
  position: relative;
}
.step-item.active   .step-circle { border-color: var(--primary); background: var(--primary); color: #fff; }
.step-item.completed .step-circle { border-color: var(--success); background: var(--success); color: #fff; }
.step-label {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-3);
  text-align: center;
  line-height: 1.3;
}
.step-item.active   .step-label { color: var(--primary); }
.step-item.completed .step-label { color: var(--success); }

.step-panel { display: none; }
.step-panel.active { display: block; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.wizard-nav-right { display: flex; gap: .75rem; }

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2rem;
}
.auth-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.75rem;
}
.auth-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 800;
}
.auth-logo-text { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.auth-title { font-size: 1.35rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.auth-sub   { font-size: .875rem; color: var(--text-2); margin-bottom: 1.75rem; }

/* ── Alert Banner ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .8rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 1rem;
}
.alert-info    { background: var(--primary-light); color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-success { background: var(--success-light); color: #065F46; border: 1px solid #A7F3D0; }
.alert-warning { background: var(--warning-light); color: #92400E; border: 1px solid #FDE68A; }
.alert-danger  { background: var(--danger-light);  color: #991B1B; border: 1px solid #FECACA; }
.alert-icon    { flex-shrink: 0; font-size: 1rem; margin-top: .05rem; }
#auth-error    { display: none; }

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1.1rem;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  font-size: .875rem;
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  max-width: 360px;
  animation: toastIn .3s ease;
}
.toast.toast-success { background: var(--success); }
.toast.toast-error   { background: var(--danger); }
.toast.toast-warning { background: var(--warning); color: var(--text); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Week Banner ── */
.week-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.week-banner h2 { color: white; margin-bottom: .25rem; }
.week-banner p  { color: rgba(255,255,255,.8); }
.week-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.2);
  color: white;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-top: .5rem;
}

/* ── Preview Sheet ── */
.preview-sheet {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: .875rem;
}
.preview-title {
  background: var(--primary);
  color: white;
  padding: .9rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  letter-spacing: .02em;
}
.preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.preview-meta-item {
  padding: .6rem 1.25rem;
  border-right: 1px solid var(--border);
  display: flex;
  gap: .5rem;
}
.preview-meta-item:nth-child(even) { border-right: none; }
.preview-meta-item strong { color: var(--text-2); min-width: 100px; font-size: .8rem; text-transform: uppercase; font-weight: 600; letter-spacing: .03em; }
.preview-section-title {
  background: var(--primary-xlight);
  padding: .6rem 1.25rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--primary-dark);
  border-top: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.preview-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.preview-summary-item {
  padding: .8rem 1.25rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.preview-summary-item:last-child { border-right: none; }
.preview-summary-item .label { font-size: .75rem; color: var(--text-3); text-transform: uppercase; margin-bottom: .25rem; }
.preview-summary-item .value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.preview-table { width: 100%; border-collapse: collapse; }
.preview-table th {
  background: var(--bg);
  padding: .5rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid var(--border);
  text-align: left;
}
.preview-table td {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text);
}
.preview-table tr:nth-child(even) td { background: var(--bg); }
.preview-kv { padding: .6rem 1.25rem; display: flex; gap: .5rem; border-bottom: 1px solid var(--border); }
.preview-kv strong { min-width: 130px; font-size: .8rem; color: var(--text-2); }
.preview-blocker { padding: .5rem 1.25rem; border-bottom: 1px solid var(--border); color: var(--text); }
.preview-blocker::before { content: '— '; color: var(--text-3); }

/* ── Modal ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.modal-body  { padding: 1.5rem; }
.modal-close { border: none; background: none; cursor: pointer; color: var(--text-3); font-size: 1.2rem; padding: .25rem; border-radius: var(--radius); transition: background .15s; }
.modal-close:hover { background: var(--bg); color: var(--text); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-3);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.empty-state h3   { color: var(--text-2); margin-bottom: .35rem; }
.empty-state p    { font-size: .875rem; }

/* ── Loading Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.4rem; }
.breadcrumb { font-size: .8rem; color: var(--text-3); margin-bottom: .25rem; }
.breadcrumb span { color: var(--text-2); }

/* ── Utils ── */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .78rem; }
.text-muted { color: var(--text-3); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.font-semibold { font-weight: 600; }
.font-bold  { font-weight: 700; }
.w-full     { width: 100%; }
.hidden     { display: none !important; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* ── Inline form header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.section-title { font-size: .9rem; font-weight: 700; color: var(--text); }

/* ── Blocker list ── */
.blocker-item {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  margin-bottom: .5rem;
}
.blocker-item .form-input { flex: 1; }

/* ── Report status card ── */
.status-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  border: 1.5px solid;
  margin-bottom: 1rem;
}
.status-card.submitted { background: var(--success-light); border-color: #A7F3D0; }
.status-card.pending   { background: var(--warning-light); border-color: #FDE68A; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .main, .main-wide { padding: 1rem; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .step-label { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0 1rem; }
  .auth-card { padding: 1.75rem; }
  .preview-meta { grid-template-columns: 1fr; }
  .preview-meta-item { border-right: none; }
  .preview-summary-grid { grid-template-columns: 1fr; }
  .chart-grid-2 { grid-template-columns: 1fr !important; }
}
