/*
 * Ganjine visual refresh 1.30.0
 * Presentation-only overrides. Loaded after every feature stylesheet so the
 * application contracts and behavioural JavaScript remain untouched.
 */

@font-face{
  font-family:"Shabnam";
  src:url("fonts/Shabnam-Light-FD.woff2") format("woff2"),url("fonts/Shabnam-Light-FD.woff") format("woff");
  font-style:normal;
  font-weight:300;
  font-display:swap
}

:root{
  --sidebar-expanded:278px;
  --sidebar-collapsed:92px
}
:root:not([data-theme="dark"]){
  color-scheme:light;
  --bg:#f7f7fa;
  --surface:#fff;
  --surface-solid:#fff;
  --surface-2:#f4f4f8;
  --text:#17171d;
  --muted:#575966;
  --line:#d9dae2;
  --control-bg:#fff;
  --hover-bg:#eeeef5;
  --primary:#5542d8;
  --primary-strong:#3f2cb8;
  --primary-bright:#6654e8;
  --primary-soft:#efedff;
  --primary-action:#5542d8;
  --primary-action-hover:#4430bd;
  --secondary:#14785f;
  --secondary-soft:#e6f6f1;
  --blue:#1769c2;
  --blue-soft:#e8f2ff;
  --violet:#7042b8;
  --violet-soft:#f2ebff;
  --amber:#865500;
  --amber-soft:#fff2cf;
  --warning:#865500;
  --warning-soft:#fff2cf;
  --danger:#b42343;
  --danger-action:#a51f3d;
  --danger-soft:#ffe8ed;
  --success:#087a5b;
  --success-soft:#e4f7ef;
  --focus-ring:#5542d8;
  --shadow:0 1px 2px rgba(24,22,40,.03),0 10px 28px rgba(24,22,40,.055)
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0e0f12;
  --surface:#191a1e;
  --surface-solid:#191a1e;
  --surface-2:#232429;
  --text:#f6f6f8;
  --muted:#c1c2cb;
  --line:#41434c;
  --control-bg:#202126;
  --hover-bg:#292a31;
  --primary:#b8aeff;
  --primary-strong:#d0caff;
  --primary-bright:#c4bbff;
  --primary-soft:#302c52;
  --primary-action:#6655df;
  --primary-action-hover:#7667ee;
  --secondary:#67d7b0;
  --secondary-soft:#16372e;
  --blue:#82b1ff;
  --blue-soft:#1b2d49;
  --violet:#c49afa;
  --violet-soft:#342443;
  --amber:#f5cc68;
  --amber-soft:#44351c;
  --warning:#f5cc68;
  --warning-soft:#44351c;
  --danger:#ff8ca0;
  --danger-action:#a92b47;
  --danger-soft:#45232b;
  --success:#75dfb7;
  --success-soft:#16382f;
  --focus-ring:#b8aeff;
  --shadow:0 1px 2px rgba(0,0,0,.22),0 12px 30px rgba(0,0,0,.2)
}

body,body p,body small,body time,body input,body select,body textarea,body .cell-sub,body .table-note,body .filter-scope-note{
  font-family:"Shabnam",Tahoma,Arial,sans-serif
}
body :is(h1,h2,h3,h4,h5,h6,strong,b,.eyebrow,.kicker,.button,button,.nav__label,.nav a,.badge,.channel-badge,.channel-pill,.status-pill,.tier-pill,th,label>span){
  font-family:"KookFaNum",Tahoma,Arial,sans-serif
}
body{font-weight:300}
body :is(h1,h2,h3,h4,h5,h6,strong,b,.button,button,.nav a,.badge,th,label>span){font-weight:700}

