/* ─── KnoLink Mail — Brutalist Redesign ──────────────── */

:root {
  /* Colors */
  --bg-cream: #FFFBF5;
  --bg-cream-dark: #F5EFEB;
  --text-main: #111111;
  --border-main: #111111;
  
  --brand-orange: #FFAF01;
  --brand-orange-dark: #FF8204;
  --brand-red: #ff5229;
  --brand-red-dark: #C4001D;
  --brand-blue: #0082E6;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  /* Shadows & Borders */
  --border-width: 2px;
  --shadow-hard: 3px 3px 0 rgba(17, 17, 17, 1);
  --shadow-hard-hover: 5px 5px 0 rgba(17, 17, 17, 1);
  --shadow-hard-active: 1px 1px 0 rgba(17, 17, 17, 1);
  --radius-sm: 2px;

  /* Layout */
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-cream);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(var(--text-main) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Typography ── */
.display-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  line-height: 1.1;
}

.display-title-sm {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mono-subtext {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brand-orange-dark);
  text-transform: uppercase;
}

.text-orange { color: var(--brand-orange-dark); }
.text-red { color: var(--brand-red); }
.text-blue { color: var(--brand-blue); }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }

/* ── Brutalist Components ── */
.brutal-card {
  background-color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  padding: 1.5rem;
  position: relative;
}

.brutal-card-small {
  background-color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  padding: 1rem;
}

.brutal-card-interactive {
  background-color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.15s ease-out;
  display: flex;
  flex-direction: column;
}

.brutal-card-interactive:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-hover);
}

.brutal-card-interactive:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-hard-active);
}

.brutal-input {
  width: 100%;
  padding: 0.75rem;
  background-color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.1s ease;
  box-shadow: inset 0 0 0 transparent;
}

.brutal-input:focus {
  background-color: var(--bg-cream);
  box-shadow: var(--shadow-hard);
  transform: translate(-1px, -1px);
}

.brutal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--brand-red);
  color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: all 0.1s ease;
  outline: none;
  text-decoration: none;
}

.brutal-btn:hover {
  background-color: var(--brand-orange-dark);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard-hover);
}

.brutal-btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-hard-active);
}

.brutal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-hard);
}

.brutal-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: #ffffff;
  color: var(--text-main);
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: all 0.1s ease;
}

.brutal-btn-outline:hover {
  background-color: var(--bg-cream-dark);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard-hover);
}

.brutal-btn-outline:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-hard-active);
}

.brutal-btn-icon {
  background: none;
  border: var(--border-width) solid transparent;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
}
.brutal-btn-icon:hover {
  border: var(--border-width) solid var(--border-main);
  background-color: rgba(0,0,0,0.05);
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.brutal-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0 rgba(17,17,17,1);
}

/* ── Auth Screen ── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.auth-bg-decor {
  position: absolute;
  top: 10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  background: var(--brand-orange);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  z-index: 0;
  animation: float 20s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-10%, 10%); }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  z-index: 10;
  background: #ffffff;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.auth-logo .logo-icon {
  width: 32px;
  height: 32px;
  background-color: var(--brand-orange);
  color: #fff;
  font-weight: bold;
}

.auth-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--brand-red);
}

.auth-tagline {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: var(--border-width) solid rgba(17,17,17,0.1);
}

.auth-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(17,17,17,0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--brand-orange);
}

.field-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-group small {
  color: rgba(17,17,17,0.5);
}

.field-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.field-grow {
  flex: 1;
}

.field-at {
  padding-bottom: 0.75rem;
  font-weight: bold;
  font-family: var(--font-mono);
}

.form-error {
  background-color: rgba(196, 0, 29, 0.1);
  color: var(--brand-red-dark);
  padding: 0.75rem;
  border-left: 4px solid var(--brand-red);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.hidden {
  display: none !important;
}

/* ── App Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background-color: #ffffff;
  border-bottom: var(--border-width) solid var(--border-main);
  position: sticky;
  top: 0;
  z-index: 40;
}

.mobile-header .logo-icon {
  width: 28px;
  height: 28px;
  background-color: var(--brand-orange);
  color: #fff;
  font-size: 0.8rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-brand .logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: #ffffff;
  border-right: var(--border-width) solid var(--border-main);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar .desktop-only {
  padding: 1.5rem;
  border-bottom: var(--border-width) solid var(--border-main);
}
.sidebar .desktop-only .logo-icon {
  width: 32px;
  height: 32px;
  background-color: var(--brand-orange);
  color: #fff;
}

.nav-links {
  flex: 1;
  list-style: none;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 0.15s ease;
}

.nav-link:hover {
  background-color: var(--bg-cream-dark);
}

.nav-link.active {
  background-color: var(--brand-orange);
  color: #ffffff;
  border-right: 4px solid var(--text-main);
}

.sidebar-footer {
  padding: 1rem;
  border-top: var(--border-width) solid var(--border-main);
  background-color: var(--bg-cream-dark);
}

.tenant-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background-color: #ffffff;
}

.tenant-avatar {
  width: 32px;
  height: 32px;
  background-color: var(--brand-blue);
  color: #fff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: var(--font-mono);
}

.tenant-details {
  overflow: hidden;
}

.tenant-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-email {
  font-size: 0.7rem;
  color: rgba(17,17,17,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 3rem;
  max-width: 1200px;
}

/* ── Views ── */
.view-header {
  margin-bottom: 2rem;
}

