:root {
  --bg: #f3efe7;
  --panel: rgba(255,255,255,0.74);
  --panel-strong: #ffffff;
  --border: rgba(32, 38, 44, 0.10);
  --text: #1e2428;
  --muted: #6c736f;
  --navy: #17314b;
  --navy-2: #23476d;
  --green: #56b487;
  --purple: #9680ff;
  --coral: #f08d84;
  --shadow: 0 14px 32px rgba(23, 35, 53, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(circle at top right, rgba(55,78,108,.08), transparent 26%),
    linear-gradient(180deg, #f7f3ec 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: rgba(248, 244, 236, 0.85);
  border-right: 1px solid rgba(61, 65, 74, 0.08);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  backdrop-filter: blur(8px);
}

.logo-block {
  padding: 4px 10px 24px;
}
.logo-wordmark {
  font-family: "Cormorant Garamond", serif;
  font-size: 46px;
  line-height: .9;
  letter-spacing: .04em;
}
.logo-sub {
  font-size: 12px;
  letter-spacing: .18em;
  margin-top: 3px;
}
.logo-product {
  margin-top: 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
}
.nav-group { display: flex; flex-direction: column; gap: 6px; }
.nav-title {
  color: #98958f;
  font-size: 11px;
  letter-spacing: .12em;
  margin: 16px 10px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #475059;
  padding: 12px 14px;
  border-radius: 14px;
  transition: .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,0.65); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, #18314c 0%, #254666 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 16px rgba(23,49,75,.15);
}
.ico {
  width: 18px;
  text-align: center;
  opacity: .9;
}
.divider {
  height: 1px;
  background: rgba(61,65,74,.08);
  margin: 12px 8px 8px;
}

.workspace {
  padding: 24px 26px 28px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.searchbar {
  min-width: 320px;
  width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow);
  border: 1px solid rgba(32,38,44,.06);
}
.searchbar input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ghost-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow);
}
.user-pill strong { display: block; font-size: 13px; }
.user-pill small { color: var(--muted); }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1d3249, #7e614f);
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(800px, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.main-column { display: flex; flex-direction: column; gap: 22px; }
.right-column { display: flex; flex-direction: column; gap: 18px; }

.headline-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.headline-row h1 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(44px, 4vw, 64px);
  font-weight: 600;
  line-height: .95;
}
.headline-row p { margin: 0; color: var(--muted); font-size: 17px; }
.sunmark { color: #e9af45; font-size: 28px; vertical-align: text-top; }
.date-card {
  min-width: 250px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(32,38,44,.06);
}
.date-left { color: var(--text); text-align: right; line-height: 1.35; }
.date-left span { color: var(--muted); }
.date-time { font-family: "Cormorant Garamond", serif; font-size: 56px; line-height: 1; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  position: relative;
  padding: 20px 20px 18px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid rgba(32,38,44,.05);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 700;
}
.stat-icon.blue { background: #e7f1ff; color: #4882d8; }
.stat-icon.green { background: #e6f7ee; color: #3ca26e; }
.stat-icon.purple { background: #efeaff; color: #7f69f0; }
.stat-icon.coral { background: #ffe9e7; color: #da7269; }
.stat-value { font-size: 40px; font-weight: 700; letter-spacing: -.04em; }
.stat-label { color: var(--muted); margin-top: 4px; }
.stat-trend {
  position: absolute;
  right: 18px;
  top: 22px;
  font-size: 13px;
  font-weight: 600;
}
.stat-trend.up { color: #37a06f; }
.stat-trend.down { color: #d8605f; }
.sparkline {
  margin-top: 18px;
  display: flex;
  align-items: end;
  gap: 4px;
  height: 36px;
}
.sparkline span {
  flex: 1;
  border-radius: 999px 999px 3px 3px;
  background: currentColor;
  opacity: .35;
}
.sparkline.blue { color: #5f9ae6; }
.sparkline.green { color: #55c78d; }
.sparkline.purple { color: #927dff; }
.sparkline.coral { color: #f08d84; }

.campaign-hero {
  min-height: 250px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(246,242,236,.9) 0%, rgba(237,232,225,.95) 60%, rgba(226,221,213,.9) 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(32,38,44,.05);
}
.hero-copy {
  padding: 34px 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  color: #7f7a72;
}
.hero-copy h2 {
  margin: 8px 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 48px;
  line-height: .95;
}
.hero-copy p { margin: 0 0 20px; color: var(--muted); font-size: 17px; max-width: 460px; }
.primary-btn {
  align-self: flex-start;
  padding: 14px 22px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #17314b 0%, #264a70 100%);
  box-shadow: 0 14px 28px rgba(23,49,75,.20);
  cursor: pointer;
  font-weight: 600;
}
.primary-btn span { margin-left: 10px; }
.hero-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, rgba(255,255,255,.75), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.0));
}
.desk-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.orb-a {
  width: 260px; height: 260px; right: -40px; top: -40px;
  background: radial-gradient(circle, rgba(77,101,123,.18), rgba(77,101,123,0));
}
.orb-b {
  width: 160px; height: 160px; left: 40px; bottom: -50px;
  background: radial-gradient(circle, rgba(217,194,162,.35), rgba(217,194,162,0));
}
.notepad {
  position: absolute;
  right: 46px;
  top: 36px;
  width: 175px;
  padding: 18px 16px;
  border-radius: 6px;
  background: rgba(252,250,246,.96);
  box-shadow: 0 18px 40px rgba(61, 48, 39, 0.14);
  transform: rotate(8deg);
}
.notepad-title { font-family: "Cormorant Garamond", serif; font-size: 28px; margin-bottom: 8px; }
.notepad ul { list-style: none; padding: 0; margin: 0; color: #70695f; }
.notepad li { padding: 3px 0; font-size: 14px; }
.pen {
  position: absolute;
  right: 180px;
  bottom: 52px;
  width: 140px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5a4534, #212d38);
  transform: rotate(-22deg);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
}

.panel-card, .quick-actions, .side-panel {
  background: rgba(255,255,255,0.74);
  border-radius: 24px;
  border: 1px solid rgba(32,38,44,.05);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.panel-head, .side-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.panel-head h3, .side-panel-head h3, .quick-actions .side-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
  font-weight: 600;
}
.panel-head a, .side-panel-head a { color: #4f657e; font-weight: 600; }
.table-panel { padding: 24px; }
.table-wrap { overflow: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 840px; }
.table-wrap th {
  text-align: left;
  color: #8a8f95;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(32,38,44,.08);
}
.table-wrap td {
  padding: 16px 0;
  border-bottom: 1px solid rgba(32,38,44,.06);
  font-size: 14px;
}
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.badge.done { background: #e7f7ed; color: #3a9b68; }
.badge.live { background: #e8f1ff; color: #4d7fe0; }
.badge.planned { background: #fff2df; color: #d68a30; }
.badge.stopped { background: #ffe6e4; color: #d55e5b; }

.insight-band {
  display: grid;
  grid-template-columns: 1.1fr .9fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 30px;
  color: #fff;
  border-radius: 26px;
  background: radial-gradient(circle at top right, rgba(88,122,163,.35), transparent 26%), linear-gradient(135deg, #0f1f2f 0%, #11253a 56%, #1a3958 100%);
  box-shadow: 0 16px 34px rgba(12,28,44,.22);
}
.insight-band h3 { margin: 0 0 6px; font-family: "Cormorant Garamond", serif; font-size: 38px; }
.insight-band p { margin: 0; color: rgba(255,255,255,.78); }
.bar-cluster {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 48px;
}
.bar-cluster span {
  width: 22px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #dae5ef, #8ca8c5);
}
.gain { font-family: "Cormorant Garamond", serif; font-size: 54px; }

.quick-actions { padding: 22px; }
.cta-btn, .side-btn {
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(32,38,44,.06);
  text-align: left;
  margin-top: 12px;
  cursor: pointer;
}
.cta-btn {
  color: #fff;
  background: linear-gradient(135deg, #17314b 0%, #264a70 100%);
  box-shadow: 0 12px 26px rgba(23,49,75,.16);
  font-weight: 600;
}
.cta-btn span { float: right; }
.side-btn {
  background: rgba(255,255,255,.7);
}
.side-panel { padding: 22px; }
.sender-item, .activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(32,38,44,.06);
}
.sender-item:last-child, .activity-item:last-child { border-bottom: 0; }
.sender-dot, .activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 3px;
}
.sender-dot.blue, .activity-dot.blue { background: #5a95e7; }
.sender-dot.green, .activity-dot.green { background: #53b986; }
.sender-dot.purple { background: #8672fb; }
.activity-dot.gray { background: #9aa3aa; }
.activity-dot.orange { background: #e1a14f; }
.sender-item strong, .activity-item strong { display: block; font-size: 14px; }
.sender-item small, .activity-item small { color: var(--muted); }
.chev, .activity-item time { color: #8d949a; font-size: 13px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 21, 27, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal-window {
  position: relative;
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: #f8f4ec;
  box-shadow: 0 30px 60px rgba(0,0,0,.22);
}
.close-modal {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 0;
  background: rgba(0,0,0,.05);
  cursor: pointer;
  font-size: 22px;
}
.modal-window h2 { margin: 6px 0 10px; font-family: "Cormorant Garamond", serif; font-size: 42px; }
.modal-window p { margin: 0 0 16px; color: var(--muted); }
.modal-window label { display: block; margin-bottom: 8px; font-weight: 600; }
.modal-window select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(32,38,44,.10);
  background: rgba(255,255,255,.85);
}
.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 22px;
}
.modal-info-grid div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.75);
}
.modal-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.full { width: 100%; justify-content: center; }

@media (max-width: 1500px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .layout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .workspace { padding: 18px; }
  .topbar, .headline-row, .campaign-hero, .insight-band { grid-template-columns: 1fr; display: grid; }
  .topbar { gap: 14px; }
  .searchbar { width: 100%; min-width: 0; }
  .stats-row { grid-template-columns: 1fr; }
  .campaign-hero { grid-template-columns: 1fr; }
  .date-card { min-width: 0; }
  .insight-band { grid-template-columns: 1fr; }
  .modal-info-grid { grid-template-columns: 1fr; }
}
