/* ==========================================================================
   fullthrottle.ai Campaign Investment Planner
   Design tokens and shell per the fullthrottle.app product design system.
   ========================================================================== */

:root {
  --ft-teal: #1C97A6;
  --ft-teal-light: #2AC4DA;
  --ft-teal-dark: #056B79;
  --ft-green: #65a30d;
  --ft-green-btn: #5E972D;
  --ft-green-btn-border: #649130;
  --ft-green-btn-hover: #9ccc65;
  --ft-gold: #E1A800;
  --ft-sidebar-bg: #323D4C;
  --ft-submenu-bg: #2c3643;
  --ft-toolbar-bg: #5a636f;
  --ft-sidebar-width: 250px;
  --ft-sidebar-mini-width: 60px;
}

/* --- Utilities ----------------------------------------------------------- */

.number-font { font-family: 'DM Sans', sans-serif; font-weight: 700; line-height: 1; color: #1D1D1D; }
.text-ft-teal { color: var(--ft-teal) !important; }
.bg-ft-teal { background-color: var(--ft-teal) !important; }
.border-ft-teal { border-color: var(--ft-teal) !important; }
.text-ft-teal-light { color: var(--ft-teal-light) !important; }
.text-ft-green { color: var(--ft-green) !important; }
.text-ft-gold { color: var(--ft-gold) !important; }
.border-ft-gold { border-color: var(--ft-gold) !important; }
.fs-13 { font-size: 13px !important; }
.fs-12 { font-size: 12px !important; }
.fs-11 { font-size: 11px !important; }
.fs-10 { font-size: 10px !important; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ft-teal);
}
.field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #999;
  margin-bottom: 4px;
  display: block;
}

/* --- Shell --------------------------------------------------------------- */

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Helvetica Neue", Roboto, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: .9rem;
  background: #f0f2f5;
  color: #333;
}

#page-container { display: flex; min-height: 100vh; }

#sidebar {
  width: var(--ft-sidebar-mini-width);
  background: var(--ft-sidebar-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1030;
  overflow-x: hidden;
  transition: width .2s ease;
}
#sidebar:hover { width: var(--ft-sidebar-width); }

.sidebar-header {
  padding: 16px 12px;
  display: flex; align-items: center; justify-content: center;
  min-height: 64px;
}
.sidebar-header .logo-full { display: none; width: 160px; height: auto; }
.sidebar-header .logo-mini { display: block; width: 30px; height: auto; }
#sidebar:hover .sidebar-header .logo-full { display: block; }
#sidebar:hover .sidebar-header .logo-mini { display: none; }

