/*
 * Modern theme for Maia Mailguard.
 * Copyright 2004 Robert LeBlanc. Restyle only; original license terms apply.
 */

:root {
    --bg: #f3f5f8;
    --surface: #ffffff;
    --ink: #1c2430;
    --muted: #5c6b7a;
    --line: #e3e8ee;
    --brand: #1e3a5f;
    --brand-2: #16304f;
    --accent: #2f6fed;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px rgba(16, 24, 40, .06);
    --radius: 12px;
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
    --ham: #e8f6ee;
    --ham-ink: #0f6b3c;
    --spam: #fdecec;
    --spam-ink: #9b1c1c;
    --suspect: #fff6e5;
    --suspect-ink: #92400e;
    --virus: #ffedd5;
    --virus-ink: #9a3412;
    --banned: #f3e8ff;
    --banned-ink: #6b21a8;
    --headerbad: #e8eefc;
    --headerbad-ink: #1e3a8a;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    font-weight: normal;
    line-height: 1.45;
}

body { min-height: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font);
    font-weight: 650;
    color: var(--brand);
    margin: 0 0 12px;
    position: static;
    left: auto;
}

h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
h4 { font-size: 15px; }

p { margin: 0 0 12px; position: static; left: auto; }

th, td { font-family: var(--font); }

#page {
    max-width: 1100px;
    margin: 20px auto 32px;
    padding: 0 16px;
}

.appbar {
    background: var(--brand);
    color: #fff;
    padding: 12px 20px 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

.appbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
    background: #fff;
    border-radius: 8px;
    padding: 2px;
}

.topbanner, .topbanner2, .topbanner3, .topbanner4, .topbanner5,
.menubanner, .menuheader, .menubody, .menuheader2, .menubody2, .menulight {
    background: transparent;
    font-weight: 600;
    color: inherit;
}

.topbanner {
    font-size: 18px;
    line-height: 1.2;
    color: #fff;
}

.topbanner2 {
    font-size: 13px;
    font-weight: 500;
    color: #d5deea;
}

.topbanner3 {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #c5d2e2;
}

.topbanner4, .topbanner5 { font-size: 13px; font-weight: 600; }

.appnav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 12px -20px 0;
    padding: 0 12px;
    background: var(--brand-2);
}

.navlink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e8eef6;
    padding: 10px 12px;
    border-radius: 8px 8px 0 0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.navlink:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
}

.appnav img, .topbanner4 img {
    width: 16px;
    height: 16px;
    border: 0;
    vertical-align: middle;
}

.appfoot, .powered {
    text-align: center;
    padding: 18px 12px 28px;
}

.appfoot img, .powered img { opacity: .85; }

.login-page { background: linear-gradient(180deg, #1e3a5f 0 180px, var(--bg) 180px); }

#login-card {
    max-width: 420px;
    margin: 48px auto 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px 28px 20px;
    text-align: center;
}

.login-logo img {
    height: 64px;
    width: auto;
    background: #fff;
}

.login-version, .login-about { color: var(--muted); font-size: 13px; }

.login-form { width: 100%; margin-top: 8px; }
.login-form td { padding: 6px 4px; text-align: left; }

.lang-list { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lang-list a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--muted);
}

input[type="text"], input[type="password"], input[type="email"], select, textarea {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfd6df;
    border-radius: 8px;
    padding: 7px 10px;
    box-sizing: border-box;
}

input[type="submit"], input[type="button"], button {
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
}

input[type="submit"]:hover, input[type="button"]:hover, button:hover { background: var(--accent); }

input[type="reset"] {
    background: #e8edf2;
    color: var(--ink);
}

#page table {
    border-collapse: collapse;
    background: var(--surface);
}

#page > table.layout,
#page table.layout,
table.layout td {
    background: transparent;
    border: 0;
}

#protectioncontrol, #quickview, table.panel, table.data, table.statgrid, .tabs {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

#protectioncontrol, #quickview { padding: 4px; margin: 0 0 16px; }

