/* -------------------------------------------------------------
 * szkpn.pl Mail - Complete Dark UI Design System
 * Modern Glassmorphism & High-Contrast Dark Theme
 * ------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

:root {
  /* Color Palette - Solid Dark Grey & Clean High-Contrast */
  --bg-main: #12141a;
  --bg-surface: #181a22;
  --bg-surface-elevated: #222530;
  --bg-card: #171920;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(99, 102, 241, 0.15);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --border-glow: rgba(99, 102, 241, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-cyan: #06b6d4;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Theme Variations */
body.theme-slate {
  --bg-main: #12141a;
  --bg-surface: #181a22;
  --bg-surface-elevated: #222530;
  --bg-card: #171920;
  --accent-primary: #6366f1;
}

body.theme-oled {
  --bg-main: #000000;
  --bg-surface: #0a0a0a;
  --bg-surface-elevated: #141414;
  --bg-card: #0d0d0d;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --accent-primary: #8b5cf6;
}

body.theme-cyber {
  --bg-main: #060b12;
  --bg-surface: #0d1522;
  --bg-surface-elevated: #162235;
  --bg-card: #0a111c;
  --border-subtle: rgba(6, 182, 212, 0.15);
  --accent-primary: #06b6d4;
  --accent-secondary: #3b82f6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Buttons & Inputs System */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-md);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}
.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

input, select, textarea {
  font-family: inherit;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  outline: none;
  width: 100%;
  transition: var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Badges */
.badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-indigo { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-rose { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }

/* =============================================================
 * SECTION: LANDING PAGE (Strona Startowa)
 * ============================================================= */
#landing-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
}
.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.brand-title span {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
}
.nav-link:hover {
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 20px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: #a5b4fc;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  color: #f8fafc;
}
.hero-title span {
  color: var(--accent-primary);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

/* Landing Cards Grid - Single Row 4 Columns */
.features-grid {
  max-width: 1400px;
  margin: 0 auto 80px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: left;
  backdrop-filter: blur(12px);
  transition: var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* IMAP/SMTP Guide Section */
.config-box {
  max-width: 1000px;
  margin: 0 auto 80px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.config-card {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}
.config-card h4 {
  font-size: 1rem;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.config-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 0.9rem;
}
.config-item:last-child { border-bottom: none; }
.config-val {
  font-family: 'Fira Code', monospace;
  color: var(--accent-primary);
  font-weight: 500;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* =============================================================
 * SECTION: AUTH LOGIN MODAL
 * ============================================================= */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.auth-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 12px;
}
.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--text-muted);
}
.close-modal-btn:hover { color: var(--text-primary); }

/* Quick Login Pills */
.quick-logins {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.quick-logins span {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}
.quick-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.quick-pill {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.quick-pill:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* =============================================================
 * SECTION: WEBMAIL DASHBOARD (Aplikacja Poczty)
 * ============================================================= */
#webmail-view {
  height: 100vh;
  display: grid;
  grid-template-rows: 60px 1fr;
  background: var(--bg-main);
}

/* Top App Header */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.search-box {
  position: relative;
  width: 420px;
}
.search-box input {
  padding-left: 38px;
  background: var(--bg-main);
  border-radius: var(--radius-full);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Webmail Layout (3 Columns) */
.webmail-body {
  display: grid;
  grid-template-columns: 240px 380px 1fr;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* COLUMN 1: LEFT SIDEBAR */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.compose-btn-wrap {
  width: 100%;
}
.btn-compose {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--bg-active);
  color: var(--accent-primary);
  font-weight: 600;
}
.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.nav-item.active .nav-count {
  background: var(--accent-primary);
  color: #fff;
}

/* Sidebar Storage Meter */
.storage-box {
  margin-top: auto;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}
.storage-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.storage-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.storage-bar-fill {
  height: 100%;
  width: 9%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 3px;
}

/* COLUMN 2: EMAIL LIST */
.mail-list-panel {
  background: var(--bg-main);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.list-toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.list-tabs {
  display: flex;
  gap: 6px;
}
.tab-btn {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
}

.list-scroll {
  flex: 1;
  overflow-y: auto;
}

.mail-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  gap: 12px;
  transition: var(--transition-fast);
  position: relative;
}
.mail-item:hover {
  background: var(--bg-hover);
}
.mail-item.selected {
  background: var(--bg-active);
  border-left: 3px solid var(--accent-primary);
}
.mail-item.unread {
  background: rgba(99, 102, 241, 0.05);
}
.mail-item.unread .mail-subject {
  font-weight: 700;
  color: #fff;
}

.mail-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: #334155;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.mail-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.mail-sender {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.mail-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mail-subject {
  font-size: 0.86rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.mail-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: inline-block;
  margin-right: 6px;
}

/* COLUMN 3: EMAIL READER PANE */
.mail-reader-panel {
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.reader-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
}
.reader-empty-icon {
  font-size: 3rem;
  opacity: 0.4;
}

.reader-toolbar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
  position: sticky;
  top: 0;
  z-index: 10;
}
.reader-actions {
  display: flex;
  gap: 8px;
}

.reader-body {
  padding: 30px;
  flex: 1;
}

.mail-header-info {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.reader-subject {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.sender-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sender-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sender-name {
  font-weight: 700;
  font-size: 0.95rem;
}
.sender-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.mail-body-content {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 30px;
}

/* Attachments Chip */
.attachments-box {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 30px;
}
.attachments-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.attachments-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.attachment-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.attachment-chip:hover {
  border-color: var(--accent-primary);
}

/* Inline Quick Reply */
.quick-reply-box {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
}
.quick-reply-box textarea {
  min-height: 80px;
  margin-bottom: 10px;
  resize: vertical;
}

/* =============================================================
 * SECTION: COMPOSER MODAL (Napisz Maila)
 * ============================================================= */
.composer-modal {
  position: fixed;
  bottom: 0;
  right: 40px;
  width: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-normal);
}
.composer-modal.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.composer-header {
  background: var(--bg-main);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.composer-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.composer-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.composer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}
.composer-row label {
  width: 60px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.composer-row input {
  border: none;
  background: transparent;
  padding: 4px 0;
}
.composer-row input:focus { box-shadow: none; }

.composer-body textarea {
  min-height: 180px;
  border: none;
  background: transparent;
  padding: 8px 0;
  resize: none;
}
.composer-body textarea:focus { box-shadow: none; }

.composer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
}

/* =============================================================
 * SECTION: CONTACTS & SETTINGS MODALS
 * ============================================================= */
.full-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.full-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.full-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .webmail-body {
    grid-template-columns: 80px 1fr;
  }
  .sidebar span, .nav-count, .storage-box { display: none; }
  .mail-reader-panel { display: none; }
  .hero-title { font-size: 2.4rem; }
  .config-box { grid-template-columns: 1fr; }
}
