*{box-sizing:border-box}
:root{--bg:#070708;--panel:#0d0d0f;--panel2:#121215;--line:#242429;--red:#c91f32;--red2:#8e1423;--text:#f5f5f6;--muted:#8d8d96}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{min-height:100vh}
a{text-decoration:none;color:inherit}
button,input{font:inherit}
.authwrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 10%,#26070d 0,transparent 35%),#070708}
.authcard{width:min(440px,100%);background:rgba(14,14,16,.96);border:1px solid #29292e;border-radius:24px;padding:38px;box-shadow:0 30px 100px #000}
.authcard.wide{width:min(520px,100%)}
.logo,.brand span{display:grid;place-items:center;background:linear-gradient(145deg,#e72b43,#82101f);color:#fff;font-weight:900}
.logo{width:52px;height:52px;border-radius:15px;margin-bottom:28px;font-size:24px;box-shadow:0 10px 30px #8e142355}
h1{font-size:30px;margin:6px 0 10px;letter-spacing:-.8px}
h2{margin:6px 0 8px}
.eyebrow{font-size:11px;letter-spacing:2px;color:#e3475a;font-weight:800}
.muted,.fine{color:var(--muted);line-height:1.55}
.fine{font-size:12px;text-align:center;margin-top:22px}
label{display:block;color:#c8c8ce;font-size:13px;font-weight:650;margin:19px 0 8px}
input{width:100%;border:1px solid #2b2b31;background:#09090b;color:#fff;border-radius:11px;padding:13px 14px;outline:none}
input:focus{border-color:#a51b2c;box-shadow:0 0 0 3px #a51b2c22}
.primary{width:100%;border:0;border-radius:11px;padding:13px 16px;margin-top:22px;background:linear-gradient(135deg,#d9253a,#9c1627);color:white;font-weight:750;cursor:pointer}
.primary:hover{filter:brightness(1.12)}
.linkbtn{display:block;text-align:center}
.emailfield,.copyrow{display:flex;align-items:center}
.emailfield input{border-radius:11px 0 0 11px}
.emailfield span{height:45px;display:flex;align-items:center;padding:0 13px;background:#17171b;border:1px solid #2b2b31;border-left:0;border-radius:0 11px 11px 0;color:#aaa}
.error{color:#ff6979}
.shell{display:grid;grid-template-columns:245px 1fr;min-height:100vh}
aside{position:relative;border-right:1px solid var(--line);padding:22px 14px;background:#09090b}
.brand{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:800;padding:0 10px}
.brand span{width:31px;height:31px;border-radius:9px}
.compose{width:100%;margin:28px 0 16px;padding:12px;border:1px solid #7d1523;border-radius:11px;background:#2b0b11;color:#ffb6bf;font-weight:700}
.nav{display:flex;align-items:center;gap:11px;padding:10px 12px;margin:3px 0;border-radius:9px;color:#9c9ca5;font-size:14px}
.nav b{margin-left:auto}
.nav:hover,.nav.active{background:#19191d;color:#fff}
.nav.active{border-left:2px solid #d9253a}
.account{position:absolute;left:14px;right:14px;bottom:20px;padding:14px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:4px}
.account small{color:var(--muted)}
.account a{color:#e3475a;font-size:12px;margin-top:7px}
main{min-width:0}
header{height:72px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 30px;gap:20px}
.search{max-width:560px;background:#101013}
.avatar{margin-left:auto;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#76111f;font-weight:800}
.mailhead{display:flex;justify-content:space-between;align-items:center;padding:34px 38px 22px;border-bottom:1px solid var(--line)}
.mailhead h1{margin:3px 0}
.iconbtn,.secondary{border:1px solid var(--line);background:#111114;color:#ddd;border-radius:9px;padding:9px 12px}
.empty{min-height:60vh;display:grid;place-items:center;align-content:center;text-align:center;color:var(--muted)}
.empty h2{color:#eee}
.mailicon{font-size:34px;width:70px;height:70px;border-radius:50%;display:grid;place-items:center;background:#170b0e;border:1px solid #48131c;color:#dc3348}
.adminwrap{max-width:1100px;margin:auto;padding:30px}
.topbar,.adminhero{display:flex;align-items:center;justify-content:space-between}
.adminhero{margin:65px 0 25px}
.fit{width:auto;margin:0}
.tablecard{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--panel)}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:15px;border-bottom:1px solid var(--line);font-size:13px}
th{color:#8d8d96;background:#111114}
.modal{position:fixed;inset:0;background:#000b;display:grid;place-items:center;padding:20px}
.modal.hidden{display:none}
.modalcard{width:min(480px,100%);background:#101012;border:1px solid #34343a;border-radius:20px;padding:28px;box-shadow:0 30px 100px #000}
.copyrow input{border-radius:10px 0 0 10px}
.copyrow button{align-self:stretch;border:1px solid #333;border-left:0;border-radius:0 10px 10px 0;background:#1b1b20;color:#fff;padding:0 14px;cursor:pointer}
.modalok{display:block;width:120px;margin:28px auto 0}
@media(max-width:720px){.shell{grid-template-columns:76px 1fr}aside{padding:15px 8px}.brand{font-size:0;padding:0 12px}.compose{font-size:0}.compose:first-letter{font-size:20px}.nav{font-size:0;justify-content:center}.account{display:none}.mailhead{padding:25px 20px}header{padding:0 15px}.adminhero{align-items:flex-start;gap:20px;flex-direction:column}}

/* Veyrix Mail Settings */
.settingswrap{
  max-width:1100px;
  margin:auto;
  padding:30px;
}
.settingshero{
  margin:65px 0 28px;
}
.settingshero h1{
  margin-bottom:6px;
}
.settingsgrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:start;
}
.settingscard{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:18px;
  padding:26px;
}
.securitybox h2{
  margin-top:5px;
}
.actionbutton{
  display:inline-block;
  margin-top:18px;
  cursor:pointer;
}
.dangerbtn{
  width:100%;
  border:1px solid #72202b;
  border-radius:11px;
  padding:13px 16px;
  margin-top:22px;
  background:#250b10;
  color:#ff7a8b;
  font-weight:750;
  cursor:pointer;
}
.dangerbtn:hover{
  background:#321016;
}
.qrwrap{
  width:220px;
  height:220px;
  margin:26px auto;
  padding:12px;
  background:white;
  border-radius:16px;
}
.qrwrap img{
  display:block;
  width:100%;
  height:100%;
}
.secretbox{
  padding:13px;
  border:1px solid #303036;
  border-radius:10px;
  background:#09090b;
  color:#ddd;
  text-align:center;
  word-break:break-all;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:13px;
}
.cancelsetup{
  display:block;
  margin-top:20px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}
.cancelsetup:hover{
  color:white;
}

@media(max-width:800px){
  .settingsgrid{
    grid-template-columns:1fr;
  }
  .settingswrap{
    padding:20px;
  }
}

/* =========================================================
   Veyrix Mail — Admin Management V2
   ========================================================= */

.adminwrap{
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
  padding:28px 0 70px;
}

.adminhero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin:28px 0 22px;
  padding:30px;
  border:1px solid #29292f;
  border-radius:20px;
  background:
    radial-gradient(circle at 90% 0%,rgba(190,25,47,.12),transparent 38%),
    linear-gradient(145deg,#111114,#0b0b0d);
}

.adminhero h1{
  margin:5px 0 7px;
  font-size:30px;
}

.adminhero .muted{
  margin:0;
}

.admin-grid{
  display:grid;
  grid-template-columns:1.4fr .8fr;
  gap:18px;
  margin-bottom:40px;
}

.admin-card{
  position:relative;
  padding:26px;
  overflow:hidden;
  border:1px solid #29292f;
  border-radius:18px;
  background:
    radial-gradient(circle at 100% 0%,rgba(201,31,50,.08),transparent 40%),
    #0d0d10;
}

.admin-card::before{
  content:"";
  position:absolute;
  top:0;
  left:22px;
  right:22px;
  height:1px;
  background:linear-gradient(90deg,transparent,#8f2435,transparent);
}

.admin-card h2{
  margin:5px 0 7px;
  font-size:20px;
}

.admin-card .muted{
  margin:0;
  font-size:13px;
}

.admin-email-form{
  margin-top:25px;
}

.admin-email-row{
  display:flex;
  gap:10px;
  margin-top:8px;
}

.admin-email-row input{
  flex:1;
  min-width:0;
}

.admin-email-row .primary{
  width:auto;
  min-width:125px;
  margin:0;
}

.root-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.root-badge{
  display:inline-flex;
  margin-top:auto;
  padding:7px 10px;
  border:1px solid #55202a;
  border-radius:999px;
  background:#1b0c10;
  color:#e56c7a;
  font-size:11px;
  font-weight:800;
}

.admin-section{
  margin-top:35px;
}

.section-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  margin-bottom:14px;
}

.section-heading h2{
  margin:4px 0 0;
  font-size:20px;
}

.section-heading .muted{
  margin:7px 0 0;
  font-size:13px;
}

.count-badge{
  display:grid;
  place-items:center;
  min-width:31px;
  height:31px;
  padding:0 9px;
  border:1px solid #2e2e34;
  border-radius:9px;
  background:#111114;
  color:#b8b8c0;
  font-size:12px;
  font-weight:800;
}

.tablecard{
  overflow:hidden;
  border:1px solid #29292f;
  border-radius:16px;
  background:#0d0d10;
}

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

.tablecard th,
.tablecard td{
  padding:16px 18px;
  border-bottom:1px solid #202025;
  text-align:left;
}

.tablecard th{
  color:#74747d;
  font-size:10px;
  font-weight:800;
  letter-spacing:.7px;
  text-transform:uppercase;
}

.tablecard tbody tr:last-child td{
  border-bottom:0;
}

.usercell{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.usercell strong{
  color:#eee;
  font-size:13px;
}

.usercell small{
  color:#777780;
  font-size:11px;
}

.status{
  display:inline-flex;
  align-items:center;
  padding:6px 9px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.5px;
}

.status.pending{
  border:1px solid #4c3d18;
  background:#171309;
  color:#c9a847;
}

.status.admin{
  border:1px solid #54202a;
  background:#1b0b0f;
  color:#e36a78;
}

.status.root{
  border:1px solid #762332;
  background:#260c12;
  color:#ff8290;
}

.actioncell{
  text-align:right !important;
}

.danger-small{
  padding:8px 11px;
  border:1px solid #552029;
  border-radius:8px;
  background:#18090c;
  color:#e96877;
  font-size:11px;
  font-weight:750;
  cursor:pointer;
  transition:.15s ease;
}

.danger-small:hover{
  border-color:#8b2634;
  background:#260d12;
  color:#ff9aa6;
}

.protected{
  color:#66666f;
  font-size:11px;
}

.emptyrow{
  padding:30px !important;
  text-align:center !important;
  color:#707078;
}

.confirm-card{
  max-width:430px;
  text-align:center;
}

.warning-icon{
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  margin:0 auto 20px;
  border:1px solid #702330;
  border-radius:50%;
  background:#240c11;
  color:#ff6679;
  font-size:20px;
  font-weight:900;
}

.danger-confirm{
  width:100%;
  margin-top:20px;
  padding:13px;
  border:1px solid #802434;
  border-radius:10px;
  background:#a2182b;
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:.15s ease;
}

.danger-confirm:hover{
  background:#bd1d32;
}

.cancel-confirm{
  width:100%;
  margin-top:9px;
  cursor:pointer;
}

@media(max-width:760px){
  .adminwrap{
    width:min(100% - 24px,1180px);
  }

  .adminhero{
    align-items:flex-start;
    flex-direction:column;
  }

  .adminhero .primary{
    width:100%;
  }

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

  .admin-email-row{
    flex-direction:column;
  }

  .admin-email-row .primary{
    width:100%;
  }

  .tablecard{
    overflow-x:auto;
  }
}

/* Admin V3 */

.status.claimed{
  border:1px solid #214d36;
  background:#0d1b13;
  color:#67c88e;
}

.status.member{
  border:1px solid #35353c;
  background:#151518;
  color:#a7a7b0;
}

.admin-section + .admin-section{
  margin-top:42px;
}

.tablecard tbody tr{
  transition:background .12s ease;
}

.tablecard tbody tr:hover{
  background:#111115;
}


/* =========================================================
   Veyrix Mail - Admin V4
   ========================================================= */

.accounts-section{
  margin:24px 0 34px !important;
}

.accounts-section .section-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:14px;
}

.accounts-section .section-heading h2{
  margin:4px 0 5px;
  font-size:22px;
  line-height:1.2;
}

.accounts-section .section-heading .muted{
  margin:0;
  color:#8d8d96;
  font-size:13px;
}

.accounts-section .count-badge{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:30px;
  padding:0 10px;
  border:1px solid #303037;
  border-radius:999px;
  background:#141417;
  color:#b8b8c1;
  font-size:11px;
  font-weight:800;
}

.accounts-section .tablecard{
  overflow:hidden;
  border:1px solid #28282e;
  border-radius:16px;
  background:#0d0d10;
}

.accounts-section table{
  width:100%;
  border-collapse:collapse;
}

.accounts-section thead{
  background:#111114;
}

.accounts-section th{
  padding:15px 16px;
  color:#80808b;
  font-size:10px;
  font-weight:800;
  letter-spacing:.6px;
  text-transform:uppercase;
}

.accounts-section td{
  padding:16px;
  border-top:1px solid #232328;
  vertical-align:middle;
}

.accounts-section tbody tr{
  transition:background .15s ease;
}

.accounts-section tbody tr:hover{
  background:#111115;
}

.accounts-section .usercell strong{
  color:#f0f0f3;
  font-size:13px;
}

.accounts-section .usercell small{
  margin-top:3px;
  color:#74747d;
  font-size:11px;
}

.delete-account-form{
  display:flex;
  justify-content:flex-end;
  margin:0;
}

.tablecard .delete-account-btn{
  -webkit-appearance:none;
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  height:32px;
  padding:0 13px;
  border:1px solid #6d2430;
  border-radius:8px;
  outline:none;
  background:
    linear-gradient(180deg,#261015,#190b0e);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03);
  color:#ee7180;
  font-family:inherit;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .15s ease;
}

.tablecard .delete-account-btn:hover{
  border-color:#a02e40;
  background:
    linear-gradient(180deg,#36131a,#240d12);
  color:#ff98a4;
}

.tablecard .delete-account-btn:active{
  transform:translateY(1px);
}

.accounts-section .actioncell{
  width:120px;
  text-align:right !important;
}

.accounts-section .status{
  white-space:nowrap;
}

@media(max-width:760px){
  .accounts-section .tablecard{
    overflow-x:auto;
  }

  .accounts-section table{
    min-width:700px;
  }
}
