/* ==========================================================================
   Shmry Mail — Mobile-First Responsive Design & Stylesheet
   ========================================================================== */

:root {
  /* Color Palette - Midnight Dark (Default) */
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-card: #1e293b;
  --bg-sidebar: #0f172a;
  --bg-header: rgba(15, 23, 42, 0.95);
  --bg-hover: #334155;
  --bg-active: #334155;
  --bg-selected: rgba(99, 102, 241, 0.18);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-white: #ffffff;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-glow: rgba(99, 102, 241, 0.35);
  
  --border-color: #334155;
  --border-light: rgba(255, 255, 255, 0.08);
  
  --star-color: #f59e0b;
  --unread-dot: #38bdf8;
  
  /* Category & Label Colors */
  --color-work: #38bdf8;
  --color-personal: #ec4899;
  --color-urgent: #ef4444;
  --color-developer: #10b981;
  --color-finance: #f59e0b;
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  
  /* Layout Dimensions */
  --header-height: 60px;
  --sidebar-width: 260px;
  --email-list-width: 360px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-app: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-sidebar: #f8fafc;
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-hover: #e2e8f0;
  --bg-active: #cbd5e1;
  --bg-selected: #e0e7ff;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-light: rgba(0, 0, 0, 0.06);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
}

body, html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-primary);
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

/* Header */
.app-header {
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-badge {
  font-size: 0.6rem;
  background: var(--accent-primary);
  color: white;
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  vertical-align: super;
  font-weight: 600;
}

.header-center {
  flex: 1;
  max-width: 500px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  gap: 10px;
  transition: var(--transition-normal);
}

.search-bar:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Controls */
.btn-icon {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-icon-sm {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-header-pill {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-open-acc-pill {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-profile {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

/* User Profile Dropdown Menu */
.user-profile-menu-container {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  top: 45px;
  right: 0;
  width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 12px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.dropdown-email {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.dropdown-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 0 4px;
}

.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.account-item:hover {
  background: var(--bg-hover);
}

.account-item.active-acc {
  background: var(--bg-selected);
  border-left: 3px solid var(--accent-primary);
}

.account-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.acc-name {
  font-size: 0.82rem;
  font-weight: 600;
}

.acc-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item {
  background: transparent;
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-item.text-danger {
  color: #ef4444;
}

/* Auth / Account Creation Dialog */
.auth-window {
  width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
}

.auth-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-app);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-app);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.auth-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-group label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-input-group input {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}

.auth-input-group input:focus {
  border-color: var(--accent-primary);
}

.input-with-suffix {
  display: flex;
  align-items: center;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-with-suffix input {
  flex: 1;
  border: none !important;
  background: transparent;
}

.domain-suffix {
  padding: 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  height: 100%;
  display: flex;
  align-items: center;
}

.btn-auth-submit {
  width: 100%;
  height: 44px;
  justify-content: center;
  font-size: 0.95rem;
  margin-top: 6px;
}

/* App Body & Sidebar */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  justify-content: space-between;
  transition: transform var(--transition-normal);
  z-index: 900;
}

.btn-compose {
  width: 100%;
  height: 44px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.nav-folders {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin: 12px 10px 6px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-primary);
  color: white;
  font-weight: 600;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.color-dot.work { background: var(--color-work); }
.color-dot.personal { background: var(--color-personal); }
.color-dot.urgent { background: var(--color-urgent); }
.color-dot.developer { background: var(--color-developer); }
.color-dot.finance { background: var(--color-finance); }

.storage-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-top: auto;
}

.storage-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.storage-bar {
  height: 5px;
  background: var(--bg-app);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  background: var(--accent-gradient);
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-app);
}

.tabs-bar {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.tab-item.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.tab-badge {
  background: var(--accent-primary);
  color: white;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}

/* Toolbar */
.action-toolbar {
  height: 44px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-surface);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-toolbar {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px;
}

.btn-toolbar:disabled {
  opacity: 0.35;
}

.toolbar-right {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Content Split View */
.content-split-view {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.email-list-container {
  width: var(--email-list-width);
  border-right: 1px solid var(--border-color);
  background: var(--bg-surface);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.email-list {
  display: flex;
  flex-direction: column;
}

.email-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.email-item:hover {
  background: var(--bg-hover);
}

.email-item.selected {
  background: var(--bg-selected);
}

.email-item.unread {
  font-weight: 600;
}

.email-item.unread::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--unread-dot);
}

.email-star {
  color: var(--text-muted);
  padding: 2px;
}

.email-star.starred {
  color: var(--star-color);
}

.email-content-preview {
  flex: 1;
  min-width: 0;
}

.email-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.email-sender {
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.email-subject {
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.email-snippet {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.tag-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* Email Reader Section */
.email-reader {
  flex: 1;
  background: var(--bg-app);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.email-reader.empty {
  align-items: center;
  justify-content: center;
}

.reader-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.reader-placeholder i {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.4;
}

.reader-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 850px;
  margin: 0 auto;
  width: 100%;
}

.reader-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.mobile-back-btn {
  display: none;
}

.reader-subject {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.reader-toolbar {
  display: flex;
  gap: 6px;
}

.sender-info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-md);
}

.sender-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sender-top-row {
  display: flex;
  justify-content: space-between;
}

.message-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sender-email {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.reader-body-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.reply-composer-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-header {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.reply-composer-card textarea {
  width: 100%;
  min-height: 80px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px;
  outline: none;
  resize: vertical;
  font-size: 0.9rem;
}

.reply-actions {
  display: flex;
  gap: 10px;
}

/* Buttons */
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}

/* Compose Modal Window */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 30px 0 0;
  z-index: 2000;
}

.compose-window {
  width: 540px;
  height: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compose-titlebar {
  background: var(--bg-app);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.compose-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.compose-field {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding: 6px 0;
  font-size: 0.88rem;
}

.compose-field label {
  width: 60px;
  color: var(--text-muted);
}

.compose-field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.formatting-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}

.btn-fmt {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.fmt-divider {
  width: 1px;
  height: 14px;
  background: var(--border-color);
  margin: 0 4px;
}

.btn-ai-pill {
  margin-left: auto;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.compose-editable {
  flex: 1;
  outline: none;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  overflow-y: auto;
}

.compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3000;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE BREAKPOINTS (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .mobile-back-btn {
    display: flex !important;
  }

  /* Header */
  .app-header {
    padding: 0 10px;
  }

  .header-left {
    width: auto;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .search-bar {
    padding: 4px 10px;
  }

  .search-bar input {
    font-size: 0.82rem;
  }

  /* Sidebar Drawer */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1100;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 1200;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }

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

  /* Mobile Views Switcher (List vs Reader) */
  .email-list-container {
    width: 100%;
    border-right: none;
  }

  .email-reader {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: none;
  }

  /* When an email is selected on mobile */
  .content-split-view.mobile-view-reader .email-list-container {
    display: none;
  }

  .content-split-view.mobile-view-reader .email-reader {
    display: flex;
  }

  .reader-content {
    padding: 16px;
  }

  .reader-subject {
    font-size: 1.1rem;
  }

  .sender-info-card {
    padding: 10px;
  }

  /* Fullscreen Mobile Compose & Auth Modals */
  .modal-backdrop {
    padding: 0;
  }

  .compose-window, .auth-window {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
}
