/* ==========================================================================
   NSEND EMAIL MANAGER - Premium Webmail Application Stylesheet
   Version: 1.0.0

   Table of Contents:
   1.  CSS Custom Properties (Theme System)
   2.  Reset & Base Styles
   3.  Typography
   4.  Layout System
   5.  Sidebar
   6.  Message List
   7.  Reading Pane
   8.  Compose Modal
   9.  Login Page
   10. Settings Pages
   11. Admin Panel
   12. Contacts
   13. Buttons
   14. Form Inputs
   15. Cards
   16. Badges & Pills
   17. Dropdowns
   18. Modals
   19. Toast Notifications
   20. Loading States
   21. Empty States
   22. Tooltips
   23. Avatars
   24. Checkboxes & Toggles
   25. Animations & Keyframes
   26. Utility Classes
   27. Scrollbar Styling
   28. Responsive Breakpoints
   ========================================================================== */


/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (THEME SYSTEM)
   ========================================================================== */

:root {
  /* ---- Primary Palette ---- */
  --color-primary-50:  #eef2ff;
  --color-primary-100: #e0e7ff;
  --color-primary-200: #c7d2fe;
  --color-primary-300: #a5b4fc;
  --color-primary-400: #818cf8;
  --color-primary-500: #6366f1;
  --color-primary-600: #4f46e5;
  --color-primary-700: #4338ca;
  --color-primary-800: #3730a3;
  --color-primary-900: #312e81;

  /* ---- Neutral / Slate ---- */
  --color-slate-25:  #fcfcfd;
  --color-slate-50:  #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;

  /* ---- Semantic Colors ---- */
  --color-success-50:  #f0fdf4;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;
  --color-success-700: #15803d;

  --color-warning-50:  #fffbeb;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;

  --color-danger-50:  #fef2f2;
  --color-danger-500: #ef4444;
  --color-danger-600: #dc2626;
  --color-danger-700: #b91c1c;

  --color-info-50:  #eff6ff;
  --color-info-500: #3b82f6;
  --color-info-600: #2563eb;

  /* ---- Light Theme Tokens ---- */
  --bg-app:           #f1f5f9;
  --bg-surface:       #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-surface-active:#f1f5f9;
  --bg-elevated:      #ffffff;
  --bg-sidebar:       #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active:#334155;
  --bg-overlay:       rgba(15, 23, 42, 0.5);
  --bg-input:         #ffffff;

  --text-primary:     #0f172a;
  --text-secondary:   #475569;
  --text-tertiary:    #94a3b8;
  --text-inverse:     #ffffff;
  --text-sidebar:     #cbd5e1;
  --text-sidebar-active: #ffffff;
  --text-link:        #4f46e5;
  --text-on-primary:  #ffffff;

  --border-default:   #e2e8f0;
  --border-light:     #f1f5f9;
  --border-focus:     #4f46e5;
  --border-input:     #cbd5e1;

  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);

  --ring-focus: 0 0 0 3px rgba(79, 70, 229, 0.2);

  /* ---- Sizing & Spacing ---- */
  --sidebar-width:      280px;
  --sidebar-collapsed:  64px;
  --header-height:      56px;
  --toolbar-height:     48px;
  --message-row-height: 64px;

  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ---- Typography ---- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 0.875rem;   /* 14px */
  --text-md:   1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;

  --font-normal:   400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;

  /* ---- Transitions ---- */
  --transition-fast:   100ms ease;
  --transition-base:   150ms ease;
  --transition-smooth: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---- Z-Index Scale ---- */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
}

/* ---- Dark Mode Theme ---- */
[data-theme="dark"] {
  --bg-app:           #020617;
  --bg-surface:       #0f172a;
  --bg-surface-hover: #1e293b;
  --bg-surface-active:#334155;
  --bg-elevated:      #1e293b;
  --bg-sidebar:       #020617;
  --bg-sidebar-hover: #0f172a;
  --bg-sidebar-active:#1e293b;
  --bg-overlay:       rgba(0, 0, 0, 0.65);
  --bg-input:         #1e293b;

  --text-primary:     #f1f5f9;
  --text-secondary:   #94a3b8;
  --text-tertiary:    #64748b;
  --text-inverse:     #0f172a;
  --text-sidebar:     #94a3b8;
  --text-sidebar-active: #f1f5f9;
  --text-link:        #818cf8;
  --text-on-primary:  #ffffff;

  --border-default:   #1e293b;
  --border-light:     #0f172a;
  --border-focus:     #818cf8;
  --border-input:     #334155;

  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

  --ring-focus: 0 0 0 3px rgba(129, 140, 248, 0.3);
}


/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-app);
  min-height: 100vh;
  overflow: hidden;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

[data-theme="dark"] a:hover {
  color: var(--color-primary-300);
}

img {
  display: block;
  max-width: 100%;
}

svg.icon,
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.sidebar-brand .icon {
  width: 28px;
  height: 28px;
}

.empty-state-icon .icon {
  width: 64px;
  height: 64px;
  color: var(--text-tertiary);
  opacity: 0.5;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: var(--space-4) 0;
}

::selection {
  background-color: var(--color-primary-100);
  color: var(--color-primary-900);
}

[data-theme="dark"] ::selection {
  background-color: var(--color-primary-800);
  color: var(--color-primary-100);
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.015em; }
h3 { font-size: var(--text-xl);  letter-spacing: -0.01em; }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

