:root {
  --bg: #030712;
  --bg-soft: #0f172a;
  --panel: rgba(17, 24, 39, 0.75);
  --panel-alt: rgba(15, 23, 42, 0.85);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f9fafb;
  --muted: #94a3b8;
  --brand: #2dd4bf;      /* Teal-400 */
  --brand-2: #38bdf8;    /* Sky-400 */
  --brand-soft: rgba(45, 212, 191, 0.12);
  --brand-line: rgba(45, 212, 191, 0.28);
  --accent: #fbbf24;     /* Amber-400 */
  --danger: #f87171;     /* Red-400 */
  --success: #34d399;    /* Emerald-400 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-body: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
  --font-display: 'Outfit', 'IBM Plex Sans Arabic', sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background: 
    radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    #030712;
  line-height: 1.6;
}

body.auth-page-shell {
  display: grid;
  place-items: center;
  padding: 24px;
}

h1, h2, h3, h4, .eyebrow {
  font-family: var(--font-display);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.lead {
  color: var(--muted);
  line-height: 1.8;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 20%, rgba(45, 212, 191, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
}

.auth-layout {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(24px);
}

html[dir="rtl"] .auth-layout .auth-showcase {
  order: 2;
  border-inline-start: none;
  border-inline-end: 1px solid var(--line);
}

html[dir="rtl"] .auth-layout .auth-panel {
  order: 1;
}

.auth-layout-single {
  width: min(1080px, 100%);
}

.login-card,
.sidebar,
.workspace-header,
.hero-card,
.panel-card,
.modal,
.print-sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.login-card {
  width: min(460px, 100%);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.auth-showcase {
  border-radius: 0;
  padding: 60px 56px;
  border: none;
  border-inline-start: 1px solid var(--line);
  background:
    radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.12) 0%, transparent 40%),
    rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(40px);
  display: grid;
  align-content: center;
  gap: 24px;
}

.auth-showcase h1 {
  margin-bottom: 0;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 800;
  background: linear-gradient(to bottom right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-panel {
  display: grid;
  gap: 18px;
}

.auth-card {
  width: 100%;
  padding: 24px;
}

.auth-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 6px;
}

.auth-card h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.auth-link-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.auth-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.7;
}

.auth-feedback.hidden {
  display: none;
}

.auth-feedback.is-error {
  color: #ffd5d5;
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.28);
}

.auth-feedback.is-success {
  color: #d8fff3;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.28);
}

.auth-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.input-with-action {
  position: relative;
  display: grid;
}

.input-with-action input {
  padding-inline-start: 16px;
  padding-inline-end: 78px;
}

.input-action {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.input-action:hover {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.25);
  background: rgba(45, 212, 191, 0.08);
}

.auth-link-row a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.auth-link-row a:hover {
  text-decoration: underline;
}

