/* mail-enterprise/public/styles.css — Industrial Utilitarian Enterprise Design System (Theme: Trắng SÁNG) */
:root {
  /* Bộ màu Trắng (SÁNG): Nền trắng · chữ đen · vàng đậm · tím phụ */
  --bg-canvas: #F7F6F2;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F3F2ED;
  --bg-hover: #EEECE6;
  --border-dim: #EFECE6;
  --border-card: #E5E2DA;
  --border-focus: #E0A61C;
  
  --text-main: #1B1916;
  --text-dim: #5E5951;
  --text-muted: #78716C;

  --amber: #E0A61C;
  --amber-2: #8A5C02;
  --amber-hover: #D99B12;
  --on-amber: #221A00;
  --amber-glow: rgba(224, 166, 28, 0.22);
  --btn-amber: linear-gradient(180deg, #F7CB5C 0%, #E9AE23 100%);

  --purple: #6D4AFF;
  --purple-glow: rgba(109, 74, 255, 0.16);
  --purple-soft: rgba(109, 74, 255, 0.08);

  --blue: #1F6FD1;
  --blue-hover: #1656A8;
  --blue-glow: rgba(31, 111, 209, 0.15);
  --blue-soft: #EBF3FC;

  --green: #187030;
  --green-glow: rgba(24, 112, 48, 0.12);
  --green-soft: #E6F4EA;

  --red: #D3372B;
  --red-glow: rgba(211, 55, 43, 0.12);
  --red-soft: #FCE8E6;

  --cyan: #1F6FD1;
  --cyan-hover: #1656A8;
  --cyan-glow: rgba(31, 111, 209, 0.15);

  --indigo: #6D4AFF;
  --indigo-glow: rgba(109, 74, 255, 0.16);

  --shadow-sm: 0 1px 3px rgba(20, 16, 8, 0.05);
  --shadow-md: 0 4px 14px rgba(20, 16, 8, 0.07);
  --shadow-lg: 0 10px 30px rgba(20, 16, 8, 0.12);

  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light !important;
}

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

html, body {
  color-scheme: light !important;
  background-color: #F7F6F2 !important;
  background: #F7F6F2 !important;
}

body {
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout Wrapper */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Modern Clean Stroke-Based Vector SVG Icons (Lucide/Feather Style) */
.icon-svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: -2px;
  flex-shrink: 0;
  transition: transform 0.15s ease, stroke 0.15s ease;
}

.icon-svg.sm {
  width: 13px;
  height: 13px;
  vertical-align: -1.5px;
}

.icon-svg.lg {
  width: 20px;
  height: 20px;
  vertical-align: -3px;
}

.icon-svg.xl {
  width: 32px;
  height: 32px;
}

.search-icon-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

/* Top App Bar */
.top-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(20, 16, 8, 0.04);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  background: var(--btn-amber);
  color: var(--on-amber);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(224, 166, 28, 0.35);
  border: 1px solid rgba(138, 92, 2, 0.2);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(109, 74, 255, 0.08);
  color: var(--purple);
  border: 1px solid rgba(109, 74, 255, 0.25);
  letter-spacing: 0.5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* KPI HUD Bar */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px 24px 8px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.kpi-card.c-total::after { background: var(--purple); }
.kpi-card.c-active::after { background: var(--green); }
.kpi-card.c-otp::after { background: var(--amber); }
.kpi-card.c-expired::after { background: var(--red); }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Main Content Container */
.main-area {
  padding: 16px 24px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Control & Filter Toolbar */
.control-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}

.search-input {
  width: 100%;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  color: var(--text-main);
  font-size: 13.5px;
  font-family: var(--font-mono);
  outline: none;
  transition: all 0.15s;
}

.search-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
  background: #FFFFFF;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-ctrl {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.select-ctrl:focus {
  border-color: var(--amber);
}

/* Token Health Controls & Auto-Check */
.token-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-auto-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.btn-auto-check.active {
  background: #E6F4EA;
  border-color: rgba(24, 112, 48, 0.4);
  color: #187030;
}

.btn-auto-check:hover {
  border-color: rgba(24, 112, 48, 0.6);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #78716C;
  transition: all 0.2s;
}