.text-caption {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: var(--leading-normal);
}

.text-small {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.text-body {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.font-medium   { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold     { font-weight: var(--font-bold); }


/* ==========================================================================
   4. LAYOUT SYSTEM
   ========================================================================== */

.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
  z-index: var(--z-sticky);
}

.app-header__title {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.app-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Three-panel layout */
.panel-list {
  width: 380px;
  min-width: 280px;
  max-width: 500px;
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  overflow: hidden;
}

.panel-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-surface);
  overflow: hidden;
}

/* Panel resize handle */
.panel-resize-handle {
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background var(--transition-base);
  flex-shrink: 0;
  position: relative;
}

.panel-resize-handle:hover,
.panel-resize-handle:active {
  background: var(--color-primary-500);
}

.panel-resize-handle::after {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  right: -4px;
  bottom: 0;
}


/* ==========================================================================
   5. SIDEBAR
   ========================================================================== */

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition-smooth), min-width var(--transition-smooth);
  flex-shrink: 0;
  z-index: var(--z-base);
}

.sidebar--collapsed {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}

.sidebar--collapsed .sidebar__label,
.sidebar--collapsed .sidebar__count,
.sidebar--collapsed .sidebar__compose-text,
.sidebar--collapsed .sidebar__account-info {
  display: none;
}

.sidebar--collapsed .sidebar__nav-item,
.sidebar--collapsed .sidebar__compose-btn {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* -- Account Switcher -- */
.sidebar__account {
  padding: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__account-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-sidebar-active);
  transition: background var(--transition-base);
  cursor: pointer;
}

.sidebar__account-trigger:hover {
  background: var(--bg-sidebar-hover);
}

.sidebar__account-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: white;
  flex-shrink: 0;
}

.sidebar__account-info {
  flex: 1;
  min-width: 0;
}

.sidebar__account-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-sidebar-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__account-email {
  font-size: var(--text-xs);
  color: var(--text-sidebar);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__account-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-sidebar);
  transition: transform var(--transition-base);
}

.sidebar__account-trigger[aria-expanded="true"] .sidebar__account-chevron {
  transform: rotate(180deg);
}

/* -- Compose Button -- */
.sidebar__compose {
  padding: var(--space-3) var(--space-4);
}

.sidebar__compose-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-600);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: background var(--transition-base), transform var(--transition-fast);
  cursor: pointer;
  border: none;
  height: 40px;
}

.sidebar__compose-btn:hover {
  background: var(--color-primary-500);
  transform: translateY(-1px);
}

.sidebar__compose-btn:active {
  background: var(--color-primary-700);
  transform: translateY(0);
}

.sidebar__compose-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* -- Navigation -- */
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) var(--space-3);
}

.sidebar__nav-group {
  margin-bottom: var(--space-4);
}

.sidebar__nav-heading {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-sidebar);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.sidebar__nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-sidebar-active);
  text-decoration: none;
}

.sidebar__nav-item--active {
  background: var(--bg-sidebar-active);
  color: var(--text-sidebar-active);
}

.sidebar__nav-item--active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--color-primary-500);
  border-radius: var(--radius-full);
}

.sidebar__nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar__nav-item:hover .sidebar__nav-icon,
.sidebar__nav-item--active .sidebar__nav-icon {
  opacity: 1;
}

.sidebar__label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__count {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary-600);
  color: white;
}

.sidebar__count--muted {
  background: transparent;
  color: var(--text-sidebar);
}

