/* ======================================================================
   TuxPhish — branded "TuxMat Outlook" console
   Brand system (TuxMat Guidelines, Jul 2025):
     Rich Black #000000 · TuxMat Gold #B9975B · Secondary Gold #DFBA7C
     Gold Metallic #9C762D→#E5C770 · Blue-Rich Black #2E3339 · White
     Type: Poppins (Arial web fallback) — Bold headers, Light body
   ====================================================================== */
:root {
  /* brand */
  --rich-black: #000000;
  --gold: #B9975B;
  --gold-2: #DFBA7C;
  --gold-deep: #9C762D;
  --gold-light: #E5C770;
  --blue-black: #2E3339;

  /* legacy alias so any stray reference still resolves to brand */
  --outlook-blue: #9C762D;
  --outlook-blue-dark: #7d5f23;

  /* surfaces (warm neutrals read more premium than cold MS grays) */
  --bg: #FBFAF8;
  --rail: #F6F4F0;
  --line: #EDEBE7;
  --line-2: #DED9D0;
  --hover: #F1EDE6;
  --sel: #FBF5EA;         /* gold-tinted selection */
  --sel-bar: var(--gold);

  /* text */
  --text: #1C1B19;
  --ink: #1C1B19;
  --muted: #6E6B64;

  /* outcome semantics (kept meaningful + accessible) */
  --clean: #107C41;
  --curious: #8A857C;
  --clicked: #B87514;
  --compromised: #C4314B;
  --reported: #6B4CA8;

  --font: "Poppins", Arial, "Helvetica Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 14px; font-weight: 400; -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--gold); }

/* ---- app frame ---- */
.app { display: flex; flex-direction: column; height: 100vh; }

/* ---- command bar: the branded Outlook chrome (black + gold hairline) ---- */
.command-bar {
  background: linear-gradient(180deg, #101011 0%, #050505 100%);
  color: #fff; height: 58px; flex-shrink: 0;
  display: flex; align-items: center; gap: 18px; padding: 0 18px;
  border-bottom: 1px solid rgba(185,151,91,.34);
}
.brandblock { display: flex; align-items: center; color: #fff; }
.wordmark { font-weight: 700; font-size: 17px; letter-spacing: .15em; line-height: 1; }
.wm-1 { color: #fff; }
.wm-2 { color: var(--gold); }

.search {
  display: flex; align-items: center; gap: 9px; height: 36px; width: 340px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09);
  border-radius: 7px; padding: 0 12px; transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: rgba(185,151,91,.5); background: rgba(255,255,255,.1); }
.search svg { width: 15px; height: 15px; color: rgba(255,255,255,.5); flex-shrink: 0; }
.search input {
  background: none; border: none; outline: none; color: #fff;
  font-family: var(--font); font-size: 13px; width: 100%;
}
.search input::placeholder { color: rgba(255,255,255,.45); }
.spacer { flex: 1; }

.usermenu { position: relative; }
.usermenu > summary { list-style: none; cursor: pointer; }
.usermenu > summary::-webkit-details-marker { display: none; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-light));
  color: #1c1204; font-weight: 700; font-size: 12px; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.14); transition: box-shadow .15s;
}
.usermenu[open] > .avatar, .avatar:hover { box-shadow: 0 0 0 3px rgba(185,151,91,.35); }
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 210px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 11px;
  box-shadow: 0 14px 38px rgba(0,0,0,.2); padding: 6px; z-index: 60;
}
.um-email {
  font-size: 12px; color: var(--muted); font-weight: 400; padding: 9px 12px 8px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px; word-break: break-all;
}
.um-item {
  display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink);
  font-size: 13.5px; font-weight: 500;
}
.um-item:hover { background: var(--hover); color: var(--gold-deep); }

.body { display: flex; flex: 1; min-height: 0; }

/* ---- left folder rail ---- */
.rail {
  width: 236px; background: var(--rail); border-right: 1px solid var(--line-2);
  flex-shrink: 0; display: flex; flex-direction: column; padding: 14px 10px;
}
.newmail {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 55%, var(--gold-light) 100%);
  color: #1c1204; border: none; border-radius: 8px; padding: 11px 14px;
  font-family: var(--font); font-weight: 600; font-size: 14px; cursor: pointer;
  margin: 2px 4px 16px; width: calc(100% - 8px);
  box-shadow: 0 2px 7px rgba(156,118,45,.3); transition: filter .15s;
}
.newmail:hover { filter: brightness(1.06); }
.newmail .plus { display: flex; }
.newmail .plus svg { width: 16px; height: 16px; }

