:root{
  --ax-bg:#f4f7fb;
  --ax-panel:#ffffff;
  --ax-panel-2:#f8fbff;
  --ax-text:#10254d;
  --ax-muted:#6b7c97;
  --ax-line:#d7e2f1;
  --ax-brand:#2f6fed;
  --ax-brand-2:#47b8ff;
  --ax-brand-soft:#e9f1ff;
  --ax-success:#16a34a;
  --ax-success-soft:#dcfce7;
  --ax-warning:#d97706;
  --ax-warning-soft:#fff7e8;
  --ax-danger:#dc2626;
  --ax-danger-soft:#fee2e2;
  --ax-shadow:0 10px 30px rgba(16,37,77,.08);
}

body{
  margin:0;
  background:
    radial-gradient(circle at top right, rgba(71,184,255,.10), transparent 22%),
    radial-gradient(circle at left bottom, rgba(47,111,237,.08), transparent 18%),
    var(--ax-bg);
  color:var(--ax-text);
  font-family:Inter,Segoe UI,Arial,sans-serif;
}

body.ax-dark{
  --ax-bg:#0b1220;
  --ax-panel:#0f172a;
  --ax-panel-2:#111827;
  --ax-text:#e5eefc;
  --ax-muted:#94a3b8;
  --ax-line:#263447;
  --ax-brand:#60a5fa;
  --ax-brand-2:#3b82f6;
  --ax-brand-soft:#172554;
  --ax-success:#4ade80;
  --ax-success-soft:#052e16;
  --ax-warning:#f59e0b;
  --ax-warning-soft:#3b2603;
  --ax-danger:#f87171;
  --ax-danger-soft:#450a0a;
  --ax-shadow:0 12px 34px rgba(2,6,23,.35);
  color-scheme:dark;
}

*{
  box-sizing:border-box;
}

a{
  color:inherit;
  text-decoration:none;
}

.ax-shell{
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  min-height:100vh;
}

.ax-sidebar{
  background:linear-gradient(180deg, rgba(255,255,255,.76), rgba(248,251,255,.95));
  border-right:1px solid var(--ax-line);
  padding:16px 14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

body.ax-dark .ax-sidebar{
  background:linear-gradient(180deg, rgba(15,23,42,.92), rgba(17,24,39,.98));
}

.ax-sidebar-top{
  display:flex;
}

.ax-menu-btn{
  width:100%;
  border:1px solid var(--ax-line);
  background:var(--ax-panel);
  color:var(--ax-text);
  border-radius:16px;
  min-height:46px;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
}

.ax-brand{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:10px 8px 14px;
  border-bottom:1px solid var(--ax-line);
}

.ax-brand-logo{
  width:150px;
  height:48px;
  object-fit:contain;
  display:block;
}

.ax-brand-title{
  font-size:18px;
  font-weight:900;
  line-height:1;
}

.ax-brand-subtitle{
  font-size:12px;
  color:var(--ax-muted);
  line-height:1.35;
}

.ax-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ax-nav-group{
  border:1px solid var(--ax-line);
  background:var(--ax-panel);
  border-radius:18px;
  overflow:hidden;
}

.ax-nav-toggle{
  width:100%;
  border:0;
  background:transparent;
  color:var(--ax-text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 15px;
  font-size:14px;
  font-weight:900;
  cursor:pointer;
}

.ax-arrow{
  color:var(--ax-muted);
  transition:transform .18s ease;
}

.ax-nav-toggle.is-open .ax-arrow{
  transform:rotate(90deg);
}

.ax-nav-body{
  display:none;
  padding:0 10px 10px;
  border-top:1px solid var(--ax-line);
  flex-direction:column;
  gap:8px;
}

.ax-nav-body.is-open{
  display:flex;
}

.ax-nav-link,
.ax-nav-future{
  min-height:42px;
  border-radius:13px;
  display:flex;
  align-items:center;
  padding:0 14px;
  font-size:13px;
  font-weight:800;
  border:1px solid transparent;
  background:var(--ax-panel);
}

.ax-nav-link.active{
  background:linear-gradient(90deg, rgba(47,111,237,.12), rgba(71,184,255,.08));
  border-color:#cfe0ff;
}

body.ax-dark .ax-nav-link.active{
  background:linear-gradient(90deg, rgba(96,165,250,.20), rgba(59,130,246,.10));
  border-color:#1d4ed8;
}

.ax-nav-future{
  justify-content:space-between;
  color:var(--ax-muted);
  border-style:dashed;
  border-color:var(--ax-line);
}

.ax-nav-future span{
  padding:5px 9px;
  border-radius:999px;
  background:var(--ax-brand-soft);
  color:var(--ax-brand);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}

.ax-sidebar-footer{
  margin-top:auto;
  padding-top:10px;
}

.ax-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}

.ax-chip{
  padding:5px 9px;
  border-radius:999px;
  background:var(--ax-brand-soft);
  color:var(--ax-brand);
  font-size:10px;
  font-weight:900;
}

.ax-sidebar-meta{
  font-size:12px;
  color:var(--ax-muted);
}

.ax-main-shell{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.ax-topbar{
  min-height:74px;
  border-bottom:1px solid var(--ax-line);
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(12px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 20px;
}

body.ax-dark .ax-topbar{
  background:rgba(15,23,42,.76);
}

.ax-topbar-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.ax-topbar-title{
  font-size:18px;
  font-weight:900;
}

.ax-topbar-badge{
  padding:6px 10px;
  border-radius:999px;
  background:var(--ax-brand-soft);
  color:var(--ax-brand);
  font-size:11px;
  font-weight:900;
}

.ax-topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.ax-search{
  width:320px;
  min-height:44px;
  border:1px solid var(--ax-line);
  background:var(--ax-panel);
  color:var(--ax-text);
  border-radius:14px;
  padding:0 14px;
  outline:none;
  font-size:14px;
}

.ax-top-btn,
.ax-btn{
  border:1px solid var(--ax-line);
  background:var(--ax-panel);
  color:var(--ax-text);
  border-radius:14px;
  min-height:42px;
  padding:0 16px;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.ax-btn-primary{
  background:linear-gradient(90deg, var(--ax-brand), var(--ax-brand-2));
  color:#fff;
  border-color:transparent;
}

.ax-btn-danger{
  background:var(--ax-danger-soft);
  color:var(--ax-danger);
  border-color:transparent;
}

.ax-avatar{
  width:42px;
  height:42px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--ax-brand), var(--ax-brand-2));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}

.ax-main{
  padding:18px 20px 26px;
}

.ax-page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.ax-eyebrow{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:var(--ax-brand-soft);
  color:var(--ax-brand);
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-bottom:12px;
}

.ax-page-title{
  margin:0;
  font-size:26px;
  line-height:1.05;
  font-weight:900;
  letter-spacing:-.04em;
}

.ax-page-subtitle{
  margin:10px 0 0;
  font-size:13px;
  color:var(--ax-muted);
  max-width:700px;
}

.ax-page-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.ax-card{
  background:var(--ax-panel);
  border:1px solid var(--ax-line);
  border-radius:22px;
  box-shadow:var(--ax-shadow);
}

.ax-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:16px;
}

.ax-kpi-card{
  padding:18px;
}

.ax-kpi-label{
  font-size:13px;
  color:var(--ax-muted);
  font-weight:900;
  margin-bottom:10px;
}

.ax-kpi-value{
  font-size:30px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.05em;
}

.ax-kpi-meta{
  margin-top:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  color:var(--ax-muted);
  font-weight:800;
}

.ax-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1.75fr) 340px;
  gap:16px;
  align-items:start;
}

