/* ============================================================
   TTEC Digital SA Tools Portal — Shared Design System
   Brand: ttecdigital.com  |  Source Sans 3 + Source Code Pro
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;600;700;800&family=Source+Code+Pro:wght@400;500;600;700&display=swap');

/* ── DESIGN TOKENS (Light) ── */
:root {
  --bg:          #f4f6fa;
  --surface:     #ffffff;
  --surface2:    #f0f3f8;
  --border:      #e2e7f0;
  --border-md:   #c8d2e4;

  --teal:        #00b2b8;
  --teal-dark:   #008c91;
  --teal-pale:   #e6f7f8;
  --teal-glow:   rgba(0,178,184,0.12);

  --navy:        #0d1f3c;
  --navy-mid:    #1a3056;

  --text:        #0d1f3c;
  --text-mid:    #3d5068;
  --text-muted:  #7a8fa8;

  --green:       #0d9567;
  --green-pale:  rgba(13,149,103,0.08);
  --green-border:rgba(13,149,103,0.3);

  --red:         #dc2626;
  --red-pale:    rgba(220,38,38,0.07);

  --amber:       #b45309;
  --amber-pale:  rgba(180,83,9,0.08);

  --blue:        #1d4ed8;
  --blue-pale:   rgba(29,78,216,0.07);

  --warn:        #b45309;
  --warn-bg:     #fffbea;

  --font:        'Source Sans 3', 'Segoe UI', sans-serif;
  --serif:       'Source Sans 3', Georgia, serif;
  --mono:        'Source Code Pro', 'Consolas', monospace;
  --radius:      10px;
  --radius-lg:   14px;
}


/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── LOGO COMPONENT ── */
.ttec-logo-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--navy);
  border-radius: 6px;
  padding: 6px 10px 5px 9px;
  line-height: 1;
  gap: 1px;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
}
.ttec-logo-badge .lw {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ttec-logo-badge .lw sup {
  font-size: 7px;
  font-weight: 400;
  vertical-align: super;
  letter-spacing: 0;
  color: rgba(255,255,255,0.8);
}
.ttec-logo-badge .ls {
  font-family: var(--font);
  font-size: 8px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}

/* ── TOP BANNER ── */
.portal-banner {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  padding: 6px 16px;
  letter-spacing: 0.03em;
}
.portal-banner strong { color: var(--teal); font-weight: 700; }

/* ── NAVIGATION ── */
.portal-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(13,31,60,0.07);
}
.nav-left  { display: flex; align-items: center; gap: 12px; }
.nav-div   { width: 1px; height: 24px; background: var(--border); }
.nav-title { font-size: 13px; font-weight: 700; color: var(--navy); }
.nav-sub   { font-size: 10px; color: var(--teal); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px; }
.nav-right { display: flex; align-items: center; gap: 10px; }

.badge-sa {
  background: var(--teal-pale);
  border: 1px solid rgba(0,178,184,0.35);
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.nav-avatar {
  width: 32px; height: 32px;
  background: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--teal);
}

/* ── TOOL HEADER (inner pages) ── */
.tool-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(13,31,60,0.06);
}
.tool-topbar-left  { display: flex; align-items: center; gap: 14px; }
.tool-topbar-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.tool-topbar-sub   { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-top: 1px; }
.tool-topbar-right { display: flex; align-items: center; gap: 10px; }

