:root {
  --navy: #082f49;
  --navy-deep: #052238;
  --teal: #0f766e;
  --teal-light: #ccfbf1;
  --orange: #f97316;
  --orange-light: #ffedd5;
  --ink: #152534;
  --muted: #64748b;
  --line: #dbe4ea;
  --surface: #ffffff;
  --background: #f5f8fa;
  --danger: #b91c1c;
  --success: #15803d;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(8, 47, 73, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--background); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1.06; letter-spacing: -.04em; }
h2 { letter-spacing: -.025em; }

.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--orange); color: white; font-size: .8rem; letter-spacing: .05em; font-weight: 900; box-shadow: 0 8px 20px rgba(249,115,22,.25); }
.eyebrow { display: block; color: var(--teal); font-size: .74rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; border: 1px solid transparent; border-radius: 12px; padding: .72rem 1.15rem; font-weight: 760; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--orange); box-shadow: 0 10px 24px rgba(249,115,22,.22); }
.button-primary:hover { background: #ea580c; }
.button-secondary { color: var(--navy); background: #fff; border-color: var(--line); }
.button-compact { min-height: 38px; padding: .5rem .9rem; }
.button-full { width: 100%; }
.small-link, .back-link { color: var(--teal); font-weight: 760; }
.back-link { display: inline-block; margin-bottom: .75rem; font-size: .9rem; }

.public-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1.25rem, 5vw, 5rem); background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(219,228,234,.8); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.public-brand { display: flex; align-items: center; gap: .75rem; font-size: 1.05rem; }
.public-header nav { display: flex; align-items: center; gap: 1.25rem; font-weight: 700; }
.public-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1.25rem, 5vw, 5rem); background: var(--navy-deep); color: rgba(255,255,255,.75); }
.public-footer a { color: #fff; font-weight: 700; }

.hero { min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); align-items: center; gap: clamp(3rem, 7vw, 8rem); padding: 5rem clamp(1.25rem, 7vw, 8rem); overflow: hidden; background: radial-gradient(circle at 80% 18%, rgba(15,118,110,.12), transparent 30%), linear-gradient(145deg, #f8fbfc, #eff7f7); }
.hero-copy { max-width: 690px; }
.hero-copy h1 { color: var(--navy-deep); margin-bottom: 1.3rem; }
.hero-copy > p { max-width: 610px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 2.3rem; color: var(--muted); font-size: .88rem; font-weight: 650; }
.trust-row span { display: flex; align-items: center; gap: .45rem; }
.trust-row b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--teal); background: var(--teal-light); }
.signal-card { position: relative; width: min(100%, 430px); aspect-ratio: 1/.88; justify-self: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 2.2rem; text-align: center; border-radius: 36px; background: var(--navy); color: white; box-shadow: 0 34px 70px rgba(8,47,73,.24); transform: rotate(2deg); }
.signal-card strong { font-size: 1.35rem; }
.signal-card small { max-width: 290px; margin-top: .45rem; color: rgba(255,255,255,.7); }
.signal-rings { position: absolute; top: 19%; width: 190px; height: 140px; }
.signal-rings span { position: absolute; left: 50%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #5eead4; border-radius: 50%; }
.signal-rings span:nth-child(1) { width: 180px; height: 180px; top: 0; }
.signal-rings span:nth-child(2) { width: 125px; height: 125px; top: 28px; }
.signal-rings span:nth-child(3) { width: 70px; height: 70px; top: 56px; }
.signal-rings i { position: absolute; left: calc(50% - 8px); bottom: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--orange); }
.signal-status { margin-top: 1.3rem; padding: .55rem .85rem; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .78rem; }
.signal-status i { display: inline-block; width: 7px; height: 7px; margin-right: .4rem; border-radius: 50%; background: #4ade80; }
.location-section { padding: 5.5rem clamp(1.25rem, 7vw, 8rem); background: white; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--navy); }
.section-heading > a { color: var(--teal); font-weight: 760; }
.location-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.location-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .16s, border-color .16s, box-shadow .16s; }
.location-card:hover { transform: translateY(-2px); border-color: #99f6e4; box-shadow: var(--shadow); }
.location-card h3 { margin: 0 0 .15rem; font-size: 1rem; }
.location-card p, .location-card small { margin: 0; color: var(--muted); }
.location-icon, .entity-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--teal); background: var(--teal-light); font-size: 1.4rem; }
.benefit-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #164e63; color: white; }
.benefit-strip > div { padding: 2.4rem clamp(1.5rem, 5vw, 4rem); background: var(--navy); }
.benefit-strip b, .benefit-strip span { display: block; }
.benefit-strip span { margin-top: .25rem; color: rgba(255,255,255,.68); font-size: .9rem; }