/* -- Sidebar Footer -- */
.sidebar__footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* -- Folder color indicators -- */
.sidebar__folder-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.sidebar__folder-dot--red    { background: #ef4444; }
.sidebar__folder-dot--orange { background: #f97316; }
.sidebar__folder-dot--yellow { background: #eab308; }
.sidebar__folder-dot--green  { background: #22c55e; }
.sidebar__folder-dot--blue   { background: #3b82f6; }
.sidebar__folder-dot--purple { background: #a855f7; }


/* ==========================================================================
   6. MESSAGE LIST
   ========================================================================== */

.message-list__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  height: var(--toolbar-height);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}

.message-list__toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.message-list__toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.message-list__search {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.message-list__search-input {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-3) 0 36px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.message-list__search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
  background: var(--bg-surface);
}

.message-list__search-input::placeholder {
  color: var(--text-tertiary);
}

.message-list__search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

/* Scrollable message rows */
.message-list__items {
  flex: 1;
  overflow-y: auto;
}

/* -- Single Message Row -- */
.message-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  min-height: var(--message-row-height);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.message-row:hover {
  background: var(--bg-surface-hover);
}

.message-row--selected {
  background: var(--color-primary-50);
  border-left: 3px solid var(--color-primary-600);
  padding-left: calc(var(--space-4) - 3px);
}

[data-theme="dark"] .message-row--selected {
  background: rgba(79, 70, 229, 0.1);
}

.message-row--unread .message-row__sender,
.message-row--unread .message-row__subject {
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.message-row--unread::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary-600);
}

.message-row--selected.message-row--unread::after {
  left: 3px;
}

.message-row__checkbox {
  flex-shrink: 0;
}

.message-row__avatar {
  flex-shrink: 0;
}

.message-row__content {
  flex: 1;
  min-width: 0;
}

.message-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.message-row__sender {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-row__date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.message-row__subject {
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.message-row__snippet {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: var(--leading-normal);
}

.message-row__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.message-row__star {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color var(--transition-base);
  flex-shrink: 0;
}

.message-row__star:hover {
  color: var(--color-warning-500);
}

.message-row__star--active {
  color: var(--color-warning-500);
  fill: var(--color-warning-500);
}

.message-row__attachment-icon {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.message-row__labels {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}


/* ==========================================================================
   7. READING PANE
   ========================================================================== */

.reading-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.reading-pane__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  height: var(--toolbar-height);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
  gap: var(--space-2);
}

.reading-pane__toolbar-group {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* -- Message Header -- */
.reading-pane__header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}

.reading-pane__subject {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.reading-pane__from {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.reading-pane__from-info {
  flex: 1;
  min-width: 0;
}

.reading-pane__sender-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.reading-pane__sender-email {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.reading-pane__recipients {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.reading-pane__recipients strong {
  color: var(--text-secondary);
  font-weight: var(--font-medium);
}

.reading-pane__date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* -- Message Body -- */
.reading-pane__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

.reading-pane__body-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  max-width: 720px;
}

.reading-pane__body-content p {
  margin-bottom: var(--space-4);
}

.reading-pane__body-content a {
  color: var(--text-link);
  text-decoration: underline;
}

.reading-pane__body-content blockquote {
  border-left: 3px solid var(--border-default);
  padding-left: var(--space-4);
  margin: var(--space-4) 0;
  color: var(--text-secondary);
}

.reading-pane__body-content pre {
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  margin: var(--space-4) 0;
}

/* -- Attachments -- */
.reading-pane__attachments {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
}

.reading-pane__attachments-header {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  max-width: 240px;
}

.attachment-item:hover {
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
  color: var(--color-primary-700);
}

[data-theme="dark"] .attachment-item:hover {
  border-color: var(--color-primary-700);
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary-300);
}

.attachment-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.attachment-item__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.attachment-item__size {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
}


/* ==========================================================================
   8. COMPOSE MODAL
   ========================================================================== */

.compose-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-6);
  animation: fadeIn 150ms ease;
}

.compose-modal {
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 48px);
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
  animation: slideUp 250ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Full-screen compose variant */
.compose-modal--fullscreen {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-lg);
  margin: auto;
  max-width: 800px;
  max-height: calc(100vh - 80px);
}

.compose-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}

.compose-modal__title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.compose-modal__header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* -- Recipient Fields -- */
.compose-field {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  min-height: 40px;
}

.compose-field__label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: var(--font-medium);
  padding-top: 6px;
  width: 40px;
  flex-shrink: 0;
}

.compose-field__input-area {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-height: 32px;
}

.compose-field__input {
  flex: 1;
  min-width: 120px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--text-sm);
  padding: 4px 0;
  outline: none;
}

.compose-field__input::placeholder {
  color: var(--text-tertiary);
}

/* Recipient pills */
.recipient-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 4px 2px 8px;
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-200);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-primary-700);
  max-width: 200px;
  transition: background var(--transition-base);
}

[data-theme="dark"] .recipient-pill {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.3);
  color: var(--color-primary-300);
}

.recipient-pill:hover {
  background: var(--color-primary-100);
}

.recipient-pill__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-pill__remove {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-primary-400);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.recipient-pill__remove:hover {
  background: var(--color-primary-200);
  color: var(--color-primary-700);
}

/* -- Subject -- */
.compose-subject {
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.compose-subject__input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: 6px 0;
  outline: none;
}

.compose-subject__input::placeholder {
  color: var(--text-tertiary);
  font-weight: var(--font-normal);
}

/* -- Rich Text Toolbar -- */
.compose-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.compose-toolbar__btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.compose-toolbar__btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.compose-toolbar__btn--active {
  background: var(--color-primary-50);
  color: var(--color-primary-600);
}

[data-theme="dark"] .compose-toolbar__btn--active {
  background: rgba(79, 70, 229, 0.15);
  color: var(--color-primary-400);
}

.compose-toolbar__divider {
  width: 1px;
  height: 20px;
  background: var(--border-default);
  margin: 0 var(--space-1);
}

/* -- Body Editor -- */
.compose-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  min-height: 200px;
}

.compose-body__editor {
  min-height: 180px;
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  outline: none;
}

.compose-body__editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-tertiary);
  pointer-events: none;
}

/* -- Attachment Drop Zone -- */
.compose-dropzone {
  margin: var(--space-3) var(--space-4);
  padding: var(--space-6);
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.compose-dropzone--active {
  border-color: var(--color-primary-400);
  background: var(--color-primary-50);
}

[data-theme="dark"] .compose-dropzone--active {
  background: rgba(79, 70, 229, 0.05);
}

.compose-dropzone__text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.compose-dropzone__link {
  color: var(--text-link);
  font-weight: var(--font-medium);
  cursor: pointer;
}

.compose-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
}

/* -- Compose Footer -- */
.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
}

.compose-footer__left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.compose-footer__right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}


/* ==========================================================================
   9. LOGIN PAGE
   ========================================================================== */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-app);
  padding: var(--space-4);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-10) var(--space-8);
  animation: fadeInScale 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.login-card__logo-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary-600);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.login-card__logo-text {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.login-card__title {
  text-align: center;
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.login-card__subtitle {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.login-card__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.login-card__actions {
  margin-top: var(--space-4);
}

.login-card__footer {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.login-card__divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.login-card__divider::before,
.login-card__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

.login-card__social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 44px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: all var(--transition-base);
}

.login-card__social-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-input);
}

/* Auth layout aliases - maps Blade template classes to CSS */
.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--bg-app) 50%, var(--color-primary-100) 100%);
  padding: var(--space-4);
  margin: 0;
}

