:root {
  color-scheme: light;
  --white: #ffffff;
  --sky-25: #f8fcff;
  --sky-50: #f2faff;
  --sky-100: #e5f5ff;
  --sky-200: #ccecff;
  --sky-300: #9edcff;
  --blue-500: #2c9ad6;
  --blue-600: #197fbf;
  --blue-700: #12669f;
  --blue-800: #174f7a;
  --blue-900: #163b5c;
  --ink: #153b59;
  --muted: #65839a;
  --line: #d9edf8;
  --line-strong: #bddff1;
  --green: #27866c;
  --red: #bd5063;
  --amber: #a56e18;
  --shadow: 0 18px 45px rgba(28, 105, 151, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--sky-50);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--sky-50);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--sky-50);
  -webkit-font-smoothing: antialiased;
}

/* Analytics Ecosistema */
.analytics-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.analytics-grid > .stat { grid-column: span 1; }
.analytics-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.analytics-toolbar h2 { margin-bottom: 0; }
.analytics-toolbar > div:last-child { display: flex; gap: 12px; }
.analytics-toolbar label,
.analytics-settings label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 800; }
.analytics-toolbar select,
.analytics-settings select,
.analytics-settings input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: var(--white); }
.product-metric-grid { padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border: 0; background: transparent; box-shadow: none; }
.product-metric-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.product-metric-card header { display: flex; align-items: center; gap: 12px; }
.product-metric-card header > i { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 12px; color: var(--white); background: var(--product, var(--blue-500)); font-style: normal; font-weight: 900; }
.product-metric-card header > div { min-width: 0; flex: 1; }
.product-metric-card h3 { margin: 0; color: var(--blue-900); font-size: 15px; }
.product-metric-card header small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.product-metric-card header em { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--sky-50); font-size: 8px; font-style: normal; font-weight: 900; }
.product-metric-card header em.operational { color: var(--green); background: #edf9f5; }
.product-metric-card header em.degraded { color: var(--amber); background: #fff8e9; }
.product-metric-card header em.outage { color: var(--red); background: #fff0f3; }
.product-metric-card > strong { display: block; margin: 24px 0 17px; color: var(--blue-900); font-size: 27px; letter-spacing: -.04em; }
.product-metric-card > strong small { color: var(--muted); font-size: 10px; letter-spacing: 0; }
.product-metric-card dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.product-metric-card dl > div { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sky-25); }
.product-metric-card dt { color: var(--muted); font-size: 8px; font-weight: 800; }
.product-metric-card dd { margin: 5px 0 0; color: var(--blue-900); font-size: 15px; font-weight: 850; }
.metric-help i { width: 13px; height: 13px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 7px; font-style: normal; }
.analytics-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analytics-chart { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--sky-25); }
.analytics-chart > div { display: flex; justify-content: space-between; gap: 12px; }
.analytics-chart b { color: var(--blue-900); font-size: 11px; }
.analytics-chart small { color: var(--muted); font-size: 9px; }
.analytics-chart svg { width: 100%; height: 155px; margin-top: 8px; overflow: visible; }
.analytics-chart path { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.analytics-chart polyline { fill: none; stroke: var(--blue-500); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.analytics-chart circle { fill: var(--white); stroke: var(--blue-500); stroke-width: 3; }
.analytics-settings form { display: grid; gap: 13px; margin-top: 18px; }
.analytics-settings .switch-row { min-height: 40px; grid-template-columns: 1fr auto; align-items: center; }
.analytics-settings .switch-row input { min-height: auto; width: 18px; height: 18px; }
.analytics-settings button { min-height: 42px; border: 0; border-radius: 10px; color: var(--white); background: var(--blue-600); font-weight: 800; }

@media (max-width: 1180px) {
  .analytics-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .analytics-grid > .stat { grid-column: span 1; }
  .product-metric-card dl { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .analytics-grid > .stat { grid-column: span 1; }
  .product-metric-grid,
  .analytics-charts { grid-template-columns: 1fr; }
  .analytics-toolbar { align-items: stretch; flex-direction: column; }
  .analytics-toolbar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-toolbar > div:last-child { grid-template-columns: 1fr; }
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input {
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(44, 154, 214, 0.22);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.eyebrow {
  color: var(--blue-600);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

/* Accesso */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(380px, 0.86fr);
  background: var(--white);
}

.login-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 8vw, 124px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(106, 202, 250, 0.34), transparent 25%),
    radial-gradient(circle at 8% 88%, rgba(197, 233, 252, 0.72), transparent 30%),
    linear-gradient(145deg, #f8fdff 0%, #e6f6ff 58%, #d9f1ff 100%);
  border-right: 1px solid var(--line);
}

.login-story::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(38vw, 520px);
  aspect-ratio: 1;
  right: -16%;
  bottom: -28%;
  border: 1px solid rgba(44, 154, 214, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.18), 0 0 0 96px rgba(255, 255, 255, 0.12);
}

.symbol {
  position: absolute;
  top: clamp(32px, 5vw, 64px);
  left: clamp(32px, 8vw, 124px);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sky-300);
  border-radius: 14px;
  color: var(--blue-700);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 25px rgba(25, 127, 191, 0.08);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.login-story h1 {
  max-width: 790px;
  margin: 16px 0 24px;
  color: var(--blue-900);
  font-size: clamp(42px, 5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.login-story > p:last-child {
  max-width: 600px;
  margin: 0;
  color: var(--blue-800);
  font-size: 17px;
  line-height: 1.75;
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(400px, calc(100% - 64px));
  padding: 42px;
  display: grid;
  gap: 17px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 4px 0 -8px;
  color: var(--blue-900);
  font-size: 30px;
  letter-spacing: -0.035em;
}

.login-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--blue-800);
  font-size: 11px;
  font-weight: 750;
}

.login-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: var(--sky-25);
}

.login-card input:hover {
  border-color: var(--sky-300);
}

.login-card input:focus {
  border-color: var(--blue-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(44, 154, 214, 0.12);
}

.login-card button {
  height: 48px;
  margin-top: 3px;
  border: 1px solid var(--blue-600);
  border-radius: 11px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), #31a8e3);
  box-shadow: 0 10px 24px rgba(25, 127, 191, 0.18);
  font-weight: 800;
}

.login-card button:hover {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  transform: translateY(-1px);
}

.login-card output {
  min-height: 18px;
  color: var(--red);
  font-size: 12px;
  line-height: 1.4;
}

/* Struttura applicazione */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--sky-50);
}

.app aside {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 100vh;
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--line);
}

