:root{
  --bg:#08070d;
  --bg-2:#0d0b13;
  --surface:#11101a;
  --surface-2:#171522;
  --surface-3:#1d1a29;
  --text:#f7f7fb;
  --muted:#8f8da0;
  --border:rgba(255,255,255,.08);
  --primary:#ff2aa3;
  --primary-2:#b51772;
  --purple:#8b5cf6;
  --green:#39e29b;
  --yellow:#f6c453;
  --red:#ff6678;
  --shadow:0 16px 45px rgba(0,0,0,.35);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  min-height:100%;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
}

body{
  overflow-x:hidden;
}

button,input,select{
  font:inherit;
}

button{
  cursor:pointer;
}

.hidden{
  display:none!important;
}

.login-screen{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:24px;
  background:
    radial-gradient(circle at 50% 0%,rgba(255,42,163,.15),transparent 35%),
    radial-gradient(circle at 10% 90%,rgba(139,92,246,.11),transparent 35%),
    var(--bg);
}

.login-card{
  width:min(430px,100%);
  padding:34px;
  border:1px solid var(--border);
  border-radius:24px;
  background:linear-gradient(180deg,rgba(25,21,36,.96),rgba(12,10,18,.98));
  box-shadow:0 25px 80px rgba(0,0,0,.55);
}

.login-logo{
  width:180px;
  height:100px;
  margin:0 auto 8px;
  overflow:hidden;
  border-radius:18px;
}

.login-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.login-title{
  text-align:center;
  font-size:26px;
  font-weight:800;
  margin-top:12px;
}

.login-subtitle{
  text-align:center;
  color:var(--muted);
  margin:8px 0 28px;
}

.login-card label{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#c3bfd1;
  margin:16px 0 8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.login-card input{
  width:100%;
  height:48px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#0d0b14;
  color:var(--text);
  padding:0 14px;
  outline:none;
}

.login-card input:focus{
  border-color:rgba(255,42,163,.6);
  box-shadow:0 0 0 3px rgba(255,42,163,.08);
}

.primary-btn{
  width:100%;
  margin-top:22px;
  height:48px;
  border:0;
  border-radius:12px;
  color:#fff;
  font-weight:800;
  background:linear-gradient(135deg,var(--primary),#d61c86);
  box-shadow:0 12px 25px rgba(255,42,163,.22);
}

.primary-btn:hover{
  filter:brightness(1.08);
}

.login-error{
  min-height:20px;
  margin-top:12px;
  color:var(--red);
  font-size:13px;
  text-align:center;
}

.app-shell{
  display:flex;
  min-height:100vh;
  background:
    radial-gradient(circle at 75% 0%,rgba(139,92,246,.07),transparent 26%),
    var(--bg);
}

.sidebar{
  width:260px;
  flex:0 0 260px;
  min-height:100vh;
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid var(--border);
  background:linear-gradient(180deg,#0d0b13 0%,#09080d 100%);
  z-index:20;
}

.sidebar-brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding:18px 18px 20px;
  border-bottom:1px solid var(--border);
}

.sidebar-logo{
  width:60px;
  height:48px;
  border-radius:12px;
  overflow:hidden;
  flex:0 0 60px;
}

.sidebar-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.brand-name{
  font-size:24px;
  font-weight:900;
  letter-spacing:.04em;
  line-height:1;
}

.brand-sub{
  color:var(--muted);
  font-size:11px;
  margin-top:4px;
}

.nav{
  flex:1;
  padding:14px 12px;
  overflow:auto;
}

.nav-item{
  width:100%;
  border:0;
  background:transparent;
  color:#aaa6b8;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  padding:12px 14px;
  margin:2px 0;
  border-radius:12px;
  font-size:14px;
  font-weight:650;
}

.nav-item span{
  width:22px;
  text-align:center;
  font-size:17px;
}

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

.nav-item.active{
  color:#fff;
  background:linear-gradient(90deg,rgba(255,42,163,.18),rgba(139,92,246,.09));
  box-shadow:inset 3px 0 0 var(--primary),0 7px 22px rgba(255,42,163,.06);
}

.nav-section-title{
  color:#5f5b6c;
  font-size:10px;
  font-weight:800;
  letter-spacing:.13em;
  padding:16px 14px 7px;
}

.sidebar-bottom{
  padding:14px;
  border-top:1px solid var(--border);
}

.logged-user{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.avatar{
  width:38px;
  height:38px;
  border-radius:12px;
  display:flex;
  justify-content:center;
  align-items:center;
  font-weight:900;
  background:linear-gradient(135deg,var(--primary),var(--purple));
}

.logged-info{
  min-width:0;
  display:flex;
  flex-direction:column;
}

.logged-info strong{
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.logged-info small{
  color:var(--muted);
  font-size:10px;
  margin-top:3px;
}

.logout-btn{
  width:100%;
  height:40px;
  border-radius:10px;
  border:1px solid var(--border);
  color:#bbb7c7;
  background:#0e0c14;
}

.main{
  width:calc(100% - 260px);
  margin-left:260px;
  min-width:0;
}

.topbar{
  position:sticky;
  top:0;
  z-index:15;
  min-height:84px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:18px 28px;
  background:rgba(8,7,13,.87);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--border);
}

.page-eyebrow{
  color:var(--primary);
  font-size:10px;
  font-weight:900;
  letter-spacing:.18em;
}

.topbar h1{
  margin:3px 0 0;
  font-size:25px;
}

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

.ghost-btn{
  height:40px;
  padding:0 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface);
  color:#d6d2de;
}

.status-pill{
  display:flex;
  align-items:center;
  gap:7px;
  height:40px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid rgba(57,226,155,.15);
  background:rgba(57,226,155,.05);
  color:#bdeed7;
  font-size:12px;
}

.status-pill i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 12px var(--green);
}

.content{
  padding:26px 28px 36px;
}

.grid{
  display:grid;
  gap:18px;
}

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

.kpi{
  position:relative;
  min-height:142px;
  padding:20px;
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(145deg,var(--surface),#0f0e16);
  overflow:hidden;
}

.kpi:after{
  content:"";
  position:absolute;
  right:-35px;
  top:-35px;
  width:100px;
  height:100px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,42,163,.17),transparent 70%);
}

