/* ARNET responsive layer — loaded after the base styles. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(145deg, #2563eb, #0ea5e9);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong { letter-spacing: .09em; }
.brand-copy small { margin-top: 4px; opacity: .62; font-size: 11px; }
.logout-icon { display: none; }
.speed-number small { margin-left: 4px; font-size: .72em; font-weight: 700; opacity: .62; }
.usage-note { margin: 11px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.olt-usage-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.olt-usage-summary article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #071320; }
.olt-usage-summary span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.olt-usage-summary b { display: block; margin-top: 8px; color: var(--blue); font-size: 24px; font-variant-numeric: tabular-nums; }
.range-result[hidden] { display: none; }

@media (max-width: 1100px) {
  .shell { padding: 24px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .side-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 900px) {
  .table-wrap { display: none; }
  .client-cards { display: grid; gap: 12px; }
  .client-card { cursor: pointer; }
}

@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }

  .shell {
    width: 100%;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .top-nav {
    position: sticky;
    top: 8px;
    z-index: 30;
    min-height: 58px;
    padding: 10px 12px;
    margin-bottom: 18px;
    border-radius: 17px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-copy small { display: none; }
  .logout-link { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 13px; }
  .logout-label { display: none; }
  .logout-icon { display: inline; font-size: 20px; line-height: 1; }

  .dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    margin-bottom: 18px;
  }

  body header:not(.dashboard-header) { flex-wrap: wrap; gap: 12px; }

  .dashboard-header h1 { font-size: clamp(26px, 8vw, 36px); line-height: 1.05; }
  .dashboard-header p { margin-top: 7px; }
  .health { width: 100%; align-items: flex-start; padding: 12px 14px; border-radius: 15px; }

  .stats { gap: 10px; margin-bottom: 10px; }
  .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats article { min-width: 0; padding: 15px 12px; border-radius: 17px; }
  .stats article > span { font-size: 10px; letter-spacing: .055em; }
  .stats article > strong { font-size: clamp(20px, 6.2vw, 29px); white-space: nowrap; }
  .stats.three article > strong { font-size: clamp(22px, 8vw, 34px); }

  .grid, .side-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .panel { padding: 16px; border-radius: 18px; }
  .panel-head { gap: 10px; align-items: flex-start; }
  .panel-head h2 { font-size: 14px; line-height: 1.25; }
  .period-select { min-height: 42px; max-width: 122px; }
  .chart-wrap { height: 235px; }

  .clients-panel { padding: 14px; }
  .client-toolbar { position: sticky; top: 74px; z-index: 20; padding: 4px 0 12px; background: var(--panel); }
  .search { width: 100%; min-height: 46px; }
  .filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .filter { min-height: 42px; padding: 8px 5px; }

  .client-cards article { padding: 15px; border-radius: 16px; }
  .client-cards article:active { transform: scale(.985); }
  .mobile-client-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
  .mobile-client-head > div:nth-child(2) { min-width: 0; }
  .mobile-client-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .avatar { width: 42px; height: 42px; flex-basis: 42px; font-size: 12px; }
  .mobile-speeds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-speeds > div { min-width: 0; padding: 11px 9px; border-radius: 12px; }
  .mobile-speeds b { font-size: clamp(17px, 5vw, 22px); white-space: nowrap; }
  .mobile-speeds small { font-size: 10px; }
  .mobile-usage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-usage span { min-width: 0; }

  .interface-grid { grid-template-columns: minmax(0, 1fr); }
  .top-row { min-height: 54px; }

  .back { display: inline-flex; align-items: center; min-height: 42px; }
  dl { min-width: 0; }
  dl div { gap: 12px; }
  dd { margin-left: 0; text-align: right; overflow-wrap: anywhere; }
  .date-form { grid-template-columns: minmax(0, 1fr); }
  .date-form input, .date-form button { width: 100%; min-height: 46px; }
  .result { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .olt-usage-summary { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .olt-usage-summary article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; }
  .olt-usage-summary b { margin-top: 0; font-size: 20px; text-align: right; }

  .auth-wrap { padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .login-card { width: 100%; padding: 26px 20px; border-radius: 22px; }
  .login-card input, .login-card button { min-height: 50px; font-size: 16px; }
}

@media (max-width: 390px) {
  .shell { padding-left: 10px; padding-right: 10px; }
  .stats { gap: 7px; }
  .stats article { padding: 13px 8px; }
  .stats article > span { font-size: 9px; }
  .stats.two { grid-template-columns: minmax(0, 1fr); }
  .stats.two article > strong { font-size: 28px; }
  .panel { padding: 13px; }
  .clients-panel { padding: 11px; }
  .mobile-speeds b { font-size: 17px; }
}

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