/* AIO Communication Suite - Enterprise System UI v17.03.02 */
:root{
  --aio-bg:#01091d;
  --aio-bg-2:#020b20;
  --aio-bg-3:#071d42;
  --aio-panel:#061a3a;
  --aio-panel-2:#092453;
  --aio-panel-3:#0a2c62;
  --aio-border:rgba(28,149,226,.28);
  --aio-border-strong:rgba(28,149,226,.52);
  --aio-text:#f4f7fb;
  --aio-muted:#aab8cc;
  --aio-subtle:#7f8ca3;
  --aio-primary:#0868d5;
  --aio-secondary:#0d52a0;
  --aio-accent:#1c95e2;
  --aio-cyan:#28d8ff;
  --aio-success:#42e8a2;
  --aio-danger:#ff5c7a;
  --aio-warning:#ffd166;
  --aio-shadow:0 24px 70px rgba(0,0,0,.45);
  --aio-glow:0 0 26px rgba(28,149,226,.36);
  --aio-radius:20px;
  --aio-radius-sm:14px;
  --aio-font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

*{box-sizing:border-box}
html{min-height:100%;background:var(--aio-bg)}
body.aio-system-ui,
body.aio-auth-ui{
  min-height:100vh;
  margin:0;
  color:var(--aio-text);
  font-family:var(--aio-font);
  background:
    radial-gradient(circle at 20% -10%, rgba(28,149,226,.28), transparent 32rem),
    radial-gradient(circle at 88% 8%, rgba(8,104,213,.22), transparent 34rem),
    linear-gradient(135deg, #010714 0%, #020b20 42%, #061a3a 100%);
  line-height:1.55;
  overflow-x:hidden;
}
body.aio-system-ui:before,
body.aio-auth-ui:before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background-image:linear-gradient(rgba(28,149,226,.05) 1px, transparent 1px),linear-gradient(90deg, rgba(28,149,226,.05) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.18));
}
.aio-system-backdrop{
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(120deg, rgba(1,9,29,.82), rgba(1,9,29,.96)),
    url("../aio-brand/AIOBackground.png") center top/cover no-repeat;
  opacity:.35;
  pointer-events:none;
}
a{color:var(--aio-cyan);text-decoration:none}
a:hover{color:#fff}
img{max-width:100%}

.aio-system-shell{
  display:grid;
  grid-template-columns:292px minmax(0,1fr);
  min-height:100vh;
}
.aio-system-sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:22px 18px;
  border-right:1px solid var(--aio-border);
  background:
    linear-gradient(180deg, rgba(6,26,58,.92), rgba(1,9,29,.96)),
    radial-gradient(circle at 50% 0%, rgba(28,149,226,.20), transparent 18rem);
  box-shadow:18px 0 60px rgba(0,0,0,.26);
  overflow:auto;
}
.aio-system-brand{
  display:flex;
  gap:13px;
  align-items:center;
  padding:10px;
  margin-bottom:18px;
  border:1px solid rgba(28,149,226,.22);
  border-radius:20px;
  background:linear-gradient(135deg, rgba(9,36,83,.72), rgba(2,11,32,.82));
  color:var(--aio-text);
  box-shadow:var(--aio-glow);
}
.aio-brand-mark{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  flex:0 0 54px;
  border:1px solid rgba(40,216,255,.52);
  border-radius:16px;
  background:rgba(1,9,29,.72);
  box-shadow:0 0 30px rgba(28,149,226,.40);
  overflow:hidden;
}
.aio-brand-mark img{width:54px;height:54px;object-fit:cover}
.aio-brand-copy strong{
  display:block;
  color:#fff;
  font-size:15px;
  letter-spacing:.02em;
  line-height:1.15;
}
.aio-brand-copy small{
  display:block;
  margin-top:4px;
  color:var(--aio-muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.aio-system-nav{display:grid;gap:7px}
.aio-system-nav a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 13px;
  color:var(--aio-muted);
  border:1px solid transparent;
  border-radius:15px;
  font-weight:750;
  font-size:14px;
  transition:.18s ease;
}
.aio-system-nav a:hover{
  color:#fff;
  background:rgba(28,149,226,.10);
  border-color:rgba(28,149,226,.24);
  transform:translateX(2px);
}
.aio-system-nav a.active{
  color:#fff;
  background:linear-gradient(135deg, rgba(8,104,213,.78), rgba(28,149,226,.24));
  border-color:rgba(40,216,255,.45);
  box-shadow:0 10px 28px rgba(8,104,213,.26);
}
.aio-nav-icon{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
}
.aio-sidebar-card{
  margin-top:18px;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(28,149,226,.26);
  background:linear-gradient(135deg, rgba(9,36,83,.70), rgba(1,9,29,.75));
  color:var(--aio-muted);
}
.aio-sidebar-card strong{display:block;color:#fff;margin-bottom:4px}
.aio-sidebar-card small{display:block;line-height:1.45}
.aio-live-dot{
  display:inline-block;
  width:9px;
  height:9px;
  margin-right:8px;
  border-radius:50%;
  background:var(--aio-success);
  box-shadow:0 0 18px var(--aio-success);
}
.aio-sidebar-footer{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(28,149,226,.20);
}
.aio-sidebar-footer a{
  color:var(--aio-muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.09em;
}

.aio-system-main{min-width:0}
.aio-system-topbar{
  position:sticky;
  top:0;
  z-index:25;
  min-height:86px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 28px;
  border-bottom:1px solid var(--aio-border);
  background:linear-gradient(180deg, rgba(2,11,32,.92), rgba(2,11,32,.78));
  backdrop-filter:blur(18px);
  box-shadow:0 16px 40px rgba(0,0,0,.24);
}
.aio-menu-button{
  display:none;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(28,149,226,.35);
  background:rgba(9,36,83,.88);
  color:#fff;
  font-size:20px;
}
.aio-topbar-title span{
  display:block;
  margin-bottom:3px;
  color:var(--aio-cyan);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.16em;
}
.aio-topbar-title h1{
  margin:0;
  color:#fff;
  font-size:clamp(22px,2.2vw,32px);
  line-height:1.08;
  letter-spacing:-.03em;
}
.aio-topbar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.aio-topbar-link,
.aio-topbar-primary,
.btn,
button.btn,
input[type=submit],
button[type=submit]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid rgba(28,149,226,.38);
  color:#fff;
  font-weight:900;
  letter-spacing:-.01em;
  line-height:1;
  cursor:pointer;
  text-decoration:none;
  transition:.18s ease;
}
.aio-topbar-link,
.btn.secondary{
  background:rgba(9,36,83,.62);
}
.aio-topbar-primary,
.btn.primary,
input[type=submit],
button[type=submit]{
  background:linear-gradient(135deg, var(--aio-primary), var(--aio-cyan));
  border-color:rgba(40,216,255,.55);
  box-shadow:0 14px 30px rgba(8,104,213,.26);
}
.aio-topbar-link:hover,
.aio-topbar-primary:hover,
.btn:hover,
button[type=submit]:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 36px rgba(8,104,213,.28);
}
.aio-user-chip{
  display:flex;
  align-items:center;
  gap:9px;
  max-width:210px;
  padding:6px 11px 6px 6px;
  border-radius:999px;
  border:1px solid rgba(28,149,226,.28);
  background:rgba(255,255,255,.04);
  color:var(--aio-muted);
}
.aio-user-chip span{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--aio-primary), var(--aio-cyan));
  color:#fff;
  font-weight:950;
}
.aio-user-chip small{
  max-width:140px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:800;
}

