:root {
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  color: #39271c;
  background: #102e27;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at top, #20483b, transparent 70%);
  min-height: 100vh;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button,
.button-link {
  border: 1px solid #a77530;
  background: linear-gradient(#a82129, #7c111c);
  color: #fff0c9;
  border-radius: 7px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.3;
}
button:hover,
.button-link:hover {
  filter: brightness(1.12);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.secondary {
  background: #fff7e8;
  color: #6b2920;
  border-color: #c6a775;
}
a {
  color: #8a1923;
  text-underline-offset: 3px;
}
input {
  border: 1px solid #b99b70;
  border-radius: 6px;
  padding: 12px 13px;
  min-width: 0;
  font-size: 16px;
  background: #fffdf7;
  color: #39271c;
  width: 100%;
}
label {
  display: block;
  margin: 18px 0 8px;
  font-size: 16px;
}
:focus-visible {
  outline: 3px solid #c58e31;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.brand {
  font-size: 28px;
  text-decoration: none;
  color: #8a1721;
}
.login-panel {
  width: min(440px, calc(100% - 32px));
  margin: 9vh auto 35px;
  padding: 35px;
  border: 3px double #c49a4f;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff2d4, #efdab2);
  box-shadow: 0 18px 60px #001b1670;
}
.eyebrow {
  font-style: italic;
  color: #806346;
  font-size: 14px;
  margin-top: 16px;
}
.login-panel h1 {
  font-size: 38px;
  font-weight: 400;
  margin: 20px 0 12px;
}
.login-panel p {
  line-height: 1.6;
}
.login-panel button {
  width: 100%;
  margin-top: 20px;
}
.back-link {
  font-size: 15px;
}
.status {
  font:
    15px/1.5 system-ui,
    sans-serif;
  color: #8c1d26;
  min-height: 4px;
  overflow-wrap: anywhere;
}
.loading {
  text-align: center;
  padding: 50px;
  color: #f5e5bd;
}
.inbox-panel {
  max-width: 1500px;
  margin: 28px auto;
  padding: 30px;
  background: #fbefd7;
  border: 3px double #bd944c;
  border-radius: 14px;
  box-shadow: 0 10px 40px #00140f66;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-bottom: 1px solid #d7bc8d;
  padding-bottom: 25px;
}
.admin-header h1 {
  font-size: 31px;
  font-weight: 400;
  margin: 10px 0 0;
}
.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.inbox-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 10px;
}
#folders {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
#folders button {
  background: #f3e2c2;
  color: #673a26;
  border: 1px solid #c6a775;
}
#folders button[aria-pressed="true"] {
  background: #8b1922;
  color: #fff2d6;
}
#folders span {
  font:
    12px system-ui,
    sans-serif;
  margin-left: 5px;
  opacity: 0.8;
}
#search-form {
  display: flex;
  gap: 8px;
}
#search-form input {
  max-width: 240px;
}
.trash-note {
  font:
    15px/1.5 system-ui,
    sans-serif;
  padding: 14px 18px;
  background: #f0dfb9;
  border-left: 3px solid #ad7932;
}
.inbox-layout {
  display: grid;
  grid-template-columns: minmax(270px, 350px) minmax(0, 1fr);
  min-height: 540px;
  border: 1px solid #d3b98f;
  border-radius: 10px;
  overflow: hidden;
  background: #fffaf0;
}
.inbox-layout aside {
  border-right: 1px solid #dcc6a4;
  min-width: 0;
  background: #f9ecd6;
}
#message-list {
  max-height: 70vh;
  overflow: auto;
}
.message-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid #ddc8a5;
  border-radius: 0;
  background: transparent;
  color: #4c3627;
}
.message-row:hover,
.message-row.selected {
  background: #efdab6;
  filter: none;
}
.message-row.unread {
  border-left: 4px solid #9a1b25;
  padding-left: 14px;
}
.message-row strong,
.message-row time,
.message-row .subject,
.message-row .preview {
  display: block;
  overflow-wrap: anywhere;
}
.message-row strong {
  font-size: 19px;
  line-height: 1.3;
}
.message-row time {
  font:
    12px/1.4 system-ui,
    sans-serif;
  color: #816751;
  margin: 5px 0 10px;
}
.message-row .subject {
  font-size: 16px;
  line-height: 1.4;
}
.message-row .preview {
  font:
    13px/1.5 system-ui,
    sans-serif;
  color: #816751;
  margin-top: 7px;
}
.message-detail {
  padding: 30px;
  min-width: 0;
}
.empty-detail {
  text-align: center;
  margin: 65px auto;
  color: #846b52;
}
.empty-detail > span {
  font-size: 44px;
  color: #a37638;
}
.empty-detail h2 {
  font-weight: 400;
  line-height: 1.3;
}
.message-detail h2 {
  font-size: 31px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.message-date {
  font:
    14px/1.6 system-ui,
    sans-serif;
  color: #80634c;
}
.message-meta {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 9px 13px;
  font:
    15px/1.5 system-ui,
    sans-serif;
  margin: 24px 0;
}
.message-meta dt {
  font-weight: 600;
  color: #7e5438;
}
.message-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 19px;
  line-height: 1.7;
  border-block: 1px solid #dfcba8;
  padding: 25px 0;
  margin: 25px 0;
}
.message-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.message-actions .danger {
  color: #8b1723;
  background: #fff4e7;
}
.message-trash {
  font:
    14px/1.5 system-ui,
    sans-serif;
  padding: 12px 15px;
  background: #f0dfb9;
  border-radius: 6px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 12px;
  font:
    13px system-ui,
    sans-serif;
}
.pagination button {
  font-size: 13px;
  padding: 8px;
}
.empty-list {
  padding: 28px 20px;
  font-size: 17px;
  line-height: 1.5;
  color: #80634c;
}
.inbox-footnote {
  font:
    14px/1.6 system-ui,
    sans-serif;
  color: #80634c;
  margin: 22px 0 0;
  overflow-wrap: anywhere;
}
dialog {
  width: min(480px, calc(100% - 32px));
  border: 2px solid #c6a775;
  border-radius: 12px;
  padding: 28px;
  background: #fff6e5;
  color: #39271c;
}
dialog::backdrop {
  background: #071d19b3;
}
dialog h2 {
  margin-top: 0;
  font-size: 27px;
  font-weight: 400;
}
dialog p {
  font-size: 15px;
  line-height: 1.5;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .inbox-panel {
    margin: 14px;
    padding: 22px;
  }
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .inbox-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  #search-form input {
    max-width: none;
  }
  .inbox-layout {
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  }
  .message-detail {
    padding: 23px;
  }
  .message-detail h2 {
    font-size: 27px;
  }
}
@media (max-width: 640px) {
  .inbox-panel {
    margin: 8px;
    padding: 16px;
    border-width: 2px;
  }
  .brand {
    font-size: 25px;
  }
  .admin-header h1 {
    font-size: 27px;
  }
  .header-actions {
    gap: 7px;
  }
  .header-actions button {
    font-size: 13px;
    padding: 9px 10px;
  }
  #folders {
    gap: 7px;
  }
  #folders button {
    font-size: 14px;
    padding: 9px 10px;
  }
  .inbox-layout {
    display: block;
    min-height: 0;
  }
  .inbox-layout aside {
    border-right: 0;
    border-bottom: 1px solid #dcc6a4;
  }
  #message-list {
    max-height: 310px;
  }
  .message-row {
    padding: 14px;
  }
  .message-row.unread {
    padding-left: 10px;
  }
  .message-row .preview {
    display: none;
  }
  .message-row time {
    margin-bottom: 5px;
  }
  .message-detail {
    padding: 20px;
  }
  .message-meta {
    grid-template-columns: 65px minmax(0, 1fr);
    font-size: 14px;
  }
  .message-body {
    font-size: 18px;
  }
  .message-actions {
    align-items: stretch;
  }
  .message-actions > * {
    flex: 1 1 auto;
    text-align: center;
  }
  .empty-detail {
    margin: 30px auto;
  }
  .login-panel {
    padding: 28px 24px;
  }
  .login-panel h1 {
    font-size: 34px;
  }
}
