/* AUMORRIX AGI TECH Mail · premium look (loaded last). Navy side and top, white inbox, gold Compose. Looks only. */
:root {
  --ax-navy: #0b1f4d;
  --ax-navy2: #13306b;
  --ax-navy3: #1c3f86;
  --ax-gold: #f2b84b;
  --ax-gold2: #e3a52f;
  --ax-blue: #2563eb;
  --teal: #2563eb;
  --teal2: #1d4ed8;
  --teal3: #eaf1ff;
  --coral: #e3a52f;
  --coral2: #c98f22;
  --bg: #0b1f4d;
  --card: #ffffff;
  --line: #e6eaf2;
  --text: #0f172a;
  --muted: #5b6678;
  --label: #334155;
  --chip: #f1f4f9;
  --hover: #f7f9fc;
  --sel: #eaf1ff;
  --body: 'Inter', 'Nunito Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
}
:root[data-theme='dark'] {
  --card: #111c30;
  --line: #22314d;
  --text: #e8eef8;
  --muted: #9fb0c8;
  --label: #c8d4e6;
  --chip: #1a2740;
  --hover: #15223a;
  --sel: #1b2f55;
  --teal3: #1b2f55;
  --bg: #071433;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='dark']) {
    --bg: #0b1f4d;
    --card: #ffffff;
    --line: #e6eaf2;
    --text: #0f172a;
    --muted: #5b6678;
    --label: #334155;
    --chip: #f1f4f9;
    --hover: #f7f9fc;
    --sel: #eaf1ff;
    --teal3: #eaf1ff;
  }
}
body {
  font-family: var(--body);
}
.btn-p {
  background: var(--ax-blue);
}
.btn-p:hover {
  background: #1d4ed8;
}
.inp:focus {
  border-color: var(--ax-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* ---------- app frame ---------- */
#app {
  background: linear-gradient(180deg, #0b1f4d 0%, #0a1a40 100%);
  grid-template-rows: 70px auto 1fr;
}
.topbar {
  background: transparent;
  border-bottom: 0;
  color: #fff;
  padding: 0 22px;
  gap: 18px;
}
.topbar .mbrand {
  gap: 10px;
  min-width: 228px;
}
.topbar .mbrand .mlogo,
#login .mlogo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  padding: 2px;
  box-shadow: none;
}
.mlogo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.topbar .mname {
  font-family: var(--body);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.05;
}
.topbar .mname small {
  color: #c9d4ea;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  font-weight: 700;
}
.mpill {
  margin-left: 6px;
  background: var(--ax-gold);
  color: #1d1505;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 8px;
}
.search {
  max-width: 620px;
}
.search input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding-right: 130px;
  border-radius: 12px;
}
.search input::placeholder {
  color: #c4cfe4;
}
.search input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}
.search > svg {
  color: #c4cfe4;
}
.search kbd {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--body);
  font-size: 11.5px;
  color: #d6def0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 2px 7px;
}
.adv-b {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #d6def0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.adv-b:hover {
  background: rgba(255, 255, 255, 0.12);
}
.adv-b svg {
  position: static;
  transform: none;
  width: 18px;
  height: 18px;
  color: inherit;
}
.topbar .ib {
  color: #e4eaf6;
}
.topbar .ib:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.bell {
  position: relative;
  margin-left: auto;
}
.bell svg {
  width: 22px;
  height: 22px;
}
.bcnt {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.me {
  margin-left: 0;
  position: relative;
}
.mebtn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 10px;
}
.mebtn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.me .who {
  display: flex;
  flex-direction: column;
  text-align: right;
}
.me .who b {
  color: #fff;
}
.me .who small {
  color: #c4cfe4;
}
.me .av {
  background: var(--ax-gold) !important;
  color: #1d1505;
}
.car {
  width: 16px;
  height: 16px;
  color: #c4cfe4;
}
.mepop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
  padding: 6px;
  z-index: 70;
}
.mpi {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}
.mpi:hover {
  background: var(--chip);
}
.mpi.bad {
  color: #dc2626;
}