[data-theme="dark"] .auth-layout {
  background: linear-gradient(135deg, #0c1222 0%, var(--bg-app) 50%, #111827 100%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-10) var(--space-8);
  animation: fadeInScale 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.auth-logo .icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary-600);
}

.auth-brand {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-heading {
  text-align: center;
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-footer-text {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-footer-text a {
  color: var(--color-primary-600);
  font-weight: var(--font-medium);
  text-decoration: none;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

/* Form elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-group.form-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.input-icon-wrapper .form-input {
  padding-left: 40px;
}

.input-icon-action {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
}

.input-icon-action:hover {
  color: var(--text-primary);
}

.input-icon-action .icon {
  width: 18px;
  height: 18px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.form-link {
  font-size: var(--text-sm);
  color: var(--color-primary-600);
  text-decoration: none;
  font-weight: var(--font-medium);
}

.form-link:hover {
  text-decoration: underline;
}

.form-link-disabled {
  color: var(--text-tertiary);
  cursor: default;
  pointer-events: none;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger-500);
  margin-top: var(--space-1);
}

.btn-block {
  width: 100%;
  margin-top: var(--space-2);
}

.hidden {
  display: none !important;
}

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.alert-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-700);
  border: 1px solid var(--color-danger-200);
}

.alert-success {
  background: var(--color-success-50);
  color: var(--color-success-700);
  border: 1px solid var(--color-success-200);
}

.alert-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ==========================================================================
   10. SETTINGS PAGES
   ========================================================================== */

.settings-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.settings-tabs {
  width: 220px;
  border-right: 1px solid var(--border-default);
  padding: var(--space-4);
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--bg-surface);
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  margin-bottom: var(--space-1);
}

.settings-tab:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.settings-tab--active {
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  font-weight: var(--font-medium);
}

[data-theme="dark"] .settings-tab--active {
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary-400);
}

.settings-tab__icon {
  width: 18px;
  height: 18px;
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6) var(--space-8);
}

.settings-section {
  margin-bottom: var(--space-8);
  max-width: 640px;
}

.settings-section__title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.settings-section__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-light);
  gap: var(--space-4);
}

.settings-row__info {
  flex: 1;
}

.settings-row__label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.settings-row__desc {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.settings-row__control {
  flex-shrink: 0;
}


/* ==========================================================================
   11. ADMIN PANEL
   ========================================================================== */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
  border-color: var(--color-primary-200);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .stat-card:hover {
  border-color: var(--color-primary-800);
}

.stat-card__label {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.stat-card__value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card__change {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-card__change--positive {
  color: var(--color-success-600);
}

.stat-card__change--negative {
  color: var(--color-danger-600);
}

/* -- Data Table -- */
.data-table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table thead {
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-default);
}

.data-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

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

.data-table__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Table pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-default);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.table-pagination__pages {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.table-pagination__btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.table-pagination__btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.table-pagination__btn--active {
  background: var(--color-primary-600);
  color: white;
}


/* ==========================================================================
   12. CONTACTS
   ========================================================================== */

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

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

.contact-item--selected {
  background: var(--color-primary-50);
}

[data-theme="dark"] .contact-item--selected {
  background: rgba(79, 70, 229, 0.08);
}

.contact-item__info {
  flex: 1;
  min-width: 0;
}

.contact-item__name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.contact-item__email {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-item__groups {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.contact-detail {
  padding: var(--space-6);
}

.contact-detail__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact-detail__name {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.contact-detail__section {
  margin-bottom: var(--space-5);
}

.contact-detail__section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3);
}

.contact-detail__field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.contact-detail__field-icon {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}


/* ==========================================================================
   13. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  height: 36px;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.btn:disabled,
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Sizes */
.btn--xs {
  height: 28px;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  border-radius: var(--radius-xs);
}

.btn--sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

.btn--lg {
  height: 44px;
  padding: 0 var(--space-6);
  font-size: var(--text-md);
}

.btn--xl {
  height: 48px;
  padding: 0 var(--space-8);
  font-size: var(--text-md);
  border-radius: var(--radius-md);
}

.btn--full {
  width: 100%;
}

/* -- Primary Button -- */
.btn--primary {
  background: var(--color-primary-600);
  color: var(--text-on-primary);
  border-color: var(--color-primary-600);
}

.btn--primary:hover {
  background: var(--color-primary-500);
  border-color: var(--color-primary-500);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  background: var(--color-primary-700);
  border-color: var(--color-primary-700);
  transform: translateY(0);
  box-shadow: none;
}

/* -- Secondary Button -- */
.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-input);
}

.btn--secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-tertiary);
}

.btn--secondary:active {
  background: var(--bg-surface-active);
}

/* -- Danger Button -- */
.btn--danger {
  background: var(--color-danger-600);
  color: white;
  border-color: var(--color-danger-600);
}