.folder {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 7px; color: var(--ink); cursor: pointer; font-size: 13.5px;
  font-weight: 500; margin: 1px 2px; position: relative;
}
.folder svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.folder:hover { background: var(--hover); }
.folder.active { background: none; color: var(--gold-deep); font-weight: 600; }
.folder.active svg { color: var(--gold-deep); }
.folder .count { margin-left: auto; color: var(--muted); font-size: 12px; }
.rail .sec {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--muted); padding: 16px 12px 6px; font-weight: 600;
}
.rail-foot {
  margin-top: auto; padding: 13px 12px 4px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.rail-foot .ver { letter-spacing: .05em; color: #A79C8A; font-weight: 500; }

/* ---- list column ---- */
.list {
  width: 372px; background: #fff; border-right: 1px solid var(--line-2);
  overflow-y: auto; flex-shrink: 0;
}
.list-head {
  padding: 18px 20px 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between;
}
.list-head h2 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: .01em; }
.list-head .n { color: var(--muted); font-size: 12px; }
.item {
  display: block; padding: 13px 20px; border-bottom: 1px solid var(--line); cursor: pointer;
  border-left: 3px solid transparent; transition: background .12s;
}
.item:hover { background: var(--bg); }
.item.active { background: var(--sel); border-left-color: var(--gold); }
.item .r1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.item .sender { font-weight: 600; font-size: 14px; }
.item .date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.item .subject { font-size: 13px; margin-top: 3px; font-weight: 500; }
.item .snippet {
  color: var(--muted); font-size: 12px; margin-top: 3px; font-weight: 300;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- reading / content pane ---- */
.pane { flex: 1; overflow-y: auto; background: #fff; min-width: 0; }
.pane-inner { padding: 30px 38px 64px; max-width: 940px; }
.pane h1 { font-size: 23px; margin: 0 0 5px; font-weight: 600; letter-spacing: .005em; }
.pane .sub { color: var(--muted); margin: 0 0 24px; font-size: 13.5px; font-weight: 300; line-height: 1.55; }

/* KPI tiles */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 26px; }
.tile {
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 16px 18px; position: relative; overflow: hidden;
}
.tile::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; }
.tile.total::before { background: linear-gradient(var(--gold-deep), var(--gold)); }
.tile.clean::before { background: var(--clean); }
.tile.clicked::before { background: var(--clicked); }
.tile.compromised::before { background: var(--compromised); }
.tile.reported::before { background: var(--reported); }
.tile .num { font-size: 27px; font-weight: 600; letter-spacing: -.01em; }
.tile .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }

/* exposure meter */
.meter { display:flex; height:8px; border-radius:5px; overflow:hidden; background:#ECEAE6; }
.meter .seg { height:100%; }
.seg.clean{background:var(--clean)} .seg.curious{background:var(--curious)}
.seg.clicked{background:var(--clicked)} .seg.compromised{background:var(--compromised)}

table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:11px 12px; border-bottom:1px solid var(--line); font-size:13px; }
th { color:var(--muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
td .em { color: var(--muted); font-size: 12px; font-weight: 300; }
.badge { font-size:11px; font-weight:600; padding:3px 10px; border-radius:999px; display:inline-block; letter-spacing:.01em; }
.badge.clean{background:#DFF3E6;color:#0B5A2F} .badge.curious{background:#F0EEEA;color:#4A4640}
.badge.clicked{background:#FBEDD4;color:#87540A} .badge.compromised{background:#FBE0E5;color:#96263B}
.badge.reported{background:#EDE6F8;color:#4C2F86}
.timeline { font-family: var(--mono); font-size:11px; color:var(--muted); }

/* forms / compose */
.field { margin-bottom: 15px; }
.field label { display:block; font-size:12px; color:var(--muted); font-weight:600; margin-bottom:6px; }
.field input, .field select, .field textarea {
  width:100%; padding:10px 12px; border:1px solid var(--line-2); border-radius:6px;
  font-family:var(--font); font-size:14px; background:#fff; color:var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(185,151,91,.18); }
.field textarea { min-height: 210px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height:1.5; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:15px; }

.btn {
  background:#161412; color:#fff; border:none; border-radius:7px;
  padding:11px 22px; font-weight:600; font-size:13.5px; cursor:pointer;
  font-family:var(--font); letter-spacing:.01em; transition:background .15s, box-shadow .15s;
}
.btn:hover { background:#000; box-shadow:0 3px 12px rgba(0,0,0,.22); }
.btn.ghost { background:#fff; color:var(--ink); border:1px solid var(--line-2); box-shadow:none; }
.btn.ghost:hover { background:var(--hover); border-color:var(--gold); }
.btn.gold {
  background:linear-gradient(135deg, var(--gold-deep), var(--gold) 60%, var(--gold-light));
  color:#1c1204; box-shadow:0 2px 7px rgba(156,118,45,.28);
}
.btn.gold:hover { filter:brightness(1.06); box-shadow:0 3px 12px rgba(156,118,45,.34); }

.recipients { border:1px solid var(--line-2); border-radius:6px; max-height:230px; overflow-y:auto; }
.recipients label { display:flex; align-items:center; gap:10px; padding:9px 12px;
  border-bottom:1px solid var(--line); font-size:13px; cursor:pointer; margin:0; }
.recipients label:hover { background:var(--bg); }
.recipients input { width:auto; accent-color:var(--gold-deep); }
.recipients .dept { margin-left:auto; color:var(--muted); font-size:12px; font-weight:300; }
.preview-box { border:1px solid var(--line-2); border-radius:6px; padding:20px; background:#fff; margin-top:8px; min-height:120px; }
.checkline { display:flex; align-items:center; gap:9px; font-size:13px; margin:16px 0; }
.checkline input { width:auto; accent-color:var(--gold-deep); }

/* safety note — rebranded as a gold advisory */
.note {
  background:#FBF5EA; border:1px solid rgba(185,151,91,.32); border-left:3px solid var(--gold);
  border-radius:7px; padding:13px 16px; font-size:12.5px; color:#5C4A24; margin:16px 0; line-height:1.55;
}
.mono { font-family: var(--mono); }

.legend { display:flex; gap:16px; margin-top:13px; font-size:12px; color:var(--muted); flex-wrap:wrap; font-weight:400; }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.dot { width:9px; height:9px; border-radius:3px; }

/* ======================================================================
   Login — full-dark, TuxTrack-style
   ====================================================================== */
.login-wrap {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:24px; background:radial-gradient(circle at 50% 20%, #FFFDF8 0%, var(--bg) 52%, #F1ECE2 100%);
}
.login-card {
  position:relative; width:452px; max-width:100%; background:#fff;
  border:1px solid var(--line-2); border-radius:16px;
  padding:46px 46px 34px; box-shadow:0 24px 70px rgba(62,46,16,.13);
}
.login-card::before {
  content:""; position:absolute; left:26px; right:26px; top:0; height:2px; border-radius:2px;
  background:linear-gradient(90deg, transparent, var(--gold-deep), var(--gold-light), var(--gold-deep), transparent);
}
.login-mark { width:44px; height:44px; color:var(--gold-deep); margin:6px auto 22px; display:block; }
.login-word { text-align:center; font-weight:700; font-size:33px; letter-spacing:.14em; }
.login-word .a { color:var(--ink); }
.login-word .b { color:var(--gold-deep); }
.login-tag {
  text-align:center; color:var(--muted); font-size:10.5px; letter-spacing:.42em;
  text-transform:uppercase; margin-top:11px; font-weight:500;
}
.login-by {
  display:flex; align-items:center; justify-content:center; gap:9px;
  margin:20px 0 2px; color:#9A938A; font-size:10.5px; letter-spacing:.24em; font-weight:500;
}
.login-by .mark { width:17px; height:17px; color:var(--gold-deep); }
.login-by .tm { color:var(--gold-deep); letter-spacing:.2em; font-weight:600; }
.login-hint { text-align:center; color:var(--muted); font-size:13px; font-weight:300; margin:26px 0 20px; }

.ms-btn {
  display:flex; align-items:center; justify-content:center; gap:12px; width:100%;
  background:linear-gradient(180deg, #3C8A6A 0%, #2F6F53 100%); color:#fff;
  border:none; border-radius:9px; padding:15px; font-family:var(--font);
  font-weight:600; font-size:15px; cursor:pointer; letter-spacing:.01em;
  box-shadow:0 6px 20px rgba(47,111,83,.34); transition:filter .15s;
}
.ms-btn:hover { filter:brightness(1.07); }
.ms-logo { width:18px; height:18px; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:2px; flex-shrink:0; }
.ms-logo i { display:block; border-radius:1px; }
.ms-logo i:nth-child(1){background:#F25022} .ms-logo i:nth-child(2){background:#7FBA00}
.ms-logo i:nth-child(3){background:#00A4EF} .ms-logo i:nth-child(4){background:#FFB900}

/* form inside the login card (light) */
.login-card .field { margin:0 0 12px; }
.login-card .btn { width:100%; }
.login-card .err {
  color:#96263B; background:#FBE0E5; border:1px solid rgba(196,49,75,.3);
  border-radius:7px; padding:9px 12px; text-align:center; margin-top:14px; font-size:12.5px; font-weight:400;
}
.err { color: var(--compromised); font-size:13px; margin-top:10px; }

.login-alt { margin-top:18px; }
.login-alt > summary {
  list-style:none; cursor:pointer; text-align:center; color:var(--muted);
  font-size:12px; letter-spacing:.03em; padding:8px; user-select:none;
}
.login-alt > summary::-webkit-details-marker { display:none; }
.login-alt > summary:hover { color:var(--gold-deep); }
.login-alt[open] > summary { margin-bottom:12px; }

.sso-or { text-align:center; color:var(--muted); font-size:12px; margin:16px 0; position:relative; }
.sso-or::before, .sso-or::after { content:""; position:absolute; top:50%; width:42%; height:1px; background:var(--line-2); }
.sso-or::before { left:0; } .sso-or::after { right:0; }

.login-foot {
  text-align:center; color:var(--muted); font-size:11px; letter-spacing:.05em; margin-top:26px; font-weight:400;
}
