/* Shared design tokens + scaffolding for login/admin/assistant/client portals.
   Tokens match the marketing site (index.html) for visual consistency. */

:root {
  --gold: #B8975A;
  --gold-lt: #D4B87A;
  --gold-dim: rgba(184, 151, 90, 0.18);
  --dark: #111111;
  --mid: #444444;
  --light: #888888;
  --border: #E8E3D9;
  --cream: #FAF8F4;
  --cream-dk: #F2EDE5;
  --white: #FFFFFF;
  --danger: #B3453D;
  --danger-bg: #FBEAE8;
  --success: #4A7A5E;
  --success-bg: #EAF3ED;
  --warning: #96690F;
  --warning-bg: #FBF1DE;
  --info: #3D6A8C;
  --info-bg: #E9F1F6;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Montserrat', Arial, sans-serif;
  --ease: 0.2s ease;
  --max: 1180px;
  --shadow-sm: 0 1px 3px rgba(17,17,17,0.06), 0 1px 2px rgba(17,17,17,0.04);
  --shadow-md: 0 8px 28px rgba(17,17,17,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
}

* , *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 12px; }

.wrap { width: 92%; max-width: var(--max); margin: 0 auto; }

a { color: var(--gold); }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--dark);
  background: var(--dark);
  color: var(--white);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity var(--ease), transform var(--ease);
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: translateY(1px); }
.btn--outline { background: transparent; color: var(--dark); }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--white); }
.btn--gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); }
.btn--sm { padding: 6px 14px; font-size: 10px; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card--hover { transition: box-shadow var(--ease), transform var(--ease); }
.card--hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 14px;
  background: var(--white);
  color: var(--dark);
  transition: border-color var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--light); font-weight: 600; }
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: var(--cream); }

.alert { padding: 12px 16px; border-radius: 4px; font-size: 13px; margin-bottom: 16px; }
.alert--error { background: var(--danger-bg); color: var(--danger); }
.alert--success { background: var(--success-bg); color: var(--success); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold-dim);
  color: var(--gold);
}
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }

[data-editable] { cursor: pointer; border-bottom: 1px dashed transparent; }
[data-editable]:hover { border-bottom-color: var(--gold); }
[data-editable].editing-saving { opacity: 0.5; }
[data-editable].editing-saved { background: var(--success-bg); }
[data-editable].editing-error { background: var(--danger-bg); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.topbar__brand {
  font-family: var(--serif);
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar__brand img { display: block; }
.topbar__meta { margin-right: 16px; color: var(--mid); font-size: 12px; }

/* ── SECTION HEAD (portal equivalent of the marketing site's .sh) ──── */
.section-head { margin-bottom: 20px; }
.section-head__eye {
  font-size: 9px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px;
}
.section-head__title {
  font-family: var(--serif); font-size: 26px; font-weight: 500;
  color: var(--dark); margin: 0 0 4px;
}
.section-head__sub { font-size: 12.5px; color: var(--light); }

/* ── PORTAL HERO (dark welcome banner) ───────────────────────────── */
.portal-hero {
  background: var(--dark);
  border-radius: var(--radius-md);
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.portal-hero::before {
  content: '';
  position: absolute; top: -40%; right: -8%;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,151,90,0.28) 0%, transparent 70%);
}
.portal-hero__eye {
  font-size: 9px; font-weight: 600; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
  position: relative;
}
.portal-hero__title {
  font-family: var(--serif); font-size: clamp(24px, 3vw, 34px);
  font-weight: 400; color: var(--white); margin: 0 0 8px; position: relative;
}
.portal-hero__title em { font-style: italic; color: var(--gold); }
.portal-hero__sub { font-size: 13px; color: rgba(255,255,255,0.55); max-width: 560px; position: relative; }

/* Set --hero-photo: url('/img/....jpg') inline per page. The gradient is
   baked into the same background-image (not a separate overlay element)
   so it always paints under the existing ::before gold blob and the text
   without fighting z-index/stacking order. */
.portal-hero--photo {
  background-image: linear-gradient(120deg, rgba(17,17,17,0.94) 0%, rgba(17,17,17,0.82) 42%, rgba(17,17,17,0.45) 100%), var(--hero-photo);
  background-size: cover;
  background-position: center;
}

/* ── TABS (segmented pill nav, shared canonical) ─────────────────── */
.tabs {
  display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px; box-shadow: var(--shadow-sm);
}
.tab {
  padding: 9px 18px; border: none; border-radius: 999px;
  background: transparent; color: var(--mid);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em;
  cursor: pointer; transition: background var(--ease), color var(--ease);
  white-space: nowrap;
}
.tab:hover { color: var(--dark); }
.tab.active { background: var(--dark); color: var(--white); }
.panel { display: none; }
.panel.active { display: block; animation: panelIn .25s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── STAT TILES ───────────────────────────────────────────────────── */
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-tile {
  flex: 1; min-width: 150px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
}
.stat-tile__icon {
  width: 22px; height: 22px; color: var(--gold); margin-bottom: 8px;
}
.stat-tile__n { font-family: var(--serif); font-size: 30px; color: var(--dark); line-height: 1.1; }
.stat-tile__l { font-size: 10.5px; color: var(--light); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* ── PROGRESS BAR ─────────────────────────────────────────────────── */
.progress { background: var(--border); border-radius: 999px; height: 10px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--gold); transition: width .4s ease; }

/* ── PROMO BANNER (upsell / callout) ─────────────────────────────── */
.promo-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--dark) 0%, #1c1a17 100%);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  margin-bottom: 20px;
}
.promo-banner__eye { font-size: 9px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.promo-banner__title { font-family: var(--serif); font-size: 20px; color: var(--white); margin: 0 0 4px; }
.promo-banner__body { font-size: 12.5px; color: rgba(255,255,255,0.55); max-width: 460px; }

/* ── QUOTE / TESTIMONIAL ──────────────────────────────────────────── */
.quote-card { background: var(--cream); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); padding: 20px 24px; }
.quote-card__mark { font-family: var(--serif); font-size: 40px; color: var(--gold); line-height: 0.6; display: block; margin-bottom: 8px; }
.quote-card__text { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--mid); line-height: 1.6; margin-bottom: 12px; }
.quote-card__author { font-size: 11px; color: var(--light); letter-spacing: 0.04em; text-transform: uppercase; }