.btn--danger:hover {
  background: var(--color-danger-500);
  border-color: var(--color-danger-500);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--danger:active {
  background: var(--color-danger-700);
  border-color: var(--color-danger-700);
  transform: translateY(0);
}

/* -- Danger Outline -- */
.btn--danger-outline {
  background: transparent;
  color: var(--color-danger-600);
  border-color: var(--color-danger-300);
}

.btn--danger-outline:hover {
  background: var(--color-danger-50);
  border-color: var(--color-danger-500);
}

[data-theme="dark"] .btn--danger-outline:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* -- Ghost Button -- */
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

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

.btn--ghost:active {
  background: var(--bg-surface-active);
}

/* -- Icon-only Button -- */
.btn--icon {
  width: 36px;
  padding: 0;
}

.btn--icon.btn--sm {
  width: 32px;
}

.btn--icon.btn--xs {
  width: 28px;
}

.btn--icon.btn--lg {
  width: 44px;
}

/* -- Success Button -- */
.btn--success {
  background: var(--color-success-600);
  color: white;
  border-color: var(--color-success-600);
}

.btn--success:hover {
  background: var(--color-success-500);
  border-color: var(--color-success-500);
}

/* -- Loading state -- */
.btn--loading {
  color: transparent;
  pointer-events: none;
}

.btn--loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: var(--radius-full);
  animation: spin 600ms linear infinite;
}

.btn--secondary.btn--loading::after,
.btn--ghost.btn--loading::after {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: var(--text-secondary);
}


/* ==========================================================================
   14. FORM INPUTS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.form-label--required::after {
  content: ' *';
  color: var(--color-danger-500);
}

.form-input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.form-input:hover {
  border-color: var(--text-tertiary);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input--error {
  border-color: var(--color-danger-500);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-input--sm {
  height: 32px;
  font-size: var(--text-xs);
}

.form-input--lg {
  height: 48px;
  font-size: var(--text-md);
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
}

/* Textarea */
.form-textarea {
  width: 100%;
  min-height: 100px;
  padding: var(--space-3);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  resize: vertical;
  transition: all var(--transition-base);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

/* Select */
.form-select {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-8) 0 var(--space-3);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.47 5.97a.75.75 0 011.06 0L8 8.44l2.47-2.47a.75.75 0 111.06 1.06l-3 3a.75.75 0 01-1.06 0l-3-3a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

/* Hint & Error Text */
.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger-500);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Input with icon */
.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .form-input {
  padding-left: 38px;
}

.input-icon-wrapper__icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}


/* ==========================================================================
   15. CARDS
   ========================================================================== */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card--hoverable:hover {
  border-color: var(--color-primary-200);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .card--hoverable:hover {
  border-color: var(--color-primary-800);
}

.card--elevated {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card--flat {
  border-color: transparent;
  background: var(--bg-app);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.card__title {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.card__body {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}


/* ==========================================================================
   16. BADGES & PILLS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.4;
}

.badge--primary {
  background: var(--color-primary-50);
  color: var(--color-primary-700);
}

[data-theme="dark"] .badge--primary {
  background: rgba(79, 70, 229, 0.15);
  color: var(--color-primary-300);
}

.badge--success {
  background: var(--color-success-50);
  color: var(--color-success-700);
}

[data-theme="dark"] .badge--success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success-500);
}

.badge--warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}

[data-theme="dark"] .badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning-500);
}

.badge--danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}

[data-theme="dark"] .badge--danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger-500);
}

.badge--neutral {
  background: var(--bg-app);
  color: var(--text-secondary);
}

[data-theme="dark"] .badge--neutral {
  background: var(--color-slate-700);
  color: var(--color-slate-300);
}

/* Dot indicator badge */
.badge--dot {
  position: relative;
  padding-left: 16px;
}

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

/* Count badge (small circle) */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--font-semibold);
  background: var(--color-primary-600);
  color: white;
  line-height: 1;
}

.count-badge--danger {
  background: var(--color-danger-600);
}

.count-badge--muted {
  background: var(--color-slate-300);
  color: var(--color-slate-700);
}

[data-theme="dark"] .count-badge--muted {
  background: var(--color-slate-600);
  color: var(--color-slate-300);
}


/* ==========================================================================
   17. DROPDOWNS
   ========================================================================== */

.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: var(--z-dropdown);
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-1);
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.dropdown--open .dropdown__menu,
.dropdown__menu--visible {
  opacity: 1;
  transform: translateY(4px) scale(1);
  pointer-events: auto;
}

.dropdown__menu--right {
  left: auto;
  right: 0;
}

.dropdown__menu--up {
  top: auto;
  bottom: 100%;
  transform: translateY(4px) scale(0.98);
}

.dropdown--open .dropdown__menu--up {
  transform: translateY(-4px) scale(1);
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-primary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dropdown__item:hover {
  background: var(--bg-surface-hover);
}

.dropdown__item--active {
  background: var(--color-primary-50);
  color: var(--color-primary-700);
}

[data-theme="dark"] .dropdown__item--active {
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary-400);
}

.dropdown__item--danger {
  color: var(--color-danger-600);
}

.dropdown__item--danger:hover {
  background: var(--color-danger-50);
}

[data-theme="dark"] .dropdown__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.dropdown__item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.dropdown__item-text {
  flex: 1;
}

.dropdown__item-shortcut {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.dropdown__divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-1) 0;
}

.dropdown__header {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ==========================================================================
   18. MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 150ms ease;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInScale 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal--sm { max-width: 400px; }
.modal--lg { max-width: 680px; }
.modal--xl { max-width: 900px; }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}