/* High contrast for controls, subdued copy and state chips in both themes. */
body{color:var(--text);background-color:var(--bg)}
:root ::selection{color:#fff;background:var(--primary-action)}
a:not(.button){color:var(--primary)}
:is(p,small,time,.cell-sub,.table-note,.filter-scope-note,.date-filter__result){color:var(--muted)}
:is(input,select,textarea){color:var(--text)!important;background:var(--control-bg)!important;border-color:var(--line)!important}
:is(input,textarea)::placeholder{color:color-mix(in srgb,var(--muted) 82%,transparent);opacity:1}
:is(input,select,textarea):focus{border-color:color-mix(in srgb,var(--primary) 58%,var(--line))!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--focus-ring) 15%,transparent)!important}
.button--primary,.button--glow,.lp-button{color:#fff!important;background:var(--primary-action)!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
.button--primary:hover,.button--glow:hover,.lp-button:hover{color:#fff!important;background:var(--primary-action-hover)!important}
.button--secondary,.button--ghost,.button--light{color:var(--text)!important;background:var(--surface)!important;border-color:var(--line)!important}
.button--secondary:hover,.button--ghost:hover,.button--light:hover{color:var(--primary)!important;background:var(--primary-soft)!important;border-color:color-mix(in srgb,var(--primary) 34%,var(--line))!important}
.button--danger{color:#fff!important;background:var(--danger-action)!important;border-color:transparent!important}
.button--danger:hover{color:#fff!important;background:color-mix(in srgb,var(--danger-action) 86%,#000)!important}
:is(.button,button):disabled,:is(.button,button)[aria-disabled="true"]{opacity:.55;cursor:not-allowed;box-shadow:none!important}
:is(.panel,.store-card,.stat-card,.modal,.automation-builder-section,.table-wrap,.auth-card,.guest-card){color:var(--text);border-color:var(--line)!important;background-color:var(--surface)!important}
thead,th{color:var(--muted)!important;background:var(--surface-2)!important}
tbody tr:hover{background:var(--hover-bg)!important}

:root:not([data-theme="dark"]) :is(.badge--success,.badge--status-completed,.badge--status-bslm-completed,.badge--stock-instock,.status-pill--success){color:#075f47!important;background:#e4f7ef!important;border-color:#b9e4d4!important}
:root:not([data-theme="dark"]) :is(.badge--pending,.badge--warning,.badge--status-pending,.badge--status-on-hold,.badge--status-bslm-wait-vendor,.badge--stock-onbackorder,.status-pill--warning){color:#714600!important;background:#fff2cf!important;border-color:#ead28f!important}
:root:not([data-theme="dark"]) :is(.badge--danger,.badge--status-failed,.badge--status-cancelled,.badge--status-bslm-rejected,.badge--status-refunded,.badge--stock-outofstock,.status-pill--danger){color:#9e1c38!important;background:#ffe8ed!important;border-color:#efbfca!important}
:root:not([data-theme="dark"]) :is(.badge--info,.badge--status-processing,.badge--status-pws-ready-to-ship,.badge--status-pws-shipping,.badge--status-bslm-preparation,.badge--status-bslm-shipping){color:#2452a4!important;background:#e8f2ff!important;border-color:#c2d9fa!important}
:root[data-theme="dark"] :is(.panel,.store-card,.stat-card,.modal,.automation-builder-section){border-color:var(--line)!important}
:root[data-theme="dark"] :is(.badge--success,.badge--status-completed,.badge--status-bslm-completed,.badge--stock-instock,.status-pill--success){color:#b9f4dc!important;background:#16382f!important;border-color:#285d4c!important}
:root[data-theme="dark"] :is(.badge--pending,.badge--warning,.badge--status-pending,.badge--status-on-hold,.badge--status-bslm-wait-vendor,.badge--stock-onbackorder,.status-pill--warning){color:#ffe2a8!important;background:#44351c!important;border-color:#715a2a!important}
:root[data-theme="dark"] :is(.badge--danger,.badge--status-failed,.badge--status-cancelled,.badge--status-bslm-rejected,.badge--status-refunded,.badge--stock-outofstock,.status-pill--danger){color:#ffc4ce!important;background:#45232b!important;border-color:#713845!important}
:root[data-theme="dark"] :is(.badge--info,.badge--status-processing,.badge--status-pws-ready-to-ship,.badge--status-pws-shipping,.badge--status-bslm-preparation,.badge--status-bslm-shipping){color:#c7dbff!important;background:#1b2d49!important;border-color:#36557e!important}

/* Comfortable content scale. No text declaration in the shipped styles is below 9px. */
.button,button:not(.icon-button):not(.metric-point){font-size:14px!important}
:is(.panel,.store-card,.stat-card,.mini-stats article,.automation-card,.auth-card,.guest-card){font-size:14px}
:is(.panel,.store-card,.stat-card,.automation-card) :is(p,small,span,li,dt,dd){line-height:1.75}

/* Navigation: clean logo, invisible scrollbar and a tighter collapsed dock. */
.sidebar .nav{scrollbar-width:none!important;-ms-overflow-style:none}
.sidebar .nav::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.brand__mark,.brand__mark img{transform:none!important;rotate:0deg!important}
.brand__mark img{display:block;object-fit:contain}
.nav__label::before,.nav__label::after{display:none!important;content:none!important}
.sidebar{color:var(--text)!important;background:color-mix(in srgb,var(--surface) 97%,transparent)!important;border-color:var(--line)!important;box-shadow:var(--shadow)!important}
.nav a{color:var(--muted)!important}
.nav a:hover{color:var(--text)!important;background:var(--hover-bg)!important}
:root:not(.sidebar-collapsed) .nav a.is-active{color:#fff!important;background:var(--primary-action)!important;border-color:transparent!important;box-shadow:none!important}
:root:not(.sidebar-collapsed) .nav a.is-active .nav__icon{color:#fff!important;background:rgba(255,255,255,.13)!important}
:root.sidebar-collapsed .nav a.is-active .nav__icon{color:var(--primary)!important;background:var(--primary-soft)!important}
.sidebar-profile--footer{color:var(--text)!important;background:var(--surface-2)!important;border-color:var(--line)!important}
:root.sidebar-collapsed .sidebar{padding-inline:9px}
:root.sidebar-collapsed .brand__mark{width:40px;height:40px;flex-basis:40px}
:root.sidebar-collapsed .nav a{min-height:42px!important}
:root.sidebar-collapsed .nav a .nav__icon{width:34px;height:34px;flex-basis:34px;padding:8px}

/* Header: centred pill search, quiet shortcut and desktop/mobile menu separation. */
.topbar{position:sticky}
.topbar{color:var(--text);background:color-mix(in srgb,var(--surface) 94%,transparent)!important;border-color:var(--line)!important;box-shadow:none!important}
.command-trigger,.icon-button,.user-chip{color:var(--muted);background:var(--surface)!important;border-color:var(--line)!important}
.command-trigger:hover,.icon-button:hover{color:var(--primary)!important;background:var(--primary-soft)!important}
.mobile-menu{display:none!important}
.command-trigger{
  position:absolute!important;
  right:auto!important;
  left:50%!important;
  width:min(470px,38vw);
  max-width:none!important;
  min-height:44px!important;
  justify-content:space-between;
  border-radius:999px!important;
  transform:translateX(-50%)!important
}
.command-trigger:hover{transform:translateX(-50%)!important}
.command-trigger kbd,.command-menu kbd{
  padding:0!important;
  border:0!important;
  color:var(--muted)!important;
  background:transparent!important;
  box-shadow:none!important;
  opacity:.58;
  font-size:10px!important
}

/* Borderless, single-row filter bars. Dense sets scroll horizontally on small screens. */
:is(.date-filter-card,.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.analytics-site-filter,.product-analytics-filters,.geo-controls,.bulk-finance-bar,.supply-filters){
  border:0!important;
  box-shadow:none!important;
  background:color-mix(in srgb,var(--surface-2) 72%,transparent)!important
}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.date-filter,.analytics-site-filter,.product-analytics-filters,.geo-controls,.bulk-finance-bar,.supply-filters){
  display:flex!important;
  align-items:flex-end!important;
  flex-flow:row nowrap!important;
  gap:10px!important;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  overscroll-behavior-inline:contain
}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.date-filter,.analytics-site-filter,.product-analytics-filters,.geo-controls,.bulk-finance-bar,.supply-filters)::-webkit-scrollbar{display:none}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.date-filter,.analytics-site-filter,.product-analytics-filters,.geo-controls,.bulk-finance-bar,.supply-filters)>label{
  flex:1 1 0!important;
  min-width:120px!important;
  margin:0!important
}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.date-filter,.analytics-site-filter,.product-analytics-filters,.geo-controls,.bulk-finance-bar,.supply-filters) :is(input,select){width:100%;min-width:0}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.date-filter,.analytics-site-filter,.product-analytics-filters,.geo-controls,.bulk-finance-bar,.supply-filters) :is(.button,.filter-actions){flex:0 0 auto}
.date-filter-card{padding:10px 12px!important}
.date-filter__result{flex:0 0 auto;margin-inline-start:auto!important;white-space:nowrap}

/* Automation builder: full canvas, stable columns and no preview overlap. */
.automation-builder-dialog{
  inset:6px!important;
  width:calc(100vw - 12px)!important;
  max-width:none!important;
  height:calc(100dvh - 12px)!important;
  max-height:none!important;
  margin:auto!important;
  overflow:hidden!important;
  border-radius:18px!important
}
.automation-builder-dialog>form{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto;height:100%;min-height:0;padding:0!important}
.automation-builder-head{padding:15px 22px!important}
.automation-wizard-nav{padding-block:8px!important}
.automation-builder-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(290px,340px)!important;
  align-items:start!important;
  gap:14px!important;
  min-height:0!important;
  padding:14px 18px!important;
  overflow:auto!important
}
.automation-builder-layout.is-full-width{grid-template-columns:minmax(0,1fr)!important}
.automation-builder-main,.automation-builder-section,.automation-builder-steps,.automation-step,.automation-message-editor{width:100%;min-width:0;max-width:none}
.automation-builder-section{padding:16px!important}
.automation-builder-basics{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.automation-builder-basics .form-grid__wide{grid-column:1/-1}
.automation-step-settings{grid-template-columns:minmax(230px,1fr) repeat(2,minmax(190px,1fr))!important}
.automation-message-composer{
  display:grid!important;
  grid-template-columns:minmax(480px,1fr) minmax(320px,390px)!important;
  align-items:stretch!important;
  gap:16px!important;
  overflow:visible!important
}
.automation-message-editor{align-content:start}
.automation-template-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.automation-phone-preview{position:static!important;z-index:auto!important;width:100%!important;max-width:none!important;min-width:0!important;min-height:100%!important;align-self:stretch!important;contain:layout paint}
.automation-preview-sidebar{position:sticky!important;top:0;min-width:0}
.automation-builder-footer{padding:11px 18px!important}

@media(max-width:1180px) and (min-width:851px){
  .command-trigger{width:min(330px,32vw)}
  .topbar__context strong{max-width:180px}
  .automation-builder-basics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .automation-message-composer{grid-template-columns:minmax(0,1fr) minmax(300px,350px)!important}
}

@media(max-width:850px){
  .mobile-menu{display:grid!important}
  .command-trigger{display:none!important}
  .automation-builder-dialog{inset:0!important;width:100vw!important;height:100dvh!important;border-radius:0!important}
  .automation-builder-layout,.automation-builder-layout.is-full-width{grid-template-columns:minmax(0,1fr)!important;padding:10px!important}
  .automation-builder-basics,.automation-step-settings,.automation-message-composer,.automation-template-choices{grid-template-columns:minmax(0,1fr)!important}
  .automation-phone-preview{min-height:280px!important}
  .automation-preview-sidebar{position:static!important}
  :is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.date-filter,.analytics-site-filter,.product-analytics-filters,.geo-controls,.bulk-finance-bar,.supply-filters)>label{flex:0 0 min(70vw,210px)!important;min-width:min(70vw,210px)!important}
}

@media(max-width:520px){
  .automation-builder-head p,.automation-builder-footer>div:first-child span{display:none}
  .automation-builder-head{padding:11px 13px!important}
  .automation-builder-section{padding:12px!important}
  .automation-builder-footer{align-items:stretch!important;flex-direction:column!important;gap:8px!important;padding:9px 10px!important}
}

/* Minimal filter refinement: no card-like shell or decorative background. */
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.analytics-site-filter,.product-analytics-filters,.support-filters,.supply-filters,.geo-controls>form,.bulk-finance-bar){
  gap:8px!important;
  margin-block:0 14px!important;
  padding:4px 0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important
}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.analytics-site-filter,.product-analytics-filters,.support-filters,.supply-filters,.geo-controls>form,.bulk-finance-bar)>label{
  min-width:112px!important
}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.analytics-site-filter,.product-analytics-filters,.support-filters,.supply-filters,.geo-controls>form,.bulk-finance-bar) label>span{
  margin:0 2px 4px!important;
  color:var(--muted)!important;
  font-size:11px!important
}
:is(.filters,.advanced-customer-filters,.product-filters,.finance-product-filters,.analytics-site-filter,.product-analytics-filters,.support-filters,.supply-filters,.geo-controls>form,.bulk-finance-bar) :is(input,select,.button){
  min-height:40px!important;
  height:40px!important;
  border-radius:11px!important;
  box-shadow:none!important
}
.customer-filter-panel{padding-top:14px!important}
.intelligence-filter-bar{gap:8px!important;margin-bottom:14px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}

/* Coherent charts, dashboard surfaces and dark-mode data cards. */
:is(.metric-point__bar,.bar-chart__item span,.analytics-bar>span){background:linear-gradient(180deg,var(--primary),var(--blue))!important}
:is(.growth-metrics .up,.action-card--positive>span){color:var(--success)!important;background:var(--success-soft)!important}
:is(.growth-metrics .down,.action-card--critical>span,.action-card--high>span){color:var(--danger)!important;background:var(--danger-soft)!important}
.action-card--medium>span{color:var(--warning)!important;background:var(--warning-soft)!important}
:root[data-theme="dark"] :is(.order-showcase,.order-showcase__grid){background:var(--surface)!important;border-color:var(--line)!important}
:root[data-theme="dark"] :is(.order-tile,.order-tile dl>div,.order-tile__head>a){color:var(--text)!important;background:var(--surface-2)!important;border-color:var(--line)!important}

/* Landing and guest pages use the same palette as the application shell. */
.landing-body,.guest-body{color:var(--text)!important;background:var(--bg)!important}
.lp-nav,.lp-proof,.lp-footer,.lp-loss-grid article,.lp-feature-grid article,.lp-calc,.lp-faq details{color:var(--text)!important;background:var(--surface)!important;border-color:var(--line)!important}
.lp-nav nav,.lp-brand small,.lp-hero__copy>p,.lp-hero__copy ul,.lp-section__head p,.lp-pricing>div>p,.lp-loss-grid p,.lp-feature-grid p,.lp-faq details p,.lp-footer p{color:var(--muted)!important}
.lp-hero h1 em,.lp-section__head>span,.lp-pricing>div>span,.lp-text-link{color:var(--primary)!important}
.lp-kicker,.lp-feature-grid article>span{color:var(--primary)!important;background:var(--primary-soft)!important;border-color:color-mix(in srgb,var(--primary) 22%,var(--line))!important}
.lp-compare{background:var(--primary-soft)!important}
.lp-compare__table>div{color:var(--text)!important;background:color-mix(in srgb,var(--surface) 90%,transparent)!important}
.lp-how{background:#171821!important}

/* Central SMS provider settings: readable status first, secrets kept secondary. */
.sms-provider-admin{display:grid;gap:18px}
.sms-provider-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.sms-provider-overview article{display:grid;align-content:start;gap:5px;min-height:112px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.sms-provider-overview article>span,.sms-provider-overview article>small{color:var(--muted)}
.sms-provider-overview article>strong{font-size:18px;line-height:1.55;color:var(--text)}
.sms-provider-overview article>strong small{font-family:"Shabnam",Tahoma,Arial,sans-serif;font-size:11px;color:var(--muted)}
.sms-provider-form{padding-top:16px;border-top:1px solid var(--line)}
.sms-provider-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border-radius:13px;background:var(--primary-soft)}
.sms-provider-actions p{margin:0;color:var(--text)}
.sms-provider-admin .alert{display:grid;gap:4px;margin:0}
.sms-provider-admin .alert span,.sms-provider-admin .alert small{color:inherit}
.sms-pattern-guide__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.sms-pattern-guide h3{margin:0 0 10px}
.sms-pattern-guide pre,.sms-pattern-preview{min-height:150px;margin:0;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2);color:var(--text);font-family:"Shabnam",Tahoma,Arial,sans-serif;font-size:14px;line-height:2;white-space:pre-wrap}
.sms-pattern-preview{background:linear-gradient(145deg,var(--primary-soft),var(--surface));box-shadow:var(--shadow)}
.sms-pattern-guide ol{margin:14px 0 0;padding-right:22px;color:var(--muted);line-height:2}
.sms-pattern-table{min-width:980px}.sms-template-pattern{min-width:360px}.sms-template-pattern summary{cursor:pointer;color:var(--primary);font-weight:700}.sms-template-pattern pre{max-height:290px;margin:12px 0;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);color:var(--text);font-family:"Shabnam",Tahoma,Arial,sans-serif;font-size:13px;line-height:1.9;white-space:pre-wrap;overflow:auto}.sms-template-pattern ol{display:flex;flex-wrap:wrap;gap:7px 14px;margin:0 0 8px;padding:0;list-style:none}.sms-template-pattern li{font-size:12px;color:var(--muted)}.sms-template-pattern code{color:var(--primary);font-weight:800}.customer-credit-summary{margin:0 0 16px}
.mobile-login-settings{margin-top:17px}
.mobile-login-settings__grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:18px;align-items:start}
.mobile-login-current,.mobile-pending-note{display:grid;gap:6px;padding:18px;border-radius:16px;background:var(--primary-soft)}
.mobile-login-current span,.mobile-login-current small,.mobile-pending-note span{color:var(--muted)}
.mobile-login-current strong,.mobile-pending-note strong{font-size:20px;color:var(--text)}
.mobile-pending-actions{display:flex;flex-wrap:wrap;gap:8px}

@media(max-width:1100px){.sms-provider-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.sms-pattern-guide__grid,.mobile-login-settings__grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.sms-provider-overview{grid-template-columns:minmax(0,1fr)}.sms-provider-actions{align-items:stretch;flex-direction:column}.sms-provider-actions .button{width:100%}}