.auth-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.auth-point {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.auth-point:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.auth-point strong {
  font-size: 18px;
  color: var(--brand);
}

.auth-point span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.login-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.register-box h3 {
  margin-bottom: 12px;
}

.app-shell {
  width: min(1600px, calc(100% - 24px));
  margin: 12px auto;
  min-height: calc(100vh - 24px);
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
  position: relative;
  z-index: 1;
}

.sidebar {
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  min-height: calc(100vh - 24px);
  position: sticky;
  top: 12px;
  align-self: start;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand h2 {
  margin-bottom: 14px;
}

.live-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 rgba(45, 212, 191, 0.5);
  animation: pulse 1.8s infinite;
}

.live-box strong,
.live-box span {
  display: block;
}

.live-box span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.inline-sync-status {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.inline-sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.inline-sync-status.is-info {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
}

.inline-sync-status.is-success {
  color: #bbf7d0;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
}

.inline-sync-status.is-error {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-link,
.nav-group-toggle,
.nav-sublink,
.primary,
.secondary,
.ghost,
.tiny-action,
.link-action,
.modal-close {
  border-radius: 16px;
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-link {
  border: 1px solid transparent;
  padding: 12px 16px;
  text-align: right;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 15px;
}

.nav-link svg, .nav-group-toggle svg, .nav-sublink svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
  border-radius: 8px;
  color: var(--muted);
}

.nav-link.active svg, .nav-sublink.active svg {
  color: var(--brand);
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.2);
}

.nav-group {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.nav-group-toggle {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 12px;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-group-toggle div {
  display: grid;
  gap: 2px;
}

.nav-group-toggle small {
  color: var(--muted);
  font-size: 12px;
}

.nav-group.expanded .nav-group-toggle,
.nav-group-toggle:hover {
  background: rgba(45, 212, 191, 0.08);
  border-color: rgba(45, 212, 191, 0.16);
}

.nav-submenu {
  display: none;
  gap: 6px;
  padding-inline: 8px;
}

.nav-group.expanded .nav-submenu {
  display: grid;
}

.nav-group.expanded {
  border-color: rgba(45, 212, 191, 0.14);
  background: rgba(45, 212, 191, 0.04);
}

.nav-sublink {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
}

.nav-sublink:hover,
.nav-sublink.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.session-mini {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.workspace {
  display: grid;
  gap: 18px;
  align-content: start;
  padding-bottom: 16px;
  min-width: 0;
}

.alert-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.alert-card {
  border-radius: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 23, 37, 0.92), rgba(8, 16, 27, 0.96));
}

.alert-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.workspace-header {
  border-radius: 30px;
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.route-trail {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.route-trail span:last-child {
  color: var(--text);
  font-weight: 700;
}

.route-trail i {
  font-style: normal;
  opacity: 0.5;
}

.header-actions,
.toolbar,
.inline-actions,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.view {
  display: none;
  gap: 18px;
}

.view.active {
  display: grid;
}

.content-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -2px;
  margin-bottom: 2px;
}

.content-tab-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.content-tab-button:hover {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.25);
  background: rgba(45, 212, 191, 0.08);
}

.content-tab-button.active {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.28);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(104, 225, 255, 0.12));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.overview-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

.overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.content-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.guide-shell,
.overview-shell {
  display: grid;
  gap: 18px;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: center;
}

.guide-hero-copy h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

.overview-hero {
  display: grid;
  gap: 16px;
}

.settings-hero,
.settings-guide-card,
.settings-troubleshoot-card {
  grid-column: 1 / -1;
}

.settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(89, 198, 255, 0.12);
  border: 1px solid rgba(89, 198, 255, 0.24);
  color: #95ddff;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.settings-hero-copy h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

.summary-metric {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.summary-metric span {
  color: var(--muted);
  font-size: 13px;
}

.summary-metric strong {
  font-size: 18px;
  color: #f6fbff;
}

.settings-main-card,
.settings-side-card {
  min-height: 100%;
}

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

.settings-form-grid label {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.settings-form-grid label input {
  margin-top: 2px;
}

.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-checkbox input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
}

.settings-checkbox span {
  margin-top: 0;
  font-size: 14px;
  color: rgba(246, 251, 255, 0.92);
}

.settings-hint-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(89, 198, 255, 0.28);
  background: rgba(89, 198, 255, 0.06);
  color: #e7f8ff;
}

.settings-hint-card span {
  color: #c3dbef;
  font-size: 14px;
  line-height: 1.7;
}

.settings-actions {
  justify-content: flex-end;
}

.settings-result {
  margin-top: 14px;
}

.settings-status {
  min-height: auto;
}

.settings-check.modal-wrap {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  padding: 4px;
}

.modal {
  display: grid;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-head {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.modal form {
  padding: 32px;
}

.modal .form-actions {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.settings-checklist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hotspot-shell {
  display: grid;
  gap: 18px;
}

.hotspot-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.hotspot-hero-copy h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.hotspot-toolbar {
  justify-content: flex-end;
}

.hotspot-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hotspot-content-grid {
  align-items: start;
}

.hotspot-results-card {
  order: 0;
}

.hotspot-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ppp-shell {
  display: grid;
  gap: 18px;
}

.ppp-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.ppp-hero-copy h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.ppp-toolbar {
  justify-content: flex-end;
}

.ppp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ppp-interface-grid,
.ppp-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.radius-shell {
  display: grid;
  gap: 18px;
}

.radius-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.radius-hero-copy h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.radius-toolbar {
  justify-content: flex-end;
}

.radius-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.radius-server-kv-grid {
  align-items: start;
}

.backups-shell,
.audit-shell,
.admin-shell {
  display: grid;
  gap: 18px;
}

.backups-hero,
.audit-hero,
.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.backups-hero-copy h3,
.audit-hero-copy h3,
.admin-hero-copy h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.backups-toolbar,
.admin-toolbar {
  justify-content: flex-end;
}

.backups-kpis,
.audit-kpis,
.admin-kpis {
  display: grid;
  gap: 12px;
}

.backups-kpis,
.admin-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.result-block {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.result-block-head {
  font-size: 14px;
  font-weight: 700;
  color: #f0f8ff;
}

.check-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.check-item strong {
  font-size: 14px;
}

.check-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.check-item.ok {
  border-color: rgba(94, 214, 140, 0.28);
  background: rgba(94, 214, 140, 0.08);
}

.check-item.warn {
  border-color: rgba(255, 189, 89, 0.28);
  background: rgba(255, 189, 89, 0.08);
}

.check-item.pending {
  border-color: rgba(89, 198, 255, 0.2);
  background: rgba(89, 198, 255, 0.05);
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.hero-card,
.panel-card {
  border-radius: var(--radius-xl);
  padding: 20px;
}

.content-panel {
  display: none;
}

.content-panel.active {
  display: block;
}

.hero-card {
  grid-column: span 3;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.list-tools {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.list-tools input,
.list-tools select {
  background: rgba(255, 255, 255, 0.03);
}

.card-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.guide-grid,
.troubleshoot-list {
  display: grid;
  gap: 12px;
}

.guide-step {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.guide-step.is-match {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.08);
}

.guide-step span,
.error-state span {
  color: var(--muted);
  line-height: 1.7;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 14px;
}

.data-table thead th {
  background: rgba(255, 255, 255, 0.04);
  padding: 16px 20px;
  color: var(--muted);
  font-weight: 700;
  text-transform: none;
  font-size: 12px;
  letter-spacing: normal;
  border-bottom: 2px solid var(--line-strong);
}

.data-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table strong {
  color: var(--text);
  font-weight: 600;
}

.data-table .inline-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.data-table .tiny-action {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.error-state {
  display: grid;
  gap: 6px;
}

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

.stat-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--brand), transparent);
  opacity: 0.1;
  filter: blur(20px);
}

.stat-card small,
.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: clamp(32px, 3.5vw, 44px);
  letter-spacing: -0.05em;
  font-weight: 800;
  color: #fff;
}

.result,
.list,
.kv {
  min-height: 150px;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(2, 10, 20, 0.38);
  overflow: auto;
}

.list {
  max-height: 420px;
}

.compact {
  min-height: 100px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  gap: 6px;
}

.badge-info { background: rgba(56, 189, 248, 0.1); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.2); }
.badge-success { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-outline { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.pulse {
  position: relative;
}

.pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: badge-pulse 1.5s infinite;
}

@keyframes badge-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cell-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
}

.action-primary { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.action-primary:hover { background: var(--brand); color: white; }

.action-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
.action-danger:hover { background: #ef4444; color: white; }


.kv div:last-child,
.item:last-child {
  margin-bottom: 0;
}

.item span,
.kv span,
.empty,
pre {
  color: var(--muted);
}

.empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--line);
  background: rgba(255, 255, 255, 0.01);
  text-align: center;
  line-height: 1.8;
  color: var(--muted);
}

.empty strong {
  display: block;
  color: #eef7ff;
  font-size: 15px;
  margin-bottom: 6px;
}

.empty span {
  color: var(--muted);
  max-width: 32ch;
}

pre.result:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.8;
}

.item strong,
.kv strong {
  font-size: 15px;
}

label {
  display: grid;
  gap: 8px;
  color: #d9ebff;
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.inline-form {
  margin-top: 18px;
}

/* RADIUS Tab Navigation */
.radius-toolbar-nav {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(2, 10, 20, 0.4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-top: 16px;
  overflow-x: auto;
}

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-width: 140px;
}

.nav-tab i {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-tab.active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
}

.nav-tab.active i {
  opacity: 1;
}

.radius-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.radius-hero-actions .toolbar {
  margin-top: 0;
}

#radiusActions {
  flex-wrap: wrap;
  gap: 8px;
}

/* Hide radius action buttons that don't match active tab */
#radiusActions .content-panel {
  display: none;
}

#radiusActions .content-panel.active {
  display: inline-flex;
}

/* Auth Layout Overhaul */
.auth-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 40%),
              radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.05), transparent 40%);
}