.aio-system-content{
  width:min(100%, 1520px);
  margin:0 auto;
  padding:28px;
}
.aio-flash-stack{
  width:min(100%, 1520px);
  margin:18px auto 0;
  padding:0 28px;
  display:grid;
  gap:10px;
}
.aio-flash{
  border-radius:16px;
  padding:13px 16px;
  font-weight:800;
  border:1px solid var(--aio-border);
  background:rgba(9,36,83,.82);
}
.aio-flash.success{border-color:rgba(66,232,162,.45);color:#dfffee}
.aio-flash.error{border-color:rgba(255,92,122,.50);color:#ffe7ed}
.aio-flash.info{border-color:rgba(40,216,255,.45);color:#dff8ff}

/* System content primitives */
.platform-page-hero,
.card,
.public-card,
section.card,
article.card,
.modal,
.panel,
.widget,
.settings-panel{
  border:1px solid var(--aio-border) !important;
  background:
    linear-gradient(145deg, rgba(9,36,83,.86), rgba(1,9,29,.88)) !important;
  border-radius:var(--aio-radius) !important;
  box-shadow:var(--aio-shadow);
  color:var(--aio-text);
}
.platform-page-hero{
  position:relative;
  overflow:hidden;
  padding:28px !important;
  margin-bottom:22px;
}
.platform-page-hero:before,
.card:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(circle at 12% 0%, rgba(40,216,255,.13), transparent 22rem);
}
.card{
  position:relative;
  padding:22px !important;
  overflow:hidden;
}
.card.stat{
  min-height:138px;
}
.card.stat h3,
.card h2,
.card h3,
.toolbar h2,
.toolbar h3,
.platform-page-copy h2{
  color:#fff;
  letter-spacing:-.025em;
}
.card.stat p{
  color:#fff;
  font-size:clamp(28px,3vw,46px);
  font-weight:950;
  line-height:1;
}
.card.stat span,
.muted,
.small,
.help,
.hint,
.card p,
.platform-page-copy p{
  color:var(--aio-muted) !important;
}
.platform-page-kicker,
.badge,
.pill,
.permission-pill,
.status-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  width:max-content;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid rgba(40,216,255,.32);
  background:rgba(28,149,226,.16);
  color:#dff8ff !important;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.grid,
.cards,
.form-grid{
  display:grid;
  gap:16px;
}
.grid.two,
.cards.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three,
.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.four,
.cards.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.compact-stats{margin-bottom:20px}

/* Forms */
input,
select,
textarea{
  width:100%;
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(28,149,226,.30);
  background:rgba(1,9,29,.62);
  color:#fff;
  padding:12px 14px;
  font:inherit;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
textarea{min-height:110px;resize:vertical}
input:focus,
select:focus,
textarea:focus{
  border-color:rgba(40,216,255,.75);
  box-shadow:0 0 0 4px rgba(28,149,226,.18), inset 0 1px 0 rgba(255,255,255,.04);
}
input::placeholder,
textarea::placeholder{color:#7d8ba3}
label{
  color:var(--aio-muted);
  font-weight:800;
}
label strong{color:#fff}
input[type=checkbox],
input[type=radio]{
  width:auto;
  min-height:auto;
  accent-color:var(--aio-accent);
}
.permission-pill{
  width:auto;
  gap:9px;
  text-transform:none;
  letter-spacing:0;
  font-size:13px;
}

/* Tables */
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--aio-border);
  border-radius:18px;
  background:rgba(1,9,29,.42);
}
th,td{
  padding:13px 14px;
  border-bottom:1px solid rgba(28,149,226,.16);
  color:var(--aio-muted);
  text-align:left;
  vertical-align:top;
}
th{
  color:#fff;
  background:rgba(9,36,83,.78);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
tr:hover td{background:rgba(28,149,226,.055);color:#dbe8fb}
tr:last-child td{border-bottom:0}
code,
pre{
  color:#dff8ff;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(28,149,226,.22);
  border-radius:10px;
}
code{padding:3px 7px}
pre{
  padding:14px;
  overflow:auto;
}

/* App-specific sections */
.dashboard-grid,
.analytics-grid,
.settings-grid,
.billing-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:16px;
}
.dashboard-grid > *,
.analytics-grid > *,
.settings-grid > *,
.billing-grid > *{grid-column:span 6}
.sidebar,
.topbar,
main,
.content{
  color:inherit;
}
hr{border:0;border-top:1px solid rgba(28,149,226,.22)}
.alert,
.notice{
  border-radius:16px;
  border:1px solid rgba(28,149,226,.28);
  background:rgba(9,36,83,.72);
  color:var(--aio-muted);
  padding:13px 16px;
}

/* Auth */
.aio-auth-shell{
  width:min(1120px, calc(100% - 32px));
  min-height:100vh;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) 440px;
  gap:24px;
  align-items:center;
  padding:44px 0;
}
.aio-auth-hero,
.aio-auth-panel{
  border:1px solid var(--aio-border);
  background:linear-gradient(145deg, rgba(9,36,83,.82), rgba(1,9,29,.88));
  border-radius:28px;
  box-shadow:var(--aio-shadow);
}
.aio-auth-hero{
  min-height:540px;
  padding:44px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:hidden;
  position:relative;
}
.aio-auth-hero:before{
  content:"";
  position:absolute;
  inset:0;
  background:url("../aio-brand/AIOBackground.png") center/cover no-repeat;
  opacity:.25;
}
.aio-auth-hero > *{position:relative}
.aio-auth-hero img{
  width:96px;
  height:96px;
  border-radius:24px;
  margin-bottom:26px;
  box-shadow:0 0 42px rgba(28,149,226,.54);
}
.aio-auth-hero span{
  color:var(--aio-cyan);
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.14em;
}
.aio-auth-hero h1{
  max-width:620px;
  margin:14px 0;
  color:#fff;
  font-size:clamp(38px,5vw,68px);
  line-height:.96;
  letter-spacing:-.055em;
}
.aio-auth-hero p{
  max-width:640px;
  margin:0;
  color:var(--aio-muted);
  font-size:18px;
}
.aio-auth-proof{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:28px;
}
.aio-auth-proof strong{
  padding:9px 12px;
  border-radius:999px;
  color:#fff;
  background:rgba(28,149,226,.16);
  border:1px solid rgba(40,216,255,.26);
}
.aio-auth-panel{
  padding:28px;
}

/* Utility */
.center{text-align:center}
.right{text-align:right}
.actions,
.button-row,
.public-button-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.empty-state{
  padding:28px;
  border:1px dashed rgba(28,149,226,.35);
  border-radius:20px;
  color:var(--aio-muted);
  background:rgba(255,255,255,.03);
}
::-webkit-scrollbar{width:12px;height:12px}
::-webkit-scrollbar-track{background:#01091d}
::-webkit-scrollbar-thumb{background:#0d52a0;border-radius:999px;border:3px solid #01091d}
::-webkit-scrollbar-thumb:hover{background:#1c95e2}

@media (max-width:1180px){
  .grid.four,.cards.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid.three,.cards.three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .aio-topbar-actions{display:none}
}
@media (max-width:900px){
  .aio-system-shell{grid-template-columns:1fr}
  .aio-system-sidebar{
    position:fixed;
    inset:0 auto 0 0;
    z-index:60;
    width:min(320px,86vw);
    transform:translateX(-105%);
    transition:.22s ease;
  }
  body.aio-menu-open .aio-system-sidebar{transform:translateX(0)}
  .aio-mobile-scrim{
    position:fixed;
    inset:0;
    z-index:50;
    background:rgba(0,0,0,.56);
    opacity:0;
    pointer-events:none;
    transition:.22s ease;
  }
  body.aio-menu-open .aio-mobile-scrim{opacity:1;pointer-events:auto}
  .aio-menu-button{display:inline-grid;place-items:center}
  .aio-system-topbar{padding:14px 18px}
  .aio-system-content{padding:20px 16px}
  .aio-flash-stack{padding:0 16px}
  .grid.two,.grid.three,.grid.four,.cards.two,.cards.three,.cards.four,.form-grid{grid-template-columns:1fr}
  .aio-auth-shell{grid-template-columns:1fr;padding:24px 0}
  .aio-auth-hero{min-height:auto;padding:30px}
}
@media (max-width:620px){
  .aio-system-content{padding:16px 12px}
  .card,.platform-page-hero{padding:18px !important}
  th,td{padding:11px 10px}
  .aio-auth-hero h1{font-size:40px}
}