/* ── FOUNDER / AVATAR ─────────────────────────────────────────────── */
.founder-row { display: flex; gap: 20px; flex-wrap: wrap; }
.founder-card { display: flex; align-items: center; gap: 12px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.founder-card__name { font-family: var(--serif); font-size: 15px; color: var(--dark); }
.founder-card__title { font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* ── SERVICE CARD ─────────────────────────────────────────────────── */
.service-card {
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 12px; background: var(--white); box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: flex-start;
}
.service-card__icon {
  width: 36px; height: 36px; border-radius: 50%; background: var(--gold-dim);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.service-card__icon svg { width: 18px; height: 18px; }
.service-card h3 { font-size: 15px; margin-bottom: 4px; }
.service-card p { font-size: 12px; color: var(--mid); margin: 0; }
.service-card__photo {
  width: 76px; height: 76px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0; margin-left: auto;
}

/* ── CHECKLIST / GOAL / ACHIEVEMENT ──────────────────────────────── */
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.checklist-item.done { opacity: 0.55; }
.checklist-item.done span { text-decoration: line-through; }
.qual-badge { display: inline-block; margin: 2px 4px 2px 0; }

.goal-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.goal-card:last-child { border-bottom: none; }
.goal-card__title { font-size: 13.5px; font-weight: 600; color: var(--dark); }
.goal-card__desc { font-size: 12px; color: var(--mid); margin-top: 3px; }

/* ── EMPTY STATE ──────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 32px 20px; color: var(--light); font-size: 13px; }

/* ── KPI GRID (admin) ────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold);
}
.kpi-card--warn::before { background: var(--warning); }
.kpi-card--info::before { background: var(--info); }
.kpi-card--clickable { cursor: pointer; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.kpi-card--clickable:hover { box-shadow: var(--shadow-md, 0 4px 14px rgba(0,0,0,0.08)); transform: translateY(-2px); }
.kpi-card__icon { width: 20px; height: 20px; color: var(--gold); margin-bottom: 10px; }
.kpi-card__n { font-family: var(--serif); font-size: 28px; color: var(--dark); line-height: 1; }
.kpi-card__l { font-size: 10.5px; color: var(--light); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }

/* ── KANBAN BOARD ─────────────────────────────────────────────────── */
.board-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.board-toolbar input[type="text"], .board-toolbar select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px;
  font-family: var(--sans); font-size: 13px; background: var(--white); color: var(--dark);
}
.board-toolbar input[type="text"] { flex: 1; min-width: 160px; }

.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.board__col {
  flex: 0 0 260px; width: 260px;
  background: var(--cream-dk); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px; min-height: 120px; transition: background var(--ease), box-shadow var(--ease);
}
.board__col--over { background: var(--gold-dim); box-shadow: inset 0 0 0 2px var(--gold); }
.board__col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }
.board__col-title { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mid); }
.board__col-count {
  font-size: 10.5px; font-weight: 600; color: var(--light); background: var(--white);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px;
}
.board__col-body { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }

.board-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow-sm); cursor: grab;
  transition: box-shadow var(--ease), transform var(--ease), opacity var(--ease);
}
.board-card:hover { box-shadow: var(--shadow-md); }
.board-card--dragging { opacity: 0.4; }
.board-card__title { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; line-height: 1.35; }
.board-card__meta { font-size: 11px; color: var(--light); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.board-card__meta strong { color: var(--mid); font-weight: 600; }
.board-card__badges { display: flex; gap: 6px; flex-wrap: wrap; }
.board-card--urgent { border-left: 3px solid var(--danger); }
.board-card__due { font-size: 10.5px; color: var(--light); margin-top: 4px; }
.board-card__due--overdue { color: var(--danger); font-weight: 600; }
.board__empty { text-align: center; padding: 18px 6px; color: var(--light); font-size: 11.5px; }
.board__footnote { text-align: center; margin-top: 12px; font-size: 11.5px; color: var(--light); cursor: pointer; }

/* ── MODAL ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17,17,17,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.modal {
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: 28px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal__sub { font-size: 12.5px; color: var(--light); margin-bottom: 18px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

@media (max-width: 720px) {
  .promo-banner { flex-direction: column; align-items: flex-start; }
  .tabs { overflow-x: auto; }
  .board__col { flex: 0 0 220px; width: 220px; }
}
