:root {
  --primary: #f43f6d;
  --primary-strong: #d92555;
  --secondary: #16bcae;
  --secondary-dark: #087f78;
  --ink: #20262d;
  --muted: #69727d;
  --line: #dfe5ea;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --surface-green: #eafaf7;
  --success: #15956f;
  --warning: #e18a13;
  --danger: #c73551;
  --shadow: 0 12px 30px rgba(25, 38, 52, .09);
  --shadow-soft: 0 5px 16px rgba(25, 38, 52, .07);
  --radius: 20px;
  --header-height: 70px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-soft);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; display: block; }

#app { min-height: 100vh; }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.icon { width: 21px; height: 21px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 27px; height: 27px; }
.icon-sm { width: 17px; height: 17px; }
.muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  min-height: 47px;
  border-radius: 14px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: .85; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .card-button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(22, 188, 174, .25);
  outline-offset: 2px;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(244, 63, 109, .22); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-secondary { background: var(--secondary); color: #fff; box-shadow: 0 8px 18px rgba(22, 188, 174, .18); }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.btn-ghost { background: transparent; color: var(--primary); min-height: 40px; padding: 0 8px; }
.btn-danger { background: #fff0f3; color: var(--danger); border: 1px solid #f3c4ce; }
.btn-block { width: 100%; }
.btn-small { min-height: 39px; border-radius: 12px; padding: 0 13px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.badge-count {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  border: 2px solid #fff;
}

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 800; color: #404951; }
.input-wrap { position: relative; }
.input-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #7a858e; pointer-events: none; }
.input-wrap input, .input-wrap select, .field textarea, .field input, .field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #ced6dd;
  border-radius: 13px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  transition: border .15s ease, box-shadow .15s ease;
}
.input-wrap input { padding-left: 46px; }
.field textarea { min-height: 110px; padding-top: 13px; resize: vertical; }
.input-wrap input:focus, .input-wrap select:focus, .field textarea:focus, .field input:focus, .field select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(22, 188, 174, .10);
  outline: none;
}
.form-error { color: var(--danger); font-size: 12px; font-weight: 700; min-height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr);
  background: linear-gradient(135deg, #eafaf7 0%, #f8fbfc 47%, #fff0f4 100%);
}
.login-visual {
  position: relative;
  min-height: 100vh;
  padding: 52px clamp(34px, 6vw, 88px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,.85) 0 90px, transparent 91px),
    linear-gradient(145deg, #12b8ac 0%, #11a796 58%, #087f78 100%);
  color: #fff;
}
.login-visual::before, .login-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 50%;
}
.login-visual::before { width: 480px; height: 480px; left: -170px; bottom: -180px; }
.login-visual::after { width: 280px; height: 280px; right: -110px; top: 26%; }
.visual-top, .visual-copy, .visual-foot { position: relative; z-index: 1; }
.visual-brand {
  width: 126px;
  height: 94px;
  background: rgba(255,255,255,.96);
  border-radius: 22px;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px rgba(0,0,0,.13);
}
.visual-brand img { width: 104px; height: 78px; object-fit: contain; }
.visual-copy { max-width: 620px; }
.visual-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 900; opacity: .85; }
.visual-copy h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.02; margin: 15px 0 20px; letter-spacing: -.045em; }
.visual-copy p { margin: 0; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.65; max-width: 570px; opacity: .92; }
.visual-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.visual-pill { border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.11); border-radius: 999px; padding: 9px 13px; font-weight: 800; font-size: 13px; backdrop-filter: blur(5px); }
.visual-foot { font-size: 12px; opacity: .7; }