.sidebar-nav { list-style: none; padding: 8px 0; margin: 0; }
.sidebar-nav a {
  display: flex; align-items: center;
  padding: 9px 16px;
  color: #EAEEEE99;
  text-decoration: none;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.sidebar-nav a:hover { color: #fff !important; background: rgba(255,255,255,.04); }
.sidebar-nav a.active { color: #fff; background: var(--ft-teal); }
.sidebar-nav .nav-icon {
  width: 28px; min-width: 28px; text-align: center;
  font-size: 15px; margin-right: 12px;
}
.sidebar-nav .nav-text { opacity: 0; transition: opacity .15s; overflow: hidden; }
#sidebar:hover .sidebar-nav .nav-text { opacity: 1; }

#main-container {
  margin-left: var(--ft-sidebar-mini-width);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.ft-header {
  background: var(--ft-sidebar-bg);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 12px;
}
.ft-header .advertiser-info { display: flex; align-items: center; gap: 12px; }
.ft-header .advertiser-name {
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase;
}
.ft-header .advertiser-url { color: rgba(255,255,255,.5); font-size: 11px; text-transform: uppercase; }
.ft-header .page-breadcrumb {
  display: inline-block;
  background: var(--ft-toolbar-bg);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px; line-height: 14px; margin-top: 6px;
}
.ft-header .page-breadcrumb i { margin-right: 4px; font-size: 10px; }
.ft-header .user-info {
  margin-left: auto; color: #fff; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.status-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #9ccc65; box-shadow: 0 0 3px 1px #9ccc65;
  display: inline-block;
}

.content { padding: 24px; flex: 1; }

/* --- Blocks -------------------------------------------------------------- */

.block {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  margin-bottom: 16px;
}
.block-header {
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
  display: flex; align-items: center; gap: 10px;
}
.block-header h3 {
  margin: 0; font-size: 16px; font-weight: 700;
  color: var(--ft-teal);
}
.block-content { padding: 20px; }

/* --- Forms --------------------------------------------------------------- */

.form-control:focus, .form-select:focus {
  border-color: var(--ft-teal) !important;
  box-shadow: none !important;
}
.form-control:hover, .form-select:hover { border-color: var(--ft-teal); }
.form-check-input:checked {
  background-color: var(--ft-teal);
  border-color: var(--ft-teal);
}
.form-check-input:focus { box-shadow: none; border-color: var(--ft-teal); }

.btn-ft {
  background: #fff; border: 1px solid var(--ft-teal); color: var(--ft-teal);
  font-weight: 600;
}
.btn-ft:hover { background: var(--ft-teal); color: #fff; border-color: var(--ft-teal); }
.btn-ft-solid { background: var(--ft-teal); border: 1px solid var(--ft-teal); color: #fff; font-weight: 600; }
.btn-ft-solid:hover { background: var(--ft-teal-dark); border-color: var(--ft-teal-dark); color: #fff; }
.btn-success {
  background: var(--ft-green-btn); border-color: var(--ft-green-btn-border);
}
.btn-success:hover, .btn-success:focus {
  background: var(--ft-green-btn-hover); border-color: var(--ft-green-btn-hover); color: #1D1D1D;
}

/* --- Segmented option tiles (campaign goal, geography) ------------------- */

.option-row { display: flex; flex-wrap: wrap; gap: 10px; }
.option-tile {
  flex: 1 1 0;
  min-width: 140px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #fff;
  padding: 10px 12px;
  font-size: 13px; font-weight: 600;
  color: #555;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: border-color .15s, color .15s, background .15s;
}
.option-tile i { color: #adb5bd; transition: color .15s; }
.option-tile:hover { border-color: var(--ft-teal); }
.option-tile.active {
  border-color: var(--ft-teal);
  color: var(--ft-teal);
  background: rgba(28,151,166,.05);
  box-shadow: inset 0 0 0 1px var(--ft-teal);
}
.option-tile.active i { color: var(--ft-teal); }
.option-tile.disabled { opacity: .5; cursor: not-allowed; }

/* --- Range sliders ------------------------------------------------------- */

.ft-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right,
    var(--ft-teal) 0%, var(--ft-teal) var(--pct, 50%),
    #e9ecef var(--pct, 50%), #e9ecef 100%);
  outline: none;
  margin: 10px 0 4px;
  cursor: pointer;
}
.ft-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ft-teal);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  cursor: pointer;
}
.ft-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ft-teal);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  cursor: pointer;
}
.ft-range:disabled { opacity: .45; cursor: not-allowed; }
.range-scale {
  display: flex; justify-content: space-between;
  font-size: 10px; font-weight: 700; color: #adb5bd;
  text-transform: uppercase; letter-spacing: .04em;
}
.range-value {
  font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 20px; color: var(--ft-teal); line-height: 1;
}

/* --- Tactic cards -------------------------------------------------------- */

.tactic-card {
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color .15s, opacity .15s;
}
.tactic-card.on { border-color: rgba(28,151,166,.45); }
.tactic-card.off { opacity: .6; background: #fafbfc; }
.tactic-title {
  font-size: 14px; font-weight: 700; color: #1D1D1D;
  display: flex; align-items: center; gap: 8px;
}
.tactic-title .tactic-icon {
  width: 26px; height: 26px; border-radius: 4px;
  background: var(--ft-teal); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.tactic-card.off .tactic-title .tactic-icon { background: #adb5bd; }
.tactic-metric .metric-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: #999; display: block;
}
.tactic-metric .metric-value {
  font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 17px; color: #1D1D1D; line-height: 1.2;
}
.mix-bar {
  height: 18px; border-radius: 3px; background: #e9ecef;
  overflow: hidden; flex: 1;
}
.mix-bar > span {
  display: block; height: 100%;
  background: var(--ft-teal);
  transition: width .25s ease;
}
.badge-floor {
  background: #fff; border: 1px solid var(--ft-gold);
  color: var(--ft-gold);
  font-size: 10px; font-weight: 700; border-radius: 3px;
  padding: 2px 6px; text-transform: uppercase; letter-spacing: .04em;
}

/* --- Forecast panel ------------------------------------------------------ */

.forecast-panel { position: sticky; top: 16px; }
.forecast-block {
  background: #fff; border: 1px solid var(--ft-teal);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  margin-bottom: 16px;
}
.forecast-head {
  padding: 12px 16px; border-bottom: 1px solid #eee;
  display: flex; align-items: center; gap: 8px;
}
.forecast-head .eyebrow { font-size: 10px; }
.forecast-head h4 {
  margin: 0; font-size: 16px; font-weight: 700; color: var(--ft-teal);
}
.forecast-body { padding: 16px; }
.forecast-stat .stat-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: #999; display: block; margin-bottom: 3px;
}
.forecast-stat .stat-value {
  font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 26px; color: #1D1D1D; line-height: 1;
}
.forecast-stat .stat-sub { font-size: 11px; color: #adb5bd; }

.investment-card {
  background: var(--ft-teal); border-radius: 4px;
  padding: 16px; color: #fff; margin-bottom: 8px;
}
.investment-card .ic-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: #fff; margin-bottom: 2px;
}
.investment-card .ic-desc { font-size: 11px; color: rgba(255,255,255,.85); margin-bottom: 8px; }
.investment-card .ic-value {
  font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 32px; color: #fff; line-height: 1;
}
.investment-card .ic-foot { font-size: 11px; color: rgba(255,255,255,.85); margin-top: 6px; }

.fee-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.fee-row:last-child { border-bottom: 0; }
.fee-row .fee-amount { font-family: 'DM Sans', sans-serif; font-weight: 700; color: #1D1D1D; }
.fee-row.total { border-top: 2px solid #eee; margin-top: 4px; padding-top: 10px; border-bottom: 0; }
.fee-row.total .fee-amount { color: var(--ft-teal); font-size: 16px; }

/* --- Mix table ----------------------------------------------------------- */

.table thead th {
  font-size: 10px; text-transform: uppercase; font-weight: 700;
  letter-spacing: .05em; color: #999; border-bottom: 1px solid #eee;
}
.table td { font-size: 13px; vertical-align: middle; }
.table td.num { text-align: right; }

/* --- Assumption note ----------------------------------------------------- */

.note {
  font-size: 11px; color: #6c757d; line-height: 1.5;
}
.assumption {
  border-left: 3px solid var(--ft-gold);
  background: #fffdf5;
  padding: 8px 12px;
  font-size: 11px; color: #6c757d;
  border-radius: 0 3px 3px 0;
}

.stale { opacity: .45; transition: opacity .12s; }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 991.98px) {
  .forecast-panel { position: static; }
  .content { padding: 16px; }
}

/* --- Print --------------------------------------------------------------- */

@media print {
  #sidebar, .ft-header, .no-print { display: none !important; }
  #main-container { margin-left: 0; }
  .content { padding: 0; }
  .block, .forecast-block { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .forecast-panel { position: static; }
}