.kpi-label{
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.07em;
  font-weight:700;
}

.kpi-value{
  margin-top:13px;
  font-size:34px;
  line-height:1;
  font-weight:900;
}

.kpi-meta{
  margin-top:12px;
  font-size:11px;
  color:#aaa5b7;
}

.two-col{
  grid-template-columns:1.45fr 1fr;
}

.card{
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(145deg,var(--surface),#0e0d14);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  padding:18px 20px;
  border-bottom:1px solid var(--border);
}

.card-title{
  font-weight:800;
  font-size:14px;
}

.card-subtitle{
  color:var(--muted);
  font-size:11px;
  margin-top:4px;
}

.card-body{
  padding:20px;
}

.filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.filter-row input,
.filter-row select{
  height:40px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#0d0b14;
  color:#e9e6ef;
  padding:0 12px;
  outline:none;
}

.filter-row input{
  min-width:220px;
}

.chart-wrap{
  min-height:290px;
}

.chart{
  width:100%;
  height:290px;
}

.legend-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:15px;
}

.legend-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  color:#bdb8c8;
}

.legend-left{
  display:flex;
  align-items:center;
  gap:8px;
}

.dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--primary);
  box-shadow:0 0 9px rgba(255,42,163,.45);
}

.dot.purple{
  background:var(--purple);
}

.dot.green{
  background:var(--green);
}

.dot.yellow{
  background:var(--yellow);
}

.donut-wrap{
  display:flex;
  align-items:center;
  gap:25px;
  min-height:260px;
}

.donut{
  width:190px;
  height:190px;
  border-radius:50%;
  position:relative;
  background:conic-gradient(var(--primary) 0 40%,var(--purple) 40% 70%,var(--green) 70% 90%,var(--yellow) 90% 100%);
  flex:0 0 190px;
}

