:root {
  --blue: #4673a4;
  --blue-dark: #345b86;
  --blue-soft: #eef3f9;
  --navy: #10232e;
  --page: #edf3f8;
  --surface: #fff;
  --surface-soft: #f5f8fb;
  --surface-soft-2: #eef4f8;
  --border: #dfe8f1;
  --dark: #16202b;
  --text: #2b3a47;
  --muted: #6b7a8c;
  --orange: #f3931f;
  --green: #238363;
  --red: #b43f48;
  --shadow: 0 2px 8px rgba(27,40,56,.04), 0 14px 36px rgba(27,40,56,.09);
  --radius: 22px;
  --radius-small: 12px;
  --sidebar: 224px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--page); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

.environment-banner { position: fixed; z-index: 100; inset: 0 0 auto; height: 26px; display: grid; place-items: center; color: #fff; background: #7a2e2e; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.environment-banner:not([hidden]) ~ .app-shell .topbar { top: 26px; }
.environment-banner:not([hidden]) ~ .app-shell .app-body { padding-top: 124px; }
.environment-banner:not([hidden]) ~ .app-shell .sidebar { top: 124px; }

.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 250px; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { font-size: 15px; line-height: 1.2; letter-spacing: -.01em; }
.brand-lockup small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.brand-mark { width: 36px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark svg { display: block; width: 36px; height: 38px; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, 560px) minmax(420px, 1fr); background: #f8fbfd; }
.login-card { width: min(440px, calc(100% - 64px)); margin: auto; padding: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); }
.brand-lockup-login { margin-bottom: 48px; }
.login-copy h1 { margin: 9px 0 12px; font-size: clamp(31px, 4vw, 44px); line-height: 1.05; letter-spacing: -.045em; }
.login-copy p { margin: 0 0 30px; color: var(--muted); line-height: 1.6; }
.login-visual { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 70px; color: #fff; background: var(--navy); }
.visual-grid { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.22) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.22) 1px,transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(130deg, transparent, #000); }
.login-visual::before { content: ""; position: absolute; width: 560px; height: 560px; top: -220px; right: -170px; border: 110px solid rgba(70,115,164,.38); border-radius: 50%; }
.login-visual::after { content: ""; position: absolute; width: 240px; height: 6px; left: 0; bottom: 20%; background: var(--orange); transform: rotate(-12deg); transform-origin: left; }
.visual-content { position: relative; z-index: 1; width: min(610px, 100%); }
.signal-dot { display: block; width: 13px; height: 13px; margin-bottom: 36px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 9px rgba(243,147,31,.16); }
.visual-kicker { margin: 0 0 12px; color: #b9d2e4; text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.visual-content h2 { max-width: 600px; margin: 0 0 48px; font-size: clamp(35px, 4vw, 62px); line-height: 1.02; letter-spacing: -.05em; }
.visual-content ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0; padding: 0; }
.visual-content li { display: flex; align-items: center; gap: 12px; color: #d7e5ed; font-size: 14px; }
.visual-content li span { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.13); border-radius: 12px; font-size: 11px; font-weight: 800; }

.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; color: var(--text); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field select, .search, .toolbar select { width: 100%; min-height: 40px; padding: 0 13px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; outline: none; font-size: 13px; font-weight: 400; letter-spacing: normal; text-transform: none; transition: border .15s, box-shadow .15s, background .15s; }
.field input:focus, .field select:focus, .search:focus, .toolbar select:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(70,115,164,.13); }
.field input::placeholder, .search::placeholder { color: #98a8b1; }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 13px; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(70,115,164,.22); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { color: var(--blue-dark); background: #fff; border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--blue-soft); }
.btn-danger { color: #fff; background: var(--red); }
.btn-small { min-height: 32px; padding: 0 12px; font-size: 12px; }
.btn-wide { width: 100%; }
.text-button { padding: 3px 0; color: var(--blue-dark); background: none; border: 0; cursor: pointer; font-weight: 650; font-size: 13px; }
.login-card > .text-button { display: block; margin: 18px auto 0; }
.form-message { min-height: 19px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-message.error { color: var(--red); }
.form-message.success { color: var(--green); }
.demo-hint { display: grid; gap: 5px; margin-top: 22px; padding: 14px; color: #4e6877; background: var(--blue-soft); border: 1px solid var(--border); border-radius: 12px; font-size: 11px; }

.app-shell { min-height: 100vh; }
.topbar { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 12px 16px 0; padding: 0 24px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 10px 30px rgba(35,55,72,.09); }
.topbar-context { display: flex; align-items: center; gap: 22px; }
.organization-picker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.organization-picker select { min-width: 210px; min-height: 40px; padding: 0 34px 0 12px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; font-weight: 650; text-transform: none; letter-spacing: normal; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 12px; font-size: 11px; font-weight: 800; }
.user-copy strong, .user-copy small { display: block; }
.user-copy strong { font-size: 13px; }
.user-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-size: 19px; }
.icon-button:hover { color: var(--blue-dark); background: var(--blue-soft); border-color: var(--border); }

.app-body { min-height: 100vh; padding-top: 98px; background: radial-gradient(circle at left bottom, rgba(70,115,164,.08), transparent 36%), var(--page); }
.sidebar { position: fixed; z-index: 20; top: 98px; left: 16px; bottom: 16px; width: var(--sidebar); display: flex; flex-direction: column; justify-content: space-between; padding: 12px 0; color: var(--muted); background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 14px 34px rgba(35,55,72,.09); overflow-y: auto; }
.nav-label { margin: 18px 13px 8px; padding-bottom: 7px; color: #8796a5; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 2px; }
.nav-item { width: calc(100% - 24px); min-height: 44px; display: flex; align-items: center; gap: 11px; margin: 2px 12px; padding: 9px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 12px; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; }
.nav-item span { width: 22px; display: inline-flex; align-items: center; justify-content: center; color: #8796a5; }
.nav-item svg { width: 15px; height: 15px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: var(--text); background: var(--surface-soft); }
.nav-item.active { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(70,115,164,.20); }
.nav-item.active span { color: #fff; }
.nav-admin-group { margin: 2px 0 4px; }
.nav-subitem { min-height: 38px; padding-left: 26px; font-size: 12px; font-weight: 550; }
.nav-subitem svg { width: 14px; height: 14px; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 14px 18px 4px; border-top: 1px solid var(--border); }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { color: var(--text); font-size: 11px; }
.sidebar-footer small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; background: #54bf91; border-radius: 50%; box-shadow: 0 0 0 5px rgba(84,191,145,.12); }

.content { min-height: calc(100vh - 98px); margin-left: 256px; padding: 28px 32px 36px; }
.page { display: none; width: min(1560px, 100%); margin: 0 auto; animation: reveal .18s ease-out; }
.page.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 4px 0 24px; }
.page-heading h1 { margin: 7px 0 6px; color: var(--dark); font-size: 32px; font-weight: 700; line-height: 1.08; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.page[data-page-view="dashboard"] .page-heading h1 { font-size: 38px; }
.page[data-page-view="dashboard"] .page-heading p { font-size: 16px; }
.page[data-page-view="dashboard"] .page-heading .btn-primary { min-height: 44px; padding: 0 20px; border-radius: 14px; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { color: var(--blue-dark); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.card, .kpi-card, .info-card { background: var(--surface); border: 1px solid rgba(207,220,232,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 20px; }
.card-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-header h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.02em; }
.card-header h2, .kpi-card strong, .company-card h3, .rule-card h3, .integration-card h3 { color: var(--dark); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
#reportKpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-card { position: relative; min-height: 144px; overflow: hidden; padding: 22px; border-radius: 24px; }
.kpi-card::after { content: ""; position: absolute; width: 72px; height: 72px; right: -22px; bottom: -26px; background: var(--blue-soft); border-radius: 50%; }
.kpi-card > span { display: block; color: var(--muted); font-size: 13px; font-weight: 650; }
.kpi-card strong { display: block; margin: 10px 0 5px; font-size: 32px; line-height: 1; letter-spacing: -.04em; }
.kpi-card small { color: #8a9ba5; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 20px; }
.progress-overview { display: flex; flex-direction: column; }
.progress-ring { --progress: 0deg; width: 154px; height: 154px; display: grid; place-content: center; align-self: center; margin: 8px 0 24px; text-align: center; background: radial-gradient(circle at center,#fff 56%,transparent 58%),conic-gradient(var(--blue) var(--progress),var(--blue-soft) 0); border-radius: 50%; }
.progress-ring strong { font-size: 28px; letter-spacing: -.04em; }
.progress-ring span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.legend { display: grid; gap: 9px; margin-top: auto; }
.legend-row { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.legend-row span:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--blue); border-radius: 50%; }

.admin-scope { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 18px 20px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid var(--border); border-radius: 14px; }
.admin-scope strong, .admin-scope span { display: block; }
.admin-scope strong { font-size: 14px; }
.admin-scope span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.admin-scope .scope-role { flex: 0 0 auto; margin: 0; padding: 6px 10px; color: var(--blue-dark); background: #fff; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.admin-command-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.admin-command-card { min-height: 154px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; color: var(--text); background: #fff; border: 1px solid rgba(207,220,232,.9); border-radius: 22px; box-shadow: var(--shadow); cursor: pointer; text-align: left; }
.admin-command-card:hover { transform: translateY(-2px); border-color: #b8cee4; }
.admin-command-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 12px; font-size: 16px; font-weight: 800; }
.admin-command-card strong { margin-top: 15px; color: var(--dark); font-size: 15px; }
.admin-command-card span:last-child { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.admin-users-card { margin-top: 0; }

.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.order-summary { position: sticky; top: 110px; }
.order-summary h2 { margin: 7px 0 22px; }
.order-rows { display: grid; gap: 16px; }
.order-row { position: relative; display: grid; grid-template-columns: 1fr 1fr 1.15fr .85fr; gap: 12px; padding: 20px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 14px; }
.order-row .field-course { grid-column: span 2; }
.order-row .remove-row { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; font-size: 16px; }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 12px; font-size: 11px; font-weight: 800; }
.summary-rows { display: grid; gap: 10px; min-height: 76px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #e7eef3; font-size: 12px; }
.summary-row span { color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0; padding-top: 18px; border-top: 2px solid var(--navy); }
.summary-total strong { font-size: 22px; }
.summary-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.billing-requirement { display: grid; gap: 4px; margin: 0 0 16px; padding: 13px 14px; color: #874e12; background: #fff3e0; border: 1px solid #f2d3aa; border-radius: 12px; }
.billing-requirement strong { font-size: 12px; }
.billing-requirement span { color: #875f34; font-size: 11px; line-height: 1.45; }
.billing-requirement .text-button { justify-self: start; margin-top: 4px; color: #874e12; }
.empty-state { margin: 24px 0; color: #8a9ba5; text-align: center; font-size: 12px; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.search { max-width: 360px; }
.toolbar select { width: 180px; }
.sync-label { margin-left: auto; color: var(--muted); font-size: 11px; }
.table-shell { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; z-index: 1; padding: 13px 18px; color: #728792; background: var(--surface-soft-2); border-bottom: 1px solid var(--border); text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
td { padding: 17px 18px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: var(--surface-soft); }
tr:last-child td { border-bottom: 0; }
.table-main { display: block; color: var(--text); font-weight: 650; }
.table-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 9px; color: var(--blue-dark); background: var(--blue-soft); border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.badge.success { color: var(--green); background: #e8f6ef; }
.badge.warning { color: #ad6b20; background: #fff3e0; }
.badge.danger { color: var(--red); background: #fbeaec; }
.progress-cell { min-width: 130px; }
.progress-bar { height: 7px; overflow: hidden; background: #e7eff4; border-radius: 999px; }
.progress-bar i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.progress-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; text-align: right; }

.company-grid, .rule-grid, .integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.company-card, .rule-card, .integration-card { padding: 20px; background: #fff; border: 1px solid rgba(207,220,232,.9); border-radius: 22px; box-shadow: var(--shadow); }
.company-card h3, .rule-card h3, .integration-card h3 { margin: 9px 0 6px; font-size: 16px; }
.company-card p, .rule-card p, .integration-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.company-card .card-actions, .rule-card .card-actions { display: flex; gap: 8px; margin-top: 18px; }
.info-card { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding: 17px 20px; color: var(--blue-dark); background: var(--blue-soft); box-shadow: none; }
.info-card strong { white-space: nowrap; }
.info-card span { color: var(--muted); font-size: 12px; }
.integration-card { position: relative; }
.integration-card::after { content: ""; position: absolute; top: 20px; right: 20px; width: 9px; height: 9px; background: #9aabb4; border-radius: 50%; }
.integration-card.configured::after { background: var(--green); box-shadow: 0 0 0 5px rgba(35,131,99,.11); }
.integration-card.preview::after { background: #a96a14; box-shadow: 0 0 0 5px rgba(169,106,20,.11); }
.integration-card .btn { margin-top: 16px; }
.integration-card .integration-test-result { display: grid; justify-items: start; gap: 6px; margin-top: 12px; }
.form-card { margin-top: 18px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.settings-grid .btn { align-self: end; }
.account-grid { display: grid; grid-template-columns: minmax(380px, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.account-card { margin-top: 0; }
.billing-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.billing-form .wide, .billing-form .actions { grid-column: 1 / -1; }
.billing-form .actions { display: flex; justify-content: flex-end; margin-top: 2px; }
.card-intro { margin: -5px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.dialog { width: calc(100vw - 64px); max-height: calc(100vh - 64px); padding: 0; color: var(--text); background: #fff; border: 0; border-radius: 24px; box-shadow: 0 24px 70px rgba(15,23,42,.22); }
.dialog-small { max-width: 520px; }
.dialog-medium { max-width: 840px; }
.dialog::backdrop { background: rgba(15,23,42,.42); backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px 14px; background: #fff; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 5px 0 0; color: var(--dark); font-size: 17px; }
.dialog-body { padding: 22px 24px 26px; overflow-y: auto; }
.dialog-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.dialog-form .wide { grid-column: 1 / -1; }
.dialog-form .form-section { grid-column: 1 / -1; padding: 12px 16px 16px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 14px; }
.dialog-form .form-section + .form-section { margin-top: -5px; }
.form-section-head { margin-bottom: 12px; }
.form-section-head strong { display: block; color: var(--dark); font-size: 14px; }
.form-section-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.form-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-section-grid .wide { grid-column: 1 / -1; }
.dialog-form .actions { position: sticky; bottom: -26px; z-index: 2; grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin: 0 -24px -26px; padding: 8px 24px; background: #fff; border-top: 1px solid var(--border); }
.check-field { min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; color: var(--text); background: var(--blue-soft); border: 1px solid var(--border); border-radius: 12px; font-size: 12px; font-weight: 650; }
.check-field input { width: 17px; height: 17px; accent-color: var(--blue); }
.toast { position: fixed; z-index: 80; right: 25px; top: 102px; max-width: 390px; padding: 13px 17px; color: #fff; background: var(--navy); border-radius: 12px; box-shadow: 0 14px 32px rgba(0,0,0,.22); font-size: 12px; }
.toast.error { background: var(--red); }
.mobile-only { display: none; }

@media (min-width: 1600px) {
  .content { padding: 32px 40px 40px; }
}

@media (max-width: 1360px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  #reportKpis { grid-template-columns: repeat(3, 1fr); }
  .admin-command-grid { grid-template-columns: 1fr 1fr; }
  .page[data-page-view="dashboard"] .page-heading h1 { font-size: 34px; }
}

@media (max-width: 1180px) {
  .content { padding: 22px 24px 30px; }
  .page-heading h1 { font-size: 28px; }
}

@media (max-width: 1120px) {
  .company-grid, .rule-grid, .integration-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .order-row { grid-template-columns: 1fr 1fr; }
  .order-row .field-course { grid-column: span 1; }
}

@media (max-width: 900px) {
  .dialog-form, .form-section-grid { grid-template-columns: 1fr; }
  .form-section-grid .wide { grid-column: auto; }
}

@media (max-width: 820px) {
  .login-view { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-card { margin: 50px auto; }
  .mobile-only { display: grid; }
  .topbar { height: 66px; padding: 0 14px; }
  .topbar > .brand-lockup { min-width: 0; }
  .topbar > .brand-lockup div:last-child { display: none; }
  .organization-picker span, .user-copy { display: none; }
  .organization-picker select { min-width: 145px; max-width: 180px; }
  .app-body { padding-top: 94px; }
  .sidebar { top: 94px; bottom: 0; left: 0; border-radius: 0 22px 22px 0; transform: translateX(-105%); transition: transform .2s; box-shadow: 15px 0 45px rgba(0,0,0,.18); }
  .environment-banner:not([hidden]) ~ .app-shell .app-body { padding-top: 120px; }
  .environment-banner:not([hidden]) ~ .app-shell .sidebar { top: 120px; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; padding: 16px; }
  .dashboard-grid, .order-layout, .account-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { justify-content: flex-start; }
  .page-heading h1 { font-size: 26px; }
  .page[data-page-view="dashboard"] .page-heading h1 { font-size: 30px; }
}

@media (max-width: 760px) {
  .company-grid, .rule-grid, .integration-grid, .settings-grid, .order-row { grid-template-columns: 1fr; }
  .order-row .field-course { grid-column: auto; }
}

@media (max-width: 560px) {
  .login-card { width: calc(100% - 28px); padding: 28px 22px; }
  .brand-lockup-login { margin-bottom: 34px; }
  .topbar-context { gap: 8px; }
  .organization-picker select { min-width: 118px; width: 118px; }
  .user-menu .avatar { display: none; }
  .kpi-grid, #reportKpis, .admin-command-grid { grid-template-columns: 1fr; }
  .admin-scope { align-items: flex-start; flex-direction: column; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search, .toolbar select { max-width: none; width: 100%; }
  .sync-label { margin-left: 0; }
  .card { padding: 18px; }
  .info-card { align-items: flex-start; flex-direction: column; }
  .info-card strong { white-space: normal; }
}