.btn-auto-check.active .pulse-dot {
  background: #187030;
  box-shadow: 0 0 8px #187030;
  animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(24, 112, 48, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(24, 112, 48, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(24, 112, 48, 0); }
}

.token-banner-active {
  background: rgba(31, 111, 209, 0.08);
  border: 1px solid rgba(31, 111, 209, 0.25);
  color: var(--blue);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  animation: fadeIn 0.2s ease;
}

.btn-warning {
  background: rgba(224, 166, 28, 0.15);
  border: 1px solid rgba(224, 166, 28, 0.4);
  color: var(--amber-2);
}

.btn-warning:hover:not(:disabled) {
  background: rgba(224, 166, 28, 0.25);
  border-color: rgba(224, 166, 28, 0.7);
  box-shadow: 0 0 10px rgba(224, 166, 28, 0.25);
}

/* Batch Operations Bar (Hiển thị khi tick chọn nhiều) */
.batch-bar {
  background: #FDF9EE;
  border: 1px solid var(--amber);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideDown 0.2s ease-out;
  box-shadow: var(--shadow-sm);
}

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

.batch-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--amber-2);
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Data Table Grid */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-card-alt);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
  user-select: none;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-main);
  background: #FFFFFF;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.12s;
  cursor: pointer;
}

.data-table tbody tr:hover td {
  background: #FAF8F5;
}

.data-table tbody tr.selected td {
  background: #FDF8EC;
}

/* Table Elements */
.cell-email {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.copy-mini {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0.7;
  transition: all 0.15s;
}

.copy-mini:hover {
  opacity: 1;
  color: var(--amber-2);
  background: rgba(224, 166, 28, 0.15);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge.active {
  background: #E6F4EA;
  color: #187030;
  border: 1px solid rgba(24, 112, 48, 0.3);
}
.badge.active .badge-dot { background: #187030; }

.badge.expired {
  background: #FCE8E6;
  color: #D3372B;
  border: 1px solid rgba(211, 55, 43, 0.3);
}
.badge.expired .badge-dot { background: #D3372B; }

.badge.error {
  background: #FEF3D6;
  color: #8A5C02;
  border: 1px solid rgba(224, 166, 28, 0.4);
}
.badge.error .badge-dot { background: #8A5C02; }

/* Password Cell in Table — Mặc định che dấu ••••••••, click để hiện/ẩn, nút copy 1 chạm */
.pwd-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}

.pwd-pill-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F4F1EA;
  border: 1px solid #E5E0D5;
  color: #5E5951;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 7px;
  height: 24px;
  border-radius: 5px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.pwd-pill-compact:hover {
  background: #EAE5D9;
  border-color: #D4CDBC;
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(20, 16, 8, 0.08);
}

.pwd-val {
  line-height: 1;
  letter-spacing: 1.5px;
  transition: all 0.15s ease;
}

.pwd-val.revealed {
  color: var(--purple);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.pwd-btn-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}

.pwd-btn-toggle:hover {
  opacity: 1;
  color: var(--purple);
  transform: scale(1.1);
}

/* Token Cell in Table — Mặc định che dấu ••••••••, click để hiện/ẩn, nút copy 1 chạm */
.cell-token {
  white-space: nowrap;
}

.token-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}

.token-pill-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F4F1EA;
  border: 1px solid #E5E0D5;
  color: #5E5951;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 7px;
  height: 24px;
  border-radius: 5px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
  max-width: 100%;
}

.token-pill-compact:hover {
  background: #EAE5D9;
  border-color: #D4CDBC;
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(20, 16, 8, 0.08);
}

.token-val {
  line-height: 1;
  letter-spacing: 1.5px;
  transition: all 0.15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 85px;
}

.token-val.revealed {
  color: #0284c7;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 11px;
}

.token-btn-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
  flex-shrink: 0;
}

.token-btn-toggle:hover {
  opacity: 1;
  color: #0284c7;
  transform: scale(1.1);
}

/* OTP Badge in Table — Thiết kế gọn gàng, đồng bộ chiều cao tuyệt đối với các hàng khác */
.otp-inline-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}

.otp-pill-compact,
.otp-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #E6F4EA;
  border: 1px solid rgba(24, 112, 48, 0.35);
  color: #187030;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  height: 22px;
  border-radius: 5px;
  letter-spacing: 0.5px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.otp-pill-compact:hover,