.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 34px; }
.login-card { width: min(100%, 470px); background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.9); border-radius: 26px; padding: clamp(25px, 4vw, 42px); box-shadow: 0 25px 65px rgba(35, 47, 59, .14); }
.login-mobile-logo { display: none; width: 120px; height: 88px; margin: 0 auto 10px; object-fit: contain; }
.login-card h2 { font-size: 30px; margin: 0 0 7px; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 25px; color: var(--muted); line-height: 1.5; }
.login-form { display: grid; gap: 14px; }
.login-help { display: flex; justify-content: space-between; align-items: center; margin-top: 1px; gap: 12px; font-size: 13px; }
.link-button { border: 0; background: transparent; color: var(--primary); font-weight: 800; cursor: pointer; padding: 4px 0; }
.demo-access { margin-top: 20px; padding: 14px; border-radius: 15px; background: var(--surface-green); border: 1px solid #bdece3; font-size: 13px; line-height: 1.65; }
.demo-access strong { color: var(--secondary-dark); }
.login-site-link { margin-top: 17px; display: flex; justify-content: center; }

/* ---------- Authenticated shell ---------- */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px 16px 18px;
  z-index: 20;
}
.sidebar-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 2px 9px 20px; }
.sidebar-logo img { width: 66px; height: 50px; object-fit: contain; }
.sidebar-logo-text strong { display: block; font-size: 16px; }
.sidebar-logo-text span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.nav-list { display: grid; gap: 6px; }
.nav-item {
  border: 0;
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  background: transparent;
  color: #525c66;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: #f5f8fa; color: var(--ink); }
.nav-item.active { color: var(--primary); background: #fff0f4; }
.nav-item.active .nav-icon-box { color: #fff; background: var(--primary); }
.nav-icon-box { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--secondary-dark); background: var(--surface-green); }
.sidebar-spacer { flex: 1; }
.sidebar-account { padding: 13px; border-radius: 15px; background: var(--surface-soft); margin-top: 16px; }
.account-line { display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #ff7195); color: #fff; font-weight: 900; }
.account-copy { min-width: 0; flex: 1; }
.account-copy strong, .account-copy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-copy strong { font-size: 13px; }
.account-copy span { font-size: 11px; color: var(--muted); margin-top: 2px; }
.logout-mini { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }

.app-main { min-width: 0; }
.topbar {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 18;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(218,226,232,.82);
  display: flex;
  align-items: center;
  padding: 0 clamp(18px, 4vw, 42px);
}
.topbar-content { width: min(100%, 1180px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.back-button { display: none; }
.topbar-title h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.header-logo { width: 62px; height: 46px; object-fit: contain; cursor: pointer; }
.content-wrap { width: min(100%, 1180px); margin: 0 auto; padding: 28px clamp(18px, 4vw, 42px) 50px; }
.mobile-bottom-nav { display: none; }

/* ---------- Page components ---------- */
.page-heading { margin-bottom: 21px; }
.page-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.04em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.section-title { font-size: 18px; margin: 0 0 12px; letter-spacing: -.02em; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px;
  box-shadow: var(--shadow-soft);
}
.card-flat { box-shadow: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 18px; }
.dashboard-main, .dashboard-side { display: grid; gap: 18px; align-content: start; }

.welcome-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.welcome-line h2 { margin: 0; font-size: clamp(27px, 4vw, 39px); letter-spacing: -.045em; }
.welcome-line p { margin: 7px 0 0; color: var(--muted); }

.site-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border: 1px solid #beeae4;
  background: linear-gradient(135deg, #effcf9 0%, #fff 80%);
  border-radius: 19px;
  padding: 15px 16px;
  box-shadow: var(--shadow-soft);
  transition: transform .15s, border-color .15s;
}
.site-card:hover { transform: translateY(-2px); border-color: var(--secondary); }
.site-card-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--secondary); color: #fff; }
.site-card-copy { flex: 1; min-width: 0; }
.site-card-copy strong, .site-card-copy span { display: block; }
.site-card-copy strong { font-size: 16px; }
.site-card-copy span { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.site-card-domain { color: var(--secondary-dark) !important; font-weight: 800; }

.connection-card { position: relative; overflow: hidden; background: linear-gradient(145deg, #1a2830 0%, #172126 100%); color: #fff; border: 0; box-shadow: 0 18px 40px rgba(22,35,43,.18); }
.connection-card::after { content: ""; position: absolute; width: 230px; height: 230px; right: -90px; top: -120px; border-radius: 50%; border: 35px solid rgba(22,188,174,.16); }
.connection-head, .invoice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; position: relative; z-index: 1; }
.eyebrow { color: #94a2ac; text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 900; }
.connection-card h3 { margin: 7px 0 3px; font-size: 22px; }
.connection-speed { font-size: 36px; font-weight: 950; color: #48dfcf; letter-spacing: -.04em; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-active, .status-paid, .status-resolved { background: #e7f8f1; color: var(--success); }
.status-open { background: #fff1f4; color: var(--primary); }
.status-progress { background: #fff4e6; color: #b76900; }
.status-muted { background: #eef1f4; color: #66717a; }
.connection-card .status-active { background: rgba(76,223,207,.13); color: #62e7d9; }
.address-panel { margin-top: 18px; position: relative; z-index: 1; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.address-panel span { display: block; color: #aeb9c0; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.address-panel strong { display: block; font-size: 13px; margin-top: 5px; font-weight: 650; line-height: 1.4; }

.invoice-card .amount { font-size: 34px; font-weight: 950; letter-spacing: -.045em; margin: 6px 0 0; }
.invoice-card .due-date { color: var(--muted); font-size: 13px; margin: 10px 0 16px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-action { border: 1px solid var(--line); background: #fff; min-height: 105px; border-radius: 17px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; cursor: pointer; text-align: left; transition: transform .15s, border-color .15s, box-shadow .15s; }
.quick-action:hover { transform: translateY(-2px); border-color: #cbd5dc; box-shadow: var(--shadow-soft); }
.quick-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #fff0f4; color: var(--primary); }
.quick-action:nth-child(even) .quick-icon { background: var(--surface-green); color: var(--secondary-dark); }
.quick-action strong { font-size: 13px; line-height: 1.25; }

.notice-card { border-left: 4px solid var(--secondary); }
.notice-card h3 { margin: 0 0 6px; font-size: 16px; }
.notice-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.list { display: grid; gap: 11px; }
.list-card { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 16px; box-shadow: var(--shadow-soft); }
.card-button { width: 100%; border: 0; background: #fff; cursor: pointer; text-align: left; color: inherit; }
.list-title { margin: 0; font-size: 16px; }
.list-meta { color: var(--muted); font-size: 12px; line-height: 1.5; }
.list-value { font-size: 18px; font-weight: 900; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; }
.plan-card.featured { border-color: var(--primary); box-shadow: 0 12px 28px rgba(244,63,109,.12); }
.featured-tag { position: absolute; top: -10px; right: 14px; background: var(--primary); color: #fff; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.plan-name { font-size: 15px; font-weight: 850; }
.plan-speed { color: var(--primary); font-size: 29px; font-weight: 950; letter-spacing: -.04em; }
.plan-city { color: var(--muted); font-size: 12px; }
.plan-price { font-size: 24px; font-weight: 950; }
.plan-price small { font-size: 12px; color: var(--muted); font-weight: 650; }
.benefit-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; flex: 1; }
.benefit-list li { display: flex; gap: 8px; align-items: flex-start; color: #535d66; font-size: 12px; line-height: 1.45; }
.benefit-list li::before { content: "✓"; color: var(--success); font-weight: 900; }

.radio-plan { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 13px; cursor: pointer; }
.radio-circle { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd3da; display: grid; place-items: center; }
.radio-plan.selected .radio-circle { border-color: var(--primary); }
.radio-plan.selected .radio-circle::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.radio-plan.selected { border-color: var(--primary); box-shadow: 0 8px 22px rgba(244,63,109,.10); }
.radio-copy strong, .radio-copy span { display: block; }
.radio-copy strong { font-size: 14px; }
.radio-copy .speed { color: var(--primary); font-size: 21px; font-weight: 950; margin-top: 2px; }
.radio-copy .city { color: var(--muted); font-size: 11px; margin-top: 2px; }
.radio-price { font-size: 13px; font-weight: 900; white-space: nowrap; }

.profile-hero { display: flex; align-items: center; gap: 17px; }
.profile-avatar { width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #ff779a); color: #fff; font-size: 25px; font-weight: 950; }
.profile-copy h3 { margin: 0; font-size: 21px; }
.profile-copy p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.detail { padding: 13px; border-radius: 14px; background: var(--surface-soft); }
.detail span, .detail strong { display: block; }
.detail span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.detail strong { margin-top: 5px; font-size: 13px; line-height: 1.4; }

.ticket-timeline { display: grid; gap: 0; margin-top: 10px; }
.timeline-item { display: grid; grid-template-columns: 24px 1fr; gap: 12px; min-height: 60px; }
.timeline-marker { position: relative; display: flex; justify-content: center; }
.timeline-marker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--secondary); z-index: 1; }
.timeline-marker::after { content: ""; position: absolute; width: 2px; background: #d9e4e3; top: 14px; bottom: -4px; }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-copy strong { display: block; font-size: 13px; }
.timeline-copy span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.45; }

.notification-item { display: grid; grid-template-columns: 43px minmax(0,1fr) auto; gap: 13px; align-items: start; }
.notification-icon { width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-green); color: var(--secondary-dark); }
.notification-item.unread { border-color: #f3c3cf; background: #fffafb; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 5px; }

.contract-box { font-size: 13px; line-height: 1.75; color: #4c5660; }
.contract-box h3 { color: var(--ink); margin-top: 0; }

.speed-gauge { width: min(240px, 72vw); aspect-ratio: 1; margin: 10px auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--secondary) var(--progress, 0%), #e7ecef 0); position: relative; }
.speed-gauge::before { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: #fff; }
.speed-number { position: relative; z-index: 1; text-align: center; }
.speed-number strong { display: block; font-size: 45px; letter-spacing: -.055em; }
.speed-number span { display: block; color: var(--muted); font-size: 12px; }
.speed-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.speed-stat { text-align: center; background: var(--surface-soft); border-radius: 14px; padding: 12px; }
.speed-stat strong, .speed-stat span { display: block; }
.speed-stat strong { font-size: 18px; }
.speed-stat span { color: var(--muted); font-size: 11px; margin-top: 3px; }

.empty { text-align: center; padding: 45px 20px; color: var(--muted); }
.empty .icon-box { width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-green); color: var(--secondary-dark); }

/* ---------- Dialog and toast ---------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(17,26,31,.54); display: grid; place-items: center; padding: 18px; animation: fade-in .14s ease; }
.dialog { width: min(100%, 540px); max-height: min(88vh, 780px); overflow: auto; border-radius: 23px; background: #fff; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: rise .18s ease; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.dialog-head h3 { margin: 0; font-size: 21px; }
.dialog-close { border: 0; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-soft); cursor: pointer; display: grid; place-items: center; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 19px; }
.code-box { background: #f3f5f7; border: 1px dashed #bac4cb; padding: 13px; border-radius: 13px; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.55; }
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 32px)); padding: 13px 15px; border-radius: 14px; background: #1f2b31; color: #fff; box-shadow: 0 15px 35px rgba(0,0,0,.22); display: flex; align-items: center; gap: 10px; animation: rise .2s ease; font-size: 13px; }
.toast-success .toast-icon { color: #5de4c5; }
.toast-error .toast-icon { color: #ff829d; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .plan-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .login-page { grid-template-columns: minmax(330px, .85fr) minmax(410px, 1.15fr); }
  .visual-copy h1 { font-size: 42px; }
}

@media (max-width: 820px) {
  :root { --header-height: 62px; }
  body { padding-bottom: 72px; }
  .login-page { display: block; min-height: 100vh; padding: 25px 16px; }
  .login-visual { display: none; }
  .login-panel { min-height: calc(100vh - 50px); padding: 0; }
  .login-card { border-radius: 23px; padding: 25px 20px; }
  .login-mobile-logo { display: block; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: var(--header-height); padding: 0 13px; }
  .topbar-content { width: 100%; }
  .back-button { display: grid; }
  .header-logo { width: 54px; height: 40px; }
  .content-wrap { padding: 20px 14px 34px; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 80;
    left: 0;
    right: 0;
    bottom: 0;
    height: 69px;
    padding: 5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    box-shadow: 0 -8px 24px rgba(35,47,59,.07);
  }
  .mobile-nav-item { border: 0; background: transparent; color: #7a858d; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 9px; font-weight: 800; cursor: pointer; border-radius: 12px; }
  .mobile-nav-item .icon { width: 20px; height: 20px; }
  .mobile-nav-item.active { color: var(--primary); background: #fff2f5; }
  #toast-root { bottom: 82px; right: 16px; }
  .welcome-line h2 { font-size: 29px; }
  .page-heading h2 { font-size: 27px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .quick-action { min-height: 99px; padding: 12px; }
  .quick-action strong { font-size: 11px; }
  .plan-grid { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
}

@media (max-width: 430px) {
  .topbar-title h1 { font-size: 15px; }
  .welcome-line { align-items: center; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .site-card { padding: 13px; }
  .site-card-copy span:first-of-type { display: none; }
  .radio-plan { grid-template-columns: auto minmax(0,1fr); }
  .radio-price { grid-column: 2; }
  .speed-stats { grid-template-columns: 1fr; }
  .profile-hero { align-items: flex-start; }
  .profile-avatar { width: 58px; height: 58px; border-radius: 18px; }
}


/* ---------- Instalação como aplicativo (PWA) ---------- */
.login-install {
  margin-top: 13px;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}
.login-install span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  max-width: 290px;
}
.btn-install {
  background: #e9fbf8;
  color: #087a72;
  border: 1px solid #9ee4dc;
}
.btn-install:hover {
  background: #d7f7f2;
  border-color: var(--secondary);
}

.install-card {
  width: 100%;
  border: 1px solid #bce8e3;
  background: linear-gradient(135deg, #effcf9, #ffffff);
  border-radius: 18px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  margin: 12px 0 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.install-card:hover {
  transform: translateY(-2px);
  border-color: var(--secondary);
  box-shadow: var(--shadow);
}
.install-card > .icon {
  width: 19px;
  height: 19px;
  color: var(--secondary-dark);
}
.install-card-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--secondary);
  color: #fff;
}
.install-card-icon .icon {
  width: 23px;
  height: 23px;
}
.install-card-copy {
  flex: 1;
  min-width: 0;
}
.install-card-copy strong,
.install-card-copy span {
  display: block;
}
.install-card-copy strong {
  font-size: 16px;
}
.install-card-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}
.install-help-list {
  display: grid;
  gap: 11px;
}
.install-help-item {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 14px;
  border-radius: 14px;
}
.install-help-item strong,
.install-help-item span {
  display: block;
}
.install-help-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-top: 5px;
}

@media (max-width: 430px) {
  .install-card {
    padding: 13px;
  }
  .install-card-copy span {
    font-size: 11px;
  }
}


/* ---------- Logos internas ---------- */
.visual-brand {
  width: 150px;
  height: 112px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.visual-brand img {
  width: 142px;
  height: 106px;
}
.login-mobile-logo {
  width: 150px;
  height: 112px;
}
.sidebar-logo img {
  width: 76px;
  height: 56px;
}
.header-logo {
  width: 68px;
  height: 48px;
}

@media (max-width: 760px) {
.login-mobile-logo {
    width: 154px;
    height: 116px;
  }
  .header-logo {
    width: 60px;
    height: 42px;
  }
}