/* advanced search panel */
.advp {
  margin: 0 22px 10px 272px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.5);
}
.advg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}
.advg label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--label);
}
.advg .ack {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  white-space: nowrap;
}
.adva {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.advon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #fff7e6;
  color: #8a5a00;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

/* ---------- side menu ---------- */
.shell {
  grid-template-columns: 250px 1fr;
}
.nav {
  color: #e4eaf6;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
}
.compose-btn {
  background: linear-gradient(180deg, #f5c25c, var(--ax-gold2));
  color: #1d1505;
  border-radius: 14px;
  margin: 4px 4px 16px;
  padding: 13px 22px;
  justify-content: center;
  box-shadow: 0 8px 20px -8px rgba(242, 184, 75, 0.7);
  width: calc(100% - 8px);
}
.compose-btn:hover {
  background: var(--ax-gold2);
}
.fold {
  color: #e4eaf6;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 600;
  font-size: 14.5px;
  gap: 12px;
}
.fold svg {
  color: #c4cfe4;
}
.fold:hover {
  background: rgba(255, 255, 255, 0.07);
}
.fold.on {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}
.fold.on svg {
  color: #fff;
}
.fold .n {
  background: var(--ax-gold);
  color: #1d1505;
  border-radius: 99px;
  padding: 1px 9px;
  font-size: 12px;
}
.fold .n:empty {
  display: none;
}
.labels {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.lbh {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb0d2;
  padding: 0 12px 6px;
}
.lbl-i {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  color: #e4eaf6;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}
.lbl-i:hover {
  background: rgba(255, 255, 255, 0.07);
}
.lbl-i.on {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.lbl-i b {
  margin-left: auto;
  font-size: 12px;
  color: #c4cfe4;
}
.ldot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}
.ldot.l-hr {
  background: #a78bfa;
}
.ldot.l-ops {
  background: #34d399;
}
.ldot.l-col {
  background: #f59e0b;
}
.ldot.l-fin {
  background: #f472b6;
}
.ldot.l-it {
  background: #60a5fa;
}
.ldot.l-mgmt {
  background: #f87171;
}
.navnote {
  margin: auto 4px 0;
  background: rgba(255, 255, 255, 0.07);
  color: #c4cfe4;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.navnote b {
  color: #fff;
}
.navnote .btn-g {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* ---------- main card ---------- */
.main {
  margin: 0 18px 18px 0;
  border-radius: 16px;
  border: 0;
  background: var(--card);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.6);
}
.ctabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  flex: none;
}
.ctab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.ctab svg {
  width: 18px;
  height: 18px;
}
.ctab:hover {
  background: var(--hover);
}
.ctab.on {
  color: var(--ax-blue);
  border-bottom-color: var(--ax-blue);
  background: var(--sel);
}
.tools {
  padding: 8px 14px;
  min-height: 56px;
}
.tools .pg {
  font-weight: 600;
  color: var(--label);
}
.chk {
  accent-color: var(--ax-blue);
}
.row {
  grid-template-columns: 30px 30px 220px 1fr auto;
  height: 52px;
  padding: 0 18px 0 14px;
  gap: 10px;
  font-size: 14.5px;
}
/* Read mail: plain. Only unread mail is highlighted (tinted, bold, blue bar). */
.row.read {
  background: var(--card);
}
.row.read .fn,
.row.read .line .subj {
  font-weight: 500;
  color: var(--muted);
}
.row.read .tm {
  font-weight: 400;
}
.row.unread {
  background: #e8f0ff;
  box-shadow: inset 3px 0 0 var(--ax-blue);
}
.row.unread .fn,
.row.unread .line .subj,
.row.unread .tm {
  font-weight: 800;
  color: var(--text);
}
:root[data-theme='dark'] .row.unread {
  background: #17305a;
}
.row.sel {
  background: var(--sel);
}
.row .from {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.row .from .av {
  flex: none;
}
.row .fn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--text);
}
.row .line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.row .line .subj {
  font-weight: 700;
  flex: none;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.udot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ax-blue);
  flex: none;
  margin-right: 6px;
}
.row .dt {
  gap: 10px;
}
.row .tm {
  min-width: 62px;
  text-align: right;
}
.lpill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 7px;
  white-space: nowrap;
}
.lpill.l-hr {
  background: #efe9ff;
  color: #6d28d9;
}
.lpill.l-ops {
  background: #e3f7ec;
  color: #047857;
}
.lpill.l-col {
  background: #fff3dc;
  color: #b45309;
}
.lpill.l-fin {
  background: #fde8f2;
  color: #be185d;
}
.lpill.l-it {
  background: #e3efff;
  color: #1d4ed8;
}
.lpill.l-mgmt {
  background: #fde8e8;
  color: #b91c1c;
}
.star.on {
  color: var(--ax-gold2);
}
.empty {
  color: var(--muted);
}