/* ── PAGE HEADER ── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 22px 32px 18px;
}
.page-eyebrow {
  font-size: 10px; font-weight: 700; color: var(--teal);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px;
}
.page-title {
  font-family: var(--serif);
  font-size: 24px; font-weight: 400;
  color: var(--navy); line-height: 1.2; margin-bottom: 3px;
}
.page-sub { font-size: 13px; color: var(--text-muted); }

/* ── HERO STRIP (dark — for tool pages) ── */
.tool-hero {
  background: linear-gradient(135deg, #0f1a35 0%, #0d1f3c 100%);
  padding: 28px 32px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.015) 39px, rgba(255,255,255,0.015) 40px);
  pointer-events: none;
}
.tool-hero-inner  { max-width: 1500px; margin: 0 auto; position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tool-hero-kicker { font-size: 10px; font-family: var(--mono); color: var(--teal); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.tool-hero-kicker::before { content: ''; width: 16px; height: 1px; background: var(--teal); }
.tool-hero h2 { font-family: var(--serif); font-size: 22px; font-weight: 400; color: #fff; line-height: 1.2; margin-bottom: 4px; }
.tool-hero h2 span { color: var(--teal); }
.tool-hero-sub { font-size: 11px; color: rgba(255,255,255,0.45); font-family: var(--mono); }

/* KPI strip inside hero */
.hero-kpis { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.kpi-item  { text-align: center; min-width: 80px; }
.kpi-val   { font-size: 20px; font-weight: 700; font-family: var(--mono); color: #fff; line-height: 1; }
.kpi-label { font-size: 9px; font-family: var(--mono); color: rgba(255,255,255,0.4); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }
.kpi-div   { width: 1px; background: rgba(255,255,255,0.1); align-self: stretch; }

/* ── SECTION LABEL ── */
.section-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.11em; text-transform: uppercase;
  padding: 18px 24px 8px;
}

/* ── BUTTONS ── */
.btn {
  font-family: var(--font);
  font-size: 11px; font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.btn-primary {
  background: var(--teal); color: #fff;
  border-color: var(--teal);
}
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }

.btn-navy {
  background: var(--navy); color: #fff;
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-mid); }

.btn-outline {
  background: transparent; color: var(--text-mid);
  border-color: var(--border);
}
.btn-outline:hover { border-color: rgba(0,178,184,0.4); color: var(--teal-dark); }

.btn-teal-ghost {
  background: var(--teal-pale); color: var(--teal-dark);
  border-color: rgba(0,178,184,0.3);
}
.btn-teal-ghost:hover { background: rgba(0,178,184,0.18); }

.btn-danger { background: var(--red-pale); color: var(--red); border-color: rgba(220,38,38,0.25); }
.btn-danger:hover { background: rgba(220,38,38,0.14); }

/* ── FORM INPUTS ── */
input[type=text], input[type=number], input[type=date], input[type=email],
select, textarea {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface2);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,178,184,0.1);
  background: #fff;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

label {
  display: block;
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 5px;
}

.form-row   { margin-bottom: 14px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }

/* ── TOGGLE SWITCH ── */
.tog-wrap { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.tog-wrap input { opacity: 0; width: 0; height: 0; }
.tog-slider {
  position: absolute; inset: 0;
  background: var(--border-md);
  cursor: pointer; transition: 0.2s; border-radius: 20px;
}
.tog-slider::before {
  content: '';
  position: absolute;
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background: #fff; transition: 0.2s; border-radius: 50%;
}
input:checked + .tog-slider { background: var(--teal); }
input:checked + .tog-slider::before { transform: translateX(16px); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 4px rgba(13,31,60,0.05);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 13px; font-weight: 700; color: var(--navy); }
.card-sub   { font-size: 10px; color: var(--text-muted); font-family: var(--mono); margin-top: 2px; }
.card-body  { padding: 16px 18px; }

/* ── STATUS PILLS ── */
.pill {
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: 0.05em; text-transform: uppercase;
  display: inline-block;
}
.pill-teal    { background: var(--teal-pale);  border: 1px solid rgba(0,178,184,0.3); color: var(--teal-dark); }
.pill-navy    { background: rgba(13,31,60,0.08); border: 1px solid rgba(13,31,60,0.18); color: var(--navy); }
.pill-green   { background: var(--green-pale); border: 1px solid var(--green-border); color: var(--green); }
.pill-amber   { background: var(--amber-pale); border: 1px solid rgba(180,83,9,0.25); color: var(--amber); }
.pill-red     { background: var(--red-pale);   border: 1px solid rgba(220,38,38,0.25); color: var(--red); }
.pill-blue    { background: var(--blue-pale);  border: 1px solid rgba(29,78,216,0.25); color: var(--blue); }
.pill-muted   { background: var(--surface2);   border: 1px solid var(--border); color: var(--text-muted); }
.pill-warn    { background: #fff8e1; border: 1px solid #f0c040; color: #92620a; }

/* ── STAT BOX ── */
.stat-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.stat-label { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.stat-value { font-size: 18px; font-weight: 700; color: var(--navy); font-family: var(--mono); }
.stat-value.accent { color: var(--teal-dark); }

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: 10px; font-family: var(--mono);
  color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--surface2); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(226,231,240,0.6);
  font-size: 12px;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,31,60,0.55);
  z-index: 500;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 540px; max-width: calc(100vw - 40px);
  box-shadow: 0 24px 64px rgba(13,31,60,0.18);
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.modal-subtitle { font-size: 11px; color: var(--text-muted); font-family: var(--mono); margin-top: 3px; }
.modal-close { font-size: 18px; cursor: pointer; color: var(--text-muted); background: none; border: none; padding: 2px 6px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body   { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--navy); color: #fff;
  font-size: 12px; font-family: var(--mono);
  padding: 12px 20px;
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(13,31,60,0.2);
  z-index: 1000; display: none;
  animation: toastIn 0.2s ease;
}
.toast.show { display: block; }
.toast.error { border-left-color: var(--red); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── SECTION DIVIDER (inside panels) ── */
.sec-divider {
  padding: 8px 18px;
  font-size: 10px; font-family: var(--mono);
  color: #fff; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 8px;
}
.sec-divider.navy { background: var(--navy); }
.sec-divider.navy-mid { background: var(--navy-mid); }
.sec-divider-note { font-size: 9px; opacity: 0.6; margin-left: auto; letter-spacing: 0; text-transform: none; }

/* ── PHASE BADGES ── */
.phase-qualification { background: rgba(100,116,139,0.08); border: 1px solid rgba(100,116,139,0.3); color: #64748b; }
.phase-discovery      { background: var(--blue-pale);   border: 1px solid rgba(29,78,216,0.3);   color: var(--blue); }
.phase-solutioning    { background: rgba(109,40,217,0.07); border: 1px solid rgba(109,40,217,0.25); color: #6d28d9; }
.phase-proposal       { background: var(--amber-pale);  border: 1px solid rgba(180,83,9,0.3);    color: var(--amber); }
.phase-pre-close      { background: var(--green-pale);  border: 1px solid var(--green-border);   color: var(--green); }

/* ── MAIN CONTENT WRAPPER ── */
.main-content { max-width: 1500px; margin: 0 auto; padding: 24px 32px 60px; }

/* ── RESULT / LINE ITEM TABLES ── */
.lt { width: 100%; border-collapse: collapse; font-size: 11px; }
.lt th { text-align: left; padding: 6px 10px; background: var(--surface2); color: var(--text-muted); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--border); font-family: var(--mono); }
.lt td { padding: 7px 10px; border-bottom: 1px solid rgba(226,231,240,0.5); vertical-align: middle; }
.lt tr:last-child td { border-bottom: none; }
.lt tr.sub-total td { border-top: 1px solid var(--border); background: var(--surface2); font-weight: 600; }
.lt tr.grand-total td { border-top: 2px solid var(--border-md); background: var(--surface2); font-weight: 700; font-size: 12px; }
.lt .amt { text-align: right; font-family: var(--mono); font-weight: 600; }
.lt .zero { color: var(--text-muted); }
.lt .incl { color: var(--green); font-size: 9px; font-family: var(--mono); }
.lt .rate { color: var(--text-muted); font-size: 9px; font-family: var(--mono); }
.lt .cat { font-weight: 700; font-size: 10px; padding: 7px 10px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── DISCLAIMER ── */
.disclaimer {
  font-size: 10px; font-family: var(--mono); color: var(--text-muted);
  padding: 10px 14px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px;
  margin-top: 12px; line-height: 1.6;
}

/* ── EMPTY STATE ── */
.empty-state {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px; text-align: center;
}
.empty-icon  { font-size: 36px; margin-bottom: 14px; }
.empty-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.empty-sub   { font-size: 12px; font-family: var(--mono); color: var(--text-muted); line-height: 1.6; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .portal-nav { padding: 0 16px; }
  .main-content { padding: 16px; }
  .tool-hero, .page-header { padding-left: 16px; padding-right: 16px; }
  .form-row-2 { grid-template-columns: 1fr; }
}