.otp-pill:hover {
  background: #D4EDDA;
  border-color: rgba(24, 112, 48, 0.6);
  box-shadow: 0 0 8px rgba(24, 112, 48, 0.2);
}

.otp-num {
  line-height: 1;
}

.otp-pill-copy-mini,
.otp-pill-copy {
  background: none;
  border: none;
  color: #187030;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.15s, color 0.15s;
}

.otp-pill-copy-mini svg,
.otp-pill-copy svg {
  width: 12px;
  height: 12px;
}

.otp-pill-compact:hover .otp-pill-copy-mini,
.otp-pill:hover .otp-pill-copy {
  opacity: 1;
  color: #0E481F;
}

.otp-time-inline {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1;
  user-select: none;
}

.time-stamp {
  font-size: 11px;
  color: var(--text-muted);
  display: inline;
}

/* Tag Pills */
.tag-badge {
  background: #F3F2ED;
  border: 1px solid #E5E2DA;
  color: #5E5951;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  outline: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 6px;
}

/* Primary Button: Chuẩn tone Vàng Đậm như trong ảnh mẫu "Tạo video" */
.btn-primary {
  background: var(--btn-amber);
  color: var(--on-amber);
  font-weight: 700;
  border: 1px solid rgba(138, 92, 2, 0.25);
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.08);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #F9D46E 0%, #F0B72E 100%);
  box-shadow: 0 3px 10px rgba(224, 166, 28, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-card);
}
.btn-secondary:hover {
  background: #E5E2DA;
  border-color: #D6D2C7;
}

.btn-accent {
  background: var(--purple);
  color: #FFFFFF;
}
.btn-accent:hover {
  background: #5B3CE6;
  box-shadow: 0 0 16px var(--purple-glow);
}

.btn-warning {
  background: var(--btn-amber);
  color: var(--on-amber);
  font-weight: 700;
  border: 1px solid rgba(138, 92, 2, 0.25);
}
.btn-warning:hover {
  background: linear-gradient(180deg, #F9D46E 0%, #F0B72E 100%);
}

.btn-danger {
  background: #FCE8E6;
  color: var(--red);
  border-color: rgba(211, 55, 43, 0.35);
}
.btn-danger:hover {
  background: var(--red);
  color: #FFFFFF;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* Pagination Footer */
.table-footer {
  padding: 12px 18px;
  background: var(--bg-card-alt);
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-info {
  font-size: 12.5px;
  color: var(--text-dim);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Slide-Over Drawer (Mở Hòm Thư Toàn Diện) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 8, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 720px;
  max-width: 96vw;
  background: #FAF9F5;
  border-left: 1px solid var(--border-card);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 35px rgba(20, 16, 8, 0.15);
}

.drawer-panel.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 22px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-header-icon {
  font-size: 18px;
}

.drawer-live-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  background: #E6F4EA;
  border: 1px solid rgba(24, 112, 48, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.drawer-live-badge.expired,
.drawer-live-badge.error {
  color: var(--red);
  background: #FCE8E6;
  border-color: rgba(211, 55, 43, 0.35);
}

.drawer-email-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-email-mono {
  font-family: var(--font-mono);
  color: var(--amber-2);
  font-size: 13.5px;
  font-weight: 600;
}

/* Drawer Folder Tabs */
.drawer-tabs-wrapper {
  background: #F3F2ED;
  border-bottom: 1px solid var(--border-card);
  padding: 6px 18px 0;
}

.drawer-tabs {
  display: flex;
  gap: 6px;
}

.drawer-tab {
  padding: 10px 14px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px 6px 0 0;
  transition: all 0.15s;
}

.drawer-tab:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.drawer-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  background: #FFFFFF;
}

.tab-badge {
  background: #EEECE6;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 700;
}

.drawer-tab.active .tab-badge {
  background: var(--purple);
  color: #FFFFFF;
}

/* Drawer Body */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F7F6F2;
}

/* Featured VIP OTP Banner inside Drawer */
.drawer-hero-otp {
  position: relative;
  background: linear-gradient(135deg, #FDF9EE 0%, #FFFFFF 100%);
  border: 1px solid rgba(224, 166, 28, 0.45);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(224, 166, 28, 0.12);
  animation: fadeIn 0.2s ease-out;
}

.hero-otp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-otp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--amber-2);
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 166, 28, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(224, 166, 28, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 166, 28, 0); }
}