/* ---------- login ---------- */
.scene {
  background: radial-gradient(700px 400px at 20% 10%, rgba(242, 184, 75, 0.16), transparent 60%),
    linear-gradient(160deg, #13306b 0%, #0b1f4d 60%, #071433 100%);
}
#login .mname {
  font-family: var(--body);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
}
#login .mname small {
  color: var(--ax-gold);
  opacity: 1;
}
.tag1 h1 {
  font-family: var(--body);
}
#login .btn-p {
  background: var(--ax-navy);
}
#login .btn-p:hover {
  background: var(--ax-navy2);
}

/* ---------- phone ---------- */
@media (max-width: 900px) {
  #app {
    grid-template-rows: auto auto 1fr;
  }
  .topbar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .topbar .mbrand {
    min-width: 0;
  }
  .search {
    order: 5;
    flex-basis: 100%;
    max-width: none;
  }
  .search kbd {
    display: none;
  }
  .search input {
    padding-right: 48px;
  }
  .car {
    display: none;
  }
  .nav.open {
    inset: 0 auto 0 0;
    background: #0b1f4d;
    padding-top: 16px;
  }
  .advp {
    margin: 0 10px 10px;
  }
  .advg {
    grid-template-columns: 1fr 1fr;
  }
  .row {
    grid-template-columns: 26px 26px 1fr auto;
    padding: 0 10px;
  }
  .row .dt .lpill {
    display: none;
  }
  .main {
    margin: 0;
    border-radius: 14px 14px 0 0;
  }
}

/* fixes after preview */
#app {
  grid-template-rows: 70px 1fr;
  position: relative;
}
.advp {
  position: absolute;
  top: 64px;
  left: 272px;
  right: 22px;
  max-width: 980px;
  margin: 0;
  z-index: 60;
}
.row .line {
  display: block;
}
.row .line .subj {
  max-width: none;
}
.udot {
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 900px) {
  #app {
    grid-template-rows: auto 1fr;
  }
  .advp {
    top: 112px;
    left: 10px;
    right: 10px;
  }
}
#login .form {
  background: #f5f7fb;
}
#login h2,
#login .tag1 h1 {
  font-family: var(--body);
  color: inherit;
}
#login .lcard {
  color: #0f172a;
}
#login .lcard h2 {
  color: var(--ax-navy);
  font-weight: 800;
}
@media (max-width: 900px) {
  .nav {
    display: none;
  }
  .nav.open {
    display: flex;
    z-index: 80;
  }
  .me .who {
    display: none;
  }
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .row {
    height: auto;
    padding: 10px 10px;
    row-gap: 4px;
    grid-template-columns: 24px 24px minmax(0, 1fr) auto;
  }
  .row .from {
    grid-column: 3;
    grid-row: 1;
  }
  .row .dt {
    grid-column: 4;
    grid-row: 1;
  }
  .row .line {
    display: block;
    grid-column: 3 / 5;
    grid-row: 2;
    font-size: 13px;
    padding-left: 40px;
  }
}
@media (max-width: 900px) {
  .topbar .mob {
    display: inline-grid !important;
  }
}