.auth-showcase {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10% 12%;
  position: relative;
  border-left: 1px solid var(--line);
}

.auth-showcase h1 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.1;
  font-weight: 900;
  margin: 24px 0;
  background: linear-gradient(135deg, #fff 30%, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.auth-points {
  display: grid;
  gap: 32px;
  margin-top: 48px;
}

.auth-point {
  display: grid;
  gap: 8px;
  padding-right: 24px;
  border-right: 3px solid var(--brand);
  background: linear-gradient(to left, rgba(14, 165, 233, 0.05), transparent);
}

.auth-point strong {
  font-size: 18px;
  color: var(--brand);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(20px);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 48px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card:hover {
  border-color: var(--brand-line);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-8px);
}

.auth-card-head {
  text-align: center;
  margin-bottom: 40px;
}

.auth-card-head h2 {
  font-size: 32px;
  margin: 12px 0;
  color: #fff;
}

.register-card { margin-top: 40px; }

.toast-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.toast.is-success {
  border-color: rgba(52, 211, 153, 0.35);
}

.toast.is-error {
  border-color: rgba(248, 113, 113, 0.35);
}

.toast.is-info {
  border-color: rgba(96, 165, 250, 0.32);
}

.notice-layer {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
}

.notice-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 38%),
    rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(14px);
}