.hero-otp-time {
  font-size: 11.5px;
  color: var(--text-dim);
}

.hero-otp-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-otp-digits-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-otp-code {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 5px;
  line-height: 1.1;
  user-select: all;
}

.hero-otp-source {
  font-size: 12px;
  color: var(--text-dim);
}

.hero-otp-source b {
  color: var(--text-main);
}

.btn-copy-hero {
  background: var(--btn-amber);
  color: var(--on-amber);
  font-weight: 800;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(138, 92, 2, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  box-shadow: 0 3px 12px rgba(224, 166, 28, 0.3);
}

.btn-copy-hero:hover {
  background: linear-gradient(180deg, #F9D46E 0%, #F0B72E 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(224, 166, 28, 0.4);
}

.btn-copy-hero:active {
  transform: translateY(0);
}

/* No OTP Banner */
.drawer-no-otp-banner {
  background: #FFFFFF;
  border: 1px dashed var(--border-card);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.4;
}

.drawer-no-otp-banner b {
  color: var(--purple);
}

/* Message List & Cards */
.msg-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.04);
}

.msg-card:hover {
  background: #FAF8F5;
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(20, 16, 8, 0.08);
}

.msg-card.has-otp {
  border-color: rgba(24, 112, 48, 0.35);
  background: linear-gradient(180deg, #F4FBF6 0%, #FFFFFF 100%);
}

.msg-card.has-otp:hover {
  border-color: rgba(24, 112, 48, 0.6);
  box-shadow: 0 4px 16px rgba(24, 112, 48, 0.12);
}

/* Card Header */
.msg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.msg-sender-col {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.msg-sender-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.msg-sender-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-sender-addr {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-meta-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.msg-folder-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.msg-folder-pill.inbox {
  background: #EBF3FC;
  color: #1F6FD1;
  border: 1px solid rgba(31, 111, 209, 0.25);
}

.msg-folder-pill.junk {
  background: #FEF3D6;
  color: #8A5C02;
  border: 1px solid rgba(224, 166, 28, 0.35);
}

.msg-time {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Subject */
.msg-subject-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.msg-subject {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.msg-card.has-otp .msg-subject {
  color: var(--text-main);
  font-weight: 700;
}

/* OTP Badge inside card (Compact & Elegant) */
.msg-otp-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E6F4EA;
  border: 1px solid rgba(24, 112, 48, 0.35);
  border-radius: 6px;
  padding: 3px 6px 3px 9px;
  margin: 4px 0 3px;
  width: fit-content;
  max-width: 100%;
}

.msg-otp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.otp-bolt {
  font-size: 12px;
}

.otp-tag-title {
  font-size: 10px;
  font-weight: 800;
  color: #187030;
  letter-spacing: 0.5px;
}

.otp-tag-val {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 800;
  color: #187030;
  letter-spacing: 1.5px;
}

.btn-copy-otp-card {
  background: #CBEAD2;
  color: #187030;
  border: 1px solid rgba(24, 112, 48, 0.4);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}

.btn-copy-otp-card:hover {
  background: #187030;
  color: #FFFFFF;
}

/* Preview snippet */
.msg-preview {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modal: Pro Email Reader */
.modal-box.modal-email-reader {
  width: 900px;
  max-width: 96vw;
  height: 90vh;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  box-shadow: 0 16px 50px rgba(20, 16, 8, 0.2);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.modal-email-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Email Metadata Bar */
.email-meta-card {
  background: #FAF9F5;
  border-bottom: 1px solid var(--border-card);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.email-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.email-meta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.email-meta-sender {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sender-name-bold {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.sender-addr-mono {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.email-meta-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Reading Theme Switcher */
.email-reading-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-mode-pills {
  display: flex;
  background: #EEECE6;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.view-pill {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.view-pill:hover {
  color: var(--text-main);
}

.view-pill.active {
  background: var(--purple);
  color: #FFFFFF;
  box-shadow: 0 1px 6px rgba(109, 74, 255, 0.35);
}

/* Scroll Viewport & Reading Sheet */
.email-scroll-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  background: #F7F6F2;
}

.email-reading-sheet {
  border-radius: 10px;
  padding: 28px 32px;
  min-height: 400px;
  word-break: break-word;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 4px 20px rgba(20, 16, 8, 0.08);
}

/* Sáng sủa chuẩn email (Tránh lỗi chữ đen trên nền tối) */
.email-reading-sheet.mode-light {
  background: #ffffff !important;
  color: #1B1916 !important;
  border: 1px solid #E5E2DA;
}

.email-reading-sheet.mode-light p,
.email-reading-sheet.mode-light li,
.email-reading-sheet.mode-light div,
.email-reading-sheet.mode-light span,
.email-reading-sheet.mode-light td {
  line-height: 1.65;
}

.email-reading-sheet.mode-light a:not([style*="color"]) {
  color: #1F6FD1;
}

/* Nền tối thông minh (Đảo màu chữ sang trắng) */
.email-reading-sheet.mode-dark {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #1e293b;
}

.email-reading-sheet.mode-dark p,
.email-reading-sheet.mode-dark li,
.email-reading-sheet.mode-dark div,
.email-reading-sheet.mode-dark span,
.email-reading-sheet.mode-dark td {
  color: #f1f5f9 !important;
  background-color: transparent !important;
  line-height: 1.65;
}

.email-reading-sheet.mode-dark a {
  color: #38bdf8 !important;
}

/* Văn bản thuần */
.email-reading-sheet.mode-text {
  background: #F3F2ED !important;
  color: #1B1916 !important;
  border: 1px solid var(--border-card);
  font-family: var(--font-mono) !important;
  font-size: 13.5px !important;
  line-height: 1.75 !important;
  white-space: pre-wrap !important;
}

/* Modal Popup Core */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 8, 0.45);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  width: 600px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 45px rgba(20, 16, 8, 0.18);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF9F5;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #FFFFFF;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #FAF9F5;
  border-radius: 0 0 12px 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.form-field textarea, .form-field input {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  font-family: var(--font-mono);
}

.form-field textarea:focus, .form-field input:focus {
  border-color: var(--amber);
  background: #FFFFFF;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(20, 16, 8, 0.12);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.2s ease-out;
}

.toast.success { border-color: var(--green); color: #187030; }
.toast.error { border-color: var(--red); color: #D3372B; }

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

/* Spinner Animation */
.spin {
  display: inline-block;
  animation: rotate 1s linear infinite;
}

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

/* -------------------------------------------------------------
   LANGUAGE SWITCHER
------------------------------------------------------------- */
.lang-switch-pills {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.lang-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-pill:hover {
  color: var(--text-main);
}

.lang-pill.active {
  background: #FFFFFF;
  color: var(--purple);
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.08);
}

/* -------------------------------------------------------------
   DRAG & DROP FILE ZONE IN IMPORT MODAL
------------------------------------------------------------- */
.file-drop-zone {
  border: 2px dashed var(--border-card);
  border-radius: 8px;
  padding: 16px 14px;
  text-align: center;
  background: #FAF9F5;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--amber);
  background: #FDF9EE;
}

.file-drop-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.file-drop-text {
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-browse-file {
  background: transparent;
  border: none;
  color: var(--purple);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12.5px;
  padding: 0;
}

.file-drop-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.file-selected-badge {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E6F4EA;
  border: 1px solid rgba(24, 112, 48, 0.4);
  color: #187030;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}

/* -------------------------------------------------------------
   API INTEGRATION MODAL
------------------------------------------------------------- */
.modal-api-box {
  max-width: 860px;
  width: 95vw;
}

.api-acc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF9F5;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 8px 12px;
}

.api-email-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
}

/* Endpoint Selector Tabs */
.api-endpoint-selector-tabs {
  display: flex;
  background: #EEECE6;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.api-endpoint-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.api-endpoint-tab:hover {
  color: var(--text-main);
}

.api-endpoint-tab.active {
  background: #FFFFFF;
  color: var(--purple);
  box-shadow: 0 1px 4px rgba(20, 16, 8, 0.08);
}

.api-endpoint-desc {
  background: rgba(109, 74, 255, 0.06);
  border: 1px solid rgba(109, 74, 255, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #4B2CC7;
  line-height: 1.45;
}

.api-code-block {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: 7px;
  overflow: hidden;
}

.api-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF9F5;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-card);
}

.api-method-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.api-method-badge.get {
  background: #EBF3FC;
  color: #1F6FD1;
  border: 1px solid rgba(31, 111, 209, 0.3);
}

.api-code-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
}

.api-code-content {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-main);
  word-break: break-all;
  user-select: all;
  background: #F7F6F2;
}

.api-code-pre {
  margin: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: #2E2922;
  background: #F7F6F2;
  overflow-x: auto;
  white-space: pre-wrap;
}

.api-lang-tabs {
  display: flex;
  gap: 4px;
}

.api-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.api-tab.active {
  background: #FFFFFF;
  color: var(--purple);
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.08);
}

/* Collapsible Dev Test Accordion */
.api-dev-test-details {
  background: #FFFFFF;
  border: 1px dashed var(--border-card);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 4px;
}

.api-dev-test-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  background: #FAF9F5;
  transition: all 0.15s ease;
}

.api-dev-test-summary:hover {
  color: var(--purple);
  background: #F3F2ED;
}

.api-dev-test-details[open] .api-dev-test-summary {
  border-bottom: 1px solid var(--border-card);
  color: var(--purple);
}

.api-dev-test-details .api-test-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 14px;
}

.api-test-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.api-test-badge {
  font-size: 11.5px;
  color: #187030;
  font-weight: 600;
  font-family: var(--font-mono);
}

.api-view-mode-tabs {
  display: inline-flex;
  background: #EEECE6;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.api-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.api-view-tab:hover {
  color: var(--text-main);
}

.api-view-tab.active {
  background: #FFFFFF;
  color: var(--purple);
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.08);
}

/* TempMail Live Messages Table */
.api-tempmail-table-wrapper {
  margin-top: 10px;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  overflow-x: auto;
  max-height: 290px;
  background: #FFFFFF;
}

.api-tempmail-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.api-tempmail-table th {
  background: #F3F2ED;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.api-tempmail-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-main);
  vertical-align: middle;
}

.api-tempmail-table tr:hover {
  background: #FAF8F5;
}

.api-tempmail-otp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #E6F4EA;
  border: 1px solid rgba(24, 112, 48, 0.4);
  color: #187030;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.6px;
}

.api-tempmail-btn-view {
  background: #EBF3FC;
  border: 1px solid rgba(31, 111, 209, 0.3);
  color: #1F6FD1;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.api-tempmail-btn-view:hover {
  background: #1F6FD1;
  color: #FFFFFF;
}

.api-test-result {
  margin-top: 10px;
  padding: 10px 12px;
  background: #F7F6F2;
  border: 1px solid var(--border-card);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #187030;
  max-height: 250px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.btn-api-action {
  background: #EBF3FC;
  border: 1px solid rgba(31, 111, 209, 0.3);
  color: #1F6FD1;
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-api-action:hover {
  background: #1F6FD1;
  color: #FFFFFF;
}

/* ============================================================
   COLLAPSIBLE SIDEBAR SHELL (Mailspace Inspired)
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 250px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
}

.sidebar.collapsed {
  width: 68px;
}

.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-dim);
  gap: 10px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  overflow: hidden;
}

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  background: #2563EB;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.sidebar-brand-name {
  font-size: 19px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0 10px;
}

.sidebar.collapsed .sidebar-brand {
  display: none;
}

.sidebar.collapsed .sidebar-brand-name {
  display: none;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.15s;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.sidebar.collapsed .sidebar-toggle-btn {
  margin: 0 auto;
}

.sidebar-section-label {
  padding: 18px 16px 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-section-label {
  display: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

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

.nav-item.active {
  background: #EEF2FF;
  color: #3730A3;
  font-weight: 700;
}

.nav-item.active .icon-svg {
  color: #4F46E5;
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Nav Groups & Submenus */
.nav-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-group-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-group.has-active > .nav-group-toggle {
  color: #3730A3;
  font-weight: 700;
}

.nav-group-chevron {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease;
  color: var(--text-dim);
}

.nav-group-chevron .chevron-svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-group.open > .nav-group-toggle .nav-group-chevron {
  transform: rotate(180deg);
}

.nav-sub-items {
  display: none;
  flex-direction: column;
  gap: 3px;
  padding-left: 10px;
  margin: 3px 0 6px 18px;
  border-left: 2px solid var(--border-dim);
}

.nav-group.open > .nav-sub-items {
  display: flex;
}

.nav-sub-item {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}

.sidebar.collapsed .nav-group-chevron,
.sidebar.collapsed .nav-sub-items {
  display: none !important;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .nav-item-text {
  display: none;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Sidebar Language Switcher */
.sidebar-lang-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar.collapsed .sidebar-lang-box {
  flex-direction: column;
  padding: 8px 4px;
}

.sidebar-lang-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-lang-title span {
  display: none;
}

.sidebar-lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.sidebar-lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.sidebar-lang-btn:hover {
  color: var(--text-main);
}

.sidebar-lang-btn.active {
  background: #FFFFFF;
  color: #2563EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sidebar-storage-card {
  background: #FAF9F5;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 12px;
}

.sidebar.collapsed .sidebar-storage-card {
  display: none;
}

.storage-progress-bg {
  height: 5px;
  background: #E5E2DA;
  border-radius: 3px;
  margin: 8px 0 6px;
  overflow: hidden;
}

.storage-progress-bar {
  height: 100%;
  background: #2563EB;
  border-radius: 3px;
  width: 20%;
  transition: width 0.3s ease;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EEF2FF;
  color: #3730A3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-user-row span {
  display: none;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

/* ============================================================
   VIEWS (Overview, Mail, 2FA)
   ============================================================ */
.view-section {
  display: none;
  flex-direction: column;
  min-height: 100%;
}

.view-section.active {
  display: flex;
}

.view-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 50;
}

.view-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.view-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.view-icon-badge.overview {
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.view-icon-badge.mail {
  background: #FEF3D6;
  color: #8A5C02;
  border: 1px solid rgba(224, 166, 28, 0.3);
}

.view-icon-badge.tfa {
  background: #F3EEFF;
  color: #6D4AFF;
  border: 1px solid rgba(109, 74, 255, 0.25);
}

.view-icon-badge.tempmail {
  background: #F3E8FF;
  color: #7E22CE;
  border: 1px solid rgba(126, 34, 206, 0.25);
}

.view-icon-badge.qr {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.view-icon-badge.address {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.view-icon-badge.ip {
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.view-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.view-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.view-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.view-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 2FA Dedicated Styling */
.tfa-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tfa-box-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.tfa-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.tfa-timer-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FAF9F5;
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 4px 14px 4px 6px;
}

.tfa-ring-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tfa-ring-svg {
  width: 32px;
  height: 32px;
  transform: rotate(-90deg);
}

.tfa-ring-bg {
  fill: none;
  stroke: #E5E2DA;
  stroke-width: 3;
}

.tfa-ring-progress {
  fill: none;
  stroke: #6D4AFF;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear, stroke 0.3s;
}

.tfa-ring-progress.warning {
  stroke: #E0A61C;
}

.tfa-ring-progress.danger {
  stroke: #D3372B;
}

.tfa-ring-num {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
}

.tfa-timer-text {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.tfa-timer-text small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: normal;
}

.tfa-textarea {
  width: 100%;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-main);
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color 0.15s;
}

.tfa-textarea:focus {
  border-color: #6D4AFF;
  box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.12);
  background: #FFFFFF;
}

.tfa-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.tfa-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.tfa-code-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tfa-code-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 16, 8, 0.08);
  border-color: rgba(109, 74, 255, 0.35);
}

.tfa-code-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6D4AFF, #2563EB);
}

.tfa-card-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tfa-card-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tfa-card-secret {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tfa-digits-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F4F2EB;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 10px 14px;
}

.tfa-digits {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: #1B1916;
  letter-spacing: 4px;
  user-select: all;
}

.btn-copy-tfa {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-copy-tfa:hover {
  background: #6D4AFF;
  color: #FFFFFF;
  border-color: #6D4AFF;
}

.btn-copy-tfa.copied {
  background: #187030;
  color: #FFFFFF;
  border-color: #187030;
}


.overview-banner {
  background: linear-gradient(135deg, #FFFFFF 0%, #F4FBF6 100%);
  border: 1px solid rgba(24, 112, 48, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.overview-card-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.domain-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-dim);
  font-size: 13px;
}

.domain-bar-row:last-child {
  border-bottom: none;
}

.quick-action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.15s;
}

.quick-action-link:hover {
  background: #FAF9F5;
  border-color: var(--amber-2);
  transform: translateX(3px);
}

/* ============================================================= */
/* TEMPMAIL PRO (HỘP THƯ ẢO ENTERPRISE) — TỐI ƯU & CHỐNG TRÀN   */
/* ============================================================= */
.tempmail-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tempmail-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: visible;
}

.tempmail-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, #7C3AED, #0284C7);
}

.tempmail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tempmail-status-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tempmail-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #047857;
  background: #ECFDF5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 3px 10px;
}

.tempmail-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulseDot 2s infinite;
}

.tempmail-domain-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tempmail-domain-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: all 0.15s;
}