.modal__title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--transition-base);
}

.modal__close:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.modal__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
}

/* Confirmation modal variant */
.modal--confirm .modal__body {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.modal--confirm .modal__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal--confirm .modal__icon--danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}

[data-theme="dark"] .modal--confirm .modal__icon--danger {
  background: rgba(239, 68, 68, 0.15);
}

.modal--confirm .modal__icon--warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}

.modal--confirm .modal__message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 360px;
  margin: 0 auto;
}


/* ==========================================================================
   19. TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 400px;
  width: 100%;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast--exiting {
  animation: toastSlideOut 200ms ease forwards;
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast--success .toast__icon { color: var(--color-success-500); }
.toast--error .toast__icon   { color: var(--color-danger-500); }
.toast--warning .toast__icon { color: var(--color-warning-500); }
.toast--info .toast__icon    { color: var(--color-info-500); }

.toast--success { border-left: 3px solid var(--color-success-500); }
.toast--error   { border-left: 3px solid var(--color-danger-500); }
.toast--warning { border-left: 3px solid var(--color-warning-500); }
.toast--info    { border-left: 3px solid var(--color-info-500); }

.toast__content {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast__message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

.toast__close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.toast__close:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary-500);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  animation: toastProgress 5s linear forwards;
}


/* ==========================================================================
   20. LOADING STATES
   ========================================================================== */

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border-default);
  border-top-color: var(--color-primary-600);
  border-radius: var(--radius-full);
  animation: spin 700ms linear infinite;
}

.spinner--sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner--lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.spinner--white {
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: white;
}

/* Skeleton */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-app);
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
}

.skeleton--text {
  height: 14px;
  width: 100%;
  margin-bottom: var(--space-2);
}

.skeleton--text-short {
  width: 60%;
}

.skeleton--text-xs {
  height: 10px;
}

.skeleton--avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.skeleton--button {
  height: 36px;
  width: 100px;
  border-radius: var(--radius-sm);
}

.skeleton--card {
  height: 120px;
  border-radius: var(--radius-lg);
}

/* Skeleton message row */
.skeleton-message-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  height: var(--message-row-height);
}

/* Loading overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-overlay);
  backdrop-filter: blur(2px);
}

[data-theme="dark"] .loading-overlay {
  background: rgba(15, 23, 42, 0.7);
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-app);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-primary-600);
  border-radius: var(--radius-full);
  transition: width 300ms ease;
}

.progress-bar--indeterminate .progress-bar__fill {
  width: 40%;
  animation: indeterminate 1.5s ease infinite;
}


/* ==========================================================================
   21. EMPTY STATES
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  text-align: center;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-5);
  color: var(--text-tertiary);
  opacity: 0.5;
}

.empty-state__title {
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 360px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}


/* ==========================================================================
   22. TOOLTIPS
   ========================================================================== */

.tooltip-wrapper {
  position: relative;
  display: inline-flex;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: var(--color-slate-900);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .tooltip {
  background: var(--color-slate-200);
  color: var(--color-slate-900);
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--color-slate-900);
}

[data-theme="dark"] .tooltip::after {
  border-top-color: var(--color-slate-200);
}

.tooltip--bottom {
  top: calc(100% + 6px);
  bottom: auto;
}

.tooltip--bottom::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--color-slate-900);
}

[data-theme="dark"] .tooltip--bottom::after {
  border-top-color: transparent;
  border-bottom-color: var(--color-slate-200);
}

.tooltip-wrapper:hover .tooltip {
  opacity: 1;
}

/* Data-attribute tooltip (simpler) */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: var(--color-slate-900);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: var(--z-tooltip);
}

[data-tooltip]:hover::before {
  opacity: 1;
}


/* ==========================================================================
   23. AVATARS
   ========================================================================== */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
}

.avatar--xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
}

.avatar--md {
  width: 40px;
  height: 40px;
  font-size: var(--text-sm);
}

.avatar--lg {
  width: 48px;
  height: 48px;
  font-size: var(--text-md);
}

.avatar--xl {
  width: 64px;
  height: 64px;
  font-size: var(--text-xl);
}

.avatar--2xl {
  width: 96px;
  height: 96px;
  font-size: var(--text-3xl);
}