.notice-box {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
  box-shadow: 0 36px 90px rgba(15, 23, 42, 0.4);
  display: grid;
  gap: 18px;
  animation: notice-in 220ms ease;
}

.notice-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.notice-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.notice-copy {
  display: grid;
  gap: 10px;
}

.notice-copy strong {
  font-size: 1.2rem;
  color: #f8fafc;
}

.notice-copy p {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.9;
  font-size: 0.97rem;
}

.notice-actions {
  display: flex;
  justify-content: flex-end;
}

.notice-box.is-error .notice-icon {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.26);
}

.notice-box.is-success .notice-icon {
  background: rgba(52, 211, 153, 0.18);
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.26);
}

.notice-box.is-info .notice-icon {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.22);
}

button.is-busy {
  opacity: 0.72;
  cursor: wait;
}

button[disabled] {
  opacity: 0.64;
  cursor: not-allowed;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

input,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(15, 23, 42, 0.6);
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.1);
}

.primary,
.secondary,
.ghost,
.tiny-action,
.link-action,
.modal-close {
  border: 1px solid transparent;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary {
  color: #030712;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 14px 0 rgba(45, 212, 191, 0.39);
}

.secondary {
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.45);
  filter: brightness(1.1);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.primary:active, .secondary:active {
  transform: translateY(0);
}

.ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.tiny-action:hover,
.link-action:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.modal-wrap {
  position: relative;
  width: min(860px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.modal {
  border-radius: 26px;
  padding: 24px;
}

.modal-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.7;
}

.modal-feedback.is-error {
  color: #ffd5d5;
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.28);
}

.modal-feedback.is-success {
  color: #d8fff3;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.28);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-close {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.modal-form {
  display: grid;
  gap: 16px;
}

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

.modal-form-grid label {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.modal-form-grid label:has(select[multiple]) {
  grid-column: span 2;
}

.modal-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-form .form-actions > .primary:only-child {
  min-width: 180px;
}

.modal .modal-feedback {
  margin-top: 0;
}

body.modal-open {
  overflow: hidden;
}

.print-sheet {
  position: fixed;
  inset: 24px;
  z-index: 25;
  border-radius: 26px;
  padding: 20px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.97);
  color: #13263b;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.print-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.print-card {
  border-radius: 18px;
  padding: 16px;
  background: white;
  border: 1px dashed rgba(19, 38, 59, 0.18);
}

.print-card h3,
.print-card p {
  margin: 0 0 8px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(45, 212, 191, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

@media (max-width: 1180px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-points {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-rows: auto;
    min-height: auto;
    position: static;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 900px) {
  .workspace-header,
  .alert-strip,
  .content-grid.two,
  .content-grid.three,
  .overview-grid,
  .stats-grid,
  .settings-grid,
  .hotspot-shell,
  .ppp-shell,
  .radius-shell,
  .backups-shell,
  .audit-shell,
  .admin-shell {
    padding: 20px;
  }
}

/* Authentication Switcher */
.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.btn-link {
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s;
}

.btn-link:hover {
  color: #fff;
}

@media (max-width: 900px) {
  .guide-hero,
  .guide-kpis,
  .settings-hero,
  .settings-summary-cards,
  .settings-form-grid,
  .hotspot-kpis,
  .hotspot-result-grid,
  .ppp-kpis,
  .ppp-interface-grid,
  .ppp-result-grid,
  .radius-kpis,
  .backups-kpis,
  .audit-kpis,
  .admin-kpis {
    grid-template-columns: 1fr;
  }

  .hotspot-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hotspot-toolbar {
    justify-content: stretch;
  }

  .ppp-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .ppp-toolbar {
    justify-content: stretch;
  }

  .radius-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .radius-toolbar {
    justify-content: stretch;
  }

  .backups-hero,
  .audit-hero,
  .admin-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .backups-toolbar,
  .admin-toolbar {
    justify-content: stretch;
  }

  .hero-card,
  .span-2,
  .span-3 {
    grid-column: auto;
  }
}

@media print {
  .app-shell,
  .modal-layer {
    display: none !important;
  }

  .print-sheet {
    display: block !important;
    inset: 0;
    border: none;
    box-shadow: none;
  }
}

@media (max-width: 720px) {
  .modal-wrap {
    width: min(100%, calc(100% - 16px));
  }

  .modal {
    padding: 18px;
  }

  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .modal-form-grid label:has(select[multiple]) {
    grid-column: auto;
  }

  .modal-form .form-actions {
    justify-content: stretch;
  }

  .modal-form .form-actions > * {
    width: 100%;
  }
}
