
:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #223b35; background: #f5f6f2; font-size: 15px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { max-width: 1160px; margin: auto; padding: 28px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #dde4dc; }
a.brand { color: inherit; text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.7px; }
.brand span { display: inline-block; margin-left: 20px; color: #7b8980; font-size: 12px; font-weight: 400; letter-spacing: 0; }
main { max-width: 1160px; padding: 48px 30px; margin: auto; min-height: 75vh; }
h1 { font-size: 36px; letter-spacing: -1.2px; margin: 10px 0 16px; font-weight: 600; }
h2 { font-size: 22px; margin: 0 0 20px; overflow-wrap: anywhere; }
p { color: #64766d; line-height: 1.6; }
.eyebrow { font-size: 11px; letter-spacing: 1.7px; font-weight: 650; color: #75897a; overflow-wrap: anywhere; }
.card { background: #fff; border: 1px solid #e0e6de; border-radius: 14px; padding: 30px; box-shadow: 0 5px 20px #203b3004; }
.narrow { max-width: 420px; }
#login { margin: 24px auto; padding: 40px; max-width: 440px; box-shadow: 0 18px 60px #203b300a; }
#login h1 { font-size: 30px; letter-spacing: -1px; }
#login > p { font-size: 14px; }
.login-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #d8e6d8; border-radius: 15px; background: #edf4e9; font-size: 28px; color: #315e49; margin-bottom: 28px; }
.back-link { color: #355746; text-decoration: none; font-size: 13px; }
#admin-auth { margin-top: 28px; }
label { display: block; font-size: 13px; font-weight: 550; margin: 24px 0; }
input { width: 100%; margin-top: 9px; padding: 12px; border: 1px solid #d5dfd4; border-radius: 7px; font: inherit; background: #fcfdfa; color: #223b35; }
input:focus { outline: 2px solid #8aaf99; outline-offset: 2px; }
button { border: 1px solid #d5dfd4; border-radius: 7px; background: #fff; padding: 10px 16px; color: #355746; cursor: pointer; font: inherit; font-size: 13px; }
button:hover { background: #eef3eb; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: #315e49; border-color: #315e49; color: white; width: 100%; padding: 13px; }
button.primary:hover { background: #254a39; }
.hint { font-size: 12px; line-height: 1.7; }
#login .hint { text-align: center; margin-top: 25px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.toolbar h1 { margin-bottom: 0; }
.mail-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; }
.message-list { padding: 0; overflow: hidden; }
.mail-item { border: 0; border-bottom: 1px solid #edf0e9; border-radius: 0; display: flex; flex-direction: column; text-align: left; width: 100%; padding: 20px; gap: 7px; }
.mail-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.mail-sender { font-size: 12px; color: #748176; }
.unread { font-weight: 700; }
.selected { background: #edf3e9; box-shadow: inset 3px 0 #527c5b; }
small { font-size: 11px; color: #8b948a; font-weight: 400; }
nav { display: flex; align-items: center; justify-content: space-between; padding: 15px; font-size: 12px; gap: 8px; }
nav button { padding: 8px; }
.reader { min-height: 480px; }
.empty { text-align: center; color: #8b988b; padding: 65px 10px; font-size: 14px; }
.meta { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #7c897d; border-bottom: 1px solid #e5ebe1; padding-bottom: 23px; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 14px; line-height: 1.8; color: #39483e; margin: 24px 0 0; }
#body a { color: #245baf; text-decoration: underline; text-underline-offset: 3px; }
#body a:hover { color: #163b77; }
#body a:focus-visible { outline: 2px solid #245baf; outline-offset: 3px; border-radius: 2px; }
#notice { padding: 14px 20px; border: 1px solid #d8dcbf; background: #f8f8e9; border-radius: 8px; color: #60633d; }
#admin-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
#admin-content > .narrow { max-width: none; }
#admin-content > .hint { grid-column: 1 / -1; }
footer { color: #94a08f; text-align: center; padding: 24px; font-size: 12px; }
@media (max-width: 720px) { header { padding: 20px; } .brand span { display: none; } main { padding: 28px 16px; } .mail-layout, #admin-content { grid-template-columns: 1fr; } #login { padding: 28px; margin: 20px auto; } .reader { min-height: 250px; } h1 { font-size: 30px; } }

.admin-theme { background: #fff5f5; color: #4c2026; }
.admin-theme header { border-bottom-color: #f0d0d4; }
.admin-theme .brand { color: #a51e35; }
.admin-theme .brand span, .admin-theme p { color: #855b63; }
.admin-theme .eyebrow, .admin-theme .back-link { color: #b4233c; }
.admin-theme .card { border-color: #f0d0d4; box-shadow: 0 5px 20px #8f182908; }
.admin-theme input { background: #fffafa; border-color: #e8bdc4; color: #4c2026; }
.admin-theme input:focus { outline-color: #d6536a; }
.admin-theme button { color: #a51e35; border-color: #e8bdc4; }
.admin-theme button:hover { background: #ffe5e9; }
.admin-theme button.primary { color: #fff; background: #b4233c; border-color: #b4233c; }
.admin-theme button.primary:hover { background: #931b30; border-color: #931b30; }
.admin-theme #notice { color: #8b2338; background: #ffe9ed; border-color: #efb9c3; }
.admin-theme footer { color: #99747b; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.checkbox-label input[type="checkbox"] { width: 17px; height: 17px; flex-shrink: 0; margin: 2px 0 0; accent-color: #b4233c; }
#users { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.admin-user { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid #f0d0d4; border-radius: 10px; background: #fffafa; min-width: 0; }
.admin-user small { color: #855b63; margin-top: auto; }
.mailboxes-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.mailboxes-toolbar h2 { margin: 0; }
.mailboxes-toolbar label { display: flex; align-items: center; gap: 10px; margin: 0; }
.admin-theme select { padding: 9px 12px; font: inherit; color: #4c2026; border: 1px solid #e8bdc4; border-radius: 7px; background: #fffafa; }
.admin-theme select:focus-visible { outline: 2px solid #d6536a; outline-offset: 2px; }
@media (min-width: 600px) { #users { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { #users { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { #users { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.admin-user span { min-width: 0; overflow-wrap: anywhere; }
.admin-theme .delete-mailbox { flex-shrink: 0; padding: 5px 9px; font-size: 11px; border-color: #efc3cb; color: #a51e35; background: #fff5f5; }
.admin-theme .delete-mailbox:hover { background: #ffe0e6; }
