:root {
  --ink: #12211d;
  --muted: #6b7772;
  --paper: #f4f2ec;
  --panel: #fffdf8;
  --forest: #173f35;
  --mint: #bde7d5;
  --line: #d9ddd7;
  font-family: 'Mulish', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); font-family: 'Mulish', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button, input { font: inherit; }
.eyebrow { margin: 0 0 12px; color: #52766a; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.muted { color: var(--muted); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: #f1f4f1; }
.login-panel { width: min(440px, 100%); }
.login-card { width: 100%; padding: 42px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 55px rgba(26, 53, 45, .1); }
.login-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 28px; border-radius: 11px; color: var(--forest); background: var(--mint); font-family: 'Mulish', sans-serif; font-size: 24px; font-weight: 900; }
.login-card h1 { margin: 0 0 24px; font-family: 'Mulish', sans-serif; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.login-card form { display: grid; gap: 10px; margin-top: 36px; }
.login-card label { margin-top: 8px; font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; padding: 14px 15px; border: 1px solid #cbd1cc; border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
.login-card input:focus { border-color: #3d7867; box-shadow: 0 0 0 3px rgba(61,120,103,.12); }
.login-card button { margin-top: 14px; padding: 15px 18px; border: 0; border-radius: 10px; color: white; background: var(--forest); font-weight: 800; cursor: pointer; }
.form-error { margin-top: 24px; padding: 12px 14px; border: 1px solid #e7bbb3; border-radius: 9px; color: #8c2f22; background: #fff1ef; font-size: 14px; }

.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 18px; color: #d8e3df; background: #102e27; }
.portal-logo { display: flex; gap: 12px; align-items: center; padding: 0 10px 35px; color: white; text-decoration: none; font-family: 'Mulish', sans-serif; font-size: 21px; font-weight: 800; }
.portal-logo span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--forest); background: var(--mint); font-family: 'Mulish', sans-serif; font-size: 20px; font-weight: 900; }
.nav-label { margin: 28px 12px 8px; color: #68857b; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.nav-item { display: flex; gap: 12px; align-items: center; margin: 3px 0; padding: 11px 12px; border-radius: 8px; color: #afc2bb; text-decoration: none; font-size: 13px; font-weight: 600; }
.nav-item span { color: #5f8075; font-family: ui-monospace, monospace; font-size: 10px; }
.nav-item.active { color: white; background: rgba(189,231,213,.12); }
.nav-item.disabled { cursor: default; opacity: .58; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #63d5a6; box-shadow: 0 0 0 4px rgba(99,213,166,.13); }
.sidebar-footer { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(255,255,255,.09); color: #91a69f; font-size: 11px; }
.portal-main { min-width: 0; padding: 0 38px 56px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 28px 0 24px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-family: 'Mulish', sans-serif; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.user-area, .user-chip { display: flex; gap: 14px; align-items: center; }
.user-chip > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: white; background: #3e7465; font-weight: 800; }
.user-chip strong, .user-chip small { display: block; font-size: 12px; }
.user-chip small { margin-top: 2px; color: var(--muted); }
.logout-button { padding: 9px 12px; border: 1px solid #cfd5d0; border-radius: 8px; color: #314c43; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.hero-strip { display: flex; justify-content: space-between; gap: 40px; align-items: center; margin: 34px 0 42px; padding: 38px 42px; border-radius: 18px; color: #eff8f4; background: linear-gradient(115deg, #183f35, #2d6655); box-shadow: 0 18px 50px rgba(19,55,46,.16); }
.hero-strip h2 { margin: 0 0 10px; font-family: 'Mulish', sans-serif; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -0.02em; }
.hero-strip p:not(.eyebrow) { max-width: 650px; margin: 0; color: #c4d8d1; line-height: 1.6; }
.hero-strip .eyebrow { color: var(--mint); }
.foundation-badge { display: flex; gap: 14px; align-items: center; min-width: 170px; padding: 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.07); }
.foundation-badge strong { font-family: 'Mulish', sans-serif; font-size: 34px; font-weight: 900; }
.foundation-badge span { color: #bfd2ca; font-size: 11px; line-height: 1.35; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-family: 'Mulish', sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.module-card { position: relative; min-height: 210px; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 7px 25px rgba(31,49,43,.05); }
.module-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent, #4c8977); }
.module-top { display: flex; justify-content: space-between; align-items: center; }
.module-code { color: var(--accent, #4c8977); font-family: ui-monospace, monospace; font-size: 11px; font-weight: 800; }
.coming-soon { padding: 5px 8px; border-radius: 999px; color: #75817c; background: #f0f1ed; font-size: 10px; font-weight: 700; }
.module-card h3 { margin: 34px 0 10px; font-family: 'Mulish', sans-serif; font-size: 21px; font-weight: 700; }
.module-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.module-arrow { position: absolute; right: 20px; bottom: 18px; color: var(--accent, #4c8977); font-size: 24px; }
.accent-blue { --accent: #4b75aa; }.accent-violet { --accent: #8062a7; }.accent-amber { --accent: #bb7a2d; }.accent-rose { --accent: #b66569; }.accent-slate { --accent: #667580; }

/* Marketing Daily styles */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 24px 0; }
.kpi-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 4px 15px rgba(26,53,45,.04); }
.kpi-card .kpi-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi-card .kpi-value { font-family: 'Mulish', sans-serif; font-size: 24px; font-weight: 800; color: var(--forest); margin-top: 6px; }
.kpi-card .kpi-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

.health-banner { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border: 1px solid #c9e6db; border-radius: 12px; background: #eef8f4; margin: 20px 0; }
.health-status { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #175240; font-size: 13px; }
.health-meta { font-size: 12px; color: #436e60; }

.status-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-badge.status-previewed { background: #fef3c7; color: #92400e; }
.status-badge.status-approved { background: #d1fae5; color: #065f46; }
.status-badge.status-draft { background: #f3f4f6; color: #4b5563; }

.content-card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin-bottom: 24px; box-shadow: 0 4px 20px rgba(26,53,45,.03); }
.content-card h3 { margin: 0 0 16px; font-family: 'Mulish', sans-serif; font-size: 18px; font-weight: 800; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.data-table th { padding: 12px 14px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: #faf9f6; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #edece8; color: var(--ink); }
.data-table tr:hover td { background: #f8faf9; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .tag { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #e5e7eb; color: #374151; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--forest); color: white; }
.btn-primary:hover { background: #22574a; }
.btn-success { background: #059669; color: white; }
.btn-success:hover { background: #047857; }
.btn-outline { border: 1px solid var(--line); background: white; color: var(--ink); }
.btn-outline:hover { background: #f3f4f1; }

.form-inline { display: flex; gap: 12px; align-items: center; }
.form-control { padding: 10px 14px; border: 1px solid #cbd1cc; border-radius: 8px; font-size: 13px; outline: none; background: white; }
.form-control:focus { border-color: #3d7867; box-shadow: 0 0 0 2px rgba(61,120,103,.12); }

.messages-list { margin-bottom: 20px; }
.alert { padding: 14px 18px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

@media (max-width: 1020px) { .module-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .portal-shell { grid-template-columns: 1fr; } .sidebar { position: static; width: 100%; height: auto; } .sidebar nav, .sidebar-footer { display: none; } .portal-logo { padding-bottom: 0; } .portal-main { padding: 0 18px 38px; } .topbar { align-items: flex-start; } .user-chip { display: none; } .hero-strip { padding: 28px; } .foundation-badge { display: none; } .module-grid { grid-template-columns: 1fr; } .login-panel { padding: 28px; } }

/* Sidebar V2 Accordion & Folder Styling */
.sidebar-v2 { font-size: 14px; }
.sidebar-v2 .portal-logo strong { font-size: 18px; }
.sidebar-brand-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 4px 18px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.09); }
.brand-badge-circle { font-size: 18px; }
.brand-meta-label { font-size: 10px; color: #86a197; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.brand-meta-name { font-size: 14px; font-weight: 800; color: #ffffff; }

.sidebar-v2 .nav-item-top { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.sidebar-v2 .nav-icon { font-size: 16px; margin-right: 2px; }

.nav-accordion { margin-bottom: 6px; border-radius: 8px; overflow: hidden; }
.nav-accordion-header { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: #cbd7d2; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; transition: background 0.15s ease, color 0.15s ease; }
.nav-accordion-header:hover { background: rgba(255, 255, 255, 0.06); color: #ffffff; }
.nav-accordion.open .nav-accordion-header { color: #bde7d5; background: rgba(189, 231, 213, 0.08); }
.folder-icon { font-size: 16px; }
.folder-title { flex: 1; font-size: 14px; }
.folder-arrow { font-size: 14px; font-weight: 800; color: #78998d; transition: transform 0.2s ease; }
.nav-accordion.open .folder-arrow { transform: rotate(90deg); color: #bde7d5; }

.nav-accordion-body { display: none; padding: 4px 0 6px 14px; }
.nav-accordion.open .nav-accordion-body { display: block; }
.nav-sub-item { padding: 9px 12px; font-size: 14px; font-weight: 500; color: #a4bbb3; border-radius: 6px; }
.nav-sub-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.05); }
.nav-sub-item.active { color: #ffffff; font-weight: 700; background: rgba(189, 231, 213, 0.14); }
.item-bullet { font-size: 11px; opacity: 0.7; margin-right: 2px; }