.tempmail-domain-select:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* Address Studio Display */
.tempmail-hero-address-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px 18px;
  gap: 14px;
  flex-wrap: wrap;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tempmail-hero-address-bar:hover {
  border-color: rgba(124, 58, 237, 0.4);
}

.tempmail-address-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.tempmail-address-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(2, 132, 199, 0.12));
  color: #7C3AED;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tempmail-current-address-text {
  font-family: var(--font-mono);
  font-size: 18.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.3px;
  word-break: break-all;
  user-select: all;
}

.tempmail-address-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Custom Prefix Form */
.tempmail-custom-input-box {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--bg-canvas);
  border: 1px dashed rgba(124, 58, 237, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  flex-wrap: wrap;
  animation: fadeIn 0.2s ease-out;
}

.tempmail-custom-input-box.active {
  display: flex;
}

.tempmail-prefix-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
}

.tempmail-prefix-input {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-main);
  background: transparent;
  min-width: 180px;
}

.tempmail-prefix-domain-tag {
  background: var(--bg-canvas);
  border-left: 1px solid var(--border-card);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  user-select: none;
  font-weight: 600;
}

/* Unified Action Bar & Compact History (NEVER WRAPS INTO HUNDREDS OF ROWS) */
.tempmail-unified-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed var(--border-dim);
}