.view-subtitle {
  color: rgba(17,17,17,0.7);
  font-size: 1.1rem;
}

.split-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

/* ── Overview Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--brand-orange);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

/* ── Quick Actions ── */
.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.action-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.action-icon {
  width: 40px;
  height: 40px;
  background-color: var(--bg-cream-dark);
  border: var(--border-width) solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
}

.action-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.action-desc {
  font-size: 0.85rem;
  color: rgba(17,17,17,0.7);
  flex-grow: 1;
}

.action-arrow {
  margin-top: 1rem;
  align-self: flex-end;
  font-family: var(--font-mono);
  font-weight: bold;
}

/* ── Lists / Cards (Domains, Mailboxes, Emails) ── */
.domains-list,
.mailboxes-list,
.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.domain-card,
.mailbox-card {
  background-color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0 rgba(17,17,17,1);
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.domain-info,
.mailbox-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.domain-icon,
.mailbox-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--brand-orange);
  color: #fff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.mailbox-avatar { background-color: var(--brand-blue); }

.domain-name,
.mailbox-address {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
}

.domain-meta,
.mailbox-meta {
  font-size: 0.75rem;
  color: rgba(17,17,17,0.6);
  margin-top: 0.25rem;
}

.domain-actions,
.mailbox-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: bold;
  text-transform: uppercase;
}
.badge-success { background-color: #A3E635; color: #111; }
.badge-warning { background-color: var(--brand-orange); color: #111; }
.badge-danger { background-color: var(--brand-red); color: #fff; }

/* ── DNS Panel ── */
.dns-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.brutal-alert {
  background-color: var(--bg-cream-dark);
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.dns-table-wrapper {
  overflow-x: auto;
  border: var(--border-width) solid var(--border-main);
  margin-bottom: 1.5rem;
}

.dns-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.dns-table th {
  background-color: var(--bg-cream-dark);
  border-bottom: var(--border-width) solid var(--border-main);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dns-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(17,17,17,0.1);
}

.dns-table tr:last-child td {
  border-bottom: none;
}

.dns-type-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  background-color: #111;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
}
.dns-type-MX { background-color: var(--brand-blue); }
.dns-type-TXT { background-color: var(--brand-orange-dark); }
.dns-type-CNAME { background-color: var(--brand-red); }

.dns-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-cream);
  border: 1px solid var(--border-main);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-main);
}

.dns-actions {
  display: flex;
  gap: 1rem;
}

/* ── Inbox Items ── */
.email-item {
  background-color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.email-item:hover {
  background-color: var(--bg-cream-dark);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--text-main);
}

.email-item.unread {
  background-color: var(--bg-cream);
  border-left: 6px solid var(--brand-blue);
  font-weight: 600;
}

.email-from {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: bold;
}

.email-subject {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-date {
  width: 100%;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(17,17,17,0.6);
  white-space: nowrap;
}

.email-detail-header {
  border-bottom: var(--border-width) solid var(--border-main);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.email-detail-subject {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.email-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(17,17,17,0.8);
}

.email-detail-body {
  white-space: pre-wrap;
  font-family: var(--font-sans);
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(17,17,17,0.4);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  width: 100%;
  max-width: 500px;
  background-color: #ffffff;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background-color: #ffffff;
  border: var(--border-width) solid var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Mobile & Responsive ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17,17,17,0.5);
  z-index: 45;
}

@media (max-width: 800px) {
  .app-shell {
    flex-direction: column;
  }
  
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.open ~ .sidebar-overlay {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }

  .split-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .domain-card, .mailbox-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .domain-actions, .mailbox-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 1rem;
    border-top: 1px solid rgba(17,17,17,0.1);
    padding-top: 1rem;
  }
  
  .email-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .email-from {
    width: 100%;
  }
}

/* ── Split-Pane Layout (Inbox/Sent) ── */
.mail-layout {
  display: flex;
  gap: 1.5rem;
  height: calc(100vh - 8rem);
  margin-top: 1rem;
}

.mail-list-pane {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 0.75rem 2rem 0.25rem;
}

.mail-reading-pane {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.email-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  text-align: center;
}

/* Scrollbar styling for panes */
.mail-list-pane::-webkit-scrollbar,
.mail-reading-pane::-webkit-scrollbar {
  width: 6px;
}
.mail-list-pane::-webkit-scrollbar-track,
.mail-reading-pane::-webkit-scrollbar-track {
  background: transparent;
}
.mail-list-pane::-webkit-scrollbar-thumb,
.mail-reading-pane::-webkit-scrollbar-thumb {
  background-color: rgba(17,17,17,0.2);
  border-radius: 4px;
}

@media (max-width: 1024px) {
  .mail-layout {
    flex-direction: column;
    height: auto;
  }
  .mail-list-pane {
    flex: none;
    width: 100%;
    height: calc(100vh - 12rem);
  }
  .mail-reading-pane {
    display: none;
  }
  
  /* When an email is selected on mobile */
  .mail-layout.mobile-reading .mail-list-pane {
    display: none;
  }
  .mail-layout.mobile-reading .mail-reading-pane {
    display: flex;
    height: calc(100vh - 12rem);
  }
}

.mobile-back-btn {
  display: none;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-weight: bold;
}

@media (max-width: 1024px) {
  .mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
}

.email-detail-iframe {
  width: 100%;
  border: none;
  min-height: 500px;
  flex: 1;
  background-color: #ffffff; /* ensure emails have a white bg */
}
