/* Dashboard shell from the Fancy Dashboard artboard. */
:root { background: var(--color-surface); }
.brand { font-size: var(--text-md); line-height: 20px; letter-spacing: var(--tracking-tight); }
.brand-link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.brand-link:hover { opacity: .78; }
.brand-secondary { color: var(--color-text-secondary); font-weight: var(--font-weight-regular); }
.brand-mark, .brand-mark .icon { width: 24px; height: 24px; flex-basis: 24px; }
.sidebar-bottom > button { min-height: 32px; padding: 8px 10px; font-size: var(--text-sm); line-height: 16px; }
.delivery-badge[data-status=pending] { color: var(--color-warning); background: var(--color-warning-soft); }
button, .button-link { border-radius: var(--radius-full); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#app { grid-template-columns: 240px minmax(0, 1fr); background: var(--color-surface); }
html[data-initial-page] .workspace-content > section { display: none !important; }
html[data-initial-page=inboxes] #inboxes-page,
html[data-initial-page=api-keys] #api-keys-page,
html[data-initial-page=integrations] #integrations-page,
html[data-initial-page=domains] #domains-page,
html[data-initial-page=setup] #setup,
html[data-initial-page=settings] #settings-page { display: block !important; }
html[data-initial-page=mail] #mail-page { display: flex !important; }
html[data-initial-page] #page-title { font-size: 0; }
html[data-initial-page] #page-title::after { content: var(--initial-page-title); }
#app[aria-busy=true] :is(.resource-nav, .sidebar-bottom, #workspace-breadcrumb, .resource-footer) { visibility: hidden; }
.sidebar { padding: 20px 12px 12px; gap: 0; justify-content: space-between; background: var(--color-sand-50); }
.sidebar > .brand { padding: 8px 10px 20px; gap: 10px; }
.sidebar nav, .sidebar-bottom { gap: 4px; }
.resource-nav > .section-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.resource-nav a { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; font-size: var(--text-sm); line-height: 16px; font-weight: var(--font-weight-regular); color: var(--color-text-secondary); }
.resource-nav a .icon { color: var(--color-text-muted); }
.resource-nav a:hover { background: var(--color-sand-100); }
.resource-nav a[aria-current] { background: var(--color-surface); color: var(--color-text); font-weight: var(--font-weight-medium); box-shadow: 0 1px 2px #0000000f; }
.resource-nav a[aria-current] .icon { color: var(--color-ink); }
.account-copy strong { font-size: var(--text-sm); }
.account { font-size: var(--text-xs); }
.topbar { min-height: 64px; height: 64px; flex: 0 0 64px; padding: 0 32px; border-bottom: 0; }
.breadcrumbs { display: flex; align-items: center; gap: 12px; font-size: var(--text-sm); line-height: 16px; color: var(--color-text-muted); }
.breadcrumbs a { text-decoration: none; color: var(--color-text-secondary); }
#workspace-breadcrumb { max-width: clamp(100px, 20vw, 240px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs [aria-current], html[data-initial-page] #page-title::after { color: var(--color-text); font-size: var(--text-lg); font-weight: var(--font-weight-semibold); letter-spacing: var(--tracking-tight); line-height: 24px; }
.workspace-content { overflow: auto; padding: 8px 32px 32px; }
.resource-page, .mail-page { max-width: none; margin: 0; width: 100%; }
.resource-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.resource-heading > div { min-width: 0; }
.resource-heading h1 { font-size: var(--text-lg); line-height: 24px; letter-spacing: var(--tracking-tight); outline: none; overflow-wrap: anywhere; }
.resource-heading:not(.mail-heading) h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.resource-heading p { font-size: var(--text-base); line-height: var(--leading-normal); color: var(--color-text-secondary); margin-top: 0; }
.resource-heading > button, .heading-actions > button { min-height: 32px; height: 32px; padding-inline: 14px; flex-shrink: 0; font-size: var(--text-sm); line-height: 16px; }
.resource-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.filter-search { display: flex; flex-direction: row; align-items: center; gap: 8px; width: 280px; height: 40px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 0 12px; color: var(--color-text-muted); background: var(--color-surface); }
.filter-search input { border: 0; padding: 0; height: 38px; font-size: var(--text-sm); background: transparent; }
.filter-search:focus-within { outline: 0; border-color: var(--color-ink); box-shadow: 0 0 0 3px #11111114; }
.filter-search input:focus { box-shadow: none; }
#inbox-group { width: 148px; height: 40px; font-size: var(--text-sm); border-radius: var(--radius-sm); padding-inline: 12px; }
#refresh-inboxes { margin-left: auto; }
.resource-table-wrap { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.resource-table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); text-align: left; }
#inboxes-page .resource-table { table-layout: fixed; }
#inboxes-page th:nth-child(2), #inboxes-page th:nth-child(3), #inboxes-page th:nth-child(4) { width: 18%; }
.resource-table th { background: var(--color-surface); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-medium); line-height: 16px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.resource-table th:first-child { border-top-left-radius: var(--radius-md); }
.resource-table th:last-child { border-top-right-radius: var(--radius-md); }
.resource-table td { height: 52px; padding: 0 20px; border-bottom: 1px solid var(--color-border); color: var(--color-text-secondary); vertical-align: middle; font-size: var(--text-sm); line-height: 16px; }
.resource-table tbody tr:last-child td { border-bottom: 0; }
.resource-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-md); }
.resource-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-md); }
.resource-table tbody tr:hover td { background: var(--color-surface-subtle); }
.resource-table td:last-child, .resource-table th:last-child { text-align: right; width: 56px; }
.resource-table small { display: block; margin-top: 6px; font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; max-width: 260px; }
.resource-table strong, .inbox-group-cell { overflow-wrap: anywhere; }
.inbox-group-cell { max-width: 200px; }
.resource-table code { font-size: var(--text-xs); white-space: nowrap; background: var(--color-surface-subtle); padding: 4px 6px; border-radius: var(--radius-sm); }
.inbox-link { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; width: fit-content; max-width: 100%; }
.inbox-link > span:last-child { min-width: 0; }
.inbox-link strong { font-size: var(--text-base); font-weight: var(--font-weight-medium); display: block; overflow-wrap: anywhere; }
.inbox-link span > span { color: var(--color-text-muted); display: block; font-size: var(--text-xs); margin-top: 4px; overflow-wrap: anywhere; }
.inbox-mark { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-subtle); color: var(--color-text-secondary); }
.delivery-badge { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: var(--radius-full); background: var(--color-success-soft); color: var(--color-success); white-space: nowrap; font-size: var(--text-xs); }
.delivery-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--color-success); }
.delivery-badge[data-status=pending]::before { background: var(--color-warning); }
.resource-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; }
.resource-empty > .icon { box-sizing: content-box; width: 24px; height: 24px; padding: 16px; border-radius: var(--radius-lg); background: var(--color-surface-subtle); color: var(--color-text-secondary); margin-bottom: 8px; }
.resource-empty h2 { font-size: var(--text-lg); }
.resource-empty p { font-size: var(--text-base); line-height: var(--leading-snug); color: var(--color-text-secondary); max-width: 320px; }
.resource-empty button { margin-top: 8px; }
.resource-footer, .resource-footer > div { display: flex; align-items: center; gap: 12px; }
.resource-footer { justify-content: space-between; font-size: var(--text-xs); line-height: 16px; color: var(--color-text-muted); margin-top: 12px; }
.resource-footer button { width: 32px; min-height: 32px; padding: 7px; }
.actions-menu { position: relative; display: inline-block; text-align: left; }
.actions-menu > summary { display: flex; align-items: center; justify-content: center; list-style: none; width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer; }
.actions-menu > summary::-webkit-details-marker { display: none; }
.actions-menu > summary:hover, .actions-menu[open] > summary { background: var(--color-sand-100); }
.actions-popover { position: absolute; top: calc(100% + 4px); right: 0; width: 208px; z-index: 20; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 6px 24px #00000014; padding: 6px; }
.actions-popover button { display: flex; justify-content: flex-start; width: 100%; border: 0; padding: 10px; font-weight: var(--font-weight-regular); font-size: var(--text-sm); border-radius: var(--radius-sm); }
.account-menu { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.account-menu > summary { width: 100%; height: auto; justify-content: flex-start; gap: 10px; padding: 8px 10px; text-align: left; }
.account-menu > summary > .icon { flex: 0 0 16px; color: var(--color-text-muted); }
.account-popover { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; width: auto; }
.account-identity { padding: 8px 10px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); line-height: 20px; overflow-wrap: anywhere; }
.account-identity strong { display: block; font-weight: var(--font-weight-medium); }
.account-identity p { font-size: var(--text-xs); line-height: 16px; color: var(--color-text-muted); }
.account-popover a, .account-popover button { display: flex; align-items: center; gap: 10px; }
.account-popover a { width: 100%; padding: 10px; border-radius: var(--radius-sm); font-size: var(--text-sm); text-decoration: none; }
.account-popover a:hover, .account-popover button:hover { background: var(--color-sand-100); }
.account-popover .icon { color: var(--color-text-muted); }
.danger-text { color: var(--color-danger); }
.danger-text:hover { background: var(--color-danger-soft); }
.danger { color: var(--color-surface); background: var(--color-danger); border-color: var(--color-danger); }
.danger:hover { background: #aa2923; border-color: #aa2923; }
.delete-inbox-target { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.delete-inbox-target div { min-width: 0; overflow-wrap: anywhere; }
.delete-inbox-target strong { font-size: var(--text-base); }
.delete-inbox-target p { font-size: var(--text-sm); margin-top: 3px; }
.mail-page { height: 100%; min-height: 540px; display: flex; flex-direction: column; }
.mail-heading { align-items: flex-start; margin-bottom: 16px; }
.mail-heading > div:first-child { flex: 1; }
.mail-heading h1 { font-size: var(--text-lg); line-height: 24px; letter-spacing: var(--tracking-tight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--color-text-secondary); font-size: var(--text-sm); margin-bottom: 10px; }
.back-link .icon { width: 12px; height: 12px; }
.heading-actions { display: flex; align-items: center; gap: 8px; padding-top: 30px; flex-shrink: 0; }
.mailbox-switcher { display: flex; flex-direction: row; align-items: center; gap: 3px; padding: 2px 0 0; }
.mailbox-switcher select { width: 340px; max-width: 100%; border: 0; padding-left: 0; color: var(--color-text-secondary); height: 32px; font-size: var(--text-sm); }
.mailbox-switcher .icon-button { height: 28px; width: 28px; flex-basis: 28px; padding: 6px; }
.mail-toolbar { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
#folders { display: flex; flex-wrap: wrap; gap: 4px; }
#folders button { border: 0; background: transparent; color: var(--color-text-secondary); font-weight: var(--font-weight-regular); padding: 8px 10px; font-size: var(--text-sm); line-height: 16px; border-radius: var(--radius-sm); }
#folders button[aria-current] { background: var(--color-surface-subtle); color: var(--color-text); font-weight: var(--font-weight-medium); }
#folders button .icon { width: 16px; height: 16px; flex-basis: 16px; }
.search { width: 220px; height: 40px; border-radius: var(--radius-sm); flex-shrink: 0; }
.search input { font-size: var(--text-sm); height: 36px; }
.mail-workspace { flex: 1; min-height: 320px; height: auto; grid-template-columns: 300px minmax(0, 1fr); border-radius: var(--radius-md); }
.list-header { padding: 16px 20px; }
.list-header h2 { font-size: var(--text-base); }
.list-header p { font-size: var(--text-xs); }
.list-tools { display: flex; }
#toggle-triage[aria-expanded=true] { background: var(--color-sand-100); color: var(--color-ink); }
.thread { padding: 16px 20px; }
.thread .avatar { display: inline-flex; }
.thread .sender, .thread .subject { font-size: var(--text-sm); }
.thread .preview { font-size: var(--text-sm); }
.reader-header { padding: 16px 20px; }
.reader-header h2 { font-size: var(--text-lg); line-height: 24px; letter-spacing: var(--tracking-tight); }
.reader-tools button { font-size: var(--text-xs); }
.message { padding: 20px; }
.message-head { margin-bottom: 16px; }
.reply-button { margin: 16px 20px; }
.message-body { font-size: var(--text-base); }
.button-link { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; height: 32px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: var(--radius-full); text-decoration: none; font-size: var(--text-sm); line-height: 16px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.integration-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; background: var(--color-surface); }
.integration-card > [data-icon] { box-sizing: content-box; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); margin-bottom: 16px; color: var(--color-text); }
.integration-card h2 { font-size: var(--text-lg); }
.integration-card p { font-size: var(--text-base); line-height: var(--leading-normal); margin: 8px 0 16px; color: var(--color-text-secondary); }
.integration-card label { font-size: var(--text-xs); }
.integration-card code { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 12px; font-weight: var(--font-weight-regular); font-size: var(--text-xs); overflow-wrap: anywhere; }
.integration-card a { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--text-sm); }
.resource-page > .error:empty { display: none; }
.resource-page > .error { margin-bottom: 16px; }
.settings-content { max-width: 840px; display: grid; gap: 16px; }
.settings-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.settings-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.settings-card-body { padding: 20px; }
.settings-card h2 { font-size: var(--text-lg); font-weight: var(--font-weight-semibold); margin: 0 0 8px; }
.settings-card p, .settings-loading { font-size: var(--text-base); line-height: var(--leading-normal); color: var(--color-text-secondary); }
.settings-card label { display: block; margin: 16px 0 6px; font-size: var(--text-sm); }
.settings-card input { max-width: 460px; font-size: var(--text-base); }
.settings-card input[readonly] { background: var(--color-surface-subtle); color: var(--color-text-secondary); }
.settings-card .settings-hint { margin: 8px 0 0; font-size: var(--text-xs); }
.settings-card-footer { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--color-border); background: var(--color-surface-subtle); }
.settings-card-footer [role=status] { font-size: var(--text-sm); color: var(--color-success); }
.settings-card-footer button { flex-shrink: 0; margin-left: auto; min-height: 36px; }
.settings-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: var(--text-sm); }
@media (max-width: 1199px) { .workspace-content { padding: 8px 24px 24px; } .mail-toolbar { flex-wrap: wrap; } .mail-toolbar .search { flex: 1; } }
@media (max-width: 1023px) { .mail-workspace { grid-template-columns: minmax(0, 1fr); } .inbox-created-cell, #inboxes-page th:nth-child(4) { display: none; } .integration-grid { grid-template-columns: 1fr; } }
@media (min-width: 768px) and (max-width: 1023px) {
  .mail-heading { flex-wrap: wrap; gap: 16px; }
  .mail-heading > div:first-child { flex-basis: 100%; }
  .heading-actions { padding-top: 0; width: 100%; }
  #mail-actions { margin-left: auto; }
}
@media (max-width: 767px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { width: min(240px, calc(100vw - 24px)); padding: 20px 12px 12px; }
  .sidebar > .brand { gap: 10px; font-size: var(--text-md); padding: 8px 10px 20px; }
  .resource-nav a, .sidebar-bottom > button { min-height: 44px; }
  #open-menu, #close-menu { width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex-basis: 44px; }
  #account-button, .account-popover a, .account-popover button { min-height: 44px; }
  .resource-heading > button, .heading-actions > button, .button-link { min-height: 40px; height: 40px; }
  .filter-search { height: 40px; }
  .filter-search input { height: 38px; }
  #inbox-group { height: 40px; }
  .topbar { min-height: 64px; height: 64px; flex-basis: 64px; padding: 0 16px; }
  .workspace-content { padding: 8px 16px 16px; }
  #workspace-breadcrumb { max-width: 140px; }
  .settings-card-body { padding: 20px; }
  .settings-card-footer { padding: 14px 20px; flex-wrap: wrap; }
  .resource-heading { align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
  .resource-heading h1 { font-size: var(--text-lg); line-height: 24px; }
  .resource-heading p { font-size: var(--text-sm); line-height: 20px; }
  .resource-toolbar { flex-wrap: wrap; }
  .filter-search { width: 100%; }
  #inbox-group { width: 160px; }
  .resource-table th, .resource-table td { padding: 12px 8px; }
  .resource-table th:first-child, .resource-table td:first-child { padding-left: 12px; }
  .inbox-group-cell, #inboxes-page th:nth-child(2) { display: none; }
  #inboxes-page th:nth-child(3) { width: 100px; }
  #inboxes-page th:last-child { width: 40px; }
  .inbox-mark { display: none; }
  .inbox-link strong { font-size: var(--text-sm); }
  .inbox-link span > span { font-size: var(--text-xs); }
  .delivery-badge { font-size: var(--text-xs); padding: 3px 7px; }
  .resource-footer { gap: 8px; font-size: var(--text-xs); }
  .resource-footer > div { gap: 8px; }
  .heading-actions { padding-top: 0; width: 100%; }
  #mail-actions { margin-left: auto; }
  .mail-heading { gap: 10px; }
  .mailbox-switcher select { max-width: calc(100vw - 80px); }
  .mail-toolbar { gap: 12px; }
  #folders { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  #folders button { flex-shrink: 0; }
  #folders button .icon { display: none; }
  .mail-toolbar .search { width: 100%; }
  .mail-page { min-height: 650px; }
  .mail-workspace { min-height: 400px; }
  #developer-key-list .resource-table th:nth-child(4), #developer-key-list .resource-table td:nth-child(4), #developer-key-list .resource-table th:nth-child(2), #developer-key-list .resource-table td:nth-child(2) { display: none; }
  .integration-card { padding: 20px; }
}

.settings-card .notification-option { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; font-size: var(--text-base); cursor: pointer; }
.settings-card .notification-option input { width: 16px; height: 16px; flex: 0 0 16px; margin: 2px 0 0; accent-color: var(--color-ink); }
.notification-option strong { display: block; font-weight: var(--font-weight-medium); margin-bottom: 4px; }
.notification-option span span { color: var(--color-text-muted); line-height: 20px; overflow-wrap: anywhere; }
#allow-notifications { margin-top: 10px; font-size: var(--text-sm); }