.brand {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--blue-900);
}

.brand > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sky-300);
  border-radius: 11px;
  color: var(--blue-700);
  background: var(--sky-100);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand b {
  min-width: 0;
  overflow: hidden;
  color: var(--blue-900);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app nav {
  margin-top: 44px;
  display: grid;
  gap: 7px;
}

.app nav button {
  min-height: 44px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.nav-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-600);
  background: var(--sky-50);
  font-size: 15px;
  font-weight: 500;
}

.app nav button:hover {
  color: var(--blue-800);
  background: var(--sky-25);
  border-color: var(--line);
}

.app nav button.active {
  color: var(--blue-800);
  background: var(--sky-100);
  border-color: var(--sky-200);
}

.app nav button.active .nav-icon {
  color: var(--white);
  background: var(--blue-500);
}

.owner {
  margin-top: auto;
  padding: 17px 4px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.owner i {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-800);
  background: var(--sky-100);
  border: 1px solid var(--sky-200);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.owner span {
  min-width: 0;
}

.owner b,
.owner small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner b {
  color: var(--blue-900);
  font-size: 11px;
}

.owner small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.logout {
  padding: 8px 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
}

.logout:hover {
  color: var(--blue-700);
}

.app main {
  width: 100%;
  max-width: 1640px;
  min-width: 0;
  padding: 34px clamp(24px, 4vw, 64px) 72px;
  justify-self: center;
}

.app header {
  min-height: 60px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.app h1 {
  margin: 5px 0 0;
  color: var(--blue-900);
  font-size: clamp(27px, 3vw, 34px);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.health {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  color: var(--blue-800);
  background: var(--white);
  box-shadow: 0 6px 16px rgba(28, 105, 151, 0.04);
  font-size: 10px;
  font-weight: 700;
}

.health i {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #4ab897;
  box-shadow: 0 0 0 3px rgba(74, 184, 151, 0.13);
}

.alert {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #f1dfbc;
  border-radius: 10px;
  color: #7d5b19;
  background: #fffaf0;
  font-size: 12px;
}

/* Griglie e componenti */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(28, 105, 151, 0.045);
}

.stat {
  grid-column: span 3;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat.primary {
  color: var(--white);
  background: linear-gradient(140deg, var(--blue-700) 0%, var(--blue-500) 100%);
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(25, 127, 191, 0.2);
}

.stat > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat.primary > span,
.stat.primary small {
  color: rgba(255, 255, 255, 0.78);
}

.stat strong {
  margin: 9px 0 4px;
  color: var(--blue-900);
  font-size: clamp(25px, 2.3vw, 31px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat.primary strong {
  color: var(--white);
}

.stat small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.wide {
  grid-column: span 8;
}

.narrow {
  grid-column: span 4;
}

.full {
  grid-column: 1 / -1;
}

.card h2 {
  margin: 5px 0 19px;
  color: var(--blue-900);
  font-size: 17px;
  letter-spacing: -0.018em;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.legend {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
}

.product-row {
  min-height: 66px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 40px minmax(140px, 1fr) repeat(3, minmax(86px, 124px));
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.product-row i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sky-200);
  border-radius: 10px;
  color: var(--blue-700);
  background: linear-gradient(145deg, var(--sky-100), var(--sky-200));
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.product-row > span {
  min-width: 0;
}

.product-row > span b {
  color: var(--blue-900);
  font-size: 12px;
}

.product-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.25;
}

.product-row > b {
  color: var(--blue-900);
  font-size: 11px;
  text-align: right;
}

.label {
  width: max-content;
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--sky-100);
  font-size: 9px;
  font-weight: 800;
}

.finance-separation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.finance-separation > div {
  min-height: 78px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--sky-25);
}

.finance-separation span,
.finance-separation strong {
  display: block;
}

.finance-separation span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.finance-separation strong {
  margin-top: 8px;
  color: var(--blue-900);
  font-size: 19px;
  letter-spacing: -0.025em;
}

.service {
  min-height: 58px;
  padding: 11px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  border-top: 1px solid var(--line);
}

.service b {
  overflow: hidden;
  color: var(--blue-900);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service em {
  grid-row: 1 / 3;
  grid-column: 2;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.operational {
  color: var(--green);
  background: #eaf8f3;
}

.degraded {
  color: var(--amber);
  background: #fff7e8;
}

.outage {
  color: var(--red);
  background: #fff0f3;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 11px;
}

.table th {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: left;
}

.table td,
.table th {
  padding: 13px 10px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.table tbody tr:hover {
  background: var(--sky-25);
}

.table td small {
  color: var(--muted);
  font-size: 9px;
}

.empty {
  padding: 35px 20px;
  color: var(--muted);
  background: var(--sky-25);
  border-radius: 10px;
  font-size: 11px;
  text-align: center;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-strip div {
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sky-25);
}

.metric-strip span,
.metric-strip b {
  display: block;
}

.registry-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.registry-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.registry-form input,
.registry-form select {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: var(--sky-25);
}

.registry-wide { grid-column: span 2; }
.registry-button {
  align-self: end;
  height: 42px;
  border: 0;
  border-radius: 9px;
  color: var(--white);
  background: var(--blue-600);
  font-weight: 800;
}

.metric-strip span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.metric-strip b {
  margin-top: 7px;
  color: var(--blue-900);
  font-size: 13px;
}

.profit {
  color: var(--blue-600) !important;
}

.danger {
  color: var(--red) !important;
}

@media (max-width: 1080px) {
  .app {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .stat {
    grid-column: span 6;
  }

  .wide,
  .narrow {
    grid-column: 1 / -1;
  }

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

  .product-row {
    grid-template-columns: 40px minmax(140px, 1fr) repeat(3, minmax(76px, 110px));
  }

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

@media (max-width: 760px) {
  .registry-form { grid-template-columns: 1fr; }
  .registry-wide { grid-column: auto; }
}

@media (max-width: 760px) {
  .login-shell {
    min-height: 100vh;
    display: block;
    background: var(--sky-50);
  }

  .login-story {
    min-height: 405px;
    padding: 96px 24px 62px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .symbol {
    top: 26px;
    left: 24px;
  }

  .login-story h1 {
    margin-top: 12px;
    font-size: clamp(39px, 12vw, 52px);
  }

  .login-story > p:last-child {
    font-size: 14px;
    line-height: 1.65;
  }

  .login-card {
    position: relative;
    z-index: 2;
    width: calc(100% - 32px);
    margin: -28px auto 28px;
    padding: 28px 24px;
    border-radius: 18px;
  }

  .app {
    display: block;
  }

  .app aside {
    position: sticky;
    height: auto;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(28, 105, 151, 0.06);
  }

  .brand {
    grid-column: 1;
  }

  .brand > span {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .brand b {
    display: none;
  }

  .app nav {
    grid-column: 2;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    overflow-x: auto;
  }

  .app nav button {
    min-width: 38px;
    min-height: 38px;
    padding: 5px;
    justify-content: center;
    border-radius: 10px;
  }

  .app nav button > span:last-child {
    display: none;
  }

  .nav-icon {
    width: 26px;
    height: 26px;
  }

  .owner,
  .logout {
    display: none;
  }

  .app main {
    padding: 24px 14px 52px;
  }

  .app header {
    min-height: 52px;
    margin-bottom: 22px;
    align-items: flex-start;
  }

  .health {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    font-size: 0;
  }

  .health i {
    margin: 0;
  }

  .grid {
    gap: 12px;
  }

  .stat {
    min-height: 118px;
    padding: 19px;
    grid-column: span 6;
  }

  .card {
    padding: 19px;
    border-radius: 14px;
  }

  .finance-separation {
    grid-template-columns: 1fr;
  }

  .product-row {
    grid-template-columns: 38px minmax(110px, 1fr) minmax(80px, auto);
    gap: 8px;
  }

  .product-row > b:nth-last-child(-n + 2) {
    display: none;
  }
}

@media (max-width: 460px) {
  .login-story {
    min-height: 380px;
  }

  .login-card h2 {
    font-size: 27px;
  }

  .app h1 {
    font-size: 25px;
  }

  .stat {
    grid-column: 1 / -1;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .legend {
    display: none;
  }

  .product-row {
    grid-template-columns: 38px minmax(96px, 1fr) minmax(74px, auto);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.table-action,
.row-actions button {
  border: 1px solid #c8deec;
  border-radius: 8px;
  padding: 7px 9px;
  background: #eef8fd;
  color: #1b6f9e;
  font-size: 11px;
  font-weight: 700;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 150px;
}

.cc-tutorial {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 18% 12%, rgba(98, 192, 238, .25), transparent 28%), rgba(241, 249, 253, .96);
  backdrop-filter: blur(14px);
}

.cc-tutorial > section {
  width: min(570px, 100%);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 30px 85px rgba(20, 94, 137, .17);
  text-align: center;
}

.cc-tutorial > section > i {
  width: 74px;
  height: 74px;
  margin: 26px auto 20px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--sky-100), var(--sky-200));
  color: var(--blue-700);
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
}

.cc-tutorial h2 { margin: 0 0 12px; color: var(--blue-900); font-size: 29px; letter-spacing: -.035em; }
.cc-tutorial p { min-height: 62px; margin: 0 auto; max-width: 460px; color: var(--muted); line-height: 1.65; }
.cc-tutorial-progress { margin: 28px 0 24px; display: flex; justify-content: center; gap: 7px; }
.cc-tutorial-progress b { width: 28px; height: 5px; border-radius: 20px; background: var(--sky-100); }
.cc-tutorial-progress b.active { background: var(--blue-500); }
.cc-tutorial footer { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.cc-tutorial footer button { min-height: 42px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 800; }
.cc-tutorial footer button:first-child { margin-right: auto; border-color: transparent; color: var(--muted); }
.cc-tutorial footer .next { border-color: var(--blue-600); background: linear-gradient(135deg, var(--blue-600), #31a8e3); color: #fff; }

@media (max-width: 620px) {
  .cc-tutorial footer { flex-wrap: wrap; }
  .cc-tutorial footer button:first-child { width: 100%; margin: 0; order: 3; }
}

.cc-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}.cc-install-trigger{min-height:43px;padding:9px 13px;border:1px solid var(--line-strong);border-radius:12px;background:#fff;color:var(--blue-800);font:inherit;font-size:12px;font-weight:850;box-shadow:0 8px 24px rgba(20,94,137,.08)}.cc-install-trigger span{color:var(--blue-500)}.cc-install-trigger[hidden]{display:none}.cc-install-backdrop{position:fixed;z-index:500;inset:0;display:grid;place-items:center;padding:20px;background:rgba(17,62,89,.5);backdrop-filter:blur(8px)}.cc-install-backdrop>section{position:relative;width:min(480px,100%);padding:32px;border:1px solid var(--line-strong);border-radius:24px;background:#fff;color:var(--ink);box-shadow:0 30px 90px rgba(20,67,94,.28)}.cc-install-close{position:absolute;top:14px;right:14px;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:var(--sky-50);color:var(--muted);font-size:22px}.cc-install-logo{width:68px;height:68px;display:grid;place-items:center;margin-bottom:22px;border-radius:22px 22px 7px 22px;background:linear-gradient(145deg,var(--blue-800),var(--blue-500));color:#fff;font-size:20px;font-weight:900}.cc-install-backdrop h2{margin:9px 0 10px;color:var(--blue-900);font-size:28px}.cc-install-backdrop section>span{display:block;color:var(--muted);line-height:1.55}.cc-install-steps{margin:22px 0;padding:17px;border-radius:15px;background:var(--sky-50)}.cc-install-steps ol{margin:11px 0 0;padding-left:21px;color:var(--muted);line-height:1.65}.cc-install-primary,.cc-install-secondary{width:100%;min-height:48px;margin-top:20px;border:0;border-radius:12px;font:inherit;font-weight:850}.cc-install-primary{background:linear-gradient(135deg,var(--blue-700),var(--blue-500));color:#fff}.cc-install-secondary{margin-top:10px;background:var(--sky-50);color:var(--blue-800)}@media(max-width:760px){.cc-header-actions{gap:7px}.cc-install-trigger{width:43px;padding:0;font-size:0}.cc-install-trigger span{font-size:18px}.cc-header-actions .health{display:none}}