.ax-main-card{
  padding:18px;
}

.ax-side-stack{
  display:grid;
  gap:14px;
}

.ax-side-card{
  padding:16px;
}

.ax-side-title,
.ax-section-title{
  margin:0;
  font-size:18px;
  font-weight:900;
}

.ax-section-subtitle{
  margin:8px 0 0;
  font-size:13px;
  color:var(--ax-muted);
}

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

.ax-section-tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.ax-field{
  min-width:130px;
  min-height:42px;
  border:1px solid var(--ax-line);
  background:var(--ax-panel);
  color:var(--ax-text);
  border-radius:14px;
  padding:0 14px;
  font-size:13px;
  outline:none;
}

.ax-table-wrap{
  overflow:auto;
  border:1px solid var(--ax-line);
  border-radius:18px;
  background:var(--ax-panel);
}

.ax-table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}

.ax-table thead th{
  text-align:left;
  padding:12px;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--ax-muted);
  border-bottom:1px solid var(--ax-line);
  background:var(--ax-panel-2);
}

.ax-table tbody td{
  padding:12px;
  font-size:13px;
  border-bottom:1px solid var(--ax-line);
}

.ax-tenant-cell{
  font-weight:900;
}

.ax-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  min-height:28px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
}

.ax-status-ok{
  background:var(--ax-success-soft);
  color:var(--ax-success);
}

.ax-status-warn{
  background:var(--ax-warning-soft);
  color:var(--ax-warning);
}

.ax-status-off{
  background:var(--ax-danger-soft);
  color:var(--ax-danger);
}

.ax-row-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.ax-stat-list{
  display:grid;
  gap:12px;
}

.ax-stat-row{
  min-height:58px;
  border:1px solid var(--ax-line);
  border-radius:18px;
  background:var(--ax-panel);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  gap:12px;
}

.ax-good{
  color:var(--ax-success);
}

.ax-warn{
  color:var(--ax-warning);
}

.ax-quick-stack{
  display:grid;
  gap:10px;
}

@media (max-width: 1400px){
  .ax-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ax-dashboard-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 980px){
  .ax-shell{
    grid-template-columns:1fr;
  }

  .ax-page-head,
  .ax-section-head,
  .ax-topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .ax-topbar-right{
    width:100%;
    flex-wrap:wrap;
  }

  .ax-search{
    width:100%;
  }
}

@media (max-width: 720px){
  .ax-kpi-grid{
    grid-template-columns:1fr;
  }
}
