@font-face {
  font-family: Geist;
  src: url('/admin-assets/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: GeistMono;
  src: url('/admin-assets/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --surface: #101012;
  --line: #2a2a32;
  --muted: #a1a1aa;
  --green: #4ade80;
  --text: #ededed;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Geist, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; border-radius: 0; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 12px/1.5 GeistMono, monospace; cursor: pointer; white-space: nowrap; }
button:hover, .button:hover { background: var(--surface); border-color: var(--muted); }
.primary { background: var(--green); border-color: var(--green); color: var(--bg); }
.primary:hover { background: #74e89e; border-color: #74e89e; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.app { width: min(100% - 64px, 800px); margin: 0 auto; }
header { display: flex; justify-content: space-between; align-items: center; min-height: 104px; gap: 24px; }
.brand { font: 13px GeistMono, monospace; letter-spacing: .5px; }
.brand span { color: var(--green); }
.text-button { border: 0; color: var(--muted); padding: 10px 0; }
.text-button:hover { color: var(--text); background: transparent; }
main { padding: 56px 0 32px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; }
h1 { margin: 0; font-size: 32px; font-weight: 500; line-height: 1.2; letter-spacing: -1px; }
h2 { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.5; }
p { margin: 8px 0 16px; }
.account-list { border-top: 1px solid var(--line); }
.account { border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
summary { cursor: pointer; }
.account > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 28px; padding: 24px 0; }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover .account-email, .account[open] > summary .manage-label { color: var(--green); }
.identity { min-width: 0; }
.account-email { display: block; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.account-label { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.status.connected { color: var(--green); }
.dot { width: 5px; height: 5px; background: currentColor; flex: none; }
.manage-label { display: flex; align-items: center; gap: 10px; font: 11px GeistMono, monospace; color: var(--muted); }
.chevron { display: inline-block; font: 16px Geist, sans-serif; }
.account[open] > summary .chevron { transform: rotate(180deg); }
.account-settings { padding: 0 0 28px; }
.connection { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hint, .service-note, .lede { color: var(--muted); }
.hint { font-size: 12px; margin: 0; }
.connection .hint { max-width: 220px; }
label { display: block; font: 11px/1.5 GeistMono, monospace; margin-bottom: 8px; }
.optional { color: var(--muted); }
.label-form { max-width: 440px; }
.input-row { display: flex; gap: 8px; }
input, select { min-width: 0; width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 10px 12px; }
input::placeholder { color: var(--muted); }
.disconnect { margin-top: 24px; font-size: 12px; color: var(--muted); }
.disconnect > summary, .import > summary, .yahoo-help > summary { padding: 12px 0; min-height: 44px; }
.disconnect p { max-width: 420px; }
.disconnect button { border-color: var(--muted); }
.notice { margin: 0 0 24px; padding: 14px 16px; border-left: 2px solid var(--green); background: var(--surface); font-size: 13px; }
.inline-error { padding-left: 12px; border-left: 2px solid var(--green); font-size: 13px; }
.service-note { font-size: 12px; margin: 24px 0 0; }
.empty { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0; }
.empty p { color: var(--muted); margin: 6px 0 0; }
.back { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.back:hover, footer a:hover, .text-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.provider { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--line); padding: 28px 0; }
.provider p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.provider:last-of-type { border-bottom: 1px solid var(--line); }
.yahoo-provider { align-items: flex-start; }
.yahoo-setup { width: 380px; max-width: 100%; }
.yahoo-form { display: grid; gap: 16px; }
.yahoo-form button { justify-self: start; }
.yahoo-form .hint { font-size: 12px; margin-top: 8px; }
.yahoo-help { display: inline-block; font-size: 12px; margin-top: 12px; }
.yahoo-setup .notice { margin: 0 0 20px; }
.text-link { text-decoration: underline; text-underline-offset: 4px; }
.import { margin-top: 24px; font-size: 12px; color: var(--muted); }
.activity article { padding: 20px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.activity article > div { min-width: 0; }
.activity h2 { font-size: 14px; }
.activity p { font-size: 12px; color: var(--muted); margin: 4px 0 0; overflow-wrap: anywhere; }
.activity time { flex: none; font: 10px/1.5 GeistMono, monospace; color: var(--muted); }
.login { padding: 48px 0 64px; max-width: 520px; }
.login .lede { margin: 16px 0 32px; }
.login .hint { margin-top: 16px; overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 40px; font-size: 12px; color: var(--muted); }
footer a { display: inline-flex; align-items: center; min-height: 44px; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; left: 16px; top: 16px; padding: 12px; background: var(--bg); z-index: 1; }
@media (max-width: 600px) {
  .app { width: calc(100% - 40px); }
  header { min-height: 80px; }
  main { padding-top: 32px; }
  h1 { font-size: 28px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading .button { padding: 10px 12px; font-size: 11px; }
  .account > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 20px 0; }
  .account-email { font-size: 15px; }
  .status { grid-column: 1; grid-row: 2; }
  .manage-label { grid-column: 2; grid-row: 1 / 3; }
  .connection { align-items: flex-start; flex-direction: column; gap: 16px; }
  .connection .hint { max-width: none; }
  .provider { flex-wrap: wrap; }
  .yahoo-setup { width: 100%; }
  .activity article { align-items: flex-start; flex-direction: column; gap: 8px; }
  .login { padding-top: 24px; }
}
@media (max-width: 340px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .manage-label { font-size: 10px; gap: 5px; }
}

.admin-layout { display: grid; grid-template-columns: 200px minmax(0,1fr); min-height: 100dvh; }
.app-sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 28px 20px; border-right: 1px solid var(--line); background: var(--bg); }
.app-sidebar .brand { padding: 8px 0 40px; }
.app-sidebar nav { display: grid; gap: 4px; }
.app-sidebar nav a { display: block; padding: 12px; font-size: 13px; color: var(--muted); }
.app-sidebar nav .nav-primary { color: var(--text); background: var(--surface); border-left: 2px solid var(--green); }
.nav-primary span { margin-right: 10px; color: var(--green); }
.app-sidebar nav a:hover { color: var(--text); background: var(--surface); }
.owner-menu { margin-top: auto; padding-top: 24px; display: grid; gap: 8px; color: var(--muted); font-size: 11px; }
.owner-email { overflow-wrap: anywhere; }
.settings-main { width: min(100%, 900px); padding: 64px 48px; }
.mail-main { min-width: 0; padding: 0; }

/* Cloud is an overview: dated environment checks and a separate live task list. */
#cloud-app button[aria-disabled="true"] { opacity: .4; cursor: wait; }
#cloud-app .page-heading { align-items: flex-start; margin-bottom: 44px; }
#cloud-app .lede { margin-bottom: 0; font-size: 13px; }
.cloud-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.cloud-section-heading h2 { font-size: 17px; }
.cloud-count { color: var(--muted); font: 11px GeistMono, monospace; }
.cloud-explainer { margin-bottom: 20px; }
.cloud-environments, .cloud-activity { list-style: none; margin: 0; padding: 0; }
.cloud-environment { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; gap: 20px; border-top: 1px solid var(--line); padding: 16px 0; }
.cloud-environment .cloud-links { display: flex; flex-wrap: wrap; gap: 16px; }
.cloud-environment:last-child { border-bottom: 1px solid var(--line); }
.cloud-project h3 { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.cloud-repository { color: var(--muted); font: 10px/1.6 GeistMono, monospace; overflow-wrap: anywhere; }
.cloud-verification { display: grid; gap: 4px; }
.cloud-state { font-size: 12px; color: var(--text); }
.cloud-state.is-good { color: var(--green); }
.cloud-verification time, .cloud-task-state time { font: 10px/1.6 GeistMono, monospace; color: var(--muted); }
.cloud-verification .hint { font-size: 11px; }
.cloud-links { display: grid; gap: 4px; font: 10px/1.5 GeistMono, monospace; }
.cloud-links a { display: inline-flex; align-items: center; min-height: 36px; }
.cloud-links a:hover, .cloud-repository:hover, .cloud-task-main a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.cloud-work { margin-top: 44px; }
#cloud-notice { font-size: 12px; color: var(--muted); margin: 16px 0; }
#cloud-notice:empty { margin: 0; }
.cloud-activity { margin-top: 20px; }
.cloud-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; border-top: 1px solid var(--line); padding: 20px 0; }
.cloud-task-main { min-width: 0; }
.cloud-task-main > a { font-size: 14px; overflow-wrap: anywhere; }
.cloud-task-projects { font-size: 11px; color: var(--muted); margin: 5px 0 0; }
.cloud-task-state { display: grid; align-content: start; gap: 4px; text-align: right; }
.cloud-task .cloud-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; }
.cloud-task .cloud-links:empty { display: none; }
#cloud-more { margin-top: 20px; }
@media (max-width: 1050px) and (min-width: 761px), (max-width: 600px) {
  #cloud-app .page-heading { flex-wrap: wrap; gap: 20px; }
  .cloud-environment { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cloud-verification { grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 12px; }
  .cloud-verification .hint { grid-column: 1 / -1; }
  .cloud-environment .cloud-links { display: flex; flex-wrap: wrap; gap: 24px; }
  .cloud-links a { min-height: 44px; }
  .cloud-task { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cloud-task-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; text-align: left; }
}
@media (max-width: 760px) {
 .admin-layout { grid-template-columns: 1fr; }
 .app-sidebar { position: static; height: auto; padding: 12px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
 .app-sidebar .brand { padding: 4px 0 12px; }
 .app-sidebar nav { display: flex; flex-wrap: wrap; }
 .app-sidebar nav a { padding: 8px 10px; }
 .owner-menu { display: none; }
 .settings-main { padding: 32px 20px; }
}

/* Mail is a dense workspace; settings keep the site's quieter reading width. */
#mail-app { height: 100dvh; display: flex; flex-direction: column; min-width: 0; }
.mail-header { min-height: 92px; padding: 20px 28px; border-bottom: 1px solid var(--line); justify-content: flex-start; gap: 16px; }
.account-switch { flex: 1; max-width: 380px; }
.account-switch label { font-size: 10px; margin: 0 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.account-switch select { min-height: 32px; padding: 4px 24px 4px 0; border: 0; background: transparent; font-size: 14px; }
.settings-link { margin-left: auto; font-size: 12px; color: var(--muted); }
.mail-columns { display: grid; grid-template-columns: 152px minmax(260px,340px) minmax(280px,1fr); flex: 1; min-height: 0; }
.folders { padding: 22px 12px; border-right: 1px solid var(--line); overflow: auto; }
.folders nav { display: grid; gap: 4px; }
.folders nav button { border: 0; justify-content: flex-start; min-height: 36px; padding: 8px 12px; font: 12px Geist,Arial,sans-serif; white-space: normal; overflow-wrap: anywhere; text-align: left; color: var(--muted); }
.folders nav button.active { color: var(--green); background: var(--surface); }
#manage-folders { font-size: 10px; margin: 22px 10px; }
.message-list { min-width: 0; overflow: auto; border-right: 1px solid var(--line); }
#search-form { display: flex; margin: 18px 16px 8px; }
#search { min-height: 40px; font-size: 12px; padding: 8px 12px; }
#search-form button { min-height: 40px; padding: 8px 12px; border-left: 0; font-size: 18px; }
.list-controls { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.list-controls label { display: flex; align-items: center; gap: 5px; margin: 0; font: 10px Geist,Arial,sans-serif; color: var(--muted); }
input[type=checkbox] { width: 14px; height: 14px; min-height: 0; flex: none; accent-color: var(--green); }
#refresh { margin-left: auto; font-size: 20px; }
.list-status { padding: 10px 18px; color: var(--muted); font-size: 12px; }
.list-status:empty { padding: 4px; }
.message-row { display: flex; align-items: flex-start; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; }
.message-row > input { margin-top: 4px; }
.message-row.selected { background: var(--surface); border-left-color: var(--green); }
.message-open { display: grid; gap: 6px; flex: 1; min-width: 0; border: 0; padding: 0; justify-content: stretch; text-align: left; font: 12px Geist,Arial,sans-serif; min-height: 0; white-space: normal; }
.message-open:hover { background: transparent; }
.message-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); }
.sender { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-top time { flex: none; font: 9px GeistMono,monospace; }
.subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.unread .subject, .unread .sender { color: var(--text); font-weight: 600; }
.snippet { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.6; }
.load-more { display: flex; margin: 20px auto; }
.reading-pane { min-width: 0; overflow: auto; }
.message-toolbar { padding: 12px 18px; border-bottom: 1px solid var(--line); min-height: 64px; }
#message-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#message-actions button { font-size: 9px; padding: 6px 8px; min-height: 30px; }
button:disabled { opacity: .4; cursor: wait; }
.operation-status { margin: 0 20px; font-size: 12px; color: var(--muted); }
.operation-status:not(:empty) { padding: 14px 0; border-bottom: 1px solid var(--line); }
.reader-empty { display: grid; align-content: center; justify-items: center; height: calc(100dvh - 200px); padding: 30px; text-align: center; }
.reader-empty h1 { font-size: 22px; letter-spacing: -.5px; }
.reader-empty p { color: var(--muted); font-size: 13px; }
.empty-mark { font-size: 28px; color: var(--green); margin-bottom: 22px; }
.message-heading { padding: 28px 28px 16px; }
.message-heading h1 { font-size: 22px; line-height: 1.4; overflow-wrap: anywhere; letter-spacing: -.5px; }
.message-address { font-size: 13px; margin-top: 18px; overflow-wrap: anywhere; }
.message-details { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 28px; }
.attachments:empty { display: none; }
.attachments button { font-size: 10px; white-space: normal; overflow-wrap: anywhere; }
.message-body { padding: 20px 28px 40px; }
.message-body pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.75 Geist,Arial,sans-serif; }
.message-body details { margin-top: 20px; font-size: 12px; }
.email-frame { width: 100%; height: max(500px, 65vh); border: 0; background: #fff; }
.reader-loading { padding: 28px; color: var(--muted); }
.account-notice { padding: 12px 28px; font-size: 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.conversation-button { margin-top: 24px; }
.conversation article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.conversation h3 { font-size: 13px; }
.mobile-back { display: none; }
dialog { background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: 28px; width: min(90vw,480px); }
dialog::backdrop { background: #0009; }
dialog h2 { margin-bottom: 24px; }
dialog .actions { margin-top: 24px; }
dialog select, dialog input { margin-bottom: 16px; }
.folder-setting { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.folder-setting span { flex: 1; overflow-wrap: anywhere; }
.folder-setting button { padding: 6px; font-size: 10px; }
[hidden] { display: none !important; }
@media (max-width: 1200px) { .admin-layout { grid-template-columns: 164px minmax(0,1fr); } .app-sidebar { padding: 24px 12px; } .mail-columns { grid-template-columns: 120px minmax(240px,300px) minmax(240px,1fr); } }
@media (max-width: 1000px) {
 .mail-columns { grid-template-columns: 120px minmax(0,1fr); }
 .reading-pane { display: none; }
 .show-reader .message-list { display: none; }
 .show-reader .reading-pane { display: block; }
 .mobile-back { display: inline-flex; margin-bottom: 12px; }
}
@media (max-width: 760px) {
 .admin-layout { grid-template-columns: 1fr; }
 .app-sidebar { padding: 10px 16px; }
 .owner-menu { display: flex; align-items: center; padding-top: 4px; gap: 12px; }
 .owner-menu .owner-email { display: none; }
 #mail-app { height: calc(100dvh - 148px); min-height: 500px; }
 .mail-header { min-height: 80px; padding: 12px 16px; gap: 10px; }
 .mail-header .button { font-size: 10px; padding: 8px; }
 .settings-link { display: none; }
 .mail-columns { grid-template-columns: minmax(0,1fr); }
 .folders { padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
 .folders nav { display: flex; }
 .folders nav button { white-space: nowrap; }
 #manage-folders { margin: 0 8px; font-size: 9px; }
 .message-list, .reading-pane { min-height: 0; }
 .mail-columns { grid-template-rows: auto minmax(0,1fr); }
 .show-reader .folders { display: none; }
 .show-reader .reading-pane { grid-row: 1 / 3; }
 .message-heading { padding: 24px 18px 12px; }
 .message-body { padding: 12px 18px 28px; }
}

.signature-page { max-width: 1100px; }
.signature-page .lede { margin-bottom: 32px; }
.signature-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; }
.signature-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 24px 0; }
.signature-enable { font-size: 13px; }
.signature-brand { display: flex; gap: 24px; margin-bottom: 20px; }
.signature-brand > div:last-child { min-width: 0; flex: 1; }
.signature-brand input[type=color] { width: 48px; height: 42px; padding: 4px; }
.signature-brand input[type=file] { padding: 8px; max-width: 100%; font-size: 11px; }
.signature-brand button { padding: 6px 10px; }
.signature-preview h2 { margin: 0 0 16px; font: 11px 'Geist Mono',monospace; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.signature-preview iframe { width: 100%; height: 240px; background: #fff; border: 0; margin-bottom: 32px; }
.signature-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 20px; border: 1px solid var(--line); min-height: 160px; font: 13px/1.6 Geist,Arial,sans-serif; }
#signature-status { font-size: 13px; margin-top: 20px; color: var(--muted); }
@media(max-width:1000px){.signature-layout{grid-template-columns:1fr;gap:32px;}}
@media(max-width:480px){.signature-fields{grid-template-columns:1fr;}.signature-brand{flex-direction:column;}}

.bulk-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.bulk-actions:empty { display: none; }
.bulk-actions button { font-size: 9px; padding: 6px 8px; min-height: 30px; }