.tempmail-left-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tempmail-history-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.tempmail-history-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tempmail-recent-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  max-width: 480px;
  scrollbar-width: none;
}

.tempmail-recent-pills::-webkit-scrollbar {
  display: none;
}

.tempmail-history-pill {
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tempmail-history-pill:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: #7C3AED;
  color: #7C3AED;
}

.tempmail-history-pill.active {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #FFFFFF;
  font-weight: 700;
}

.tempmail-history-open-btn {
  font-weight: 700 !important;
  color: #7C3AED !important;
  border-color: rgba(124, 58, 237, 0.3) !important;
  white-space: nowrap;
}

.tempmail-history-open-btn:hover {
  background: rgba(124, 58, 237, 0.1) !important;
}

/* History Modal Styling (Clean & Capable of 1000 items) */
.tempmail-modal-history-scroll {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-canvas);
}

.tempmail-history-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  transition: all 0.15s;
}

.tempmail-history-item-row:hover {
  border-color: #7C3AED;
  box-shadow: var(--shadow-sm);
}

.tempmail-history-item-row.is-active {
  background: rgba(124, 58, 237, 0.05);
  border-color: #7C3AED;
}

.tempmail-history-item-addr {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tempmail-history-item-active-tag {
  font-size: 10px;
  font-weight: 800;
  color: #10B981;
  background: #ECFDF5;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.tempmail-history-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Table styling for TempMail Inbox */
.tempmail-inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
}

.tempmail-inbox-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tempmail-badge-counter {
  background: #7C3AED;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.tempmail-otp-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 1.5px;
}

.tempmail-otp-highlight button {
  background: #FFFFFF;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #B45309;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}

.tempmail-otp-highlight button:hover {
  background: #F59E0B;
  color: #FFFFFF;
}

.tempmail-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-muted);
  text-align: center;
  gap: 10px;
}