.donut:after{
  content:"";
  position:absolute;
  inset:33px;
  border-radius:50%;
  background:var(--surface);
}

.donut-center{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
}

.donut-center strong{
  font-size:26px;
}

.donut-center span{
  font-size:10px;
  color:var(--muted);
  text-transform:uppercase;
}

.bar-list{
  display:flex;
  flex-direction:column;
  gap:15px;
}

.bar-item{
  display:grid;
  grid-template-columns:120px 1fr 45px;
  gap:10px;
  align-items:center;
}

.bar-label{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color:#c5c1cc;
  font-size:12px;
}

.bar-track{
  height:9px;
  border-radius:20px;
  background:#0a0910;
  overflow:hidden;
}

.bar-fill{
  height:100%;
  border-radius:20px;
  background:linear-gradient(90deg,var(--primary),var(--purple));
  box-shadow:0 0 14px rgba(255,42,163,.2);
}

.bar-value{
  text-align:right;
  font-size:12px;
  color:#aaa5b7;
}

.table-wrap{
  overflow:auto;
}

table{
  width:100%;
  border-collapse:collapse;
}

th{
  text-align:left;
  padding:13px 15px;
  color:#787383;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.08em;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
}

td{
  padding:14px 15px;
  border-bottom:1px solid rgba(255,255,255,.055);
  color:#d8d5df;
  font-size:12px;
  vertical-align:middle;
}

tr:hover td{
  background:rgba(255,255,255,.02);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:25px;
  padding:0 9px;
  border-radius:20px;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
}

.badge.green{
  color:#8ef0c5;
  background:rgba(57,226,155,.09);
  border:1px solid rgba(57,226,155,.12);
}

.badge.pink{
  color:#ff9dcd;
  background:rgba(255,42,163,.09);
  border:1px solid rgba(255,42,163,.12);
}

.badge.yellow{
  color:#f8d783;
  background:rgba(246,196,83,.08);
  border:1px solid rgba(246,196,83,.12);
}

.badge.red{
  color:#ff9aa8;
  background:rgba(255,102,120,.08);
  border:1px solid rgba(255,102,120,.12);
}

.page-toolbar{
  margin-bottom:18px;
}

.empty{
  padding:50px 20px;
  text-align:center;
  color:var(--muted);
}

.loading{
  padding:40px;
  text-align:center;
  color:var(--muted);
}

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

.form-card{
  padding:20px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface);
}

.form-card h3{
  margin:0 0 6px;
}

.form-card p{
  color:var(--muted);
  font-size:12px;
  margin:0 0 18px;
}

.form-card label{
  display:block;
  margin:12px 0 7px;
  color:#aaa5b7;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.form-card input,
.form-card select{
  width:100%;
  height:42px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#0c0a12;
  color:#eeeaf4;
  padding:0 12px;
  outline:none;
}

.form-actions{
  margin-top:16px;
}

.small-btn{
  height:34px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#14111d;
  color:#ddd9e4;
  font-size:11px;
}

.small-btn.pink{
  border-color:rgba(255,42,163,.25);
  background:rgba(255,42,163,.08);
  color:#ff9dcd;
}

.toast{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:100;
  min-width:250px;
  max-width:360px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#171421;
  box-shadow:var(--shadow);
  font-size:12px;
}

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

  .two-col{
    grid-template-columns:1fr;
  }

  .account-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:800px){
  .sidebar{
    width:78px;
    flex-basis:78px;
  }

  .main{
    width:calc(100% - 78px);
    margin-left:78px;
  }

  .sidebar-brand{
    justify-content:center;
    padding:15px 10px;
  }

  .sidebar-brand>div:last-child,
  .nav-item:not(.active)::after,
  .nav-item span+*{
    display:none;
  }

  .nav-item{
    justify-content:center;
    padding:12px 8px;
  }

  .nav-item span{
    margin:0;
  }

  .nav-section-title{
    text-align:center;
    font-size:0;
  }

  .nav-section-title:after{
    content:"•";
    font-size:13px;
  }

  .logged-user{
    justify-content:center;
  }

  .logged-info{
    display:none;
  }

  .content{
    padding:18px 15px 28px;
  }

  .topbar{
    padding:15px;
  }

  .topbar h1{
    font-size:20px;
  }

  .status-pill{
    display:none;
  }
}


