/* Email Monitor — same professional finish as the CRM (classic): deep navy, one restrained rose accent, white cards with a hairline border.
   One stylesheet for every monitor page (loaded after each page's own CSS). Inside the CRM the monitor shows only its content. */
:root{
  --bg:#f3f5f9; --paper:#f3f5f9; --surface:#fff; --line:#e3e7ef; --line2:#eef1f6;
  --ink:#101733; --ink2:#2a3350; --muted:#667089; --navy:#0e1740; --navy2:#16235c;
  --brand:#c8315f; --brand-d:#a8264e; --ok:#0f8a63; --warn:#b7791f; --crit:#c53030;
  --r:14px; --r-sm:10px;
  --sh:0 1px 2px rgba(16,23,51,.05),0 4px 14px rgba(16,23,51,.04); --sh2:0 2px 4px rgba(16,23,51,.06),0 12px 30px rgba(16,23,51,.08);
}
html{background:var(--bg)}
body{background:var(--bg);color:var(--ink2);font-size:14.5px;-webkit-font-smoothing:antialiased}
a{color:var(--brand)}
main{max-width:1680px;padding:26px 32px 60px}
h1{font-size:26px;font-weight:800;letter-spacing:-.03em;color:var(--ink)}
h2{font-size:16px;font-weight:700;color:var(--ink)}
.sub,.muted{color:var(--muted)}

/* top bar (stand-alone use) */
.top{background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(10px)}
.top-in{max-width:1680px;padding:12px 32px}
.logo{color:var(--ink)}.logo i{background:var(--brand);border-radius:4px}
nav.tabs{gap:2px}
nav.tabs a{padding:8px 15px;font-weight:600;font-size:13.5px;border-radius:9px;color:var(--ink2)}
nav.tabs a:hover:not(.on){background:#eef1f6;text-decoration:none}
nav.tabs a.on{background:var(--navy);color:#fff}
nav.tabs a.sep{margin-left:10px}

/* cards */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);padding:22px}
.grid{gap:18px}
.chart-title{font-weight:700;color:var(--ink)}
.chart-hint{color:var(--muted)}

/* date buttons, chips */
.ranges a{border-radius:9px;font-weight:600;border:1px solid var(--line);background:#fff;color:var(--ink2)}
.ranges a.on{background:var(--navy);border-color:var(--navy);color:#fff}
.ranges a:hover:not(.on){border-color:#c7cddc;text-decoration:none}
.chip{background:#fff;border:1px solid var(--line);color:var(--ink2)}

/* inputs */
input[type=date],input[type=text],input[type=password],input[type=search],input[type=email],input[type=number],select,textarea{background:#fff;border:1px solid #d6dbe8;border-radius:var(--r-sm);color:var(--ink);min-height:40px}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(200,49,95,.13)}

/* buttons */
.btn{background:var(--navy);color:#fff;border:0;border-radius:var(--r-sm);font-weight:700;min-height:40px}
.btn:hover{background:var(--navy2);opacity:1}
.btn.brand{background:var(--brand)}.btn.brand:hover{background:var(--brand-d)}
.btn.ghost{background:#fff;color:var(--ink2);border:1px solid var(--line)}.btn.ghost:hover{border-color:#c7cddc;background:#fff}

/* key numbers */
.metrics{gap:16px}
.metric{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);padding:18px 18px 16px}
.metric .label{font-size:11.5px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:var(--muted)}
.metric .value{font-size:30px;font-weight:800;letter-spacing:-.03em;color:var(--ink)}
.metric .value.bad{color:var(--crit)}

/* alert panel */
.health{border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden}
.health-left,.health-l{background:linear-gradient(140deg,#0e1740,#16235c)!important;color:#fff}
.health-right{background:#fff}

/* tables */
table{border-collapse:separate;border-spacing:0}
thead th{position:sticky;top:0;background:#f7f8fb;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;border-bottom:1px solid var(--line)}
td{border-bottom:1px solid var(--line2)}
tbody tr:hover td{background:#f8f9fc}
td.first a,.subj a{color:var(--ink);font-weight:600}
.flash{border-radius:12px}
.rec,.idea{background:#f8f9fc;border:1px solid var(--line2);border-radius:12px}

/* Systems tab */
.sys-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:18px}
.sys{background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh);padding:20px 22px;position:relative;overflow:hidden}
.sys::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--c,#6B7385)}
.sys h3{display:flex;align-items:center;gap:10px;font-size:17px;margin-bottom:2px;color:var(--ink)}
.sys .url{font-size:12px;color:var(--muted);word-break:break-all;margin-bottom:12px}
.sys dl{display:grid;grid-template-columns:100px 1fr;gap:7px 12px;font-size:13px;margin:0}.sys dt{color:var(--muted)}.sys dd{margin:0;word-break:break-word}
.sys .how{margin-top:12px;padding:12px 14px;background:#f8f9fc;border:1px solid var(--line2);border-radius:10px;font-size:13px;line-height:1.6;color:var(--ink2)}
.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;font-size:12px;font-weight:700;padding:3px 10px}
.pill.ok{background:#e8f6f0;color:#0b7a55}.pill.bad{background:#fdecec;color:#b42323}.pill.off{background:#eef1f6;color:#4b5570}

/* inside the CRM: the CRM provides the title and the tabs, so the monitor shows only its content */
body.embed{background:var(--bg)}
body.embed.p-index .top,body.embed.p-gemini .gk-bar{display:none}
body.embed .logo,body.embed form.who{display:none}
body.embed.p-rep nav.tabs a:not([href^="reputation.php?tab"]){display:none}
body.embed .top{position:static;background:transparent;border:0;backdrop-filter:none}
body.embed .top-in{padding:6px 0 0}
body.embed main{padding:14px 0 40px}
@media(max-width:900px){main{padding:18px 14px 40px}.top-in{padding:10px 14px}}
