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

:root {
  --navy:       #1B2A4A;
  --navy-dark:  #132038;
  --navy-mid:   #243558;
  --gold:       #C9A84C;
  --gold-light: #E8D5A3;
  --gold-dim:   #8a7035;
  --cream:      #F5F0E8;
  --cream-dark: #EDE7D9;
  --white:      #FFFFFF;
  --border:     #E2D9C8;
  --text:       #1B2A4A;
  --text-mid:   #4a5568;
  --text-muted: #8a8a9a;
  --green:      #2d7a4f;
  --green-bg:   #e8f5ee;
  --amber:      #b45309;
  --amber-bg:   #fef3c7;
  --red:        #c0392b;
  --red-bg:     #fdecea;
  --rose:       #be185d;
  --sidebar-w:  240px;
}

html { background: var(--cream); color: var(--text); font-family: 'Inter', sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }

/* LAYOUT */
.app { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  background: var(--navy);
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  display: flex; flex-direction: column;
  overflow-y: auto; z-index: 100;
  flex-shrink: 0;
}
.sidebar-brand { padding: 28px 24px 24px; border-bottom: 1px solid #ffffff14; text-align: center; }
.brand-logo { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 4px; letter-spacing: -0.02em; }
.brand-sub { font-size: 9px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #ffffff44; }
.sidebar-section { padding: 20px 14px 8px; }
.sidebar-label { font-size: 9px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #ffffff33; padding: 0 10px; margin-bottom: 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; transition: all 0.12s; color: #ffffffaa; font-size: 13px; font-weight: 500; margin-bottom: 2px; text-decoration: none; }
.nav-item:hover { background: #ffffff12; color: #fff; }
.nav-item.active { background: var(--gold); color: var(--navy); font-weight: 600; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--red); color: white; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.nav-count { margin-left: auto; color: #ffffff33; font-size: 12px; }
.sidebar-divider { height: 1px; background: #ffffff12; margin: 8px 14px; }
.sidebar-spacer { flex: 1; }
.sidebar-footer { padding: 14px; border-top: 1px solid #ffffff14; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.12s; text-decoration: none; }
.user-row:hover { background: #ffffff12; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), #8a6020); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 13px; color: var(--navy); flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; }
.user-role { font-size: 10px; color: #ffffff44; letter-spacing: 0.04em; }

/* MAIN */
.main { margin-left: var(--sidebar-w); display: flex; flex-direction: column; background: var(--cream); min-height: 100vh; flex: 1; min-width: 0; width: 100%; }

/* TOPBAR */
.topbar { background: var(--white); 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: 50; }
.page-heading { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.page-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.page-sub strong { color: var(--navy); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.time-chip { font-size: 12px; font-weight: 500; color: var(--text-muted); background: var(--cream); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; }
.btn-capture { background: var(--navy); color: white; border: none; border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; transition: background 0.12s; }
.btn-capture:hover { background: var(--navy-mid); }

/* PAGE CONTENT */
.page-content { padding: 24px 32px 48px; }

/* SHARED COMPONENTS */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.section-link { font-size: 11px; color: var(--text-muted); cursor: pointer; transition: color 0.12s; text-decoration: none; }
.section-link:hover { color: var(--navy); }

/* BADGES */
.badge { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; flex-shrink: 0; display: inline-block; }
.badge-urgent { background: var(--red-bg); color: var(--red); }
.badge-active { background: #fef8ec; color: var(--gold-dim); border: 1px solid #e8d5a3; }
.badge-waiting { background: var(--amber-bg); color: var(--amber); }
.badge-done { background: var(--green-bg); color: var(--green); }
.badge-photo { background: #e8f5ee; color: var(--green); }
.badge-personal { background: #fce7f3; color: var(--rose); }

/* CHIPS */
.chip { font-size: 11px; font-weight: 500; background: var(--cream); border: 1px solid var(--border); color: var(--text-muted); padding: 3px 8px; border-radius: 5px; display: inline-flex; align-items: center; gap: 3px; }
.chip.value { background: var(--green-bg); border-color: #a7f3d0; color: var(--green); font-weight: 600; }

/* BUTTONS */
.btn-sm { background: var(--cream); border: 1px solid var(--border); color: var(--text-muted); border-radius: 7px; padding: 6px 12px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.12s; white-space: nowrap; font-family: 'Inter', sans-serif; }
.btn-sm:hover { background: var(--cream-dark); color: var(--text); }
.btn-sm.primary { background: var(--navy); border-color: var(--navy); color: white; }
.btn-sm.primary:hover { background: var(--navy-dark); }
.btn-sm.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-sm.gold:hover { opacity: 0.85; }

/* DOTS */
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }
.dot-green { background: var(--green); }
.dot-gold { background: var(--gold); }
.dot-navy { background: var(--navy); }

/* RAIL CARDS */
.rail-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rail-header { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.rail-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); flex: 1; }
.rail-action { font-size: 11px; color: var(--text-muted); cursor: pointer; text-decoration: none; }
.rail-action:hover { color: var(--navy); }
.rail-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; text-decoration: none; }
.rail-item:last-child { border-bottom: none; }
.rail-item:hover { background: var(--cream); }
.rail-text { flex: 1; font-size: 13px; color: var(--text); line-height: 1.3; }
.rail-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.rail-aside { font-size: 11px; font-weight: 600; white-space: nowrap; }
.rail-aside.red { color: var(--red); }
.rail-aside.amber { color: var(--amber); }
.rail-aside.gold { color: var(--gold-dim); }
.rail-aside.green { color: var(--green); }

/* STAT CARDS */
.stat-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; line-height: 1; }
.stat-value.gold { color: var(--gold-dim); }
.stat-value.green { color: var(--green); font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 600; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.stat-bar-track { height: 4px; background: var(--cream-dark); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.stat-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--navy)); }

/* FROG CARD */
.frog-card { background: var(--navy); border-radius: 14px; padding: 24px; display: flex; gap: 20px; align-items: center; min-height: 140px; margin-bottom: 16px; }
.frog-illustration { font-size: 64px; flex-shrink: 0; filter: drop-shadow(0 4px 12px #00000044); line-height: 1; }
.frog-body { flex: 1; }
.frog-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.frog-task { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: white; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 6px; }
.frog-detail { font-size: 12px; color: #ffffffaa; font-weight: 300; }
.btn-frog-done { background: var(--gold); color: var(--navy); border: none; border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: 'Inter', sans-serif; }
.btn-frog-done:hover { opacity: 0.85; }

/* PROJECT CARDS */
.project-card { background: var(--white); border: 1px solid var(--border); border-left: 3px solid transparent; border-radius: 12px; padding: 16px 20px; cursor: pointer; transition: all 0.15s; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 10px 16px; margin-bottom: 10px; }
.project-card:hover { box-shadow: 0 2px 14px #00000010; }
.project-card:last-child { margin-bottom: 0; }
.project-card.urgent { border-left-color: var(--red); }
.project-card.active { border-left-color: var(--gold); }
.project-card.waiting { border-left-color: var(--amber); }
.project-card.done { border-left-color: var(--green); opacity: 0.7; }
.project-top { display: flex; align-items: center; gap: 10px; grid-column: 1; }
.project-name { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.project-next { font-size: 13px; color: var(--text-mid); grid-column: 1; line-height: 1.4; }
.project-next strong { color: var(--navy); font-weight: 500; }
.project-meta { display: flex; gap: 8px; align-items: center; grid-row: 2; align-self: end; flex-wrap: wrap; }
.project-actions { grid-row: 1 / 3; align-self: center; display: flex; flex-direction: column; gap: 6px; }

/* TASK ROWS */
.task-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background 0.1s; cursor: pointer; }
.task-row:hover { background: var(--cream); }
.task-row:last-child { border-bottom: none; }
.task-check { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; transition: all 0.12s; }
.task-check:hover { border-color: var(--gold); }
.task-check.done { background: var(--green); border-color: var(--green); color: white; }
.task-text-block { flex: 1; }
.task-title { font-size: 13px; color: var(--text); font-weight: 500; }
.task-title.done { text-decoration: line-through; color: var(--text-muted); font-weight: 400; }
.task-meta-line { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.task-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.task-due { font-size: 11px; font-weight: 600; }
.task-due.overdue { color: var(--red); }
.task-due.today { color: var(--amber); }
.task-due.upcoming { color: var(--text-muted); }

/* SPACE CARDS */
.space-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.space-card-header { padding: 20px 24px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); }
.space-card-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.space-card-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--navy); }
.space-card-members { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* TEAM CARDS */
.member-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.member-header { padding: 20px 24px; display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #f9f7f3, var(--white)); border-bottom: 1px solid var(--border); }
.member-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; color: white; flex-shrink: 0; }
.av-jennie { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.av-james  { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.av-rose   { background: linear-gradient(135deg, #be185d, #ec4899); }
.av-adam   { background: linear-gradient(135deg, #db2777, #f472b6); }
.member-name { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--navy); }
.member-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.member-stats { margin-left: auto; display: flex; gap: 16px; }
.member-stat { text-align: center; }
.member-stat-val { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--navy); }
.member-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* FILTER TABS */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tab { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--white); color: var(--text-muted); transition: all 0.12s; text-decoration: none; }
.filter-tab:hover { background: var(--cream); }
.filter-tab.active { background: var(--navy); border-color: var(--navy); color: white; }

/* TASKS CONTAINER */
.tasks-container { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tasks-toolbar { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--cream); }

/* FORMS */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.form-input { background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--text); font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.12s; width: 100%; }
.form-input:focus { border-color: var(--navy); background: var(--white); }
textarea.form-input { resize: vertical; }

/* CALENDAR */
.cal-day-pill { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 10px 8px; text-align: center; cursor: pointer; transition: all 0.12s; }
.cal-day-pill:hover { border-color: var(--navy); }
.cal-day-pill.today-day { border: 2px solid var(--gold); background: #fef8ec; }
.cal-day-pill.done-day { opacity: 0.6; }
.cal-pill-label { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.cal-pill-num { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.cal-pill-area { font-size: 9px; font-weight: 700; padding: 2px 4px; border-radius: 4px; letter-spacing: 0.05em; }
.cal-block { background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; display: flex; align-items: flex-start; gap: 14px; cursor: pointer; transition: all 0.12s; }
.cal-block:hover { box-shadow: 0 2px 10px #00000010; }
.cal-block.active-block { border-left-color: var(--gold); background: #fef8ec; }
.cal-block-time { font-size: 11px; font-weight: 700; color: var(--text-muted); min-width: 70px; padding-top: 2px; }
.cal-block-body { flex: 1; }
.cal-block-title { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700; color: var(--navy); }
.cal-block-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cal-block-value { font-size: 12px; font-weight: 700; color: var(--green); white-space: nowrap; }

/* REVENUE LANES */
.rev-lane { margin-bottom: 12px; }
.rev-lane:last-child { margin-bottom: 0; }

/* ACCOUNTABILITY */
.accountability-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.accountability-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 12px; }
.acc-col-title { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.acc-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--cream-dark); font-size: 13px; color: var(--text); }
.acc-item:last-child { border-bottom: none; }
.acc-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

/* MOBILE HEADER */
.mobile-header { display: none; background: var(--navy); padding: 0 20px; height: 64px; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 200; border-bottom: 2px solid var(--gold); }
.mobile-brand { display: flex; align-items: center; gap: 12px; }
.mobile-logo-mark { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: -0.02em; line-height: 1; }
.mobile-logo-divider { width: 1px; height: 24px; background: #ffffff33; }
.mobile-logo-text { display: flex; flex-direction: column; }
.mobile-hub { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: white; line-height: 1; letter-spacing: -0.01em; }
.mobile-sub { font-size: 9px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: #ffffff55; margin-top: 2px; }
.mobile-menu-btn { background: none; border: none; color: white; font-size: 22px; cursor: pointer; padding: 4px; display: flex; align-items: center; line-height: 1; }

/* MOBILE NAV */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--navy); border-top: 2px solid var(--gold); z-index: 200; padding: 8px 0 20px; }
.mobile-nav-items { display: flex; justify-content: space-around; }
.mobile-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 16px; cursor: pointer; color: #ffffff66; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.12s; text-decoration: none; }
.mobile-nav-item.active { color: var(--gold); }
.mobile-nav-item:hover { color: #ffffffaa; }
.mobile-nav-icon { font-size: 20px; }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate { animation: fadeIn 0.25s ease both; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar { display: none !important; }
  .main { margin-left: 0 !important; width: 100% !important; }
  .mobile-header { display: flex !important; }
  .mobile-nav { display: block !important; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px 16px 80px; }
  .stat-bar { grid-template-columns: 1fr 1fr; }
  .accountability-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-actions { flex-direction: row; grid-row: auto; }
}

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300; justify-content: center; align-items: center; padding: 16px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: 14px; padding: 24px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }

/* PROGRESS BAR (general) */
.progress-bar { height: 8px; background: var(--cream-dark); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }

/* GRID LAYOUTS */
.grid-main { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ALERT */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid #f5c6c6; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid #b8e0c8; }

@media (max-width: 900px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