/* Avatar color variants */
.avatar--indigo  { background: var(--color-primary-100); color: var(--color-primary-700); }
.avatar--blue    { background: #dbeafe; color: #1d4ed8; }
.avatar--emerald { background: #d1fae5; color: #047857; }
.avatar--amber   { background: #fef3c7; color: #b45309; }
.avatar--rose    { background: #ffe4e6; color: #be123c; }
.avatar--violet  { background: #ede9fe; color: #6d28d9; }
.avatar--cyan    { background: #cffafe; color: #0e7490; }
.avatar--orange  { background: #ffedd5; color: #c2410c; }

[data-theme="dark"] .avatar--indigo  { background: rgba(79, 70, 229, 0.2);  color: var(--color-primary-300); }
[data-theme="dark"] .avatar--blue    { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
[data-theme="dark"] .avatar--emerald { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
[data-theme="dark"] .avatar--amber   { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
[data-theme="dark"] .avatar--rose    { background: rgba(244, 63, 94, 0.2);  color: #fda4af; }
[data-theme="dark"] .avatar--violet  { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
[data-theme="dark"] .avatar--cyan    { background: rgba(6, 182, 212, 0.2);  color: #67e8f9; }
[data-theme="dark"] .avatar--orange  { background: rgba(249, 115, 22, 0.2); color: #fdba74; }

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar group / stack */
.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-group .avatar {
  border: 2px solid var(--bg-surface);
  margin-left: -8px;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* Online status dot */
.avatar-wrapper {
  position: relative;
  display: inline-flex;
}

.avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-surface);
}

.avatar-status--online  { background: var(--color-success-500); }
.avatar-status--offline { background: var(--color-slate-400); }
.avatar-status--busy    { background: var(--color-danger-500); }
.avatar-status--away    { background: var(--color-warning-500); }


/* ==========================================================================
   24. CHECKBOXES & TOGGLES
   ========================================================================== */

/* Custom Checkbox */
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox__box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-input);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
  background: var(--bg-input);
}

.checkbox__input:checked + .checkbox__box {
  background: var(--color-primary-600);
  border-color: var(--color-primary-600);
}

.checkbox__input:checked + .checkbox__box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.checkbox__input:focus-visible + .checkbox__box {
  box-shadow: var(--ring-focus);
}

.checkbox__input:indeterminate + .checkbox__box {
  background: var(--color-primary-600);
  border-color: var(--color-primary-600);
}

.checkbox__input:indeterminate + .checkbox__box::after {
  content: '';
  width: 8px;
  height: 2px;
  background: white;
  border: none;
  transform: none;
}

.checkbox__label {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

/* Toggle Switch */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__track {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-slate-300);
  position: relative;
  transition: background var(--transition-smooth);
  flex-shrink: 0;
}

[data-theme="dark"] .toggle__track {
  background: var(--color-slate-600);
}

.toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth);
}

.toggle__input:checked + .toggle__track {
  background: var(--color-primary-600);
}

.toggle__input:checked + .toggle__track::after {
  transform: translateX(20px);
}

.toggle__input:focus-visible + .toggle__track {
  box-shadow: var(--ring-focus);
}

.toggle__label {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

/* Radio Button */
.radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.radio__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio__circle {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-input);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
  background: var(--bg-input);
}

.radio__input:checked + .radio__circle {
  border-color: var(--color-primary-600);
}

.radio__input:checked + .radio__circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary-600);
}

.radio__input:focus-visible + .radio__circle {
  box-shadow: var(--ring-focus);
}

.radio__label {
  font-size: var(--text-sm);
  color: var(--text-primary);
}


/* ==========================================================================
   25. ANIMATIONS & KEYFRAMES
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}


/* ==========================================================================
   26. UTILITY CLASSES
   ========================================================================== */

/* ---- Display ---- */
.d-none        { display: none !important; }
.d-block       { display: block !important; }
.d-inline      { display: inline !important; }
.d-inline-block{ display: inline-block !important; }
.d-flex        { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid        { display: grid !important; }

/* ---- Flex ---- */
.flex-row      { flex-direction: row; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow-0   { flex-grow: 0; }

.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-5  { gap: var(--space-5); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* ---- Grid ---- */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Spacing ---- */
.m-0  { margin: 0; }
.m-1  { margin: var(--space-1); }
.m-2  { margin: var(--space-2); }
.m-3  { margin: var(--space-3); }
.m-4  { margin: var(--space-4); }
.m-auto { margin: auto; }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: var(--space-1); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-5  { margin-top: var(--space-5); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: var(--space-1); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-5  { margin-bottom: var(--space-5); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.ml-0  { margin-left: 0; }
.ml-1  { margin-left: var(--space-1); }
.ml-2  { margin-left: var(--space-2); }
.ml-3  { margin-left: var(--space-3); }
.ml-4  { margin-left: var(--space-4); }
.ml-auto { margin-left: auto; }

.mr-0  { margin-right: 0; }
.mr-1  { margin-right: var(--space-1); }
.mr-2  { margin-right: var(--space-2); }
.mr-3  { margin-right: var(--space-3); }
.mr-4  { margin-right: var(--space-4); }
.mr-auto { margin-right: auto; }

.mx-auto { margin-left: auto; margin-right: auto; }

.p-0  { padding: 0; }
.p-1  { padding: var(--space-1); }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-5  { padding: var(--space-5); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }

.pt-0  { padding-top: 0; }
.pt-2  { padding-top: var(--space-2); }
.pt-4  { padding-top: var(--space-4); }

.pb-0  { padding-bottom: 0; }
.pb-2  { padding-bottom: var(--space-2); }
.pb-4  { padding-bottom: var(--space-4); }

.px-0  { padding-left: 0; padding-right: 0; }
.px-2  { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3  { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4  { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6  { padding-left: var(--space-6); padding-right: var(--space-6); }

.py-0  { padding-top: 0; padding-bottom: 0; }
.py-2  { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3  { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4  { padding-top: var(--space-4); padding-bottom: var(--space-4); }

/* ---- Text ---- */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md   { font-size: var(--text-md); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-link      { color: var(--text-link); }
.text-danger    { color: var(--color-danger-600); }
.text-success   { color: var(--color-success-600); }
.text-warning   { color: var(--color-warning-600); }

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

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.break-word {
  word-break: break-word;
  overflow-wrap: break-word;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.no-wrap { white-space: nowrap; }

/* ---- Sizing ---- */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-w-0 { min-width: 0; }
.min-h-0 { min-height: 0; }

/* ---- Borders ---- */
.border     { border: 1px solid var(--border-default); }
.border-t   { border-top: 1px solid var(--border-default); }
.border-b   { border-bottom: 1px solid var(--border-default); }
.border-l   { border-left: 1px solid var(--border-default); }
.border-r   { border-right: 1px solid var(--border-default); }
.border-0   { border: none; }

.rounded-none { border-radius: 0; }
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ---- Overflow ---- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }

/* ---- Position ---- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; top: 0; }

/* ---- Visibility ---- */
.visible    { visibility: visible; }
.invisible  { visibility: hidden; }
.opacity-0  { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100{ opacity: 1; }

/* ---- Cursor ---- */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* ---- Selection ---- */
.select-none { user-select: none; }
.select-all  { user-select: all; }

/* ---- Animation ---- */
.animate-fade-in     { animation: fadeIn 200ms ease; }
.animate-slide-up    { animation: slideUp 200ms ease; }
.animate-slide-down  { animation: slideDown 200ms ease; }
.animate-slide-right { animation: slideInRight 200ms ease; }
.animate-pulse       { animation: pulse 2s ease-in-out infinite; }
.animate-spin        { animation: spin 1s linear infinite; }
.animate-bounce      { animation: bounce 1s ease infinite; }

/* ---- Transitions ---- */
.transition-all  { transition: all var(--transition-base); }
.transition-colors { transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base); }

/* ---- Screen reader only ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---- Focus ring ---- */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}


/* ==========================================================================
   27. SCROLLBAR STYLING
   ========================================================================== */

/* Thin scrollbars for Webkit browsers */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-slate-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate-400);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--color-slate-700);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate-600);
}

/* Sidebar scrollbar - subtle */
.sidebar ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-slate-300) transparent;
}

[data-theme="dark"] * {
  scrollbar-color: var(--color-slate-700) transparent;
}


/* ==========================================================================
   28. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
  .sidebar {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
  }

  .sidebar .sidebar__label,
  .sidebar .sidebar__count,
  .sidebar .sidebar__compose-text,
  .sidebar .sidebar__account-info,
  .sidebar .sidebar__nav-heading {
    display: none;
  }

  .sidebar .sidebar__nav-item {
    justify-content: center;
    padding: var(--space-2);
  }

  .sidebar .sidebar__compose-btn {
    justify-content: center;
    padding: 0;
  }

  .panel-list {
    width: 320px;
    min-width: 240px;
  }

  .settings-tabs {
    width: 56px;
  }

  .settings-tab__text {
    display: none;
  }

  .settings-tab {
    justify-content: center;
    padding: var(--space-2);
  }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    flex-direction: row;
    padding: var(--space-1) var(--space-2);
    overflow-x: auto;
  }

  .sidebar .sidebar__account,
  .sidebar .sidebar__compose,
  .sidebar .sidebar__nav-heading,
  .sidebar .sidebar__footer,
  .sidebar .sidebar__label,
  .sidebar .sidebar__count {
    display: none;
  }

  .sidebar .sidebar__nav {
    display: flex;
    flex-direction: row;
    padding: 0;
    gap: var(--space-1);
    overflow-x: auto;
  }

  .sidebar .sidebar__nav-group {
    display: contents;
    margin-bottom: 0;
  }

  .sidebar .sidebar__nav-item {
    flex-direction: column;
    font-size: 10px;
    gap: 2px;
    padding: var(--space-1) var(--space-2);
    min-width: 56px;
    text-align: center;
  }

  .sidebar .sidebar__nav-item--active::before {
    display: none;
  }

  .app-main {
    padding-bottom: 56px;
  }

  .app-content {
    flex-direction: column;
  }

  .panel-list {
    width: 100%;
    min-width: unset;
    max-width: unset;
    border-right: none;
    border-bottom: 1px solid var(--border-default);
    flex: 1;
  }

  .panel-detail {
    display: none;
  }

  .panel-detail--visible {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    animation: slideInRight 200ms ease;
  }

  .panel-resize-handle {
    display: none;
  }

  .compose-modal {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    align-self: flex-end;
  }

  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
  }

  .settings-layout {
    flex-direction: column;
  }

  .settings-tabs {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-default);
    padding: var(--space-2);
    gap: var(--space-1);
  }

  .settings-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .settings-content {
    padding: var(--space-4);
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-lg);
  }

  .data-table-wrapper {
    overflow-x: auto;
  }

  .reading-pane__header {
    padding: var(--space-4);
  }

  .reading-pane__body {
    padding: var(--space-4);
  }

  .reading-pane__attachments {
    padding: var(--space-3) var(--space-4);
  }
}

/* Large screens */
@media (min-width: 1440px) {
  .panel-list {
    width: 420px;
  }

  .settings-content {
    padding: var(--space-8) var(--space-12);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print */
@media print {
  .sidebar,
  .panel-list,
  .reading-pane__toolbar,
  .message-list__toolbar,
  .app-header,
  .toast-container {
    display: none !important;
  }

  .app-layout {
    display: block;
    height: auto;
    overflow: visible;
  }

  .panel-detail {
    display: block;
    overflow: visible;
  }

  .reading-pane__body {
    overflow: visible;
  }

  body {
    background: white;
    color: black;
  }
}
