/* ========================================================
   Project Signal — Sales Dashboard v0.1 shared styles
   Module accent: teal. Shared with the rest of the app:
   navy nav, brand amber, universal green/orange/red statuses.
   ======================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif; }
body { background: #f5f5f0; color: #1a1a1a; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* ───────── Navy nav bar (consistent across all Sales pages) ───────── */
.nav {
  background: #0A1843;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(10, 24, 67, 0.08);
}
.nav-brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-logo { width: 24px; height: 24px; flex-shrink: 0; }
.nav-brand { display: flex; gap: 5px; align-items: baseline; font-size: 15px; letter-spacing: -0.01em; }
.brand-project { color: #FFFFFF; font-weight: 500; }
.brand-signal { color: #9CA3DD; font-weight: 400; }
.nav-page-title {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
  color: #FFFFFF;
  font-weight: 400;
  white-space: nowrap;
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.hamburger-wrap { position: relative; }
.hamburger-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  transition: background 0.15s;
}
.hamburger-btn:hover { background: rgba(255, 255, 255, 0.15); }
.hamburger-btn span { display: block; width: 16px; height: 1.5px; background: #FFFFFF; border-radius: 2px; }
.nav-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: white; border: 1px solid #e5e5e0; border-radius: 10px; min-width: 220px; overflow: hidden; z-index: 999; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); }
.nav-dropdown.open { display: block; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13px; text-decoration: none; border-bottom: 0.5px solid #f0f0ec; color: #1a1a1a; }
.nav-item:last-child { border-bottom: none; }
.nav-item:hover { background: #f5f5f0; }
.nav-item.active { font-weight: 500; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
@media (max-width: 720px) {
  .nav { padding: 10px 14px; }
  .nav-page-title { display: none; }
  .nav-brand { font-size: 13px; }
}

/* ───────── Page shell ───────── */
.s-shell { padding: 18px 22px 32px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 720px) { .s-shell { padding: 14px 12px 24px; } }

/* ───────── Section header ───────── */
.s-section { margin-bottom: 20px; }
.s-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
  flex-wrap: wrap;
}
.s-section-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #0F6E56;
  flex-shrink: 0;
}
.s-section-title { font-size: 14px; font-weight: 500; color: #0A1843; }
.s-section-meta { margin-left: auto; font-size: 11px; color: #6B7280; }
.s-section-link { font-size: 12px; color: #0F6E56; font-weight: 500; margin-left: auto; }
.s-section-link:hover { text-decoration: underline; }

/* ───────── 4-tile stats grid ───────── */
.s-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.s-stat-tile {
  background: white;
  border: 0.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 14px 16px;
}
.s-stat-top { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #6B7280; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500; margin-bottom: 6px; }
.s-stat-icon { width: 14px; height: 14px; color: #0F6E56; flex-shrink: 0; }
.s-stat-num { font-size: 28px; font-weight: 500; color: #0A1843; line-height: 1.1; }
.s-stat-num.red    { color: #B91C1C; }
.s-stat-num.green  { color: #047857; }
.s-stat-num.orange { color: #C2410C; }
.s-stat-num.teal   { color: #0F6E56; }
.s-stat-sub { font-size: 11px; color: #9CA3AF; margin-top: 3px; }
@media (max-width: 720px) { .s-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; } .s-stat-num { font-size: 22px; } }

/* ───────── Daily/Weekly toggle ───────── */
.s-toggle-group {
  display: inline-flex;
  background: #F3F4F6;
  border: 0.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 2px;
}
.s-toggle-btn {
  background: transparent;
  border: none;
  font: inherit;
  font-size: 12px;
  color: #6B7280;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}
.s-toggle-btn.active {
  background: white;
  color: #0A1843;
  box-shadow: 0 1px 2px rgba(10,24,67,0.08);
}

/* ───────── Filter bar ───────── */
.s-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: white;
  border: 0.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.s-input, .s-select {
  background: white;
  border: 0.5px solid #D1D5DB;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: #1a1a1a;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.s-input:focus, .s-select:focus { border-color: #0F6E56; box-shadow: 0 0 0 2px rgba(15,110,86,0.12); }
.s-input::placeholder { color: #9CA3AF; }
.s-input.s-search { min-width: 220px; flex: 1; }

/* ───────── Cards / lists ───────── */
.s-card {
  background: white;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
}
.s-card-row {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 0.5px solid #F3F4F6;
  cursor: pointer;
  transition: background 0.1s;
}
.s-card-row:last-child { border-bottom: none; }
.s-card-row:hover { background: #FAFAF8; }
.s-card-row.no-hover { cursor: default; }
.s-card-row.no-hover:hover { background: transparent; }

/* Attention-state left border */
.s-row-inactive { border-left: 3px solid #B91C1C; }
.s-row-due      { border-left: 3px solid #C2410C; }
.s-row-active   { border-left: 3px solid #047857; }
.s-row-closed   { border-left: 3px solid #9CA3AF; }

.s-row-main { flex: 1; min-width: 0; }
.s-row-title { font-size: 13px; color: #0A1843; font-weight: 500; line-height: 1.3; }
.s-row-sub { font-size: 11px; color: #6B7280; margin-top: 2px; line-height: 1.4; }
.s-row-right { font-size: 12px; color: #6B7280; flex-shrink: 0; text-align: right; }
.s-row-right.red    { color: #B91C1C; font-weight: 500; }
.s-row-right.orange { color: #C2410C; font-weight: 500; }
.s-row-right.green  { color: #047857; font-weight: 500; }

/* Empty / loading states */
.s-empty {
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: #6B7280;
}
.s-loading { padding: 40px; text-align: center; color: #6B7280; font-size: 13px; }

/* ───────── Status pills (the 4 customer statuses) ───────── */
.s-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 0.5px solid transparent;
}
.s-pill.status-in-progress      { background: #E1F5EE; color: #0F6E56; border-color: #B6E3D2; }
.s-pill.status-follow-up-needed { background: #FFEDD5; color: #C2410C; border-color: #FED7AA; }
.s-pill.status-closed-won       { background: #D1FAE5; color: #047857; border-color: #A7F3D0; }
.s-pill.status-closed-lost      { background: #F3F4F6; color: #6B7280; border-color: #E5E7EB; }

/* ───────── Buttons ───────── */
.s-btn {
  background: #0F6E56;
  color: #FFFFFF;
  border: none;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}
.s-btn:hover { background: #0a5a47; }
.s-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.s-btn.ghost { background: white; color: #0F6E56; border: 0.5px solid #B6E3D2; }
.s-btn.ghost:hover { background: #E1F5EE; }
.s-btn.dashed {
  background: transparent;
  color: #0F6E56;
  border: 1.5px dashed #B6E3D2;
  padding: 12px 16px;
  width: 100%;
  justify-content: center;
}
.s-btn.dashed:hover { background: #E1F5EE; }
.s-btn.danger { background: transparent; color: #B91C1C; border: 0.5px solid #FCA5A5; padding: 4px 8px; font-size: 12px; }
.s-btn.danger:hover { background: #FEE2E2; }

/* F-16: top-of-page progress bar shown during async refetches. */
.s-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 30%;
  height: 2px;
  background: #0F6E56;
  z-index: 100;
  animation: s-loading-slide 1.2s ease-in-out infinite;
  display: none;
}
@keyframes s-loading-slide {
  0%   { left: -30%; }
  100% { left: 100%; }
}

/* ───────── Today's report card (sales team member) ───────── */
.s-today-card {
  background: linear-gradient(135deg, #E1F5EE 0%, #FFFFFF 100%);
  border: 0.5px solid #B6E3D2;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.s-today-card.submitted {
  background: white;
  border-color: #E5E7EB;
  padding: 14px 18px;
}
.s-today-icon {
  width: 38px; height: 38px;
  background: #0F6E56;
  color: white;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.s-today-card.submitted .s-today-icon { background: #047857; }
.s-today-main { flex: 1; min-width: 0; }
.s-today-title { font-size: 14px; font-weight: 500; color: #0A1843; }
.s-today-sub { font-size: 12px; color: #6B7280; margin-top: 3px; }
.s-today-edit { font-size: 12px; color: #0F6E56; font-weight: 500; }
.s-today-edit:hover { text-decoration: underline; }

/* Date-driven banner variants: edit (blue), locked (gray), quiet (neutral) */
.s-today-card.edit {
  background: linear-gradient(135deg, #E0F2FE 0%, #FFFFFF 100%);
  border-color: #BAE6FD;
}
.s-today-card.edit .s-today-icon { background: #0369A1; }
.s-today-card.locked {
  background: #F9FAFB;
  border-color: #E5E7EB;
}
.s-today-card.locked .s-today-icon { background: #6B7280; }
.s-today-card.quiet {
  background: #FAFAF8;
  border-color: #F3F4F6;
}
.s-today-card.quiet .s-today-icon { background: #9CA3AF; }
.s-today-sub.muted { color: #9CA3AF; }
.s-today-sub strong { color: #1a1a1a; font-weight: 500; }

/* Outlined blue button (secondary CTA in edit banner) */
.s-btn.outline-blue {
  background: white;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}
.s-btn.outline-blue:hover { background: #E0F2FE; }
.s-btn.locked {
  background: #F3F4F6;
  color: #9CA3AF;
  border: 1px solid #E5E7EB;
  cursor: not-allowed;
  pointer-events: none;
}

/* ───────── Team activity (admin/company) ───────── */
.s-team-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) 1fr auto;
  gap: 14px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 0.5px solid #F3F4F6;
}
.s-team-row:last-child { border-bottom: none; }
.s-team-identity { display: flex; gap: 10px; align-items: center; min-width: 0; }
.s-team-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #0F6E56; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.s-team-name { font-size: 13px; font-weight: 500; color: #0A1843; }
.s-team-title { font-size: 11px; color: #6B7280; margin-top: 1px; }
.s-team-meta { font-size: 12px; color: #6B7280; }
.s-team-meta strong { color: #1a1a1a; font-weight: 500; }
.s-status-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.s-status-pill.green  { background: #D1FAE5; color: #047857; }
.s-status-pill.orange { background: #FFEDD5; color: #C2410C; }
.s-status-pill.gray   { background: #F3F4F6; color: #6B7280; }
@media (max-width: 720px) {
  .s-team-row { grid-template-columns: 1fr auto; }
  .s-team-meta { grid-column: 1 / -1; padding-left: 42px; }
}

/* ───────── Legend ───────── */
.s-legend {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: #6B7280;
  margin-left: auto;
}
.s-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.s-legend-swatch { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ───────── Customer detail header ───────── */
.s-detail-header {
  background: white;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.s-detail-top { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.s-detail-name { font-size: 20px; font-weight: 500; color: #0A1843; line-height: 1.2; }
.s-detail-desc { font-size: 13px; color: #6B7280; margin-top: 4px; line-height: 1.4; }
.s-detail-facts { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 12px; border-top: 0.5px solid #F3F4F6; }
.s-detail-fact { font-size: 11px; color: #6B7280; }
.s-detail-fact strong { display: block; font-size: 14px; color: #0A1843; font-weight: 500; margin-top: 2px; }

.s-callout {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
}
.s-callout-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.s-callout.orange { background: #FFF7ED; border: 0.5px solid #FED7AA; color: #9A3412; }
.s-callout.orange .s-callout-icon { color: #C2410C; }
.s-callout.red { background: #FEF2F2; border: 0.5px solid #FCA5A5; color: #991B1B; }
.s-callout.red .s-callout-icon { color: #B91C1C; }
.s-callout-title { font-weight: 500; color: inherit; }
.s-callout-sub { font-size: 12px; color: inherit; opacity: 0.85; margin-top: 2px; }

/* ───────── Timeline ───────── */
.s-timeline { position: relative; padding-left: 26px; }
.s-timeline::before {
  content: '';
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: #E5E7EB;
}
.s-timeline-entry { position: relative; margin-bottom: 16px; }
.s-timeline-entry:last-child { margin-bottom: 0; }
.s-timeline-dot {
  position: absolute;
  left: -22px;
  top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #0F6E56;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #E5E7EB;
}
.s-timeline-dot.orange { background: #C2410C; }
.s-timeline-dot.red    { background: #B91C1C; }
.s-timeline-dot.green  { background: #047857; }
.s-timeline-dot.gray   { background: #9CA3AF; }
.s-timeline-card {
  background: white;
  border: 0.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 16px;
}
.s-timeline-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: #6B7280; margin-bottom: 6px; }
.s-timeline-meta strong { color: #0A1843; font-weight: 500; font-size: 12px; }
.s-timeline-dot-sep { width: 3px; height: 3px; background: #D1D5DB; border-radius: 50%; }
.s-timeline-action { font-size: 13px; color: #1a1a1a; line-height: 1.5; font-weight: 500; }
.s-timeline-update { font-size: 13px; color: #4B5563; line-height: 1.5; margin-top: 6px; }
.s-timeline-next {
  font-size: 12px; color: #6B7280;
  margin-top: 8px; padding-top: 8px;
  border-top: 0.5px solid #F3F4F6;
}
.s-timeline-next strong { color: #0F6E56; font-weight: 500; }

/* ───────── Daily report form ───────── */
.s-report-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.s-report-title { font-size: 20px; font-weight: 500; color: #0A1843; }
.s-report-date { font-size: 13px; color: #6B7280; }
.s-report-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  margin-left: auto;
}
.s-report-tag.draft     { background: #FEF3C7; color: #92400E; }
.s-report-tag.submitted { background: #D1FAE5; color: #047857; }

.s-info-strip {
  background: #E1F5EE;
  border: 0.5px solid #B6E3D2;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #0F6E56;
  display: flex;
  gap: 10px;
  align-items: center;
}
.s-info-strip-icon { width: 16px; height: 16px; flex-shrink: 0; }

.s-customer-block {
  background: white;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}
.s-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.s-block-num {
  width: 22px; height: 22px;
  background: #0F6E56;
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.s-block-title { font-size: 13px; font-weight: 500; color: #0A1843; }
.s-block-remove {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #B91C1C;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.s-block-remove:hover { background: #FEE2E2; }

.s-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.s-form-grid .s-form-field.full { grid-column: 1 / -1; }
.s-form-field { display: flex; flex-direction: column; gap: 4px; }
.s-form-label { font-size: 11px; color: #6B7280; font-weight: 500; text-transform: uppercase; letter-spacing: 0.3px; }
.s-form-label .req { color: #B91C1C; margin-left: 2px; }
.s-form-input, .s-form-select, .s-form-textarea {
  background: white;
  border: 0.5px solid #D1D5DB;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: #1a1a1a;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.s-form-textarea { resize: vertical; min-height: 60px; }
.s-form-input:focus, .s-form-select:focus, .s-form-textarea:focus {
  border-color: #0F6E56;
  box-shadow: 0 0 0 2px rgba(15,110,86,0.12);
}
.s-form-field.error .s-form-input,
.s-form-field.error .s-form-select,
.s-form-field.error .s-form-textarea { border-color: #B91C1C; }
@media (max-width: 600px) { .s-form-grid { grid-template-columns: 1fr; } }

.s-report-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 0.5px solid #E5E7EB;
}
.s-report-total {
  margin-left: auto;
  font-size: 13px;
  color: #0A1843;
  font-weight: 500;
}
.s-report-total span { color: #0F6E56; }

/* ───────── Modal (Add customer) ───────── */
.s-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 24, 67, 0.45);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.s-modal-backdrop.open { display: flex; }
.s-modal {
  background: white;
  border-radius: 14px;
  max-width: 440px; width: 100%;
  padding: 22px;
  box-shadow: 0 12px 40px rgba(10, 24, 67, 0.18);
}
.s-modal-title { font-size: 16px; font-weight: 500; color: #0A1843; margin-bottom: 14px; }
.s-modal-grid { display: flex; flex-direction: column; gap: 12px; }
.s-modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ───────── Toast ───────── */
.s-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0A1843;
  color: white;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(10, 24, 67, 0.3);
  z-index: 2000;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.s-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.s-toast.error { background: #B91C1C; }
.s-toast.success { background: #047857; }

/* ───────── Footer ───────── */
.s-footer-count { text-align: center; font-size: 11px; color: #9CA3AF; padding: 14px; }
.s-last-upd { font-size: 11px; color: #9CA3AF; text-align: center; padding: 12px; }