@media(max-width:560px){
  body{
    overflow-x:hidden;
  }

  .sidebar{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    top:auto;
    width:100%;
    height:64px;
    flex-basis:auto;
    z-index:1000;
    border-right:0;
    border-top:1px solid var(--border);
    display:flex;
    padding:0;
  }

  .sidebar-brand,
  .sidebar-bottom{
    display:none;
  }

  .sidebar .nav{
    width:100%;
    height:100%;
    display:flex;
    align-items:stretch;
    justify-content:space-around;
    overflow:hidden;
  }

  .sidebar .nav-item{
    flex:1;
    min-width:0;
    height:64px;
    padding:6px 2px;
    margin:0;
    border-radius:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
  }

  .sidebar .nav-item span{
    display:block;
    margin:0;
    font-size:18px;
    line-height:20px;
  }

  .sidebar .nav-item:not(.active)::after{
    display:none;
  }

  .sidebar .nav-item{
    font-size:9px;
    white-space:nowrap;
    overflow:hidden;
  }

  .sidebar .nav-item[data-page="accounts"],
  .sidebar .nav-item[data-page="collaborators"],
  .sidebar .nav-item[data-page="users"],
  .sidebar .nav-item[data-page="account"]{
    display:none;
  }

  #adminNavBlock .nav-section-title,
  .nav > .nav-section-title{
    display:none;
  }

  .main{
    width:100%;
    margin-left:0;
    padding-bottom:64px;
  }

  .topbar{
    padding:12px;
  }

  .topbar h1{
    font-size:18px;
  }

  .topbar-right .ghost-btn{
    font-size:0;
    width:40px;
    padding:0;
  }

  .topbar-right .ghost-btn:after{
    content:"↻";
    font-size:18px;
  }

  .content{
    padding:12px;
  }

  .kpi-grid{
    grid-template-columns:1fr;
  }

  .two-col,
  .account-grid{
    grid-template-columns:1fr;
  }

  .filter-row{
    flex-direction:column;
    align-items:stretch;
  }

  .filter-row input{
    width:100%;
    min-width:0;
  }

  .donut-wrap{
    flex-direction:column;
  }

  .bar-item{
    grid-template-columns:80px 1fr 32px;
  }

  .table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  table{
    min-width:650px;
  }

  .toast{
    left:12px;
    right:12px;
    bottom:76px;
    min-width:0;
    max-width:none;
  }
}

/* =========================================================
   MOBILE RESPONSIVE FIX - 2026
   ========================================================= */