.connect-layout, .login-layout { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 520px); gap: clamp(3rem, 8vw, 8rem); align-items: center; padding: 4rem clamp(1.25rem, 8vw, 9rem); background: radial-gradient(circle at 10% 15%, rgba(15,118,110,.1), transparent 28%), var(--background); }
.connect-intro, .login-message { max-width: 620px; }
.connect-intro h1, .login-message h1 { color: var(--navy-deep); }
.connect-intro > p, .login-message > p { color: var(--muted); font-size: 1.12rem; }
.connect-intro ol { margin: 2rem 0 0; padding: 0; counter-reset: connect; list-style: none; }
.connect-intro li { display: flex; align-items: center; gap: .8rem; margin: .85rem 0; font-weight: 700; }
.connect-intro li::before { counter-increment: connect; content: counter(connect); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--teal); background: var(--teal-light); font-size: .8rem; }
.form-card, .form-panel, .panel, .table-panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 14px 38px rgba(8,47,73,.06); }
.form-card { padding: clamp(1.4rem, 4vw, 2.2rem); }
.form-card-header { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.3rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.form-card-header h2, .login-card h2 { margin-bottom: .2rem; color: var(--navy); }
.form-card-header p, .login-card > p { margin: 0; color: var(--muted); }
.step-badge { display: grid; place-items: center; min-width: 42px; height: 42px; border-radius: 13px; color: #fff; background: var(--teal); font-weight: 900; }
.field-group { margin-bottom: 1.15rem; }
.field-group > label { display: block; margin-bottom: .42rem; color: #334155; font-size: .86rem; font-weight: 760; }
.field-group > small { display: block; margin-top: .35rem; color: var(--muted); font-size: .76rem; }
.form-control { width: 100%; min-height: 46px; padding: .7rem .8rem; border: 1px solid #cbd5e1; border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.11); }
.field-error { display: block; margin-top: .35rem; color: var(--danger); font-size: .78rem; font-weight: 650; }
.form-error { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 10px; color: #991b1b; background: #fee2e2; font-size: .86rem; }
.form-error ul { margin: 0; padding-left: 1.2rem; }
.form-footnote { margin: 1rem 0 0; color: var(--muted); font-size: .76rem; text-align: center; }
.login-message { padding: clamp(1rem, 5vw, 4rem); border-radius: 30px; background: var(--navy); color: white; box-shadow: var(--shadow); }
.login-message h1 { color: white; }
.login-message > p { color: rgba(255,255,255,.7); }
.login-stat { margin-top: 3rem; padding: 1rem; border-radius: 14px; background: rgba(255,255,255,.08); }
.login-stat b, .login-stat span { display: block; }
.login-stat span { color: rgba(255,255,255,.65); font-size: .84rem; }
.login-card .small-link { display: block; margin-top: 1.2rem; text-align: center; font-size: .85rem; }

.success-layout { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 3rem 1.25rem; background: linear-gradient(145deg, #effaf8, #f8fafc); }
.success-card { width: min(100%, 620px); padding: clamp(1.6rem, 5vw, 3rem); text-align: center; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: var(--shadow); }
.success-card h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--navy); }
.success-card > p { color: var(--muted); }
.success-check { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 1.2rem; border-radius: 50%; color: white; background: var(--success); font-size: 2rem; font-weight: 900; box-shadow: 0 12px 25px rgba(21,128,61,.22); }
.package-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin: 1.6rem 0; }
.package-summary > div { padding: .9rem .6rem; border-radius: 12px; background: var(--background); }
.package-summary span, .package-summary b { display: block; }
.package-summary span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.package-summary b { margin-top: .25rem; font-size: .9rem; }
.notice { display: flex; flex-direction: column; gap: .2rem; margin: 1rem 0; padding: 1rem; border-radius: 12px; color: #9a3412; background: var(--orange-light); }
.voucher-code { margin: 1.4rem 0; padding: 1rem; border: 2px dashed #5eead4; border-radius: 14px; color: var(--navy); background: #f0fdfa; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 900; letter-spacing: .12em; }
.stack-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }

.portal-shell { background: #f3f7f9; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; display: flex; flex-direction: column; padding: 1.15rem; color: white; background: var(--navy-deep); z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: .4rem; }
.sidebar-brand span:last-child { display: flex; flex-direction: column; }
.sidebar-brand small { color: rgba(255,255,255,.48); font-size: .69rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: .22rem; margin-top: 2rem; }
.sidebar-nav a { padding: .68rem .8rem; border-radius: 9px; color: rgba(255,255,255,.68); font-size: .9rem; font-weight: 650; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: white; background: rgba(255,255,255,.09); }
.sidebar-account { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center; margin-top: auto; padding: .9rem .5rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-account > div { display: flex; flex-direction: column; min-width: 0; }
.sidebar-account strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.sidebar-account small { color: rgba(255,255,255,.5); font-size: .68rem; }
.sidebar-account form { grid-column: 2; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--navy); background: #99f6e4; font-weight: 900; }
.avatar.large { width: 54px; height: 54px; font-size: 1.1rem; }
.text-button { padding: 0; border: 0; color: #fdba74; background: transparent; font-size: .73rem; font-weight: 700; cursor: pointer; }
.portal-main { min-height: 100vh; margin-left: 260px; padding: 2rem clamp(1.2rem, 4vw, 3rem) 4rem; }
.mobile-header { display: none; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 1.2rem; margin-bottom: 1.8rem; }
.page-head.compact { align-items: start; }
.page-head h1 { margin-bottom: .35rem; color: var(--navy-deep); font-size: clamp(1.9rem, 3.2vw, 3rem); }
.page-head p { margin: 0; color: var(--muted); }
.head-actions { display: flex; gap: .6rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.metric-card { min-height: 140px; display: flex; flex-direction: column; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.metric-card.accent { color: white; border-color: var(--navy); background: var(--navy); }
.metric-card > span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.metric-card.accent > span, .metric-card.accent small { color: rgba(255,255,255,.62); }
.metric-card b { margin-top: auto; font-size: 2rem; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); }
.quick-actions { margin-top: 2.2rem; }
.quick-actions .section-heading { margin-bottom: 1rem; }
.quick-actions .section-heading h2 { font-size: 1.45rem; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.action-grid a { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: white; }
.action-grid a:hover { border-color: #5eead4; box-shadow: 0 10px 28px rgba(8,47,73,.07); }
.action-grid span { grid-row: 1 / span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--teal); background: var(--teal-light); font-size: 1.2rem; }
.action-grid b { font-size: .9rem; }
.action-grid small { color: var(--muted); font-size: .72rem; }
.dashboard-columns { display: grid; grid-template-columns: 1.25fr .75fr; gap: .9rem; margin-top: 2.2rem; }
.panel { min-width: 0; padding: 1.25rem; box-shadow: none; }
.panel-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1rem; }
.panel-head .eyebrow { margin-bottom: .25rem; }
.panel-head h2 { margin: 0; color: var(--navy); font-size: 1.25rem; }
.panel-head > a { color: var(--teal); font-size: .78rem; font-weight: 760; }
.activity-list > div, .site-mini-list > div { display: flex; align-items: center; gap: .75rem; min-height: 62px; padding: .7rem 0; border-top: 1px solid #edf2f5; }
.activity-list > div:first-child, .site-mini-list > div:first-child { border-top: 0; }
.activity-icon { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 11px; color: var(--teal); background: var(--teal-light); font-weight: 900; }
.activity-list > div > div, .site-mini-list > div > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.activity-list small, .site-mini-list small { color: var(--muted); font-size: .75rem; }
.activity-list strong { font-size: .86rem; }
.site-mini-list > div > span:last-child { color: var(--muted); font-size: .75rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.status-dot.active { background: #22c55e; }
.status-dot.suspended { background: #f59e0b; }
.live-indicator { display: inline-flex; align-items: center; gap: .45rem; min-height: 46px; padding: .7rem .85rem; color: #166534; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; font-size: .8rem; font-weight: 800; }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 5px rgba(34,197,94,.13); }
.operations-section { margin-top: 2.2rem; }
.operations-section.table-panel { margin-top: 1rem; }
.refresh-note { color: var(--muted); }
.operations-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.site-operation-card { min-width: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.site-operation-card.has-warning { border-color: #fed7aa; }
.site-operation-head, .site-operation-head > div { display: flex; align-items: center; gap: .7rem; }
.site-operation-head > div { min-width: 0; flex: 1; }
.site-operation-head h3 { margin: 0; color: var(--navy); font-size: 1rem; }
.site-operation-head small { display: block; color: var(--muted); font-size: .74rem; }
.site-operation-head strong { color: var(--teal); font-size: 2.1rem; letter-spacing: -.05em; }
.site-operation-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-top: 1rem; }
.site-operation-stats > div { padding: .65rem .5rem; border-radius: 10px; background: var(--background); text-align: center; }
.site-operation-stats span, .site-operation-stats b { display: block; }
.site-operation-stats span { color: var(--muted); font-size: .62rem; }
.site-operation-stats b { margin-top: .15rem; font-size: .95rem; }
.site-operation-foot { display: flex; justify-content: space-between; gap: .7rem; margin-top: .8rem; color: var(--muted); font-size: .7rem; }
.gateway-warning { margin-top: .65rem; padding: .55rem .7rem; color: #9a3412; border-radius: 8px; background: var(--orange-light); font-size: .72rem; font-weight: 650; }
.table-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.15rem 1rem; }
.table-title .eyebrow { margin-bottom: .25rem; }
.table-title h2 { margin: 0; color: var(--navy); font-size: 1.25rem; }
.table-title > span { color: var(--muted); font-size: .75rem; }

.messages { position: relative; margin: 0 0 1rem; }
.public-messages { width: min(92%, 900px); margin: 1rem auto; }
.message { padding: .75rem 1rem; border: 1px solid #bbf7d0; border-radius: 10px; color: #166534; background: #f0fdf4; }
.message.error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.form-panel { padding: clamp(1.2rem, 3vw, 2rem); box-shadow: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field-wide { grid-column: 1 / -1; }
.field-group ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: .3rem 0 0; padding: 0; list-style: none; }
.field-group ul li label { display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfe; font-size: .84rem; }
.field-group input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--teal); }
.form-actions { display: flex; gap: .7rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.customer-lookup-control { position: relative; }
.customer-suggestions { position: absolute; z-index: 40; top: calc(100% + .35rem); right: 0; left: 0; max-height: 290px; overflow-y: auto; padding: .35rem; border: 1px solid #cbd5e1; border-radius: 12px; background: white; box-shadow: 0 16px 35px rgba(8,47,73,.16); }
.customer-suggestion { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .75rem; border: 0; border-radius: 9px; color: var(--navy); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.customer-suggestion:hover, .customer-suggestion.is-active { background: var(--teal-light); }
.customer-suggestion span { min-width: 0; }
.customer-suggestion b, .customer-suggestion small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-suggestion b { font-size: .82rem; }
.customer-suggestion small { margin-top: .12rem; color: var(--muted); font-size: .7rem; }
.customer-suggestion > em { flex: 0 0 auto; color: var(--teal); font-size: .64rem; font-style: normal; font-weight: 800; }
.customer-suggestions__message { padding: .7rem .75rem; color: var(--muted); font-size: .76rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.entity-card, .team-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.entity-top { display: flex; justify-content: space-between; align-items: start; }
.entity-card h2 { margin: 1rem 0 .15rem; font-size: 1.2rem; }
.entity-card > p { color: var(--muted); }
.entity-card dl, .team-card dl { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); }
.entity-card dl div, .team-card dl div { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; font-size: .78rem; }
.entity-card dt, .team-card dt { color: var(--muted); }
.entity-card dd, .team-card dd { margin: 0; font-weight: 700; text-align: right; }
.pill { display: inline-flex; align-items: center; width: max-content; padding: .25rem .5rem; border-radius: 999px; color: #475569; background: #e2e8f0; font-size: .68rem; font-weight: 800; text-transform: capitalize; }
.pill.active, .pill.completed, .pill.sold { color: #166534; background: #dcfce7; }
.pill.processing, .pill.generated, .pill.available, .pill.reserved { color: #155e75; background: #cffafe; }
.pill.suspended, .pill.pending { color: #9a3412; background: #ffedd5; }
.pill.expired, .pill.exhausted, .pill.cancelled, .pill.failed, .pill.inactive { color: #991b1b; background: #fee2e2; }
.pill.accepted { color: #166534; background: #dcfce7; }
.pill.rejected, .pill.gateway_error, .pill.form_error { color: #991b1b; background: #fee2e2; }
.table-panel { overflow: hidden; box-shadow: none; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: .85rem 1rem; color: var(--muted); background: #f8fafc; font-size: .7rem; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
td { padding: .95rem 1rem; border-top: 1px solid var(--line); font-size: .84rem; vertical-align: middle; }
td > b, td > small { display: block; }
td > small { margin-top: .15rem; color: var(--muted); }
td > a { color: var(--teal); font-weight: 760; }
.voucher-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.voucher-grid > div { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .85rem; border: 1px solid var(--line); border-radius: 11px; background: white; }
.voucher-grid code { color: var(--navy); font-weight: 800; }
.search-bar { display: flex; gap: .6rem; max-width: 720px; margin-bottom: 1rem; }
.token-search { max-width: 1040px; }
.token-search input { min-width: min(420px, 55vw); }
.token-search select { min-width: 160px; }
.token-time-note { color: #155e75; background: #ecfeff; }
.token-table-panel table { min-width: 980px; }
.token-code summary { color: var(--teal); font-weight: 760; cursor: pointer; }
.token-code code { display: inline-block; margin-top: .35rem; color: var(--navy); font-size: .86rem; font-weight: 850; letter-spacing: .06em; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.team-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.team-card h2 { margin: 0; font-size: 1rem; }
.team-card p { margin: 0 0 .45rem; color: var(--muted); font-size: .8rem; }
.team-card dl { grid-column: 1 / -1; }
.empty-card, .empty-state { padding: 2rem; color: var(--muted); text-align: center; }
.empty-card { grid-column: 1 / -1; border: 1px dashed #cbd5e1; border-radius: var(--radius); background: white; }
.empty-card h2, .empty-card h3 { color: var(--navy); }
.empty-state b, .empty-state small { display: block; }
.portal-success { min-height: auto; background: transparent; }
.progress-line { width: 150px; height: 7px; margin-bottom: .35rem; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.progress-line i { display: block; height: 100%; border-radius: inherit; background: #14b8a6; }
.progress-line.warning i { background: #f97316; }
.text-button.danger { color: #dc2626; }
.field-form { max-width: 820px; margin: 0 auto; }
.product-card { display: flex; flex-direction: column; }
.product-price { margin: .75rem 0 1rem; color: var(--teal); font-size: 1.65rem; }
.product-card .stack-actions { margin-top: auto; padding-top: .8rem; }
.pill.pending, .pill.scheduled, .pill.in_progress, .pill.warning, .pill.medium, .pill.high { color: #9a3412; background: #ffedd5; }
.pill.confirmed, .pill.completed, .pill.resolved, .pill.online { color: #166534; background: #dcfce7; }
.pill.revoked, .pill.rejected, .pill.cancelled, .pill.critical, .pill.offline { color: #991b1b; background: #fee2e2; }

@media (max-width: 1100px) {
  .metric-grid, .action-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid, .card-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .operations-grid { grid-template-columns: repeat(2, 1fr); }
  .voucher-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .public-header { height: 66px; }
  .public-header nav > a:not(.button) { display: none; }
  .hero, .connect-layout, .login-layout { grid-template-columns: 1fr; min-height: auto; padding-top: 3rem; padding-bottom: 3rem; }
  .signal-card { width: min(100%, 390px); }
  .location-grid { grid-template-columns: 1fr; }
  .benefit-strip { grid-template-columns: 1fr; }
  .sidebar { position: static; width: 100%; height: auto; padding: .7rem 1rem; }
  .sidebar-brand, .sidebar-account { display: none; }
  .sidebar-nav { flex-direction: row; gap: .25rem; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .sidebar-nav a { flex: 0 0 auto; padding: .55rem .7rem; font-size: .78rem; }
  .portal-main { margin-left: 0; padding: 1.1rem 1rem 3rem; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; font-weight: 800; }
  .mobile-header > a:first-child { display: flex; align-items: center; gap: .55rem; }
  .mobile-header .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: .65rem; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .head-actions { flex-wrap: wrap; }
  .voucher-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  h1 { font-size: 2.35rem; }
  .public-header { padding: 0 1rem; }
  .hero { gap: 2.5rem; padding: 3rem 1rem; }
  .signal-card { aspect-ratio: 1; }
  .location-section { padding: 3.5rem 1rem; }
  .section-heading, .page-head { align-items: start; flex-direction: column; }
  .public-footer { flex-direction: column; }
  .connect-layout, .login-layout { padding: 2.2rem 1rem; }
  .connect-intro ol { margin-top: 1.3rem; }
  .package-summary { grid-template-columns: 1fr; }
  .metric-grid, .action-grid, .card-grid, .team-grid { grid-template-columns: 1fr; }
  .operations-grid { grid-template-columns: 1fr; }
  .site-operation-stats { grid-template-columns: repeat(2, 1fr); }
  .table-title { align-items: start; flex-direction: column; }
  .metric-card { min-height: 124px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .field-group ul { grid-template-columns: 1fr; }
  .form-actions, .stack-actions { flex-direction: column; }
  .form-actions .button, .stack-actions .button { width: 100%; }
  .voucher-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
}

/* Operations dashboard */
.ops-dashboard { width: 100%; max-width: 1560px; margin: 0 auto; color: #182939; }
.ops-hero { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 2rem; min-height: 220px; padding: clamp(1.5rem, 3vw, 2.6rem); overflow: hidden; border-radius: 26px; color: #fff; background: radial-gradient(circle at 82% 20%, rgba(45,212,191,.25), transparent 26%), radial-gradient(circle at 15% 110%, rgba(249,115,22,.18), transparent 35%), linear-gradient(135deg, #05263d, #083f54 66%, #0f5e68); box-shadow: 0 24px 60px rgba(5,34,56,.2); }
.ops-hero::after { position: absolute; top: -65px; right: 22%; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; content: ""; box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 68px rgba(255,255,255,.018); }
.ops-hero-copy { position: relative; z-index: 1; max-width: 760px; }
.ops-kicker { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.1rem; color: #99f6e4; font-size: .72rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.ops-kicker i { width: 8px; height: 8px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 6px rgba(94,234,212,.12); }
.ops-hero h1 { max-width: 720px; margin: 0 0 .75rem; color: white; font-size: clamp(2rem, 3.5vw, 3.4rem); line-height: 1.02; }
.ops-hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.68); font-size: 1rem; }
.ops-hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .65rem; }
.ops-hero .button-secondary { color: white; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.ops-live { display: flex; align-items: center; gap: .65rem; min-height: 46px; padding: .55rem .8rem; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.08); }
.ops-live > span { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 6px rgba(74,222,128,.12); }
.ops-live div { display: flex; flex-direction: column; }
.ops-live b { font-size: .77rem; }
.ops-live small { color: rgba(255,255,255,.55); font-size: .62rem; }

.ops-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.ops-kpi { position: relative; min-width: 0; min-height: 158px; display: flex; flex-direction: column; padding: 1.2rem; overflow: hidden; border: 1px solid #deeaee; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(8,47,73,.055); }
.ops-kpi-primary { color: white; border-color: #0f766e; background: linear-gradient(145deg, #0f766e, #0b5c59); box-shadow: 0 16px 34px rgba(15,118,110,.18); }
.ops-kpi-alert { border-color: #fed7aa; background: linear-gradient(145deg, #fff, #fff7ed); }
.ops-kpi-icon { position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #0f766e; background: #ccfbf1; font-weight: 900; }
.ops-kpi-icon.mint { color: #0f766e; background: #ccfbf1; }
.ops-kpi-icon.blue { color: #1d4ed8; background: #dbeafe; }
.ops-kpi-icon.amber { color: #c2410c; background: #ffedd5; }
.ops-kpi-primary .ops-kpi-icon { color: white; background: rgba(255,255,255,.14); }
.ops-kpi > span { max-width: calc(100% - 48px); color: #718194; font-size: .72rem; font-weight: 750; letter-spacing: .03em; }
.ops-kpi-primary > span, .ops-kpi-primary small { color: rgba(255,255,255,.65); }
.ops-kpi strong { margin-top: auto; overflow: hidden; font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1; letter-spacing: -.05em; text-overflow: ellipsis; white-space: nowrap; }
.ops-kpi small { margin-top: .45rem; color: #8191a4; font-size: .72rem; }

.ops-insights { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(310px, .72fr); gap: .9rem; margin-top: .9rem; }
.ops-panel { min-width: 0; overflow: hidden; border: 1px solid #deeaee; border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(8,47,73,.05); }
.ops-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.35rem 0; }
.ops-panel-head h2, .ops-section-head h2, .ops-console-head h2 { margin: .15rem 0 .22rem; color: #092f49; font-size: 1.25rem; }
.ops-panel-head p, .ops-console-toolbar p { margin: 0; color: #8191a4; font-size: .76rem; }
.ops-overline { color: #0f8d82; font-size: .65rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.ops-select-label { color: #8191a4; font-size: .65rem; font-weight: 700; }
.ops-select { display: block; min-width: 150px; margin-top: .3rem; padding: .52rem 2rem .52rem .65rem; border: 1px solid #dce7ec; border-radius: 9px; color: #173146; background: #f8fbfc; font-size: .76rem; font-weight: 700; outline: none; }
.ops-chart-legend { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.35rem .3rem; color: #718194; font-size: .7rem; }
.ops-chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.ops-chart-legend i, .ops-chart-tooltip i { width: 8px; height: 8px; border-radius: 50%; }
.ops-chart-legend i.download, .ops-chart-tooltip i.download { background: #0f9f92; }
.ops-chart-legend i.upload, .ops-chart-tooltip i.upload { background: #4f86f7; }
.ops-chart-legend b { margin-left: auto; color: #173146; font-size: .72rem; }
.ops-chart-wrap { position: relative; min-width: 0; height: 310px; padding: 0 .8rem; }
#traffic-chart { display: block; width: 100%; height: 100%; }
.ops-chart-tooltip { position: absolute; z-index: 2; width: 180px; padding: .7rem .8rem; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; color: white; background: rgba(5,34,56,.92); box-shadow: 0 10px 28px rgba(5,34,56,.2); pointer-events: none; }
.ops-chart-tooltip b, .ops-chart-tooltip span { display: flex; align-items: center; gap: .4rem; }
.ops-chart-tooltip b { margin-bottom: .35rem; font-size: .74rem; }
.ops-chart-tooltip span { color: rgba(255,255,255,.7); font-size: .64rem; }
.ops-chart-foot { display: flex; justify-content: space-between; padding: .6rem 1.35rem 1.1rem; color: #94a3b8; font-size: .62rem; }

.ops-health-panel { padding-bottom: 1rem; }
.ops-health-score { width: 164px; height: 164px; display: grid; place-items: center; margin: 1.1rem auto; border-radius: 50%; background: conic-gradient(#14b8a6 var(--health-value), #e8f0f3 0); }
.ops-health-score::before { position: absolute; content: ""; }
.ops-health-score > div { width: 125px; height: 125px; display: grid; place-content: center; border-radius: 50%; background: white; text-align: center; box-shadow: inset 0 0 0 1px #edf3f5; }
.ops-health-score strong, .ops-health-score span { display: block; }
.ops-health-score strong { color: #092f49; font-size: 2rem; letter-spacing: -.05em; }
.ops-health-score span { color: #8191a4; font-size: .68rem; }
.ops-health-numbers { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0 1.2rem .8rem; border: 1px solid #e5edf0; border-radius: 12px; }
.ops-health-numbers div { padding: .7rem; text-align: center; }
.ops-health-numbers div + div { border-left: 1px solid #e5edf0; }
.ops-health-numbers strong, .ops-health-numbers span { display: block; }
.ops-health-numbers strong { color: #173146; }
.ops-health-numbers span { color: #8191a4; font-size: .62rem; }
.ops-site-health-list { margin: 0 1.2rem; }
.ops-site-health-list > div { display: grid; grid-template-columns: auto 1fr auto; gap: .55rem; align-items: center; padding: .65rem 0; border-top: 1px solid #edf3f5; }
.ops-site-health-list b, .ops-site-health-list small { display: block; }
.ops-site-health-list b { color: #173146; font-size: .72rem; }
.ops-site-health-list small, .ops-site-health-list > div > span:last-child { color: #8191a4; font-size: .6rem; }
.ops-health-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.ops-health-dot.good { background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.ops-health-dot.warn { background: #f59e0b; box-shadow: 0 0 0 4px #fef3c7; }
.ops-health-dot.bad { background: #ef4444; box-shadow: 0 0 0 4px #fee2e2; }

.ops-section { margin-top: 2rem; }
.ops-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.ops-section-head h2 { margin-bottom: 0; }
.ops-section-head > span { color: #8191a4; font-size: .7rem; }
.ops-site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.ops-site-card { min-width: 0; padding: 1.15rem; overflow: hidden; border: 1px solid #deeaee; border-radius: 18px; background: white; box-shadow: 0 10px 28px rgba(8,47,73,.045); }
.ops-site-card.warning { border-color: #fed7aa; }
.ops-site-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; }
.ops-site-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: #0f766e; background: #ccfbf1; font-size: .72rem; font-weight: 900; }
.ops-site-top h3, .ops-site-top p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-site-top h3 { margin: 0; color: #173146; font-size: .92rem; }
.ops-site-top p { margin: .12rem 0 0; color: #8191a4; font-size: .68rem; }
.ops-status-pill, .ops-result, .ops-count-badge, .ops-speed { display: inline-flex; width: max-content; align-items: center; padding: .28rem .5rem; border-radius: 999px; font-size: .61rem; font-weight: 800; }
.ops-status-pill.online, .ops-result.accepted { color: #166534; background: #dcfce7; }
.ops-status-pill.warning, .ops-result.rejected, .ops-result.gateway_error, .ops-result.form_error { color: #9a3412; background: #ffedd5; }
.ops-site-count { display: flex; align-items: baseline; gap: .5rem; margin: 1.3rem 0 1rem; }
.ops-site-count strong { color: #092f49; font-size: 2.1rem; letter-spacing: -.06em; }
.ops-site-count span { color: #8191a4; font-size: .7rem; }
.ops-site-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #e5edf0; border-radius: 11px; background: #f9fbfc; }
.ops-site-metrics div { padding: .62rem .35rem; text-align: center; }
.ops-site-metrics div + div { border-left: 1px solid #e5edf0; }
.ops-site-metrics span, .ops-site-metrics b { display: block; }
.ops-site-metrics span { color: #8191a4; font-size: .55rem; }
.ops-site-metrics b { color: #173146; font-size: .82rem; }
.ops-site-note, .ops-site-error { margin: .7rem 0 0; padding: .5rem .65rem; border-radius: 8px; font-size: .63rem; }
.ops-site-note { color: #475569; background: #f1f5f9; }
.ops-site-error { color: #9a3412; background: #fff7ed; }

.ops-connected-panel, .ops-console { margin-top: .9rem; }
.ops-panel-head-row { align-items: center; padding-bottom: 1rem; }
.ops-count-badge { color: #0f766e; background: #ccfbf1; }
.ops-table-scroll { width: 100%; min-width: 0; overflow-x: auto; border-top: 1px solid #e9f0f3; scrollbar-width: thin; }
.ops-table { width: 100%; min-width: 800px; table-layout: auto; }
.ops-table th { padding: .68rem 1rem; color: #8191a4; background: #f8fbfc; font-size: .61rem; letter-spacing: .08em; white-space: nowrap; }
.ops-table td { max-width: 320px; padding: .8rem 1rem; border-top-color: #edf3f5; color: #40566a; font-size: .72rem; overflow-wrap: anywhere; }
.ops-table td > b { color: #173146; }
.ops-table td > small { color: #8a99aa; font-size: .62rem; }
.ops-device { display: flex; align-items: center; gap: .55rem; }
.ops-device > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #0f766e; background: #e6fffb; font-size: .65rem; font-weight: 900; }
.ops-device b, .ops-device small { display: block; }
.ops-empty { min-height: 105px; display: grid; place-content: center; gap: .15rem; color: #8191a4; text-align: center; }
.ops-empty b { color: #40566a; }
.ops-empty-card { grid-column: 1 / -1; padding: 2rem; border: 1px dashed #cad8df; border-radius: 16px; color: #8191a4; background: white; text-align: center; }

.ops-console-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem 0; }
.ops-tabs { display: flex; gap: .25rem; padding: .28rem; border: 1px solid #deeaee; border-radius: 11px; background: #f5f8fa; }
.ops-tabs button, .ops-filter button { border: 0; border-radius: 8px; color: #718194; background: transparent; font-size: .68rem; font-weight: 750; cursor: pointer; }
.ops-tabs button { padding: .55rem .7rem; }
.ops-tabs button span { margin-left: .25rem; padding: .08rem .34rem; border-radius: 999px; background: #e4ecef; font-size: .55rem; }
.ops-tabs button.active { color: #0f766e; background: white; box-shadow: 0 3px 10px rgba(8,47,73,.08); }
.ops-tab-panel { padding-top: 1rem; }
.ops-console-toolbar { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 1.25rem; border-top: 1px solid #edf3f5; }
.ops-filter { display: flex; gap: .2rem; }
.ops-filter button { padding: .38rem .55rem; }
.ops-filter button.active { color: white; background: #0f766e; }
.ops-speed.download { color: #0f766e; background: #ccfbf1; }
.ops-speed.upload { color: #1d4ed8; background: #dbeafe; }

@media (max-width: 1280px) {
  .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-insights { grid-template-columns: minmax(0, 1fr); }
  .ops-health-panel { display: grid; grid-template-columns: minmax(240px, .55fr) minmax(260px, .45fr); align-items: center; }
  .ops-health-panel .ops-panel-head { grid-column: 1 / -1; }
  .ops-site-health-list { margin-right: 1.3rem; }
}

@media (max-width: 980px) {
  .ops-hero { align-items: start; flex-direction: column; }
  .ops-hero-actions { justify-content: flex-start; }
  .ops-site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-console-head { align-items: start; flex-direction: column; }
  .ops-tabs { width: 100%; overflow-x: auto; }
  .ops-tabs button { flex: 1 0 auto; }
}

@media (max-width: 700px) {
  .ops-hero { min-height: auto; padding: 1.4rem; border-radius: 20px; }
  .ops-hero h1 { font-size: 2rem; }
  .ops-hero-actions { width: 100%; }
  .ops-hero-actions .button { flex: 1 1 auto; }
  .ops-live { width: 100%; }
  .ops-kpis, .ops-site-grid { grid-template-columns: 1fr; }
  .ops-kpi { min-height: 135px; }
  .ops-panel-head { align-items: start; flex-direction: column; }
  .ops-select-label, .ops-select { width: 100%; }
  .ops-chart-wrap { height: 270px; padding: 0 .25rem; }
  .ops-chart-legend { flex-wrap: wrap; }
  .ops-chart-legend b { width: 100%; margin-left: 0; }
  .ops-health-panel { display: block; }
  .ops-site-health-list { margin: 0 1.2rem; }
  .ops-section-head { align-items: start; }
  .ops-site-metrics { grid-template-columns: repeat(2, 1fr); }
  .ops-site-metrics div:nth-child(3) { border-left: 0; border-top: 1px solid #e5edf0; }
  .ops-site-metrics div:nth-child(4) { border-top: 1px solid #e5edf0; }
  .ops-console-head { padding: 1rem; }
  .ops-console-toolbar { align-items: start; flex-direction: column; }
  .ops-table-scroll { overflow: visible; border-top: 0; }
  .ops-table { min-width: 0; }
  .ops-table thead { display: none; }
  .ops-table, .ops-table tbody { display: block; }
  .ops-table tr { display: block; margin: .65rem; overflow: hidden; border: 1px solid #e2eaee; border-radius: 12px; background: white; }
  .ops-table td { max-width: none; display: grid; grid-template-columns: minmax(90px, .35fr) minmax(0, .65fr); gap: .7rem; padding: .65rem .75rem; border-top: 1px solid #edf3f5; text-align: right; }
  .ops-table td:first-child { border-top: 0; }
  .ops-table td::before { content: attr(data-label); color: #8191a4; font-size: .61rem; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
  .ops-table td[colspan] { display: block; text-align: center; }
  .ops-table td[colspan]::before { content: none; }
  .ops-device { justify-content: flex-end; }
}

/* Customer intelligence and consented WhatsApp campaigns */
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.insight-head { align-items: center; }
.insight-filters { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(180px, .8fr) minmax(240px, 1.2fr) auto; align-items: end; gap: .75rem; margin-bottom: 1.2rem; padding: 1rem; border: 1px solid var(--line); border-radius: 15px; background: white; }
.insight-filters label { color: #475569; font-size: .74rem; font-weight: 800; }
.insight-filters .form-control { margin-top: .35rem; }
.insight-kpis { margin-bottom: .85rem; }
.insight-kpis .metric-card b { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.rgs-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; margin-bottom: .9rem; }
.rgs-grid a { min-width: 0; padding: 1rem; border: 1px solid #cdebe6; border-radius: 14px; background: linear-gradient(145deg, #f0fdfa, white); }
.rgs-grid a:hover { border-color: #5eead4; box-shadow: 0 10px 28px rgba(8,47,73,.07); }
.rgs-grid a.risk { border-color: #fed7aa; background: linear-gradient(145deg, #fff7ed, white); }
.rgs-grid span, .rgs-grid strong, .rgs-grid small { display: block; }
.rgs-grid span { color: var(--teal); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.rgs-grid .risk span { color: #c2410c; }
.rgs-grid strong { margin: .18rem 0; color: var(--navy); font-size: 1.75rem; letter-spacing: -.04em; }
.rgs-grid small { color: var(--muted); font-size: .68rem; }
.insight-columns { display: grid; grid-template-columns: .8fr 1.2fr; gap: .9rem; margin-bottom: .9rem; }
.tenure-panel .panel-head > span, .top-users-panel .panel-head > span { color: var(--muted); font-size: .72rem; }
.tenure-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem; }
.tenure-list div { min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; padding: .7rem; border-radius: 11px; background: #f4f8fa; }
.tenure-list span { color: var(--muted); font-size: .64rem; }
.tenure-list b { color: var(--navy); font-size: 1.35rem; }
.rank-list > div { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: .7rem; min-height: 48px; border-top: 1px solid #edf2f5; }
.rank-list > div:first-child { border-top: 0; }
.rank-list > div > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: var(--teal); background: var(--teal-light); font-size: .68rem; font-weight: 900; }
.rank-list b, .rank-list small { display: block; }
.rank-list b { font-size: .78rem; }
.rank-list small { color: var(--muted); font-size: .65rem; }
.rank-list strong { color: var(--navy); font-size: .78rem; }
.rank-list > .empty-state { display: block; min-height: 84px; padding: 1rem 0; text-align: left; }
.customer-table-panel table { min-width: 900px; }
.signal-pills { display: flex; flex-wrap: wrap; gap: .25rem; }
.signal-pills span { padding: .2rem .42rem; border-radius: 999px; color: #0f766e; background: #ccfbf1; font-size: .6rem; font-weight: 800; white-space: nowrap; }
.signal-pills .new { color: #1d4ed8; background: #dbeafe; }
.signal-pills .churn { color: #b91c1c; background: #fee2e2; }
.setup-notice { display: flex; gap: .45rem; flex-direction: column; margin-bottom: 1rem; padding: 1rem 1.15rem; border: 1px solid #fed7aa; border-radius: 12px; color: #9a3412; background: #fff7ed; }
.setup-notice span { color: #7c2d12; font-size: .8rem; }
.setup-notice.compact { padding: .8rem; }
.campaign-status { align-self: center; padding: .45rem .75rem; }
.campaign-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: .9rem; }
.campaign-summary article { min-width: 0; min-height: 112px; display: flex; flex-direction: column; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: white; }
.campaign-summary span, .campaign-summary small { color: var(--muted); font-size: .7rem; }
.campaign-summary strong { margin: auto 0 .1rem; overflow-wrap: anywhere; color: var(--navy); font-size: 1.4rem; }
.campaign-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: .9rem; margin-bottom: .9rem; }
.message-preview { background: #e8f5ef; }
.whatsapp-bubble { position: relative; max-width: 560px; padding: 1rem 1rem 1.55rem; border-radius: 14px 14px 4px 14px; color: #1f2937; background: white; box-shadow: 0 4px 14px rgba(8,47,73,.08); }
.whatsapp-bubble time { position: absolute; right: .7rem; bottom: .35rem; color: #94a3b8; font-size: .58rem; }
.message-preview > p { margin: .9rem 0 0; color: #52706a; font-size: .72rem; }
.send-confirmation ul { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--muted); font-size: .78rem; }
.send-confirmation li { margin: .4rem 0; }
.pill.draft, .pill.queued { color: #92400e; background: #fef3c7; }
.pill.sending { color: #1d4ed8; background: #dbeafe; }
.pill.completed, .pill.sent { color: #166534; background: #dcfce7; }
.pill.failed, .pill.skipped { color: #991b1b; background: #fee2e2; }

@media (max-width: 1100px) {
  .insight-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .insight-columns { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .insight-head { align-items: start; }
  .insight-head, .insight-head .head-actions { width: 100%; flex-direction: column; }
  .insight-head .button { width: 100%; }
  .insight-filters, .rgs-grid, .campaign-summary, .campaign-layout { grid-template-columns: 1fr; }
  .tenure-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-table-panel table { min-width: 0; }
}