#page table td, #page table th {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.menubanner, .menuheader, .userbanner, .userheader, .wlbanner, .wlheader, .blbanner, .blheader {
    background: #f7f9fb;
    color: var(--brand);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.menuheader2, .menubody, .menubody2, .menulight, .userbody, .wlbody, .blbody {
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.menubanner { font-size: 15px; }

table.data .cache-cols td,
#cachelist .cache-cols td {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f9fb;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#cachelist tr:hover td { background: #f8fbff; }
#cachelist { font-size: 13px; }

.messagebox {
    background: #fff8e1;
    border: 1px solid #f3d48a;
    border-radius: 10px;
    color: #7a4b00;
    font-size: 14px;
    font-weight: 650;
    padding: 10px 14px;
    text-align: center;
    margin: 0 0 14px;
}

.hambanner, .hamheader, .hamheader2, .hambody3,
.suspected_hambanner, .suspected_hamheader, .suspected_hamheader2, .suspected_hambody3 {
    background: #d7f0e3;
    color: var(--ham-ink);
    font-weight: 700;
}

.hambody, .hambody2, .hambody_alt, .suspected_hambody, .suspected_hambody2 {
    background: var(--ham);
    color: var(--ink);
}

.spambanner, .spamheader, .spamheader2, .spambody3,
.fpbanner, .fpheader, .fpheader2, .fpbody3,
.fnbanner, .fnheader, .fnheader2, .fnbody3 {
    background: #f8d4d4;
    color: var(--spam-ink);
    font-weight: 700;
}

.spambody, .spambody2, .fpbody, .fpbody2, .fnbody, .fnbody2 {
    background: var(--spam);
    color: var(--ink);
}

.suspected_spambanner, .suspected_spamheader, .suspected_spamheader2, .suspected_spambody3 {
    background: #fde7c2;
    color: var(--suspect-ink);
    font-weight: 700;
}

.suspected_spambody, .suspected_spambody_alt, .suspected_spambody2 {
    background: var(--suspect);
    color: var(--ink);
}

.virusbanner, .virusheader, .virusheader2, .virusbody3,
.oversizedbanner, .oversizedheader, .oversizedheader2, .oversizedbody3 {
    background: #ffd7b0;
    color: var(--virus-ink);
    font-weight: 700;
}

.virusbody, .virusbody_alt, .virusbody2, .oversizedbody, .oversizedbody2 {
    background: var(--virus);
    color: var(--ink);
}

.banned_filebanner, .banned_fileheader, .banned_fileheader2, .banned_filebody3 {
    background: #ead7fb;
    color: var(--banned-ink);
    font-weight: 700;
}

.banned_filebody, .banned_filebody_alt, .banned_filebody2 {
    background: var(--banned);
    color: var(--ink);
}

.bad_headerbanner, .bad_headerheader, .bad_headerheader2, .bad_headerbody3 {
    background: #d9e4fb;
    color: var(--headerbad-ink);
    font-weight: 700;
}

.bad_headerbody, .bad_headerbody_alt, .bad_headerbody2 {
    background: var(--headerbad);
    color: var(--ink);
}

.whitelist { background: var(--ham); color: var(--ham-ink); font-weight: 700; }
.blacklist { background: #243044; color: #fff; font-weight: 700; }
.remove { background: var(--spam); color: var(--spam-ink); font-weight: 700; }

.wlheader2, .wlbody2, .wlbody3, .blheader2, .blbody2, .blbody3 {
    background: #fff;
    color: var(--ink);
}

.mailheader, .spamreportheader, .spamreport, .rawmailhead, .rawmail, .decodedmail {
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.mailheader { color: var(--brand); font-weight: 700; text-align: right; padding-right: 8px; vertical-align: top; }
.rawmail, .rawmailhead { font-family: ui-monospace, monospace; font-size: 12px; background: #f7f9fb; }
.rawmailhead { font-weight: 700; color: var(--brand); }

.wblist_link { color: var(--muted); font-size: 12px; margin: 0 6px; }
.edit_icon { width: 1em; border: 0; text-decoration: none; }

.HelpTip, .DisplayLinkURL, #view_full_headers { display: none; }
.DisplayLink { cursor: pointer; }
.DisplayLink_scheme, .DisplayLink_user, .DisplayLink_pass { color: var(--ink); }
.DisplayLink_host { color: var(--spam-ink); }
.DisplayLink_port { color: var(--suspect-ink); }
.DisplayLink_path { color: var(--ham-ink); }
.DisplayLink_query { color: var(--accent); }
.DisplayLink_fragment { color: var(--muted); }

#message_detail fieldset, #view_headers {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

#message_detail legend, #view_headers legend { color: var(--muted); padding: 0 6px; }

#tooltip {
    position: absolute;
    visibility: hidden;
    background: transparent;
    padding: 0;
}

.simple-tip,
.simple-tip.ui-widget-content,
.simple-tip.ui-state-highlight {
    position: absolute;
    background: #fff;
    background-image: none;
    color: var(--ink);
    border: 1px solid #c5d0dc;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    z-index: 2000;
    max-width: 320px;
    box-shadow: var(--shadow);
}

.ui-widget, .ui-widget input, .ui-widget select, .ui-widget button { font-family: var(--font); font-size: 14px; }
.ui-tabs { padding: 0; border: 0; background: transparent; }
.ui-tabs .ui-tabs-nav {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 8px;
}
.ui-tabs .ui-tabs-nav li { border: 0; background: transparent; margin: 0 4px -1px 0; }
.ui-tabs .ui-tabs-nav li a { color: var(--muted); padding: 8px 12px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { background: #fff; border: 1px solid var(--line); border-bottom-color: #fff; border-radius: 8px 8px 0 0; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a { color: var(--brand); }
.ui-tabs .ui-tabs-panel { border: 1px solid var(--line); border-top: 0; background: #fff; padding: 12px; }
.ui-widget-content { border-color: var(--line); color: var(--ink); }
.ui-state-default, .ui-widget-header { background: #f7f9fb; border-color: var(--line); color: var(--ink); }

table.statgrid { width: 100%; margin-top: 8px; }
table.statgrid td { font-weight: 600; }

@media (max-width: 720px) {
    .appbar-brand { align-items: flex-start; }
    .navlink span { font-size: 12px; }
    #page { padding: 0 10px; }
    #login-card { margin-top: 24px; }
}