@media (max-width: 700px){

  html,
  body{
    width:100%;
    min-width:0;
    max-width:100%;
    overflow-x:hidden;
  }

  body{
    min-height:100vh;
  }

  .app-shell{
    display:block !important;
    position:relative;
    width:100% !important;
    min-width:0 !important;
    min-height:100vh !important;
    height:auto !important;
    overflow:visible !important;
  }

  .sidebar{
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    top:auto !important;
    bottom:0 !important;

    width:100% !important;
    height:64px !important;
    min-height:64px !important;
    max-height:64px !important;

    margin:0 !important;
    padding:0 !important;

    display:block !important;
    flex:none !important;

    z-index:9999 !important;

    border:0 !important;
    border-top:1px solid var(--border) !important;

    background:rgba(8,7,13,.98) !important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);

    overflow:hidden !important;
  }

  .sidebar-brand,
  .sidebar-bottom{
    display:none !important;
  }

  .sidebar .nav{
    width:100% !important;
    height:64px !important;
    min-height:64px !important;

    display:flex !important;
    flex-direction:row !important;
    align-items:stretch !important;
    justify-content:space-around !important;

    padding:0 !important;
    margin:0 !important;

    overflow:hidden !important;
  }

  .sidebar .nav-item{
    display:flex !important;
    flex:1 1 0 !important;

    width:auto !important;
    min-width:0 !important;
    max-width:none !important;

    height:64px !important;
    min-height:64px !important;

    margin:0 !important;
    padding:5px 2px !important;

    border:0 !important;
    border-radius:0 !important;

    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:2px !important;

    font-size:9px !important;
    line-height:11px !important;

    white-space:nowrap !important;
    overflow:hidden !important;
  }

  .sidebar .nav-item span{
    display:block !important;

    width:auto !important;
    height:auto !important;

    margin:0 !important;
    padding:0 !important;

    font-size:18px !important;
    line-height:20px !important;
  }

  .sidebar .nav-item:not(.active)::after{
    display:none !important;
  }

  .sidebar .nav-section-title{
    display:none !important;
  }

  .sidebar .nav-item[data-page="accounts"],
  .sidebar .nav-item[data-page="collaborators"],
  .sidebar .nav-item[data-page="users"],
  .sidebar .nav-item[data-page="account"]{
    display:none !important;
  }

  .main{
    display:block !important;

    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;

    margin:0 !important;
    padding:0 0 64px 0 !important;

    position:relative !important;
    overflow:visible !important;
  }

  .topbar{
    position:sticky !important;
    top:0 !important;

    width:100% !important;
    min-width:0 !important;
    min-height:64px !important;

    padding:12px 14px !important;

    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;

    gap:10px !important;

    z-index:100 !important;

    overflow:hidden !important;
  }

  .topbar h1{
    margin:0 !important;

    max-width:65% !important;

    font-size:18px !important;
    line-height:22px !important;

    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .topbar-right{
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
  }

  .topbar-right .status-pill{
    display:none !important;
  }

  .topbar-right .ghost-btn{
    width:40px !important;
    min-width:40px !important;
    height:38px !important;

    padding:0 !important;

    font-size:0 !important;
  }

  .topbar-right .ghost-btn::after{
    content:"↻";
    display:block;
    font-size:18px;
    line-height:1;
  }

  .content{
    display:block !important;

    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;

    margin:0 !important;

    padding:14px 12px 28px !important;

    overflow:visible !important;
  }

  .grid{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  .kpi-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100% !important;
    min-width:0 !important;
  }

  .two-col,
  .account-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100% !important;
    min-width:0 !important;
  }

  .card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }

  .card-header{
    flex-wrap:wrap !important;
    gap:8px !important;
  }

  .table-wrap,
  .table-container,
  .table-scroll{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  table{
    min-width:620px;
  }

  .chart,
  .chart-wrap,
  .chart-container{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }

  svg{
    max-width:100%;
  }

  input,
  select,
  textarea,
  button{
    max-width:100%;
  }

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

  .actions,
  .filters,
  .toolbar{
    width:100% !important;
    max-width:100% !important;
    flex-wrap:wrap !important;
  }

  .modal{
    max-width:calc(100vw - 24px) !important;
    width:calc(100vw - 24px) !important;
  }

  .login-screen{
    width:100% !important;
    min-height:100vh !important;
    padding:16px !important;
  }

  .login-card{
    width:100% !important;
    max-width:420px !important;
  }
}

@media (max-width: 420px){

  .sidebar .nav-item{
    font-size:8px !important;
    padding-left:1px !important;
    padding-right:1px !important;
  }

  .sidebar .nav-item span{
    font-size:17px !important;
  }

  .topbar{
    min-height:58px !important;
    padding:10px 12px !important;
  }

  .topbar h1{
    font-size:17px !important;
  }

  .content{
    padding:12px 10px 24px !important;
  }

  .kpi-grid{
    gap:12px !important;
  }

  .card{
    border-radius:10px !important;
  }
}

