/* BIV Client V2 — bright blue surfaces shared by every client screen. */
:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #303841;
  background: #fff;
  --blue: #1677ff;
  --blue-hover: #0864e7;
  --blue-soft: #e8f3ff;
  --blue-line: #dceaff;
  --surface: #fff;
  --workspace: #fff;
  --sidebar: #eaf4ff;
  --muted: #64748b;
  --line: #dce7f4;
  --text: #303841;
  --radius: 12px;
  --shadow: 0 4px 20px rgb(54 103 167 / 4%);
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
.session-loading {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background: var(--blue-soft);
}
.session-loading-card {
  width: min(100%, 420px);
  padding: 32px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.session-loading-card .brand { justify-content: center; }
.session-loading-card p { margin: 24px 0; color: var(--muted); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { outline-offset: 3px; }
:focus-visible { outline: 3px solid #6eb1ff; }
button {
  cursor: pointer;
  border: 1px solid #bcd8ff;
  background: #fff;
  color: #146bdb;
  border-radius: 8px;
  padding: 10px 15px;
  line-height: 1.35;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
button:hover { border-color: var(--blue); background: #f0f7ff; }
button:disabled { opacity: .6; cursor: not-allowed; }
button:disabled:hover { box-shadow: none; }
.primary { background: #126fea; color: white; border-color: #126fea; box-shadow: 0 2px 5px rgb(22 119 255 / 12%); }
.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
a { color: #0868e8; text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, h4 { margin: 0; color: #242d36; line-height: 1.28; letter-spacing: -.45px; }
h1 { font-size: 30px; font-weight: 750; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 15px; }
p { line-height: 1.65; margin: 12px 0; }
small, .muted { color: var(--muted); }
small { font-size: 12px; line-height: 1.55; }
[hidden] { display: none !important; }
.eyebrow { font-size: 10px; line-height: 1.4; letter-spacing: 1.25px; font-weight: 700; color: var(--muted); margin: 0 0 10px; }
.brand { display: block; width: max-content; color: var(--blue); font-size: 42px; line-height: 1; font-weight: 850; letter-spacing: -1.9px; }
.brand:hover { color: var(--blue); text-decoration: none; }
.brand span { display: block; color: #576777; font-size: 10px; line-height: 1.5; letter-spacing: 3.2px; font-weight: 600; margin-top: 7px; padding-left: 3px; }
.error { color: #bc353b; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.error:empty { margin: 0; }

/* Authentication and invitation share the same accessible form. */
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.welcome { background: radial-gradient(ellipse at 65% 65%, #d7edff 0, #ebf7ff 45%, #f5faff 85%); padding: 44px 9%; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; overflow: hidden; }
.welcome-copy { max-width: 560px; margin: 40px 0 8px; }
.welcome h1 { font-size: clamp(36px, 3.2vw, 54px); font-weight: 750; letter-spacing: -1.5px; margin: 16px 0; }
.welcome-accent { color: var(--blue); }
.welcome p { max-width: 500px; font-size: 17px; color: #62758a; line-height: 1.65; }
.welcome small { text-align: center; font-size: 12px; margin-top: 22px; }
.login-visual { width: 100%; max-width: 530px; margin: 8px auto 16px; }
.login-visual svg { width: 100%; height: auto; }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 8%; }
.login-card { width: 100%; max-width: 440px; border: 1px solid var(--line); border-radius: 14px; padding: 32px; background: #fff; box-shadow: var(--shadow); }
.login-heading { text-align: center; margin-bottom: 24px; }
.login-card h2 { font-size: 26px; margin: 5px 0 10px; }
.login-heading p { color: var(--muted); margin: 8px 0; }
.login-card > .eyebrow { color: var(--blue); }
.login-card button { width: 100%; min-height: 44px; margin: 8px 0; }
.login-card button.primary { margin-top: 18px; }
.login-card > a { display: block; font-size: 12px; text-align: center; margin-top: 18px; }
.login-card > p:not(.error):not(.eyebrow) { color: var(--muted); }
.login-support { width: 100%; max-width: 440px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-top: 18px; background: #fff; }
.login-card .login-support { display: block; padding: 17px 18px; margin-top: 24px; background: #f8fbff; }
.login-card .login-support a { display: inline-block; margin-top: 10px; font-size: 11px; }
.login-support > svg { color: var(--blue); background: var(--blue-soft); width: 46px; height: 46px; padding: 12px; border-radius: 50%; }
.login-support p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.login-support strong { font-size: 14px; font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; margin: 18px 0 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.google-button { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text); border-color: #ccdcef; }
.google-button svg { width: 19px; height: 19px; }
.google-mark { font-weight: 800; font-size: 22px; color: #4285f4; }
.auth-note { color: var(--muted); font-size: 11px; text-align: center; line-height: 1.65; }
.login-card .text-button { background: transparent; border-color: transparent; color: #146bdb; font-size: 12px; }
.password-field { display: flex; position: relative; min-width: 0; }
.password-field input { padding-right: 65px; }
.login-card .password-toggle { position: absolute; top: 8px; right: 4px; width: 55px; min-height: 41px; padding: 7px 9px; margin: 0; border: 0; font-size: 11px; background: transparent; color: #607a98; }
.login-card .password-toggle:hover { color: var(--blue); background: #f2f8ff; }
.login-card input + small, .login-card .password-field + small { display: block; font-size: 10px; margin-top: 6px; }
.invite-summary { border: 1px solid #d4e6ff; border-radius: 10px; padding: 18px; background: #f5faff; margin: 18px 0; }
.welcome .invite-summary { padding: 0; border: 0; background: transparent; margin: 25px 0 10px; }
.welcome .invite-summary h1 { font-size: 30px; margin: 11px 0 22px; }
.welcome .invite-summary > p { font-size: 12px; }
.invite-summary .card { padding: 20px; }
.invite-permissions { display: grid; gap: 10px; padding: 4px 0 16px; font-size: 13px; }
.invite-permissions > div, .invite-permissions > p { display: flex; align-items: center; gap: 8px; margin: 0; }
.invite-permissions svg { width: 17px; height: 17px; color: var(--blue); }
.invite-summary h3 { font-size: 16px; margin-bottom: 10px; }
.invite-summary p { margin: 6px 0; font-size: 12px; }
.invite-summary ul { padding-left: 19px; margin: 12px 0; display: grid; gap: 7px; font-size: 13px; }
#invite-emailtext { overflow-wrap: anywhere; }

/* Form controls and dialog fields. */
label { display: block; font-weight: 600; margin: 16px 0 8px; line-height: 1.5; }
input, select, textarea { width: 100%; min-width: 0; display: block; border: 1px solid #c9dbee; border-radius: 8px; padding: 11px 12px; margin-top: 7px; background: #fff; color: var(--text); line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #8697ab; }
input:hover, select:hover, textarea:hover { border-color: #93bff5; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
select { padding-right: 28px; }
textarea { min-height: 116px; resize: vertical; line-height: 1.65; }
input[type=checkbox] { width: 17px; height: 17px; display: inline-block; vertical-align: middle; margin: 0 9px 0 0; accent-color: var(--blue); flex: 0 0 auto; }
input[type=checkbox] + span { font-weight: 400; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 10px; margin: 18px 0; padding: 16px; }
legend { padding: 0 7px; font-weight: 650; font-size: 13px; }
details { margin: 15px 0; font-size: 13px; }
summary { cursor: pointer; color: #146bdb; padding: 5px 0; font-weight: 600; }

/* App shell and navigation. */
.shell { display: grid; grid-template-columns: 234px minmax(0, 1fr); min-height: 100vh; }
.sidebar { padding: 25px 16px 18px; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; z-index: 20; overflow-y: auto; }
.sidebar .brand { margin: 0 10px 30px; }
.workspace-label { margin: 0 5px 22px; font-size: 10px; letter-spacing: .7px; color: var(--muted); }
.workspace-label select { font-size: 13px; color: #364355; font-weight: 600; letter-spacing: 0; padding: 11px 10px; border-color: #cfe3fc; background: rgb(255 255 255 / 60%); }
#nav { display: flex; flex-direction: column; gap: 5px; }
#nav button { text-align: left; color: #536275; border: 1px solid transparent; background: transparent; font-weight: 500; display: flex; align-items: center; gap: 13px; padding: 12px 13px; width: 100%; min-height: 45px; }
#nav button:hover { background: #e8f2ff; color: #146bdb; }
#nav button.active { background: #dfeeff; color: #0860d8; font-weight: 650; }
#nav .icon { display: inline-flex; width: 21px; height: 21px; align-items: center; justify-content: center; flex: 0 0 21px; }
.icon svg { width: 21px; height: 21px; }
.nav-group, .nav-group-label { color: #768698; font-size: 10px; font-weight: 600; letter-spacing: .8px; padding: 18px 12px 7px; margin-top: 12px; border-top: 1px solid #d9e9fc; }
.sidebar-bottom { margin-top: auto; padding: 20px 5px 0; font-size: 12px; display: grid; gap: 13px; }
.sidebar-bottom > a { color: #64778d; font-size: 11px; }
.sidebar-bottom button { color: #65778b; border: 0; background: transparent; width: max-content; padding: 6px 0; font-size: 12px; font-weight: 500; }
.sidebar-brand { position: relative; }
.sidebar-account { display: flex; align-items: center; gap: 11px; padding-top: 17px; border-top: 1px solid var(--line); }
.sidebar-account .avatar { width: 38px; height: 38px; font-size: 13px; }
.sidebar-user { display: flex; align-items: center; gap: 11px; border-top: 1px solid var(--line); padding-top: 16px; }
.sidebar-user > div { min-width: 0; }
.sidebar-user strong, #sidebar-user { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.avatar { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: #dceeff; color: #1064c7; font-size: 15px; font-weight: 700; flex: 0 0 auto; letter-spacing: -.3px; }
.avatar-small { width: 34px; height: 34px; font-size: 12px; }
.main { min-width: 0; width: 100%; max-width: 1920px; background: var(--workspace); padding: 0 30px 36px; }
header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 24px; }
.app-topbar { min-height: 68px; margin: 0 -30px 0; padding: 14px 30px; background: #fff; border-bottom: 1px solid var(--line); gap: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 12px; min-width: 0; color: #627188; font-size: 12px; }
.breadcrumb svg { color: var(--blue); width: 18px; height: 18px; }
.breadcrumb .eyebrow, #context-label { font-size: 12px; letter-spacing: 0; font-weight: 500; color: #64768c; margin: 0; overflow-wrap: anywhere; }
.header-right { display: flex; align-items: center; gap: 12px; font-size: 12px; flex: 0 0 auto; }
.header-right button { padding: 8px 11px; background: #fff; min-height: 35px; font-size: 12px; }
#user-name { color: #55667b; max-width: 160px; overflow-wrap: anywhere; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 27px 0 22px; }
.page-heading p { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.page-heading > div { min-width: 0; }
.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}
.page-actions:empty { display: none; }
.page-actions button,
.page-actions .v1-link {
  min-height: 38px;
  margin: 0;
  padding: 9px 12px;
  font-size: 12px;
  white-space: nowrap;
}
#source-badge { font-size: 11px; }
.source-badge { border: 1px solid #ffe0ad; border-radius: 6px; background: #fff3dc; color: #936318; padding: 5px 9px; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 11px 16px; background: #fff; border: 2px solid var(--blue); border-radius: 8px; color: #1168d6; }
.skip-link:focus { top: 12px; }
#menu-toggle, #nav-close, #nav-scrim, #mobile-nav { display: none; }

/* Shared panels, status, lists, and tables. */
#view { min-width: 0; }
.notice { display: block; padding: 12px 16px; border: 1px solid #ffe5ab; border-radius: 9px; background: #fff8e7; color: #80601c; margin-bottom: 18px; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.notice button { padding: 6px 10px; font-size: 12px; margin: 3px 0 3px 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; flex-wrap: wrap; }
.toolbar p { margin: 0; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filters button { font-size: 12px; color: #617389; border-color: #d5e4f7; padding: 8px 12px; font-weight: 500; }
.filters button.active { color: #0860d8; background: #e2efff; border-color: #b8d7ff; font-weight: 650; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.grid > .card, .two > .card { margin-bottom: 0; }
.card p { margin: 9px 0; }
.card .topline { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.card .topline > * { min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.section-heading h3 { font-size: 17px; }
.section-heading-link { font-size: 12px; font-weight: 500; color: #0868e8; }
.section-heading button { font-size: 12px; padding: 5px 0; border: 0; background: transparent; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: 11px; line-height: 1.5; padding: 4px 8px; border-radius: 6px; background: #eaf3ff; color: #266fc4; font-weight: 500; overflow-wrap: anywhere; }
.tag.warning { background: #fff0d4; color: #94600f; }
.tag.success { background: #e5f5eb; color: #2d7951; }
.tag.danger { background: #ffeded; color: #b33d43; }
.tag.neutral { background: #eaf4ff; color: #63748a; }
.card-footer { border-top: 1px solid #e5edf7; padding-top: 16px; margin-top: 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.card-footer button { font-size: 12px; padding: 8px 12px; }
.content-text { white-space: pre-wrap; line-height: 1.75; font-size: 13px; background: #eaf4ff; border: 1px solid #e5edf6; padding: 16px; border-radius: 8px; max-height: 400px; overflow: auto; overflow-wrap: anywhere; }
.assets { display: flex; flex-wrap: wrap; gap: 12px; margin: 15px 0; }
.assets img { display: block; max-width: 220px; max-height: 300px; object-fit: contain; border-radius: 8px; background: #eaf4ff; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td, th { text-align: left; padding: 14px 12px; border-bottom: 1px solid #e5edf7; vertical-align: top; line-height: 1.65; }
th { font-size: 11px; color: var(--muted); font-weight: 600; }
thead th { background: #f7faff; padding-top: 12px; padding-bottom: 12px; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td button { font-size: 12px; padding: 6px 10px; white-space: nowrap; }
.empty { padding: 46px 24px; text-align: center; color: var(--muted); }
.empty h2 { color: #485c73; font-size: 20px; margin-bottom: 11px; }
.empty p { max-width: 460px; margin: 0 auto; font-size: 13px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.split { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; }
.split > *, .two > *, .grid > *, .dashboard-grid > *, .inbox-layout > *, .content-grid > *, .review-layout > *, .ai-layout > *, .profile-grid > * { min-width: 0; }
.intro { background: #edf6ff; border-color: #d3e7ff; }
.intro h2 { font-size: 25px; margin: 10px 0; }
.intro p { max-width: 730px; color: #657990; }
.stat-label { font-size: 12px; color: var(--muted); }
.section-label { margin: 25px 0 17px; }
.screen-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.screen-summary > p { flex: 1; margin: 0; }
.screen-summary > button { font-size: 12px; }
.screen-summary > button svg { width: 17px; height: 17px; margin-right: 5px; }
.info-notice { background: #edf6ff; border-color: #cfe4ff; color: #4d76a5; }
.compact-empty { padding: 25px 10px; }
.compact-empty button { font-size: 12px; margin-top: 14px; }
.source-note, .decision-note { font-size: 11px; line-height: 1.65; }
.danger-button { color: #b44349; border-color: #efccd0; }
.danger-button:hover { background: #fff1f2; border-color: #dfacb2; }
.count-chip { display: inline-flex; padding: 2px 7px; border-radius: 5px; background: #e2efff; color: #116cda; font-size: 11px; font-weight: 600; }
.spinner { display: flex; justify-content: center; align-items: center; gap: 11px; padding: 60px 20px; color: var(--muted); text-align: center; }
.spinner::before { content: ''; width: 18px; height: 18px; border: 2px solid #d6e7ff; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }

/* Overview and advertising metrics. */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); margin-bottom: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 13px; text-align: left; align-content: start; color: var(--text); font-weight: 400; }
.metric-card:hover { background: #fff; }
button.metric-card:hover { border-color: #a9cfff; box-shadow: 0 4px 16px rgb(22 119 255 / 7%); }
.metric-card .metric-caption { grid-column: 1 / -1; margin: 13px 0 0; font-size: 11px; font-weight: 400; }
.metric-card > .topline { display: flex; align-items: center; gap: 13px; }
.metric-icon { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #e1efff; color: var(--blue); flex: 0 0 auto; }
.metric-icon svg { width: 24px; height: 24px; }
.metric-icon.amber { background: #fff0d4; color: #e49a20; }
.metric-icon.green { background: #e3f5ed; color: #389778; }
.metric-caption { color: var(--muted); font-size: 11px; line-height: 1.55; margin-top: 14px; }
.big-number { font-size: 27px; line-height: 1.2; font-weight: 750; color: #26313f; margin: 8px 0 0 !important; letter-spacing: -.75px; font-variant-numeric: tabular-nums; }
.metric-card .stat-label { font-weight: 600; color: #5e6f85; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.dashboard-main, .dashboard-aside { min-width: 0; }
.queue-list { display: grid; }
.queue-row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 0; border: 0; border-top: 1px solid #e5edf7; border-radius: 0; background: transparent; text-align: left; color: var(--text); font-weight: 400; }
.queue-row:first-child { padding-top: 0; border-top: 0; }
.queue-row:last-child { padding-bottom: 0; }
.queue-row:hover { background: transparent; }
.queue-row .tag { margin-left: auto; flex: 0 0 auto; }
.queue-thumbnail { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #eaf4ff; flex: 0 0 auto; }
.queue-thumbnail { overflow: hidden; }
.queue-thumbnail img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; }
.media-caption { font-size: 11px; color: var(--muted); margin: 8px 0 16px; line-height: 1.5; }
.queue-body { min-width: 0; flex: 1; }
.queue-body strong { font-size: 13px; font-weight: 650; display: block; line-height: 1.5; }
.queue-body p, .queue-body small { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.queue-body p { overflow-wrap: anywhere; }
.ads-overview .metric-grid, .metric-grid.ads-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.campaign-name { font-weight: 600; min-width: 170px; }
.creative-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.creative-card { padding: 16px; }
.creative-card .assets { margin-top: 0; }
.creative-card .assets a, .creative-card .assets img { width: 100%; max-width: 100%; }
.creative-card .assets img { aspect-ratio: 16 / 10; object-fit: cover; }
.creative-card h3 { font-size: 14px; }
.creative-card p { font-size: 12px; }
.creative-card > .content-cover { margin: 0 0 16px; min-height: 130px; }
.creative-card > .asset-placeholder { margin-bottom: 16px; }
.creative-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; border-top: 1px solid #e5edf7; margin-top: 17px; padding-top: 15px; }
.creative-stats small { display: block; margin-bottom: 5px; font-size: 10px; }
.creative-stats strong { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Content review cards, large media preview, and version decisions. */
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.content-card { padding: 0; margin-bottom: 0; overflow: hidden; }
.content-card > .topline { padding: 20px 20px 0; }
.content-cover { background: #edf4fd; display: flex; justify-content: center; align-items: center; min-height: 160px; max-height: 320px; margin: 16px 20px 0; border-radius: 8px; overflow: hidden; }
.content-cover img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.content-cover.assets img { max-width: 100%; }
.content-cover a { width: 100%; }
.asset-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 150px; width: 100%; color: #7992af; text-align: center; font-size: 12px; background: #eff6ff; border: 1px dashed #c7ddf9; border-radius: 8px; padding: 18px; }
.asset-placeholder svg { width: 29px; height: 29px; color: #6ba6ef; }
.asset-fallback { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 160px; padding: 20px; font-size: 12px; line-height: 1.6; color: #7891ae; text-align: center; background: #eff6ff; border-radius: 8px; }
.content-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 11px; margin: 12px 20px; }
.content-meta span { display: inline-flex; align-items: center; gap: 4px; }
.content-body { padding: 0 20px 20px; }
.content-body .content-text { background: transparent; border: 0; padding: 0; max-height: 250px; font-size: 13px; }
.content-card .card-footer { margin: 16px 0 0; }
.decision-status { padding: 11px 13px; background: #fff; border: 1px solid #dfeaff; border-radius: 8px; margin: 12px 0; font-size: 12px; line-height: 1.65; }
.decision-status .tag { margin: 3px 4px 3px 0; }
.content-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.content-list { display: grid; gap: 13px; }
.content-list-item { display: flex; width: 100%; text-align: left; align-items: flex-start; gap: 12px; border-color: var(--line); background: #fff; color: var(--text); padding: 14px; border-radius: 11px; font-weight: 400; }
.content-list-item.active { border-color: var(--blue); box-shadow: 0 0 0 1px rgb(22 119 255 / 9%); }
.content-list-item .queue-thumbnail { width: 68px; height: 78px; }
.content-list-item .queue-body strong { font-size: 12px; }
.content-list-item .tag { margin-top: 8px; font-size: 10px; }
.content-detail { min-width: 0; margin-bottom: 0; }
.content-detail h2 { font-size: 23px; }
.content-detail > .content-meta { margin: 14px 0; }
.content-detail > .content-cover { margin: 0 0 17px; }
.content-detail > .content-text { background: transparent; border: 0; padding: 0; max-height: none; }
.content-detail .content-actions { justify-content: flex-end; }
.content-detail .content-actions button { font-size: 12px; padding: 10px 14px; }
.content-detail .decision-note { margin-top: 13px; }
.queue-thumbnail.assets { margin: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.queue-thumbnail.assets a, .queue-thumbnail.assets img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; }
.queue-thumbnail .asset-placeholder { min-height: 0; height: 100%; padding: 5px; font-size: 8px; gap: 4px; border-radius: 8px; border: 0; }
.queue-thumbnail .asset-placeholder svg { width: 18px; height: 18px; }
.queue-thumbnail .asset-fallback, .content-list-item .queue-thumbnail > .asset-fallback { min-height: 0; height: 100%; padding: 4px; flex-direction: column; gap: 5px; font-size: 0; line-height: 0; }
.queue-thumbnail .asset-fallback::before, .content-list-item .queue-thumbnail > .asset-fallback::before { content: '▧'; font-size: 22px; line-height: 1; color: #73a8ed; }
.queue-thumbnail .asset-fallback::after, .content-list-item .queue-thumbnail > .asset-fallback::after { content: 'Chưa tải'; font-size: 8px; line-height: 1.3; color: #748ca9; }
.queue-thumbnail .asset-placeholder span { display: none; }
.queue-thumbnail .asset-placeholder::after { content: 'Chưa có ảnh'; font-size: 8px; line-height: 1.3; color: #748ca9; }
.row-arrow { display: inline-flex; color: #8599b2; }
.row-arrow svg { width: 15px; height: 15px; }

/* Fanpage inbox: threads, conversation, and context. */
.inbox-layout { display: grid; grid-template-columns: minmax(210px, .85fr) minmax(300px, 1.5fr) minmax(230px, 1fr); gap: 14px; align-items: start; }
.thread-panel { padding: 0; min-height: 560px; overflow: hidden; }
.thread-panel-heading { padding: 18px 16px 14px; border-bottom: 1px solid #e5edf7; }
.thread-panel-heading { display: flex; align-items: center; gap: 10px; }
.thread-panel-heading .provider-icon { width: 29px; height: 29px; font-size: 21px; border-radius: 50%; }
.thread-panel-heading h3 { font-size: 14px; }
.thread-panel-heading p { font-size: 11px; margin: 6px 0 0; }
.thread-list { display: grid; padding: 0 10px 10px; }
.thread { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; margin: 0; padding: 15px 10px; border: 0; border-bottom: 1px solid #e8eff8; border-radius: 0; background: transparent; color: var(--text); font-weight: 500; }
.thread:last-child { border-bottom: 0; }
.thread.active { background: #e8f3ff; color: #1466c9; border-color: #d8e9ff; border-radius: 8px; }
.thread small { display: block; margin-top: 6px; font-weight: 400; font-size: 11px; }
.thread .avatar { width: 36px; height: 36px; font-size: 12px; }
.thread-main { min-width: 0; flex: 1; }
.thread-title { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: 12px; line-height: 1.55; }
.thread-title strong { font-weight: 650; }
.thread-title small { white-space: nowrap; margin: 0; font-size: 10px; }
.thread-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.thread-meta .tag { font-size: 10px; padding: 2px 5px; }
.conversation-panel { min-width: 0; }
.conversation-panel > .card { padding: 18px; min-height: 560px; }
.conversation-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 11px; padding-bottom: 17px; border-bottom: 1px solid #e5edf7; }
.conversation-heading h3 { font-size: 16px; }
.conversation-heading > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.conversation-heading > div:first-of-type { display: block; margin-right: auto; }
.conversation-heading > div > div { min-width: 0; }
.conversation-heading p { font-size: 11px; margin: 3px 0 0; }
.conversation-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; margin-top: 12px; border-top: 1px solid #e5edf7; }
.conversation-actions button { font-size: 11px; padding: 9px 11px; }
.conversation-context .card { padding: 18px; }
.conversation-context h3 { font-size: 15px; }
.conversation-context p { font-size: 12px; line-height: 1.65; }
.conversation-context dl { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; font-size: 12px; margin: 17px 0 0; }
.conversation-context dt { color: var(--muted); }
.conversation-context dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.messages { max-height: 450px; min-height: 245px; overflow-y: auto; padding: 7px 0; }
.message { padding: 12px 14px; background: #eaf4ff; border-radius: 11px 11px 11px 3px; max-width: 88%; margin: 13px 0; white-space: pre-wrap; line-height: 1.65; font-size: 13px; overflow-wrap: anywhere; }
.message.outgoing { background: #e0f0ff; color: #314e70; border-radius: 11px 11px 3px 11px; margin-left: auto; }
.message small { display: block; margin-top: 6px; font-size: 10px; color: #7b8da3; }
.operation-card { border-color: #ffdfaa; background: #fffdf8; }
.operation-card h3 { font-size: 15px; }
.operation-card > p { font-size: 13px; }
.ai-draft-card { padding: 15px; margin: 15px 0; background: #edf6ff; border: 1px solid #cfe5ff; border-radius: 10px; }
.ai-draft-card .section-heading { align-items: flex-start; margin-bottom: 11px; }
.ai-draft-card h3 { display: flex; align-items: center; gap: 7px; color: #146cda; font-size: 13px; }
.ai-draft-card h3 svg { width: 18px; height: 18px; }
.ai-draft-card > p { background: #fff; border-radius: 7px; padding: 12px; margin: 10px 0; font-size: 12px; line-height: 1.65; }
.ai-draft-card .card-footer { border-top-color: #d7e7fb; padding-top: 10px; margin-top: 10px; }
.ai-draft-card .card-footer button { margin-left: auto; }
.ai-draft-card small { font-size: 10px; }

/* Reviews distinguish platform review from BIV reply publication. */
.review-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); gap: 18px; align-items: start; }
.review-card { padding: 20px; }
.review-card h3 { font-size: 15px; }
.review-card .topline > div { display: flex; align-items: center; gap: 11px; }
.review-card .topline > div > div { display: block; }
.review-card .topline small { display: block; margin-top: 4px; }
.review-card > p { font-size: 13px; }
.rating { display: flex; align-items: center; gap: 6px; color: #db9315; letter-spacing: 2px; font-size: 16px; margin-top: 15px; }
.rating span { font-size: 12px; letter-spacing: 0; }
.review-invite-card { position: sticky; top: 20px; background: #fff; }
.review-invite-card h3 { line-height: 1.45; }
.review-invite-card .provider-icon { margin-bottom: 16px; }
.review-invite-card > .metric-icon { margin-bottom: 16px; }
.review-invite-card p { color: var(--muted); font-size: 12px; }
.review-invite-card .card-footer { display: grid; }
.review-invite-card .card-footer button { width: 100%; }
.reply-block { background: #fff; border: 1px solid #dceaff; border-left: 3px solid #91bdff; border-radius: 8px; padding: 13px 15px; margin: 14px 0; font-size: 12px; }
.reply-block small { font-size: 11px; }
.reply-block p { font-size: 13px; margin: 7px 0 10px; }
.reply-block .tag { margin: 2px 5px 2px 0; }

/* Approved knowledge, scripts, and scoped AI consent. */
.ai-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ai-layout .toolbar { min-height: 39px; }
.ai-layout .toolbar h3 { font-size: 17px; }
.ai-layout .toolbar button { font-size: 12px; padding: 8px 10px; }
.document-card, .script-card { padding: 18px; }
.document-card h3, .script-card h3 { font-size: 15px; }
.document-card p, .script-card p { font-size: 12px; color: var(--muted); }
.script-steps { display: grid; gap: 8px; margin: 16px 0; }
.script-step { position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; background: #fff; border: 1px solid #e4eefb; border-radius: 8px; font-size: 12px; line-height: 1.6; }
.script-step > span:first-child { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; height: 22px; border-radius: 50%; color: #1670df; background: #e1efff; font-size: 10px; font-weight: 700; }
.script-step p { margin: 2px 0; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.mode-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.mode-card h3 { font-size: 15px; }
.mode-card p { font-size: 12px; color: var(--muted); }
.mode-consent { padding: 10px 12px; background: #eaf4ff; border: 1px solid #e4ebf6; border-radius: 8px; margin: 12px 0; font-size: 11px; line-height: 1.65; color: #61778f; }

/* Provider connections and read-only business profile. */
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.provider-card { padding: 22px; }
.provider-card > .provider-icon { margin-bottom: 17px; }
.provider-card h2 { font-size: 22px; }
.provider-card > .topline > div { display: flex; align-items: center; gap: 13px; }
.provider-card > .topline > div > div { display: block; }
.provider-card h3 { font-size: 17px; }
.provider-card p { color: var(--muted); font-size: 12px; }
.provider-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; background: #e5f1ff; color: var(--blue); flex: 0 0 auto; font-size: 27px; font-weight: 750; }
.provider-icon svg { width: 26px; height: 26px; }
.provider-capabilities { display: grid; gap: 9px; padding: 15px 0; color: #667b93; font-size: 12px; list-style: none; margin: 0; }
.provider-capabilities li { display: flex; align-items: center; gap: 8px; }
.provider-capabilities svg { width: 15px; height: 15px; color: #3184ee; }
.connection-list { display: grid; gap: 0; }
.connection-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #e5edf7; }
.connection-row:first-child { border-top: 0; padding-top: 0; }
.connection-row:last-child { padding-bottom: 0; }
.connection-row > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.connection-row > div > div { display: block; }
.connection-row strong { display: block; font-size: 13px; }
.connection-row small { display: block; margin-top: 3px; font-size: 11px; }
.connection-row button { flex: 0 0 auto; font-size: 12px; padding: 7px 10px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.profile-mark { width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #e5f1ff; color: var(--blue); flex: 0 0 auto; }
.profile-mark svg { width: 28px; height: 28px; }
.profile-details { display: block; }
.profile-details .profile-mark { float: left; margin-right: 15px; }
.profile-details > .eyebrow { padding-top: 6px; }
.profile-details h2 { font-size: 23px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 22px 0; }
.profile-fields > div { padding: 13px 0; border-bottom: 1px solid #e6edf8; min-width: 0; }
.profile-fields dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.profile-fields dd { margin: 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.conversation-context .profile-fields, .invite-summary .profile-fields { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 14px 0 0; }
.conversation-context .profile-fields > div { display: flex; align-items: flex-start; gap: 15px; justify-content: space-between; }
.conversation-context .profile-fields dt { margin-bottom: 0; }
.conversation-context .profile-fields dd { text-align: right; font-size: 12px; }
.profile-pair { padding: 15px 0; border-bottom: 1px solid #e7eef8; min-width: 0; }
.dashboard-grid .profile-pair { display: flex; align-items: center; gap: 12px; }
.dashboard-grid .profile-pair .metric-icon { width: 35px; height: 35px; background: #eaf4ff; color: #7389a3; }
.dashboard-grid .profile-pair .metric-icon svg { width: 18px; height: 18px; }
.profile-pair dt, .profile-pair small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.profile-pair dd { margin: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.profile-pair strong { font-size: 13px; font-weight: 500; }
.account-card h3 { font-size: 16px; }
.account-card .avatar { margin: 16px 0 12px; }
.account-card p { font-size: 12px; color: var(--muted); }
.account-card .card-footer { display: grid; }

/* Invitations and object-scoped access. */
.access-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.access-summary .metric-card { padding: 18px 20px; }
.access-summary .big-number { font-size: 26px; }
.access-table td:first-child { font-weight: 600; }
.access-table td small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }
.permission-chips { display: flex; flex-wrap: wrap; gap: 5px; max-width: 420px; }
.permission-chip { display: inline-flex; padding: 3px 7px; border-radius: 5px; color: #647b95; background: #eaf4ff; font-size: 10px; line-height: 1.5; font-weight: 500; }
.access-person { display: flex; align-items: flex-start; gap: 10px; }
.access-person > div { min-width: 0; }
.access-person .avatar { margin-top: 2px; }
.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-top: 1px solid #e5edf7; }
.invite-row:first-of-type { margin-top: 16px; }
.invite-row p { margin: 4px 0; font-size: 12px; }
.invite-row strong { font-size: 13px; }
.invite-row button { font-size: 12px; padding: 7px 11px; flex: 0 0 auto; }
.permission-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; margin: 18px 0; }
.permission-list label { display: flex; align-items: flex-start; gap: 0; font-size: 12px; margin: 8px 0; font-weight: 500; }
.permission-list input { margin-top: 2px; }

/* Dialogs preserve version, recipient, and uncertainty in the visible body. */
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; max-width: 640px; width: calc(100% - 32px); max-height: min(90dvh, 920px); color: var(--text); box-shadow: 0 20px 80px rgb(69 98 140 / 20%); overflow: auto; }
dialog::backdrop { background: rgb(22 119 255 / 18%); backdrop-filter: blur(2px); }
#dialog-form { padding: 25px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 17px; margin-bottom: 19px; border-bottom: 1px solid #e5edf7; }
.dialog-heading h2 { font-size: 20px; }
.dialog-heading button { display: inline-flex; align-items: center; justify-content: center; border: 0; background: #eaf4ff; color: #76879b; padding: 0; width: 32px; height: 32px; font-size: 24px; font-weight: 400; flex: 0 0 auto; }
.dialog-heading button:hover { background: #e9f3ff; color: var(--blue); }
#dialog-fields { min-width: 0; }
#dialog-fields > p { font-size: 13px; }
#dialog-fields > label:first-child { margin-top: 0; }
.dialog-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; border-top: 1px solid #e5edf7; padding-top: 18px; }
.dialog-footer button { min-width: 86px; }
.qr { display: block; width: 160px; height: 160px; max-width: 100%; margin: 18px auto; border: 1px solid #dce7f4; border-radius: 10px; padding: 8px; background: #fff; }

@media (min-width: 1700px) {
  .main { padding-right: 42px; padding-left: 42px; }
  .app-topbar { margin-right: -42px; margin-left: -42px; padding-right: 42px; padding-left: 42px; }
  .inbox-layout { gap: 18px; }
}
@media (max-width: 1280px) {
  .shell { grid-template-columns: 212px minmax(0, 1fr); }
  .sidebar { padding-right: 12px; padding-left: 12px; }
  #nav button { gap: 11px; padding: 12px 10px; }
  .main { padding-right: 24px; padding-left: 24px; }
  .app-topbar { margin-right: -24px; margin-left: -24px; padding-right: 24px; padding-left: 24px; }
  .metric-card { padding: 17px; }
  .metric-card .big-number { font-size: 23px; }
  .metric-icon { width: 38px; height: 38px; }
  .metric-card { grid-template-columns: 38px minmax(0, 1fr); gap: 0 10px; }
  .inbox-layout { grid-template-columns: minmax(210px, .75fr) minmax(0, 1.35fr); }
  .conversation-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; grid-column: 1 / -1; }
  .conversation-context .card { margin-bottom: 0; }
  .creative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: 195px minmax(0, 1fr); }
  .sidebar .brand { font-size: 37px; }
  #nav button { font-size: 13px; gap: 10px; }
  #nav .icon, .icon svg { width: 19px; height: 19px; }
  .main { padding-right: 20px; padding-left: 20px; }
  .app-topbar { margin-right: -20px; margin-left: -20px; padding-right: 20px; padding-left: 20px; }
  #user-name { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ads-overview .metric-grid, .metric-grid.ads-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .review-layout, .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .dashboard-aside > .card { margin-bottom: 0; }
  .review-invite-card { position: static; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .content-cover { max-height: 380px; }
  .content-cover img { max-height: 380px; }
  .account-card { max-width: none; }
  .connection-grid { grid-template-columns: minmax(0, 1fr); }
  .content-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 14px; }
  .content-list-item { display: block; padding: 13px; }
  .content-list-item .queue-thumbnail { width: 100%; height: 90px; margin-bottom: 11px; }
  .login-main { padding: 38px 7%; }
  .login-card { padding: 26px; }
  .welcome { padding: 36px 8%; }
  .welcome h1 { font-size: 37px; }
  .welcome p { font-size: 15px; }
}
@media (max-width: 820px) and (min-width: 721px) {
  .sidebar { padding-right: 9px; padding-left: 9px; }
  .shell { grid-template-columns: 182px minmax(0, 1fr); }
  .main { padding-right: 16px; padding-left: 16px; }
  .app-topbar { margin-right: -16px; margin-left: -16px; padding-right: 16px; padding-left: 16px; }
  .header-right { gap: 7px; }
  .header-right .avatar { width: 34px; height: 34px; font-size: 12px; }
  .page-heading h1 { font-size: 26px; }
  .inbox-layout { grid-template-columns: minmax(170px, .75fr) minmax(0, 1.25fr); gap: 10px; }
  .thread { padding: 13px 5px; gap: 7px; }
  .thread .avatar { width: 28px; height: 28px; font-size: 10px; }
  .thread-title { display: block; }
  .thread-title small { display: block; margin-top: 3px; }
  .conversation-panel > .card { padding: 14px; }
  .ai-layout, .mode-grid, .two, .dashboard-aside, .conversation-context { grid-template-columns: minmax(0, 1fr); }
}

/* At narrow widths the complete navigation becomes a controlled drawer. */
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: 100dvh; width: min(286px, 86vw); padding: 23px 16px 20px; z-index: 60; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s ease; box-shadow: 10px 0 40px rgb(65 92 126 / 10%); }
  .shell.menu-open .sidebar { transform: translateX(0); visibility: visible; }
  #nav-close { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 20px; right: 14px; padding: 0; border: 0; width: 34px; height: 34px; font-size: 24px; background: #e5f1ff; color: #697d93; }
  #nav-scrim { position: fixed; inset: 0; background: rgb(22 119 255 / 18%); border: 0; border-radius: 0; z-index: 50; }
  .shell.menu-open #nav-scrim { display: block; }
  .sidebar .brand { font-size: 39px; }
  .sidebar .workspace-label { margin-bottom: 20px; }
  #nav button { font-size: 14px; padding: 13px; min-height: 45px; }
  .sidebar-bottom { padding-top: 20px; }
  #mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; background: #fff; border-top: 1px solid #d9e8fb; padding: 6px 7px max(7px, env(safe-area-inset-bottom)); box-shadow: 0 -3px 15px rgb(54 103 167 / 3%); }
  #mobile-nav button { flex: 1; min-width: 0; border: 0; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 5px 2px; min-height: 49px; background: transparent; color: #64748b; font-size: 10px; font-weight: 500; }
  #mobile-nav button .icon, #mobile-nav button svg { width: 21px; height: 21px; }
  #mobile-nav button.active { color: #0860d8; background: #f4f9ff; font-weight: 650; }
  .main { padding: 0 16px 98px; }
  .app-topbar { min-height: 62px; margin: 0 -16px; padding: 12px 16px; gap: 10px; position: sticky; top: 0; z-index: 30; }
  #menu-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 6px; width: 33px; height: 34px; border: 0; color: #56718c; flex: 0 0 auto; }
  #menu-toggle svg { width: 22px; height: 22px; }
  .breadcrumb { gap: 8px; flex: 1; min-width: 0; }
  .breadcrumb > svg, .breadcrumb > .breadcrumb-divider { display: none; }
  #context-label { font-size: 11px; line-height: 1.5; }
  .header-right { gap: 7px; }
  .header-right .avatar { width: 33px; height: 33px; font-size: 12px; }
  .header-right button { padding: 7px; min-height: 32px; font-size: 11px; }
  #source-badge { display: none; }
  .page-heading { padding: 22px 0 18px; align-items: flex-start; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 12px; line-height: 1.55; }
  .page-heading > button { padding: 8px 10px; font-size: 11px; }
  .card { padding: 18px; margin-bottom: 15px; border-radius: 11px; }
  .notice { font-size: 11px; padding: 11px 13px; margin-bottom: 15px; }
  .metric-grid { gap: 11px; margin-bottom: 15px; }
  .metric-card { padding: 15px 13px; border-radius: 11px; }
  .metric-card { grid-template-columns: 33px minmax(0, 1fr); gap: 0 9px; }
  .metric-card > .topline { gap: 9px; }
  .metric-icon { width: 33px; height: 33px; border-radius: 8px; }
  .metric-icon svg { width: 19px; height: 19px; }
  .metric-card .stat-label { font-size: 10px; }
  .metric-card .big-number { font-size: 21px; }
  .metric-card > div:not(.metric-icon) { display: contents; }
  .metric-card > div:not(.metric-icon) .stat-label { align-self: center; }
  .metric-card .big-number { grid-column: 1 / -1; white-space: nowrap; font-size: 23px; margin-top: 12px !important; }
  .metric-caption { font-size: 10px; margin-top: 11px; }
  .dashboard-grid, .dashboard-aside, .two, .split, .ai-layout, .mode-grid, .connection-grid, .review-layout, .profile-grid, .content-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .dashboard-aside > .card { margin-bottom: 0; }
  .section-heading h3 { font-size: 15px; }
  .section-heading-link, .section-heading button { font-size: 11px; }
  .queue-row { gap: 10px; padding: 12px 0; }
  .queue-thumbnail { width: 52px; height: 52px; }
  .queue-body strong { font-size: 12px; }
  .queue-body p, .queue-body small { font-size: 10px; }
  .queue-row .tag { font-size: 9px; padding: 3px 5px; max-width: 85px; }
  .toolbar { gap: 12px; margin-bottom: 15px; }
  .toolbar p { font-size: 12px; }
  .filters { gap: 6px; }
  .filters button { font-size: 11px; padding: 8px 10px; }
  .content-grid { gap: 15px; }
  .content-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .content-list-item { padding: 12px; }
  .content-list-item .queue-thumbnail { width: 100%; height: 85px; }
  .content-list-item .queue-body strong { font-size: 11px; }
  .content-list-item .queue-body small { font-size: 9px; }
  .content-list-item .tag { font-size: 9px; }
  .content-detail h2 { font-size: 20px; }
  .content-detail .content-actions button { flex: 1; padding: 10px 8px; min-height: 42px; }
  .content-card { padding: 0; margin-bottom: 0; }
  .content-card > .topline { padding: 18px 18px 0; gap: 9px; }
  .content-card h3 { font-size: 16px; }
  .content-card .eyebrow { font-size: 9px; }
  .content-cover { margin: 14px 18px 0; min-height: 120px; max-height: 400px; }
  .content-cover img { max-height: 400px; }
  .content-meta { margin: 12px 18px; font-size: 10px; }
  .content-body { padding: 0 18px 18px; }
  .content-card .card-footer button { flex: 1; min-height: 42px; padding: 9px 8px; }
  .content-text { font-size: 13px; padding: 13px; }
  .creative-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .creative-card { padding: 16px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .ads-overview + .card .table-wrap table { min-width: 560px; }
  .ads-overview + .card .table-wrap th:first-child, .ads-overview + .card .table-wrap td:first-child { min-width: 200px; }
  .ads-overview + .card .table-wrap th:nth-child(n+3), .ads-overview + .card .table-wrap td:nth-child(n+3) { white-space: nowrap; }
  td, th { padding: 12px 10px; font-size: 12px; }
  thead th { font-size: 10px; }
  .inbox-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .thread-panel { min-height: 0; padding: 0; }
  .thread-panel-heading { padding: 16px; }
  .thread-list { max-height: 250px; overflow-y: auto; padding: 0 8px 8px; }
  .thread { padding: 12px 9px; }
  .thread-main { flex: 1; }
  .thread-title { font-size: 12px; }
  .thread-title small { font-size: 10px; }
  .thread-meta { margin-top: 5px; }
  .conversation-panel > .card { min-height: 0; padding: 16px; }
  .conversation-heading { gap: 8px; padding-bottom: 14px; }
  .conversation-heading h3 { font-size: 15px; }
  .conversation-heading .avatar { width: 35px; height: 35px; font-size: 12px; }
  .conversation-heading .tag { font-size: 10px; max-width: 115px; }
  .messages { min-height: 150px; max-height: 460px; }
  .message { max-width: 91%; font-size: 12px; padding: 11px 13px; }
  .conversation-actions { gap: 7px; }
  .conversation-actions button { flex: 1; min-height: 40px; padding: 8px; }
  .conversation-context { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .conversation-context .card { padding: 18px; }
  .operation-card { padding: 17px; }
  .review-card { padding: 18px; }
  .review-card .topline > div { gap: 8px; }
  .review-card .avatar { width: 35px; height: 35px; font-size: 12px; }
  .review-card h3 { font-size: 14px; }
  .review-invite-card { position: static; }
  .profile-fields { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 17px; }
  .profile-pair { padding: 13px 0; }
  .provider-card { padding: 18px; }
  .provider-card > .topline { gap: 8px; }
  .provider-card > .topline > div { gap: 10px; }
  .provider-card h3 { font-size: 15px; }
  .provider-icon { width: 37px; height: 37px; font-size: 24px; }
  .provider-icon svg { width: 23px; height: 23px; }
  .connection-row { gap: 8px; }
  .connection-row > div { gap: 10px; }
  .connection-row strong { font-size: 12px; }
  .connection-row small { font-size: 10px; }
  .connection-row button { font-size: 11px; padding: 8px; }
  .access-summary { gap: 10px; }
  .access-summary .metric-card { padding: 14px 11px; }
  .access-summary .stat-label { font-size: 10px; }
  .access-summary .big-number { font-size: 22px; }
  .access-table table { min-width: 760px; }
  .access-table th:nth-child(2), .access-table td:nth-child(2) { min-width: 220px; }
  .access-table th:nth-child(n+3), .access-table td:nth-child(n+3) { white-space: nowrap; }
  .invite-row { align-items: flex-start; gap: 10px; }
  .invite-row > div { min-width: 0; }
  .invite-row strong { font-size: 12px; }
  .permission-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .empty { padding: 35px 18px; }
  .empty h2 { font-size: 18px; }
  .empty p { font-size: 12px; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 32px); border-radius: 12px; }
  #dialog-form { padding: 20px; }
  .dialog-heading { gap: 10px; padding-bottom: 15px; margin-bottom: 17px; }
  .dialog-heading h2 { font-size: 18px; }
  .dialog-footer { gap: 9px; }
  .dialog-footer button { flex: 1; min-width: 0; min-height: 42px; padding: 9px 8px; }
  label { font-size: 13px; }
  input, select, textarea { font-size: 16px; }
  .login-layout { grid-template-columns: minmax(0, 1fr); }
  .welcome { min-height: auto; padding: 26px 24px 24px; gap: 10px; }
  .welcome .brand { font-size: 35px; }
  .welcome .brand span { font-size: 8px; letter-spacing: 2.8px; }
  .welcome-copy { margin: 10px 0 0; }
  .welcome h1 { font-size: 31px; letter-spacing: -.8px; margin: 10px 0; }
  .welcome h1 br { display: none; }
  .welcome p { font-size: 13px; margin-bottom: 5px; }
  .welcome .eyebrow { font-size: 9px; }
  .welcome small, .login-visual { display: none; }
  .login-main { padding: 25px 18px 35px; }
  .login-card { padding: 25px 21px; max-width: 440px; }
  .login-card h2 { font-size: 23px; }
  .login-heading { margin-bottom: 20px; }
  .login-heading p { font-size: 12px; }
  .login-support { padding: 16px 18px; }
  .login-support strong { font-size: 13px; }
  .invite-summary { padding: 15px; }
}
@media (max-width: 380px) {
  .main { padding-right: 12px; padding-left: 12px; }
  .app-topbar { margin-right: -12px; margin-left: -12px; padding-right: 12px; padding-left: 12px; }
  .metric-card { padding: 13px 11px; }
  .metric-icon { width: 28px; height: 28px; }
  .metric-card { grid-template-columns: 28px minmax(0, 1fr); gap: 0 7px; }
  .metric-card > .topline { gap: 7px; }
  .metric-card .big-number { font-size: 21px; }
  .queue-thumbnail { width: 46px; height: 46px; }
  .queue-row .tag { max-width: 68px; }
  .card { padding: 16px; }
  .content-card { padding: 0; }
  .connection-row button { max-width: 95px; }
  .page-heading h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.client-checkin-link{display:flex;align-items:center;gap:10px;padding:12px 14px;margin-top:8px;border-radius:12px;color:#174a9d;text-decoration:none;font-weight:600}
.client-checkin-link:hover,.client-checkin-link:focus-visible{background:#dbeafe;outline:2px solid #2563eb;outline-offset:2px}

/* BIV Growth OS visual pass: calm workspace shell, stronger hierarchy, and responsive dashboard surfaces. */
:root {
  --blue: #1769d3;
  --blue-hover: #0f59ba;
  --blue-soft: #e8f2ff;
  --blue-line: #d4e5fb;
  --surface: #ffffff;
  --workspace: #f7fbff;
  --sidebar: #f2f8ff;
  --muted: #71839b;
  --line: #dce8f6;
  --text: #183252;
  --radius: 14px;
  --shadow: 0 3px 14px rgb(33 77 130 / 6%);
}

body {
  background: var(--workspace);
  color: var(--text);
}

h1,
h2,
h3,
h4 {
  color: #153254;
}

.brand {
  color: #1769d3;
  letter-spacing: -2px;
}

.brand span {
  color: #6a7d94;
}

.shell {
  grid-template-columns: 250px minmax(0, 1fr);
  background: var(--workspace);
}

.sidebar {
  padding: 28px 17px 20px;
  background: var(--sidebar);
  border-right: 1px solid #d9e7f6;
}

.sidebar .brand {
  margin: 0 12px 34px;
}

.workspace-label {
  margin: 0 6px 24px;
  color: #8496aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.workspace-label select {
  margin-top: 8px;
  border-color: #d7e7f7;
  background: rgb(255 255 255 / 76%);
  color: #264366;
  box-shadow: 0 2px 5px rgb(29 78 133 / 3%);
}

#nav {
  gap: 5px;
}

#nav button {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #657a94;
  font-size: 13px;
  font-weight: 550;
}

#nav button:hover {
  background: #e8f2ff;
  color: #1769d3;
}

#nav button.active {
  background: #dfedff;
  border-color: #d2e4fb;
  color: #125fbe;
  font-weight: 700;
  box-shadow: 0 2px 6px rgb(39 98 164 / 5%);
}

#nav button.active .icon {
  color: #1769d3;
}

.nav-group,
.nav-group-label {
  border-top-color: #dbe8f6;
  color: #8a9bb0;
}

.sidebar-bottom {
  padding: 20px 7px 0;
}

.sidebar-account,
.sidebar-user {
  border-top-color: #dce8f6;
}

.main {
  max-width: 1920px;
  padding: 0 36px 42px;
  background: var(--workspace);
}

.app-topbar {
  min-height: 72px;
  margin: 0 -36px;
  padding: 14px 36px;
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid #dfeaf6;
  box-shadow: 0 2px 12px rgb(31 75 126 / 3%);
}

.breadcrumb {
  color: #687d96;
}

#context-label,
.breadcrumb .eyebrow {
  color: #5f7590;
  font-weight: 600;
}

.topbar-date-filter {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  color: #8292a6;
  font-size: 11px;
  white-space: nowrap;
}

.date-range-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 11px;
  border-color: #d7e5f5;
  border-radius: 9px;
  background: #ffffff;
  color: #3f5b7a;
  font-size: 12px;
  font-weight: 600;
}

.date-range-control:hover {
  border-color: #a9c9ee;
  background: #f7fbff;
}

.date-range-chevron,
.profile-chevron {
  color: #91a2b7;
  font-size: 15px;
  line-height: 1;
}

.header-right {
  gap: 9px;
}

.header-right button,
.icon-button {
  border-color: #dbe8f6;
  border-radius: 9px;
  color: #5e7896;
  background: #ffffff;
}

.header-right button:hover,
.icon-button:hover {
  border-color: #b9d4f3;
  background: #f1f7ff;
}

.notification-button {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
}

.notification-icon {
  font-size: 16px;
  filter: saturate(.7);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid #ffffff;
  border-radius: 50%;
  background: #ee6e6e;
}

.profile-menu {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 4px 8px 4px 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #1e3d62;
  text-align: left;
}

.profile-menu:hover {
  border-color: #dbe8f6;
  background: #f3f8ff;
}

.profile-menu .avatar {
  width: 32px;
  height: 32px;
  background: #dcecff;
  color: #1769d3;
  font-size: 11px;
}

.profile-details {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.profile-details #user-name,
.profile-details #user-name + .profile-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-details #user-name {
  max-width: 132px;
  color: #294665;
  font-size: 12px;
  font-weight: 700;
}

.profile-role {
  color: #8a9aae;
  font-size: 10px;
}

.page-heading {
  padding: 30px 0 23px;
}

.page-heading h1 {
  color: #16365a;
  font-size: 29px;
  letter-spacing: -.7px;
}

.page-heading p {
  color: #7789a0;
}

.card,
.metric-card {
  border-color: #dce8f6;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.card {
  padding: 23px;
  background: #ffffff;
}

.metric-card {
  min-height: 132px;
  padding: 20px;
  background: #ffffff;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card .stat-label {
  color: #74869d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1px;
}

.metric-card .big-number {
  color: #18385e;
  font-size: 28px;
}

.metric-icon {
  background: #e5f1ff;
  color: #1769d3;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, .9fr);
  gap: 20px;
}

.dashboard-main > .card,
.dashboard-aside > .card {
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h3 {
  color: #1b3c61;
  font-size: 16px;
}

.section-heading-link,
.section-heading button {
  color: #1769d3;
}

.queue-row {
  padding: 14px 0;
  border-top-color: #e5edf6;
}

.queue-row:hover {
  background: #f6faff;
}

.queue-thumbnail {
  width: 58px;
  height: 58px;
  border: 1px solid #e1ebf6;
  border-radius: 10px;
  background: #edf5fd;
}

.queue-body strong {
  color: #254667;
  font-size: 13px;
  font-weight: 700;
}

.queue-body p,
.queue-body small {
  color: #8092a7;
}

.tag {
  border-radius: 7px;
  background: #eaf3ff;
  color: #3771b3;
}

.count-chip {
  background: #e4f0ff;
  color: #1769d3;
}

.content-text,
.mode-consent {
  background: #f2f8ff;
}

.intro,
.info-notice {
  background: #eef6ff;
  border-color: #d4e7fb;
}

#mobile-nav {
  border-top-color: #dbe8f6;
}

/* Overview composition used by the BIV Growth OS dashboard reference. */
.overview-summary {
  margin-bottom: 14px;
}

.overview-feature-grid,
.overview-lower-grid,
.overview-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr);
  gap: 20px;
  margin-top: 20px;
  align-items: stretch;
}

.overview-footer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-feature-grid > .card,
.overview-lower-grid > .card,
.overview-footer-grid > .card {
  margin-bottom: 0;
}

.timeline-card,
.ad-status-card,
.content-approval-panel,
.insight-card,
.connections-panel,
.business-panel {
  min-height: 100%;
}

.timeline-card .section-heading {
  align-items: flex-start;
}

.timeline-card .section-heading p {
  margin: 6px 0 0;
  font-size: 12px;
}

.timeline-illustration {
  display: inline-flex;
  width: 70px;
  height: 70px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #eef7ff, #dceeff);
  color: #2d83ed;
  font-size: 34px;
  font-weight: 700;
}

.timeline-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 12px;
  min-height: 60px;
  padding-bottom: 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:not(:last-child)::after {
  position: absolute;
  top: 27px;
  bottom: 0;
  left: 13px;
  width: 1px;
  background: #d4e6f8;
  content: '';
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dceeff;
  color: #2b7cdb;
  font-size: 13px;
  font-weight: 800;
}

.timeline-item.complete .timeline-dot {
  background: #38b982;
  color: #ffffff;
}

.timeline-item.current .timeline-dot {
  border: 3px solid #2c81ed;
  background: #ffffff;
  color: #2c81ed;
  font-size: 8px;
}

.timeline-item.upcoming .timeline-dot {
  background: #9aacc1;
  color: #ffffff;
}

.timeline-item strong {
  display: block;
  color: #203d61;
  font-size: 13px;
  line-height: 1.45;
}

.timeline-item small {
  display: block;
  margin-top: 3px;
  color: #7389a2;
  font-size: 11px;
  line-height: 1.5;
}

.ad-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 13px;
}

.ad-preview-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e0eaf5;
  border-radius: 11px;
  background: #fbfdff;
}

.ad-preview-row img {
  width: 92px;
  height: 66px;
  border-radius: 9px;
  object-fit: cover;
}

.ad-preview-row strong,
.ad-preview-row small {
  display: block;
}

.ad-preview-row strong {
  color: #294665;
  font-size: 13px;
}

.ad-preview-row small {
  margin-top: 4px;
  color: #7c8ea4;
  font-size: 11px;
  line-height: 1.45;
}

.ad-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ad-mini-stats > div {
  min-width: 0;
  padding-right: 10px;
  border-right: 1px solid #e4edf7;
}

.ad-mini-stats > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.ad-mini-stats small,
.ad-mini-stats strong {
  display: block;
}

.ad-mini-stats small {
  color: #7a8ca3;
  font-size: 10px;
}

.ad-mini-stats strong {
  margin-top: 7px;
  color: #223f62;
  font-size: 15px;
  line-height: 1.25;
}

.insight-card {
  background: linear-gradient(145deg, #ffffff 0%, #f2f8ff 100%);
}

.insight-card > p {
  margin: 0 0 15px;
  color: #5f7590;
  font-size: 13px;
  line-height: 1.65;
}

.insight-bulb {
  display: inline-flex;
  width: 33px;
  height: 33px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff2c8;
  color: #f0aa18;
  font-size: 20px;
}

.insight-checklist {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 11px;
  background: #edf6ff;
  color: #2272cf;
  font-size: 13px;
}

.insight-checklist div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.insight-checklist span {
  color: #587493;
  line-height: 1.45;
}

.metric-card-orange .metric-icon {
  background: #fff1dc;
  color: #ee8b12;
}

.metric-card-green .metric-icon {
  background: #e1f6eb;
  color: #1aa367;
}

.metric-card-purple .metric-icon {
  background: #f0eaff;
  color: #7c5be6;
}

.metric-card-orange .big-number {
  color: #1472e7;
}

/* Keep the nested metric content in a predictable vertical flow. */
.metric-card.metric-card-blue,
.metric-card.metric-card-green,
.metric-card.metric-card-purple,
.metric-card.metric-card-orange {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.metric-card .metric-icon {
  flex: 0 0 44px;
}

.metric-card .metric-content {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.metric-card .metric-content .stat-label {
  display: block;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.3;
  white-space: normal;
}

.metric-card .metric-content .big-number {
  display: block;
  max-width: 100%;
  margin: 0 !important;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.55px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-card .metric-content small {
  display: block;
  max-width: 100%;
  color: #7a8ca3;
  font-size: 11px;
  line-height: 1.45;
}

.metric-card-orange .metric-content .big-number {
  font-size: 25px;
  letter-spacing: -0.8px;
}

/* Canonical responsive layout contract. Keep all breakpoint behavior in this section. */
html,
body,
#app {
  max-width: 100%;
  overflow-x: hidden;
}

.shell {
  grid-template-columns: 250px minmax(0, 1fr);
}

.main,
.page,
.card,
.metric-card,
.dashboard-grid,
.overview-feature-grid,
.overview-lower-grid,
.overview-footer-grid {
  min-width: 0;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  min-width: 0;
}

.metric-card .metric-content {
  min-width: 0;
}

.metric-card .metric-content .big-number {
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

dialog {
  max-width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  overflow: auto;
}

.content-detail,
.conversation-card,
.provider-card,
.preview-shell,
.preview-frame {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1280px) {
  .shell {
    grid-template-columns: 228px minmax(0, 1fr);
  }

  .main {
    padding-right: 28px;
    padding-left: 28px;
  }

  .app-topbar {
    margin-right: -28px;
    margin-left: -28px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .metric-grid,
  .metric-grid.ads-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 126px;
    padding: 18px;
  }
}

@media (max-width: 1024px) and (min-width: 901px) {
  .shell {
    grid-template-columns: 212px minmax(0, 1fr);
  }

  .main {
    padding-right: 22px;
    padding-left: 22px;
  }

  .app-topbar {
    margin-right: -22px;
    margin-left: -22px;
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 900px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: min(292px, 88vw);
    height: 100dvh;
    padding: 23px 16px 20px;
    overflow-y: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .2s ease, visibility .2s ease;
  }

  .shell.menu-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  #nav-close {
    position: absolute;
    top: 20px;
    right: 14px;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #e5f1ff;
    color: #697d93;
    font-size: 24px;
  }

  #nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    border: 0;
    border-radius: 0;
    background: rgb(22 119 255 / 18%);
  }

  .shell.menu-open #nav-scrim {
    display: block;
  }

  #mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    padding: 6px 7px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid #d9e8fb;
    background: #ffffff;
    box-shadow: 0 -3px 15px rgb(54 103 167 / 3%);
  }

  #mobile-nav button {
    display: flex;
    min-width: 0;
    min-height: 49px;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 10px;
    font-weight: 500;
  }

  #mobile-nav button.active {
    background: #f4f9ff;
    color: #0860d8;
    font-weight: 650;
  }

  #mobile-nav button .icon,
  #mobile-nav button svg {
    width: 21px;
    height: 21px;
  }

  .main {
    padding: 0 20px 98px;
  }

  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-width: 0;
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  #menu-toggle {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 6px;
    border: 0;
  }

  .breadcrumb {
    min-width: 0;
    flex: 1 1 auto;
  }

  .breadcrumb > svg,
  .breadcrumb > .breadcrumb-divider {
    display: none;
  }

  #context-label {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #source-badge,
  .topbar-date-filter {
    display: none;
  }

  .header-right {
    min-width: 0;
    flex: 0 0 auto;
    gap: 6px;
  }

  .profile-menu .profile-details,
  .profile-menu .profile-chevron {
    display: none;
  }

  .overview-feature-grid,
  .overview-lower-grid,
  .overview-footer-grid,
  .dashboard-grid,
  .dashboard-aside,
  .conversation-context {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 720px) {
  .sidebar {
    width: min(292px, 88vw);
    background: #f4f9ff;
  }

  .main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .app-topbar {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .metric-grid,
  .metric-grid.ads-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .metric-grid.overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .overview-metrics .metric-card {
    aspect-ratio: 1;
    min-height: 0;
    padding: 12px;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }

  .overview-metrics .metric-card .metric-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .overview-metrics .metric-card .metric-content {
    width: 100%;
    flex: 0 0 auto;
    gap: 5px;
  }

  .overview-metrics .metric-card .metric-content .big-number {
    font-size: clamp(18px, 5vw, 25px);
    letter-spacing: -0.5px;
  }

  .overview-metrics .metric-card .metric-content small {
    display: none;
  }

  .page-heading {
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 16px;
  }

  .page-heading h1 { font-size: 22px; }
  .page-heading p { font-size: 12px; }
  .page-actions { margin-left: auto; }
  .page-actions button { min-height: 36px; padding: 8px 10px; }

  .metric-card {
    min-height: 104px;
    padding: 16px;
  }

  .metric-card .metric-icon {
    flex-basis: 40px;
  }

  .metric-card .metric-content .big-number,
  .metric-card-orange .metric-content .big-number {
    font-size: 25px;
  }

  .page-heading {
    padding-top: 24px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .card {
    padding: 18px;
  }

  .ad-preview-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .ad-preview-row img {
    width: 76px;
    height: 60px;
  }

  .ad-mini-stats {
    gap: 8px;
  }

  .ad-mini-stats strong {
    font-size: 12px;
  }

  .dialog-footer {
    flex-wrap: wrap;
  }

  .dialog-footer button {
    min-height: 42px;
    flex: 1 1 120px;
  }
}

@media (max-width: 520px) {
  .main {
    padding-bottom: 94px;
  }

  .overview-feature-grid,
  .overview-lower-grid,
  .overview-footer-grid,
  .dashboard-grid {
    gap: 14px;
    margin-top: 14px;
  }

  .timeline-illustration {
    width: 54px;
    height: 54px;
    font-size: 27px;
  }

  .ad-preview-row {
    gap: 9px;
  }

  .section-heading {
    gap: 8px;
  }

  dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 20px);
  }

  #dialog-form {
    padding: 18px;
  }

  .dialog-heading h2 {
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .app-topbar {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  #context-label {
    max-width: 132px;
  }

  .metric-card {
    padding: 14px;
  }

  .card {
    padding: 15px;
  }
}
 .admin-console-link{color:#1768e5;font-size:11px;font-weight:750;white-space:nowrap}
