*{box-sizing:border-box}
:root{--nav:#354f83;--nav2:#263a66;--teal:#16b5aa;--ink:#1b3157;--muted:#71809a;--bg:#f3f6fb;--line:#e2e8f1}
html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;color:#1e2d47;background:var(--bg)}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 86% 4%,rgba(22,181,170,.10),transparent 25%),radial-gradient(circle at 12% 12%,rgba(53,79,131,.08),transparent 24%)}
.login-page{min-height:100vh;display:grid;place-items:center;padding:30px}
.login-box{width:min(930px,96vw);display:grid;grid-template-columns:1fr .9fr;overflow:hidden;border-radius:26px;box-shadow:0 26px 65px rgba(44,63,105,.20);background:white}
.login-brand{padding:56px;color:white;background:linear-gradient(145deg,#466298,#7186b3 55%,#1db7ac 130%)}
.brand{display:flex;gap:12px;align-items:center;font-size:18px;font-weight:800}.brand i{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.12);font-style:normal}
.login-brand h1{font-size:34px;line-height:1.4;margin:64px 0 16px}.login-brand p{line-height:1.9;color:rgba(255,255,255,.86)}
.login-form{padding:60px 52px}.login-form h2{font-size:29px;margin:0 0 8px;color:#20365f}
.muted{color:var(--muted);font-size:13px;line-height:1.65}
label{display:block;font-size:13px;font-weight:800;color:#2a3a57;margin:14px 0 7px}
input[type=text],input[type=email],input[type=password]{width:100%;height:44px;border:1px solid #dce4ef;border-radius:10px;padding:0 12px;background:#fff;outline:none}
input:focus{border-color:#738bb8;box-shadow:0 0 0 4px rgba(68,94,145,.09)}
.btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border:0;border-radius:10px;min-height:42px;padding:0 18px;font-weight:800;cursor:pointer;background:linear-gradient(90deg,#45669d,#18a99f);color:#fff}
.login-form form .btn{width:100%;margin-top:22px}
.notice{margin:18px 0 0;border-radius:12px;padding:12px 14px;font-size:13px}.notice.ok{background:#ecfaf6;color:#2d7862;border:1px solid #c8ebdf}.notice.err{background:#fff1f1;color:#a43f3f;border:1px solid #f0cccc}
@media(max-width:900px){.login-box{grid-template-columns:1fr}.login-brand{display:none}}

/* =========================================================
   HyperOmics Admin Console
   ========================================================= */

.admin-hero{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  padding:34px 38px;
  margin:8px 0 22px;
  border-radius:24px;
  color:#fff;
  background:
    radial-gradient(circle at 90% 20%,rgba(54,211,201,.35),transparent 30%),
    linear-gradient(120deg,#324f8c 0%,#496ba1 52%,#28aaa9 100%);
  box-shadow:0 18px 45px rgba(39,64,112,.16);
}

.admin-hero:after{
  content:"";
  position:absolute;
  width:260px;
  height:260px;
  right:-80px;
  bottom:-170px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
}

.admin-kicker,
.panel-eyebrow{
  font-size:11px;
  font-weight:800;
  letter-spacing:2px;
  opacity:.72;
}

.admin-hero h1{
  margin:8px 0 8px;
  font-size:30px;
  line-height:1.2;
}

.admin-hero p{
  margin:0;
  color:rgba(255,255,255,.86);
}

.admin-hero-badge{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  gap:9px;
  white-space:nowrap;
  padding:10px 16px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:999px;
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
  font-size:13px;
  font-weight:700;
}

.pulse-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#7fffd4;
  box-shadow:0 0 0 5px rgba(127,255,212,.14);
}


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

.stat-card{
  display:flex;
  align-items:center;
  gap:16px;
  padding:20px;
  border:1px solid #e7ecf4;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 28px rgba(33,54,94,.06);
}

.stat-icon{
  width:46px;
  height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  color:#315693;
  background:linear-gradient(145deg,#edf3ff,#e9faf8);
  font-size:21px;
  font-weight:800;
}

.stat-label{
  margin-bottom:3px;
  color:#75829a;
  font-size:12px;
  font-weight:700;
}

.stat-number{
  color:#17325c;
  font-size:26px;
  line-height:1;
  font-weight:800;
}


.admin-panel{
  margin-bottom:22px;
  padding:28px;
  border:1px solid #e6ebf3;
  border-radius:22px;
  background:#fff;
  box-shadow:0 10px 35px rgba(33,54,94,.065);
}

.panel-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:24px;
  padding-bottom:18px;
  border-bottom:1px solid #edf1f6;
}

.panel-eyebrow{
  color:#2ca9a6;
}

.panel-heading h2{
  margin:5px 0 5px;
  color:#19345e;
  font-size:22px;
}

.panel-heading p{
  margin:0;
  color:#77849a;
  font-size:13px;
}


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

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.field label{
  color:#31435f;
  font-size:13px;
  font-weight:700;
}

.field label span{
  color:#e45b6b;
}

.field input,
.field select{
  box-sizing:border-box;
  width:100%;
  height:44px;
  padding:0 13px;
  outline:none;
  border:1px solid #dce3ed;
  border-radius:10px;
  color:#263750;
  background:#fbfcfe;
  font-size:14px;
  transition:.18s ease;
}

.field input:focus,
.field select:focus{
  border-color:#45aaa9;
  background:#fff;
  box-shadow:0 0 0 4px rgba(50,173,169,.09);
}

.field small{
  color:#98a2b3;
  font-size:11px;
}


.permission-box{
  margin-top:22px;
  padding:20px;
  border:1px solid #e5ebf3;
  border-radius:16px;
  background:#f8fafc;
}

.permission-title strong{
  color:#28436f;
  font-size:14px;
}

.permission-title p{
  margin:4px 0 16px;
  color:#8792a5;
  font-size:12px;
}

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

.permission-option{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  cursor:pointer;
  border:1px solid #e1e7ef;
  border-radius:12px;
  background:#fff;
  transition:.18s ease;
}

.permission-option:hover{
  transform:translateY(-1px);
  border-color:#64b8b5;
  box-shadow:0 7px 18px rgba(48,92,130,.08);
}

.permission-option input{
  width:17px;
  height:17px;
  accent-color:#22a8a5;
}

.permission-option b{
  display:block;
  color:#29456f;
  font-size:13px;
}

.permission-option small{
  display:block;
  margin-top:3px;
  color:#9aa4b5;
  font-size:10px;
}

.form-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:22px;
}

.primary-action{
  min-width:145px;
  height:44px;
  border:0;
  border-radius:11px;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(110deg,#355c9a,#19aaa5);
  box-shadow:0 8px 20px rgba(36,132,154,.20);
  font-weight:800;
  font-size:14px;
}

.primary-action:hover{
  transform:translateY(-1px);
}


.users-heading{
  align-items:center;
}

.user-count{
  padding:8px 13px;
  border-radius:999px;
  color:#31568d;
  background:#edf3fb;
  font-size:12px;
  font-weight:800;
}

.table-wrap{
  width:100%;
  overflow-x:auto;
}

.users-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.users-table th{
  padding:12px 14px;
  border-bottom:1px solid #e3e9f1;
  color:#8490a4;
  background:#fafbfd;
  text-align:left;
  white-space:nowrap;
  font-size:11px;
  letter-spacing:.4px;
  text-transform:uppercase;
}

.users-table td{
  padding:16px 14px;
  border-bottom:1px solid #edf1f5;
  color:#35445d;
  vertical-align:middle;
}

.users-table tbody tr{
  transition:.15s ease;
}

.users-table tbody tr:hover{
  background:#fafcff;
}

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

.avatar{
  flex:0 0 38px;
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(145deg,#405e99,#32aaa8);
  font-weight:800;
}

.user-cell strong{
  display:block;
  color:#20395f;
}

.user-cell small{
  display:block;
  max-width:230px;
  margin-top:3px;
  overflow:hidden;
  color:#96a0b1;
  text-overflow:ellipsis;
}


.status-pill,
.role-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  white-space:nowrap;
  font-size:11px;
  font-weight:800;
}

.status-pill i{
  width:6px;
  height:6px;
  border-radius:50%;
}

.status-pill.active{
  color:#07846e;
  background:#e8f8f3;
}
.status-pill.active i{background:#18ad8e}

.status-pill.trial{
  color:#987008;
  background:#fff5d9;
}
.status-pill.trial i{background:#e5a91c}

.status-pill.expired,
.status-pill.disabled{
  color:#bd5060;
  background:#fff0f2;
}
.status-pill.expired i,
.status-pill.disabled i{background:#dc6473}

.role-pill{
  color:#52647d;
  background:#f0f3f7;
}

.admin-role{
  color:#6a4fb1;
  background:#f1ecff;
}

.trial-role{
  color:#9a7004;
  background:#fff5d9;
}


.app-tags{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  max-width:340px;
}

.app-tags span{
  padding:5px 8px;
  border-radius:7px;
  color:#365c91;
  background:#edf3fb;
  font-size:10px;
  font-weight:700;
}

.app-tags .admin-access{
  color:#087d73;
  background:#e8f8f5;
}

.app-tags .no-access{
  color:#9a6470;
  background:#f8eff1;
}

.expiry{
  white-space:nowrap;
  color:#586980;
}

.edit-button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 12px;
  border:1px solid #d9e2ee;
  border-radius:9px;
  color:#315a91;
  background:#fff;
  text-decoration:none;
  font-weight:800;
  transition:.16s ease;
}

.edit-button:hover{
  color:#fff;
  border-color:#315d98;
  background:#315d98;
}

.empty-table{
  padding:40px !important;
  color:#98a3b5 !important;
  text-align:center;
}


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

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

@media (max-width:720px){
  .admin-hero{
    align-items:flex-start;
    flex-direction:column;
    padding:26px 22px;
  }

  .admin-hero h1{
    font-size:24px;
  }

  .stats-grid,
  .form-grid,
  .permission-grid{
    grid-template-columns:1fr;
  }

  .admin-panel{
    padding:20px 16px;
  }
}
