/* ==========================================================================
   VOX WEBMAIL EXTRA STYLES (Seamlessly extending style.css)
   ========================================================================== */

:root, html, body {
  color-scheme: dark !important;
}

* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent !important;
}

/* Universal Dark Theme Scrollbars (All scrollable panels) */
::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 9999px !important;
  border: 1px solid transparent !important;
  background-clip: padding-box !important;
  transition: background-color 0.2s ease !important;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35) !important;
}

::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
  background: var(--blue-primary, #FFFFFF) !important;
}

::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: transparent !important;
}

::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ==========================================================================
   ELEGANT GREETING & FAREWELL OVERLAY (CLEAN & PROFESSIONAL)
   ========================================================================== */
.greeting-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: greetingFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.greeting-card {
  position: relative;
  width: 360px;
  max-width: 90vw;
  padding: 34px 28px;
  background: #0D0D0D !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.5) !important;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: greetingCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes greetingCardPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.greeting-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--blue-primary);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.greeting-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 6px 0;
  letter-spacing: -0.2px;
}

.greeting-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

.greeting-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.greeting-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--blue-primary);
  border-radius: 3px;
  transition: width 0.9s ease;
}

/* ==========================================================================
   THREE-PANE MAILBOX LAYOUT (DESKTOP & GENERAL)
   ========================================================================== */
.mail-layout {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: transparent !important;
}

/* Middle Pane: Message List */
.mail-list-pane {
  width: 390px;
  min-width: 330px;
  max-width: 450px;
  background-color: rgba(8, 8, 8, 0.42) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.mail-list-toolbar {
  padding: 14px 16px 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: rgba(8, 8, 8, 0.3) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.mail-list-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.mail-count-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--blue-subtle);
  color: var(--blue-primary);
  border: 1px solid var(--blue-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: 'JetBrains Mono', monospace;
}

.btn-sync-timer {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 8px !important;
  border-radius: 5px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  outline: none !important;
}

.btn-sync-timer:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.btn-sync-timer .sync-timer-counter {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #A1A1AA !important;
  letter-spacing: 0.3px !important;
}

.btn-sync-timer:hover .sync-timer-counter {
  color: #FFFFFF !important;
}

.icon-refresh {
  transition: transform 0.4s ease;
  flex-shrink: 0;
}

.icon-refresh.spinning,
.sync-status-icon.spinning {
  animation: spinSync 0.65s linear infinite !important;
}

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

/* Folder Meta Info */
.mail-list-meta-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--blue-primary);
  flex-shrink: 0;
}

.meta-folder-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* Search Box */
.mail-search-box {
  position: relative;
  width: 100%;
}

.mail-search-box input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 60px 8px 34px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.mail-search-box input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-focus-ring);
  outline: none;
}

.mail-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-key-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* Filter Pills */
.mail-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.mail-filter-pills::-webkit-scrollbar { display: none; }

.filter-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  font-family: inherit;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-pill.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

/* Mail List Scroll Area */
.mail-list-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

/* STANDARD RECTANGULAR NESTED MAIL ITEMS */
.mail-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  margin: 0;
  border-radius: 0 !important;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  position: relative;
  user-select: none;
}

.mail-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transform: none;
  box-shadow: none;
}

.mail-item.active {
  background: rgba(255, 255, 255, 0.13) !important;
  border-top: none !important;
  border-right: none !important;
  border-left: 3px solid #FFFFFF !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.mail-item.unread {
  background: linear-gradient(90deg, rgba(213, 155, 118, 0.14) 0%, rgba(38, 26, 34, 0.78) 100%) !important;
  border-left: 3px solid #D59B76 !important;
  border-bottom: 1px solid rgba(213, 155, 118, 0.14) !important;
  border-radius: 0 !important;
  box-shadow: inset 1px 0 10px rgba(213, 155, 118, 0.12) !important;
}

.mail-item.unread:hover {
  background: linear-gradient(90deg, rgba(213, 155, 118, 0.22) 0%, rgba(52, 36, 48, 0.9) 100%) !important;
  border-left-color: #F4CEB4 !important;
}

.mail-item.unread .mail-item-sender {
  font-weight: 700 !important;
  color: #FFF0E4 !important;
}

.mail-item.unread .mail-item-subject {
  font-weight: 600 !important;
  color: #FFFFFF !important;
}

.mail-item.unread .mail-item-date {
  color: #F4CEB4 !important;
  font-weight: 600 !important;
}

.mail-item.unread .mail-item-snippet {
  color: rgba(244, 206, 180, 0.72) !important;
}

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

.mail-item-sender-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mail-item-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--blue-primary);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.mail-item-avatar-mini::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}

.mail-item-avatar-mini:active {
  transform: scale(0.9);
}

.mail-item.selected .mail-item-avatar-mini {
  background: var(--blue-primary) !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

.unread-dot {
  width: 7px;
  height: 7px;
  background-color: var(--blue-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--blue-primary);
  flex-shrink: 0;
}

.mail-item-sender {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-item-date {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.mail-item-subject {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.mail-item-snippet {
  font-size: 12.5px;
  color: #CBD5E1 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.mail-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.mail-item-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mail-tag-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.mail-star-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mail-star-btn:hover {
  color: var(--orange);
  background: rgba(255, 165, 2, 0.1);
}

.mail-star-btn.starred {
  color: var(--orange);
}

/* ==========================================================================
   RIGHT PANE: MESSAGE READER (FUTURISTIC INSPECTION CONSOLE)
   ========================================================================== */
.mail-reader-pane {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
  overflow: hidden;
  position: relative;
}

/* Empty State: Sleek, Luminous & Minimalist */
.mail-reader-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
  background: transparent !important;
  position: relative;
}

.empty-state-icon-wrap {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 65%, transparent 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.22), inset 0 0 16px rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: #FFFFFF;
  animation: emptyIconFloat 4s ease-in-out infinite;
}

@keyframes emptyIconFloat {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 35px rgba(255, 255, 255, 0.2), inset 0 0 16px rgba(255, 255, 255, 0.12); }
  50% { transform: translateY(-5px); box-shadow: 0 0 50px rgba(255, 255, 255, 0.35), inset 0 0 20px rgba(255, 255, 255, 0.2); }
}

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.empty-desc {
  font-size: 13.5px;
  color: #94A3B8;
  max-width: 360px;
  line-height: 1.6;
  margin: 0;
}

/* Active Message Reader Header */
.mail-reader-header {
  padding: 18px 24px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
  position: relative !important;
  z-index: 100 !important;
  overflow: visible !important;
}

.mail-reader-top-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  min-height: 34px !important;
  width: 100% !important;
}

.mail-reader-subject-wrap {
  width: 100% !important;
  min-width: 0 !important;
  display: block !important;
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
}

.mail-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.mail-verified-badge svg {
  display: block;
}

.mail-reader-subject {
  font-size: 21px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  line-height: 1.32 !important;
  letter-spacing: -0.015em !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  margin: 0 !important;
  padding: 0 !important;
  user-select: text !important;
  -webkit-font-smoothing: antialiased !important;
}

.mail-reader-subject.is-empty-subject {
  color: rgba(255, 255, 255, 0.45) !important;
  font-style: italic !important;
  font-weight: 500 !important;
}

/* Executive Email Action Toolbar */
.mail-reader-action-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  flex-wrap: wrap !important;
}

.mail-action-btn-group {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 8px !important;
  padding: 2px !important;
  gap: 2px !important;
}

.btn-mail-action {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 30px !important;
  padding: 0 11px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #CBD5E1 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  white-space: nowrap !important;
}

.btn-mail-action svg {
  flex-shrink: 0 !important;
  transition: transform 0.18s ease, color 0.18s ease !important;
}

.btn-mail-action:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.25) !important;
}

.btn-mail-action:active {
  transform: scale(0.96) !important;
}

/* Featured "Répondre" styling */
.btn-mail-action.btn-mail-reply {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

.btn-mail-action.btn-mail-reply:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: #FFFFFF !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35) !important;
}

/* ==========================================================================
   GMAIL-INSPIRED STREAMLINED EMAIL DELETION & MORPHING TOOLBAR
   ========================================================================== */

/* Top Toolbar layout & morphing states */
.mail-list-toolbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.mail-list-toolbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

/* Master Select All Checkbox Wrap (Hidden by default, shown in selection mode) */
.mail-master-check-wrap {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: background 0.18s ease !important;
  margin-right: 2px !important;
}

.selection-mode-active .mail-master-check-wrap {
  display: inline-flex !important;
}

.mail-master-check-wrap:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.mail-header-checkbox {
  width: 15px !important;
  height: 15px !important;
  accent-color: #FFFFFF !important;
  cursor: pointer !important;
  margin: 0 !important;
}

/* Selection counter title in toolbar (STRICTLY HIDDEN by default, visible ONLY in selection mode) */
.mail-selection-title {
  display: none !important;
}

.selection-mode-active .mail-selection-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  letter-spacing: 0.2px !important;
  animation: fadeIn 0.18s ease-out !important;
}

.selection-mode-active #mail-list-normal-title {
  display: none !important;
}

#toolbar-selection-actions {
  display: none !important;
}

.selection-mode-active #toolbar-selection-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.selection-mode-active #toolbar-normal-actions {
  display: none !important;
}

/* Button Transférer dans la corbeille in selection mode */
.btn-toolbar-trash {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.btn-toolbar-trash:hover {
  background: #EF4444 !important;
  border-color: #EF4444 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45) !important;
}

.btn-toolbar-trash:active {
  transform: scale(0.96) !important;
}

/* Sleek Toolbar Action Icon Buttons */
.btn-toolbar-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94A3B8 !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-toolbar-icon:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.btn-toolbar-icon:active {
  transform: scale(0.95) !important;
}

/* Toolbar button: empty trash (strictly hidden by default, visible ONLY inside Trash folder) */
.btn-toolbar-empty-trash {
  display: none !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #F87171 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.btn-toolbar-empty-trash.visible {
  display: inline-flex !important;
}

.btn-toolbar-empty-trash:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #FCA5A5 !important;
}

/* Individual Mail Item Checkboxes (HIDDEN by default, visible in selection mode) */
.mail-item-checkbox-wrap {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px 0 0 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  opacity: 0.8 !important;
  transition: opacity 0.18s ease !important;
}

.selection-mode-active .mail-item-checkbox-wrap {
  display: inline-flex !important;
  animation: fadeIn 0.18s ease-out !important;
}

.mail-item:hover .mail-item-checkbox-wrap,
.mail-item.selected .mail-item-checkbox-wrap {
  opacity: 1 !important;
}

.mail-item-checkbox {
  width: 15px !important;
  height: 15px !important;
  accent-color: #FFFFFF !important;
  cursor: pointer !important;
  margin: 0 !important;
}

/* Selected Mail Item row style */
.mail-item.selected {
  background: rgba(255, 255, 255, 0.09) !important;
  border-left: 3px solid #FFFFFF !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Reader single delete button (Clean Icon-Only) */
.btn-mail-action.btn-mail-delete {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 7px !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.22) !important;
  color: #F87171 !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-mail-action.btn-mail-delete:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #EF4444 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
  transform: translateY(-1px) !important;
}

.btn-mail-action.btn-mail-delete:active {
  transform: scale(0.95) !important;
}

.mail-reader-sender-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative !important;
  z-index: 101 !important;
  overflow: visible !important;
}

.mail-reader-sender-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.mail-sender-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mail-sender-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-sender-address {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-reader-date {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

/* Attachments */
.mail-attachments-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-card);
  flex-shrink: 0;
}

.mail-attachment-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.mail-attachment-chip:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--blue-primary);
  color: var(--text-primary);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Mail Body Container */
.mail-reader-body-container {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  color: #F8FAFC !important;
  background-color: transparent;
  font-size: 15px;
  line-height: 1.6;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#reader-body-html {
  flex: 1;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: #F8FAFC !important;
}

#reader-body-html pre {
  color: #F8FAFC !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 14.5px !important;
  line-height: 1.6 !important;
  white-space: pre-wrap;
}

.mail-html-frame {
  width: 100%;
  border: none;
  min-height: calc(100vh - 220px);
  background: transparent;
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
}

/* Compose & Dialog Modals - Deep Black Backdrop & Panels */
.compose-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease forwards;
}

.compose-modal {
  width: 840px;
  max-width: 96vw;
  height: 680px;
  max-height: 94vh;
  background-color: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 0, 0, 0.5) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.25s ease, max-height 0.25s ease;
}

.compose-modal.is-maximized {
  width: 98vw !important;
  max-width: 98vw !important;
  height: 96vh !important;
  max-height: 96vh !important;
  border-radius: 12px !important;
}

.compose-header {
  height: 44px;
  background-color: #000000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.compose-header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.compose-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  gap: 12px;
  overflow-y: auto;
}

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

.compose-field label {
  width: 70px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.compose-field input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 4px 0;
}

.compose-field input:focus {
  outline: none;
}

.compose-textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 14px;
  resize: none;
  min-height: 220px;
  line-height: 1.5;
}

.compose-textarea:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-focus-ring);
  outline: none;
}

.compose-footer {
  padding: 12px 20px;
  background-color: #000000 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Bulletproof Sidebar Layout (Guarantees user profile & quota are NEVER pushed off-screen) */
.sidebar {
  width: 256px !important;
  min-width: 256px !important;
  max-width: 256px !important;
  height: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.sidebar-top-section {
  flex-shrink: 0 !important;
  padding: 14px 12px 6px 12px !important;
}

.nav-menu {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 10px 8px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.sidebar-bottom-section {
  flex-shrink: 0 !important;
  margin-top: auto !important;
  padding: 10px 12px 10px 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
}

.sidebar-quota-box {
  margin: 0 0 8px 0 !important;
  padding: 10px 12px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-md) !important;
  flex-shrink: 0 !important;
}

/* User Profile Badge at bottom of sidebar (Clickable) */
.sidebar-user-card {
  margin: 0 !important;
  padding: 12px 14px !important;
  background-color: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.sidebar-legal-link {
  text-align: center;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.2;
}

.sidebar-legal-link a {
  color: var(--text-muted, #94A3B8);
  text-decoration: none;
  opacity: 0.65;
  transition: all 0.2s ease;
}

.sidebar-legal-link a:hover {
  opacity: 1;
  color: var(--blue-primary, #FFFFFF);
  text-decoration: underline;
}

.sidebar-user-card:hover {
  background-color: #121212 !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
}

.sidebar-user-info {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  width: 100% !important;
}

.sidebar-user-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #000000 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.sidebar-user-details {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.sidebar-user-name-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

.sidebar-user-name {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
  max-width: 140px !important;
}

/* ==========================================================================
   USER PROFILE ROLE PASTILLES (ROUND & DISTINCT PER ROLE, NO TEXT)
   ========================================================================== */
.user-role-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  user-select: none !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.user-role-badge:hover {
  transform: scale(1.15) !important;
  filter: brightness(1.2) !important;
}

.user-role-badge svg {
  flex-shrink: 0 !important;
  display: block !important;
}

/* 1. Superadmin - Couronne Royale Violet Améthyste */
.user-role-badge.role-superadmin {
  background: radial-gradient(circle at 35% 35%, rgba(192, 132, 252, 0.38) 0%, rgba(126, 34, 206, 0.25) 100%) !important;
  color: #C084FC !important;
  border: 1.5px solid rgba(192, 132, 252, 0.75) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.45), inset 0 0 4px rgba(192, 132, 252, 0.2) !important;
}
.user-role-badge.role-superadmin:hover {
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.75), inset 0 0 6px rgba(192, 132, 252, 0.4) !important;
}

/* 2. Admin - Bouclier Saphir Bleu Néon */
.user-role-badge.role-admin {
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.38) 0%, rgba(2, 132, 199, 0.25) 100%) !important;
  color: #38BDF8 !important;
  border: 1.5px solid rgba(56, 189, 248, 0.75) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45), inset 0 0 4px rgba(56, 189, 248, 0.2) !important;
}
.user-role-badge.role-admin:hover {
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.75), inset 0 0 6px rgba(56, 189, 248, 0.4) !important;
}

/* 3. Modérateur - Coche Émeraude Vert Néon */
.user-role-badge.role-moderator {
  background: radial-gradient(circle at 35% 35%, rgba(52, 211, 153, 0.38) 0%, rgba(5, 150, 105, 0.25) 100%) !important;
  color: #34D399 !important;
  border: 1.5px solid rgba(52, 211, 153, 0.75) !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.45), inset 0 0 4px rgba(52, 211, 153, 0.2) !important;
}
.user-role-badge.role-moderator:hover {
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.75), inset 0 0 6px rgba(52, 211, 153, 0.4) !important;
}

/* 4. Support - Casque Ambre Soleil */
.user-role-badge.role-support {
  background: radial-gradient(circle at 35% 35%, rgba(251, 191, 36, 0.38) 0%, rgba(217, 119, 6, 0.25) 100%) !important;
  color: #FBBF24 !important;
  border: 1.5px solid rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45), inset 0 0 4px rgba(251, 191, 36, 0.2) !important;
}
.user-role-badge.role-support:hover {
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.75), inset 0 0 6px rgba(251, 191, 36, 0.4) !important;
}

/* 5. PREMIUM - OR MÉTALLIQUE JAUNE ÉCLATANT */
.user-role-badge.role-premium {
  background: radial-gradient(circle at 35% 35%, rgba(253, 224, 71, 0.45) 0%, rgba(202, 138, 4, 0.3) 100%) !important;
  color: #FDE047 !important;
  border: 1.5px solid rgba(250, 204, 21, 0.9) !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.6), inset 0 0 5px rgba(253, 224, 71, 0.35) !important;
}
.user-role-badge.role-premium:hover {
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.85), inset 0 0 8px rgba(253, 224, 71, 0.5) !important;
}

/* Capsule de rôle pour le modal de profil */
.profile-modal-role-capsule {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 14px 4px 6px !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

.sidebar-user-email {
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: #94A3B8 !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
}

.sidebar-user-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   ROLE ACTION PASTILLE BUTTON (THE SINGLE PASTILLE AT THE BOTTOM ACTION ROW)
   ========================================================================== */
.sidebar-admin-btn {
  width: 32px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}

.sidebar-admin-btn svg {
  display: block !important;
  transition: transform 0.2s ease !important;
}

.sidebar-admin-btn:hover svg {
  transform: scale(1.18) !important;
}

/* 1. Superadmin - Couronne Royale Violet Améthyste */
.sidebar-admin-btn.role-superadmin {
  background: radial-gradient(circle at 35% 35%, rgba(192, 132, 252, 0.28) 0%, rgba(126, 34, 206, 0.18) 100%) !important;
  border: 1px solid rgba(192, 132, 252, 0.6) !important;
  color: #C084FC !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3) !important;
}
.sidebar-admin-btn.role-superadmin:hover {
  background: radial-gradient(circle at 35% 35%, rgba(192, 132, 252, 0.45) 0%, rgba(126, 34, 206, 0.32) 100%) !important;
  border-color: rgba(192, 132, 252, 0.9) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.65) !important;
}

/* 2. Admin - Bouclier Saphir Bleu Néon */
.sidebar-admin-btn.role-admin {
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.28) 0%, rgba(2, 132, 199, 0.18) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  color: #38BDF8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3) !important;
}
.sidebar-admin-btn.role-admin:hover {
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.45) 0%, rgba(2, 132, 199, 0.32) 100%) !important;
  border-color: rgba(56, 189, 248, 0.9) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.65) !important;
}

/* 3. Modérateur - Coche Émeraude Vert Néon */
.sidebar-admin-btn.role-moderator {
  background: radial-gradient(circle at 35% 35%, rgba(52, 211, 153, 0.28) 0%, rgba(5, 150, 105, 0.18) 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
  color: #34D399 !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.3) !important;
}
.sidebar-admin-btn.role-moderator:hover {
  background: radial-gradient(circle at 35% 35%, rgba(52, 211, 153, 0.45) 0%, rgba(5, 150, 105, 0.32) 100%) !important;
  border-color: rgba(52, 211, 153, 0.9) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.65) !important;
}

/* 4. Support - Casque Ambre Soleil */
.sidebar-admin-btn.role-support {
  background: radial-gradient(circle at 35% 35%, rgba(251, 191, 36, 0.28) 0%, rgba(217, 119, 6, 0.18) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.6) !important;
  color: #FBBF24 !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3) !important;
}
.sidebar-admin-btn.role-support:hover {
  background: radial-gradient(circle at 35% 35%, rgba(251, 191, 36, 0.45) 0%, rgba(217, 119, 6, 0.32) 100%) !important;
  border-color: rgba(251, 191, 36, 0.9) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.65) !important;
}

/* 5. PREMIUM - OR MÉTALLIQUE JAUNE ÉCLATANT */
.sidebar-admin-btn.role-premium {
  background: radial-gradient(circle at 35% 35%, rgba(253, 224, 71, 0.35) 0%, rgba(202, 138, 4, 0.22) 100%) !important;
  border: 1px solid rgba(250, 204, 21, 0.8) !important;
  color: #FDE047 !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45), inset 0 0 4px rgba(253, 224, 71, 0.25) !important;
}
.sidebar-admin-btn.role-premium:hover {
  background: radial-gradient(circle at 35% 35%, rgba(253, 224, 71, 0.55) 0%, rgba(202, 138, 4, 0.35) 100%) !important;
  border-color: rgba(250, 204, 21, 1) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.85), inset 0 0 6px rgba(253, 224, 71, 0.4) !important;
}

/* 6. PLUS - ÉCLAIR CYAN ÉLECTRIQUE */
.sidebar-admin-btn.role-plus {
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.32) 0%, rgba(14, 165, 233, 0.2) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.75) !important;
  color: #38BDF8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4), inset 0 0 4px rgba(56, 189, 248, 0.2) !important;
}
.sidebar-admin-btn.role-plus:hover {
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.5) 0%, rgba(14, 165, 233, 0.32) 100%) !important;
  border-color: rgba(56, 189, 248, 1) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.8), inset 0 0 6px rgba(56, 189, 248, 0.35) !important;
}

.sidebar-profile-btn {
  flex: 1 !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  color: #D1D5DB !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 0 10px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.sidebar-profile-btn:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  transform: none !important;
}

.sidebar-lock-btn {
  width: 32px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  color: #94A3B8 !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  box-sizing: border-box !important;
}

.sidebar-lock-btn:hover {
  color: #F59E0B !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  transform: none !important;
}

.sidebar-logout-btn {
  width: 32px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  color: #94A3B8 !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  box-sizing: border-box !important;
}

.sidebar-logout-btn:hover {
  color: #EF4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  transform: none !important;
}

.sidebar-profile-btn:active,
.sidebar-lock-btn:active,
.sidebar-logout-btn:active {
  transform: translateY(1px) !important;
}

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

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

/* ==========================================================================
   EXECUTIVE AMBIENT AURORA (HIGH-END PRO BACKGROUND ANIMATION)
   ========================================================================== */
#bg-canvas {
  display: none !important;
}

body {
  background-color: #000000 !important;
}

.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background: radial-gradient(ellipse at 20% 30%, #0D0D0D 0%, #080808 60%, #000000 100%) !important;
}

/* Ambient glow orbs disabled for pure pitch black and white theme */
.aurora-orb,
.aurora-beam {
  display: none !important;
}

/* Interactive cursor spotlight - Pure monochrome silver glow (ZERO blue) */
.ambient-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 45%, transparent 68%) !important;
  filter: blur(45px) !important;
  -webkit-filter: blur(45px) !important;
  opacity: 0.85 !important;
  mix-blend-mode: screen !important;
  will-change: transform;
}

@keyframes floatOrb1 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.75; }
  50% { transform: translate3d(160px, 120px, 0) scale(1.18); opacity: 0.95; }
  100% { transform: translate3d(80px, 220px, 0) scale(0.95); opacity: 0.7; }
}

@keyframes floatOrb2 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.65; }
  50% { transform: translate3d(-120px, -100px, 0) scale(1.15); opacity: 0.85; }
  100% { transform: translate3d(110px, -60px, 0) scale(0.92); opacity: 0.6; }
}

@keyframes floatOrb3 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.68; }
  50% { transform: translate3d(-140px, 100px, 0) scale(1.2); opacity: 0.92; }
  100% { transform: translate3d(-70px, 60px, 0) scale(0.94); opacity: 0.65; }
}

@keyframes floatOrb4 {
  0% { transform: translate3d(0, 0, 0) scale(0.95); opacity: 0.58; }
  50% { transform: translate3d(-130px, -80px, 0) scale(1.18); opacity: 0.82; }
  100% { transform: translate3d(-50px, -120px, 0) scale(1); opacity: 0.62; }
}

@keyframes floatOrb5 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.62; }
  50% { transform: translate3d(100px, -60px, 0) scale(1.16); opacity: 0.88; }
  100% { transform: translate3d(-70px, 90px, 0) scale(0.94); opacity: 0.58; }
}

@keyframes pulseBeam {
  0%, 100% { opacity: 0.35; transform: scaleX(0.92); }
  50% { opacity: 0.85; transform: scaleX(1); }
}

.custom-titlebar {
  background: rgba(8, 8, 8, 0.45) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  position: relative;
  z-index: 50;
}

.app-layout {
  position: relative;
  z-index: 1;
  background-color: transparent !important;
}

/* Sidebar: Frosted executive dark glass with subtle hairline border */
.sidebar {
  position: relative;
  z-index: 2;
  background: rgba(8, 8, 8, 0.42) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}

/* Refined section headers */
.nav-section-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #64748B !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  padding: 14px 12px 6px !important;
}

/* Navigation items: Modern & Clean */
.nav-item {
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #94A3B8 !important;
  transition: all 0.15s ease !important;
  padding: 8px 10px !important;
  border: 1px solid transparent !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

.nav-item > span:not(.mail-count-badge) {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: inline-block !important;
}

.nav-item .mail-count-badge {
  flex-shrink: 0 !important;
  margin-left: auto !important;
  white-space: nowrap !important;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #F8FAFC !important;
  transform: none !important;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 6px rgba(255, 255, 255, 0.12) !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

.nav-item.active .nav-icon {
  color: #FFFFFF !important;
}

/* Mail list pane: Sleek frosted dark tone */
.mail-list-pane {
  position: relative;
  z-index: 2;
  background: rgba(8, 8, 8, 0.38) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Mail reader pane: Translucent frosted glass harmonized with ambient lighting */
.mail-reader-pane {
  position: relative;
  z-index: 3;
  background: rgba(8, 8, 8, 0.38) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.mail-reader-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  background: rgba(8, 8, 8, 0.55) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#mail-reader-content,
.mail-reader-content {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative;
  background: transparent !important;
}

.mail-reader-body-container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: auto;
  background: rgba(8, 8, 8, 0.48) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mail-reader-empty {
  background: transparent !important;
}

/* Auth Overlay Frosted Glass */
#auth-overlay {
  background: rgba(4, 4, 4, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  overflow-y: auto !important;
  padding: 16px 10px !important;
  box-sizing: border-box !important;
  align-items: center;
  justify-content: center;
}

#auth-overlay.hidden,
#auth-overlay[style*="display: none"] {
  display: none !important;
}

/* ==========================================================================
   AUTH LOGIN CARD (CLEAN, ULTRA-COMPACT & NEVER OFF-SCREEN)
   ========================================================================== */
.auth-card {
  width: 430px;
  max-width: 94vw;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto !important;
  margin: auto !important;
  background-color: rgba(10, 10, 10, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  padding: 24px 28px !important;
  position: relative;
  z-index: 10;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.75) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  box-sizing: border-box !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.auth-card::-webkit-scrollbar {
  width: 4px;
}
.auth-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.auth-card:hover {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.12), 0 24px 50px rgba(0, 0, 0, 0.8) !important;
}

/* Specific compact mode for Account Creation to keep entire UI on-screen */
.auth-card.mode-register {
  padding: 18px 22px !important;
}
.auth-card.mode-register .auth-header-block {
  margin-bottom: 10px !important;
}
.auth-card.mode-register .auth-logo-img {
  height: 42px !important;
  width: 42px !important;
  margin-bottom: 4px !important;
}
.auth-card.mode-register .auth-header-title {
  font-size: 18px !important;
}
.auth-card.mode-register .auth-header-sub {
  font-size: 11.5px !important;
  margin-top: 2px !important;
}
.auth-card.mode-register .auth-tab-group {
  margin-bottom: 10px !important;
}
.auth-card.mode-register .auth-tab-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
}
.auth-card.mode-register .auth-input-wrap {
  height: 38px !important;
}
.auth-card.mode-register .auth-input-wrap input {
  font-size: 13px !important;
  padding: 6px 10px !important;
}
.auth-card.mode-register .auth-submit-btn {
  height: 38px !important;
  font-size: 13px !important;
}
.auth-card.mode-register .auth-legal-footer {
  margin-top: 10px !important;
  padding-top: 8px !important;
}

/* ==========================================================================
   AUTH INPUTS (SINGLE SLEEK BOX - NO NESTED DOUBLE BOXES)
   ========================================================================== */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.auth-input-wrap:focus-within {
  border-color: #FFFFFF !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 0 12px rgba(255, 255, 255, 0.15) !important;
}

.auth-input-wrap input {
  flex: 1;
  width: 100%;
  height: 42px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 14px !important;
  color: #F0F2F6 !important;
  font-size: 14px !important;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.auth-input-wrap input:focus,
.auth-input-wrap input:focus-visible,
.modal-input-wrap input:focus,
.modal-input-wrap input:focus-visible,
.compose-field input:focus,
.compose-field input:focus-visible,
.mail-search-box input:focus,
.mail-search-box input:focus-visible,
.contacts-search-wrap input:focus,
.contacts-search-wrap input:focus-visible,
.password-wrap input:focus,
.password-wrap input:focus-visible,
.email-suffix-wrap input:focus,
.email-suffix-wrap input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

.auth-input-wrap input::placeholder {
  color: #545F73;
}

.auth-input-wrap.password-wrap input {
  padding-right: 42px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-toggle-password:hover {
  color: var(--blue-primary);
  background: var(--blue-subtle);
}

/* ==========================================================================
   CAPS LOCK WARNING ALERT
   ========================================================================== */
.caps-warning {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #FBBF24;
  background-color: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  animation: fadeIn 0.18s ease-out;
}

.caps-warning svg {
  flex-shrink: 0;
  color: #FBBF24;
}

/* ==========================================================================
   REMEMBER ME CUSTOM CHECKBOX
   ========================================================================== */
.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.custom-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.custom-checkbox {
  width: 17px;
  height: 17px;
  background-color: #0A0A0A;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.custom-checkbox svg {
  display: none;
  stroke: #ffffff;
}

.custom-checkbox-wrap input[type="checkbox"]:checked + .custom-checkbox {
  background-color: var(--blue-primary);
  border-color: var(--blue-primary);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.custom-checkbox-wrap input[type="checkbox"]:checked + .custom-checkbox svg {
  display: block;
}

.custom-checkbox-wrap:hover .custom-checkbox {
  border-color: rgba(255, 255, 255, 0.5);
}

.checkbox-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.custom-checkbox-wrap:hover .checkbox-label {
  color: var(--text-primary);
}

/* ==========================================================================
   AUTH SUBMIT BUTTON & SPINNER
   ========================================================================== */
.auth-submit-btn {
  position: relative;
  transition: all 0.2s ease;
}

.auth-submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  filter: grayscale(10%);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: authSpinnerRotate 0.65s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

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

/* ==========================================================================
   AUTH TABS (SEGMENTED CONTROL)
   ========================================================================== */
.auth-tab-group {
  display: flex;
  background-color: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.auth-tab-btn {
  flex: 1;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.auth-tab-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.auth-tab-btn.active {
  background-color: #202020;
  color: #F0F2F6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-tab-btn svg {
  transition: transform 0.2s ease;
}

.auth-tab-btn.active svg {
  color: var(--blue-primary);
}

/* ==========================================================================
   REGISTRATION DOMAIN BADGE
   ========================================================================== */
.email-suffix-wrap {
  padding-right: 0 !important;
}

.domain-fixed-badge {
  background-color: #141414 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  padding: 0 12px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
}

/* ==========================================================================
   PASSWORD STRENGTH METER
   ========================================================================== */
.pw-strength-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  padding: 0 2px;
  animation: fadeIn 0.2s ease;
}

.pw-strength-track {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.pw-strength-text {
  font-size: 11px;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   MOBILE NAVIGATION & ADAPTIVE RESPONSIVE LAYOUT
   ========================================================================== */
.mobile-top-bar {
  display: none; /* hidden on desktop */
  height: 52px;
  background-color: #0A0A0A !important;
  border-bottom: 1px solid var(--border-card);
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}

.mobile-menu-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-menu-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

.mobile-compose-btn {
  width: 38px !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  border: 1px solid #FFFFFF !important;
  border-radius: 8px !important;
  color: #000000 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.22) !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}

.mobile-compose-btn svg {
  stroke: #000000 !important;
  color: #000000 !important;
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.4 !important;
  display: block !important;
  pointer-events: none !important;
}

.mobile-compose-btn:hover {
  background: #E4E4E7 !important;
  border-color: #E4E4E7 !important;
}

.mobile-compose-btn:active {
  background: #D4D4D8 !important;
  border-color: #D4D4D8 !important;
  transform: scale(0.95) !important;
}

.mobile-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.mobile-top-title {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8) !important;
  z-index: 9999;
}

.mobile-reader-back-bar {
  display: none; /* desktop hidden */
  padding: 10px 14px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-card);
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.mobile-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-primary);
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.mobile-back-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-reader-folder-tag {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

/* ==========================================================================
   AUTO-UPDATE 30S SYNC TIMER BADGE (DESKTOP & MOBILE)
   ========================================================================== */
.titlebar-sync-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: 4px;
}

.sync-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-family: 'JetBrains Mono', -apple-system, monospace;
  color: var(--blue-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  outline: none;
}

.sync-timer-badge:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.sync-timer-badge:active {
  transform: translateY(0);
}

.sync-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #2ed573;
  box-shadow: 0 0 8px #2ed573;
  animation: syncPulse 2.5s infinite ease-in-out;
  flex-shrink: 0;
}

.sync-status-icon {
  color: var(--blue-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sync-status-icon.spinning {
  animation: syncSpin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.sync-status-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 11.5px;
}

.sync-timer-counter {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  min-width: 22px;
  text-align: right;
}

.mobile-sync-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: var(--blue-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-sync-btn:active {
  background: rgba(255, 255, 255, 0.22);
}

#mobile-sync-icon.spinning {
  animation: syncSpin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

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

@keyframes syncPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES FOR MOBILE (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .custom-titlebar {
    display: none !important;
  }

  .mobile-top-bar {
    display: flex;
    background: #0A0A0A !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: relative;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-left: max(14px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(14px, env(safe-area-inset-right, 0px)) !important;
    height: calc(52px + env(safe-area-inset-top, 0px)) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .mobile-top-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    margin-right: 12px !important;
    overflow: hidden !important;
  }

  .mobile-top-title {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  #mobile-folder-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.2px !important;
    line-height: 1.2 !important;
  }

  .mobile-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  #mobile-total-badge {
    display: none !important;
  }

  .mobile-top-logo-img {
    display: none !important;
  }

  .sidebar-drawer-brand-title {
    display: inline-block !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.8px !important;
    color: #FFFFFF !important;
  }

  .mobile-drawer-close-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #FFFFFF !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
  }

  .mobile-drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
  }

  .app-layout {
    height: calc(100dvh - 52px - env(safe-area-inset-top, 0px)) !important;
    height: calc(100vh - 52px - env(safe-area-inset-top, 0px));
    position: relative;
    overflow: visible;
    z-index: auto !important;
  }

  .mail-list-scroll {
    padding-bottom: calc(85px + env(safe-area-inset-bottom)) !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ==========================================================================
     MOBILE DRAWER NAVIGATION (SLIDE-OUT FULL DRAWER WITH HIGH Z-INDEX)
     ========================================================================== */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 290px !important;
    max-width: 85vw !important;
    height: 100% !important;
    height: 100dvh !important;
    z-index: 10005 !important;
    padding: 16px 14px !important;
    padding-top: max(16px, env(safe-area-inset-top)) !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    padding-left: max(14px, env(safe-area-inset-left)) !important;
    box-sizing: border-box !important;
    transform: translate3d(-100%, 0, 0) !important;
    -webkit-transform: translate3d(-100%, 0, 0) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    -webkit-transition: -webkit-transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 14px 0 45px rgba(0, 0, 0, 0.9) !important;
    background: #080808 !important;
    background-color: #080808 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.sidebar-open .sidebar,
  .sidebar.mobile-open {
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
  }

  .mobile-drawer-backdrop {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(3, 5, 10, 0.78) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 10000 !important;
  }

  body.sidebar-open .mobile-drawer-backdrop {
    display: block !important;
    z-index: 10000 !important;
  }

  /* Drawer Top Brand */
  .sidebar-brand-spine {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 6px 6px 14px 6px !important;
    margin-bottom: 6px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    cursor: pointer !important;
  }

  .sidebar-spine-logo-img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.25));
  }

  /* Drawer Top Compose Button */
  .sidebar-top-section {
    width: 100% !important;
    padding: 0 0 10px 0 !important;
    margin-bottom: 4px !important;
    display: flex !important;
  }

  .sidebar-compose-btn {
    width: 100% !important;
    height: 42px !important;
    padding: 0 16px !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    border: 1px solid #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.18) !important;
    cursor: pointer !important;
  }

  .sidebar-compose-btn svg {
    stroke: #000000 !important;
    width: 18px !important;
    height: 18px !important;
  }

  .sidebar-btn-label {
    display: inline !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #000000 !important;
  }

  /* Drawer Navigation Items & Labels */
  .nav-menu {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 0 !important;
    align-items: stretch !important;
  }

  .nav-section-label {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: var(--text-muted, #71717A) !important;
    letter-spacing: 1.2px !important;
    padding: 10px 8px 4px !important;
    text-transform: uppercase !important;
  }

  .nav-item {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    justify-content: flex-start !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-secondary, #A1A1AA) !important;
    cursor: pointer !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
  }

  .nav-item:hover, .nav-item:active {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #FFFFFF !important;
  }

  .nav-item.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 6px rgba(255, 255, 255, 0.12) !important;
  }

  .nav-item.active .nav-icon {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
  }

  .sidebar-label {
    display: inline !important;
    flex: 1 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .nav-item .mail-count-badge {
    position: static !important;
    margin-left: auto !important;
    font-size: 11px !important;
    padding: 2px 7px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #E2E8F0 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
  }

  .nav-item.active .mail-count-badge {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
  }

  /* Drawer Bottom Section */
  .sidebar-bottom-section {
    width: 100% !important;
    padding: 12px 0 0 0 !important;
    margin-top: auto !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .sidebar-quota-box {
    display: block !important;
    padding: 10px 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
  }

  .sidebar-user-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .sidebar-user-info {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .sidebar-user-avatar {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .sidebar-user-details {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .sidebar-user-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .sidebar-user-email {
    font-size: 11px !important;
    color: var(--text-muted, #71717A) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .sidebar-user-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .sidebar-user-actions .btn-link {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    color: var(--text-secondary, #A1A1AA) !important;
  }

  .sidebar-legal-link {
    display: block !important;
    text-align: center !important;
    font-size: 11px !important;
    padding: 4px 0 !important;
  }

  /* Hide Desktop Spine Toggle Button on Mobile */
  .sidebar-collapse-toggle {
    display: none !important;
  }

  /* ==========================================================================
     MOBILE MAIL LIST PANE & STREAMLINED TOOLBAR
     ========================================================================== */
  .mail-layout {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .mail-list-pane {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    background-color: #0A0A0A !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
  }

  /* Hide duplicated header toolbar row on mobile (since .mobile-top-bar has folder name & sync) */
  .mail-list-toolbar {
    padding: 8px 12px 10px 12px !important;
    gap: 8px !important;
  }

  .mail-list-toolbar-top {
    display: none !important;
  }

  /* Reveal toolbar top ONLY when batch selection mode is active */
  body.selection-mode-active .mail-list-toolbar-top,
  .mail-layout.selection-active .mail-list-toolbar-top {
    display: flex !important;
  }

  .mail-list-meta-bar {
    padding: 0 4px !important;
    font-size: 11px !important;
  }

  .mail-search-box {
    height: 38px !important;
    padding: 0 10px !important;
  }

  .mail-search-box input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
  }

  .search-key-hint {
    display: none !important;
  }

  .mail-filter-pills {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
  }
  .mail-filter-pills::-webkit-scrollbar {
    display: none !important;
  }

  .filter-pill, .thread-toggle-pill {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    height: 30px !important;
    box-sizing: border-box !important;
  }

  /* ==========================================================================
     MOBILE SLIDING READER PANE
     ========================================================================== */
  .mail-reader-pane {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #000000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    transform: translate3d(100%, 0, 0) !important;
    -webkit-transform: translate3d(100%, 0, 0) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .mail-layout.reader-open .mail-reader-pane {
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
  }

  .mobile-reader-back-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    background: #0A0A0A !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }

  .mobile-back-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: #FFFFFF !important;
  }

  .mobile-reader-folder-tag {
    font-size: 12px !important;
    color: var(--text-muted, #71717A) !important;
    font-weight: 500 !important;
  }

  #mail-reader-content {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .mail-reader-header {
    padding: 12px 14px !important;
    gap: 8px !important;
    background-color: #0C0C0C !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065) !important;
    flex-shrink: 0 !important;
  }

  .mail-reader-subject {
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }

  .mail-reader-top-actions {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .mail-reader-action-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding-bottom: 2px !important;
    justify-content: flex-start !important;
    width: 100% !important;
  }
  .mail-reader-action-group::-webkit-scrollbar {
    display: none !important;
  }

  .mail-action-btn-group {
    flex-shrink: 0 !important;
    display: flex !important;
    gap: 4px !important;
  }

  .btn-mail-action {
    padding: 6px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 32px !important;
  }

  .mail-sender-row {
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
    gap: 10px !important;
  }

  .mail-sender-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 13px !important;
  }

  .mail-reader-body-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 14px 14px calc(70px + env(safe-area-inset-bottom)) 14px !important;
    background-color: #000000 !important;
  }

  .mail-html-frame {
    min-height: calc(100dvh - 220px);
  }

  /* Auth Card on Mobile */
  .auth-card {
    padding: 24px 18px !important;
    max-width: 94vw !important;
  }

  /* Compose Modal on Mobile (Full Viewport & Sticky Controls) */
  #compose-modal.compose-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    padding: 0 !important;
    z-index: 100000 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  .compose-modal {
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  .compose-header {
    flex-shrink: 0 !important;
    height: 48px !important;
    padding: 0 14px !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
  }

  #compose-maximize-btn {
    display: none !important;
  }

  .compose-header .win-btn.close {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .compose-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .compose-field input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
  }

  .compose-textarea {
    flex: 1 1 auto !important;
    min-height: 130px !important;
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    padding: 10px 12px !important;
  }

  .compose-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 6px 8px !important;
    gap: 4px !important;
    border-radius: 6px !important;
    background: #0F0F0F !important;
  }
  .compose-toolbar::-webkit-scrollbar {
    display: none !important;
  }

  .compose-toolbar-group {
    flex-shrink: 0 !important;
  }

  .compose-toolbar-divider {
    flex-shrink: 0 !important;
    margin: 0 3px !important;
  }

  .toolbar-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
  }

  #compose-turnstile-wrap {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
  }

  .compose-footer {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
    padding: 10px 14px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    background-color: var(--bg-sidebar) !important;
    border-top: 1px solid var(--border-card) !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.65) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .compose-footer .btn-subtle,
  .compose-footer .btn-primary {
    min-height: 38px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  /* Compose sub-modals (Template Picker Studio, CTA, Table, Link, Image) must ALWAYS appear above Compose */
  #template-picker-modal,
  #cta-generator-modal,
  #table-generator-modal,
  #link-insert-modal,
  #image-insert-modal {
    z-index: 1000005 !important;
  }

  #template-picker-modal.compose-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    padding: 0 !important;
    z-index: 1000005 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  #template-picker-modal .template-studio-modal {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  #template-picker-modal .template-studio-body {
    padding: 12px 14px !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #template-picker-modal .template-categories-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
    gap: 6px !important;
  }
  #template-picker-modal .template-categories-tabs::-webkit-scrollbar {
    display: none !important;
  }

  #template-picker-modal .template-cat-tab {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 11.5px !important;
    padding: 5px 12px !important;
  }

  #template-picker-modal .template-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #template-picker-modal .template-card {
    padding: 12px !important;
  }

  #template-picker-modal .compose-header {
    flex-shrink: 0 !important;
    height: 48px !important;
    padding: 0 14px !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
  }

  #template-picker-modal .compose-footer {
    flex-shrink: 0 !important;
    padding: 10px 14px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}

/* Specific optimizations for compact smartphone screens (<= 600px) */
@media (max-width: 600px) {
  /* Compact icon-only buttons in the toolbar to prevent horizontal header overflow */
  .btn-toolbar-trash span,
  .btn-toolbar-empty-trash span {
    display: none !important;
  }
  .btn-toolbar-trash,
  .btn-toolbar-empty-trash {
    padding: 0 8px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    justify-content: center !important;
  }

  /* Reader top action group: single line with smooth horizontal scroll */
  .mail-reader-action-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
    justify-content: flex-start !important;
    width: 100% !important;
  }
  .mail-reader-action-group::-webkit-scrollbar {
    display: none !important;
  }
  .mail-action-btn-group {
    flex-shrink: 0 !important;
  }
  .btn-mail-action.btn-mail-delete {
    flex-shrink: 0 !important;
  }

  /* Full-screen legal notice modal on mobile */
  #legal-notice-modal.compose-modal-backdrop {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }
  .legal-modal-card {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }
  .legal-modal-header {
    padding: 12px 14px !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
  }
  .legal-modal-body {
    padding: 14px !important;
  }
  .legal-modal-footer {
    padding: 10px 14px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}

/* ==========================================================================
   PROFILE MODAL STYLING
   ========================================================================== */
.profile-modal-card {
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0A0A0A !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(0, 0, 0, 0.6) !important;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.profile-modal-body {
  background: #0A0A0A !important;
  padding: 22px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

.profile-avatar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  cursor: pointer;
  margin-bottom: 12px;
  background: #000000 !important;
  transition: transform 0.2s ease;
}

.profile-avatar-wrapper:hover {
  transform: scale(1.04);
}

.profile-avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #000000 !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: #FFFFFF !important;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8) !important;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF !important;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}

.profile-avatar-wrapper:hover .profile-avatar-overlay {
  opacity: 1;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.btn-danger-subtle {
  color: var(--red) !important;
  background: rgba(255, 59, 48, 0.1) !important;
  border: 1px solid rgba(255, 59, 48, 0.25) !important;
}

.btn-danger-subtle:hover {
  background: rgba(255, 59, 48, 0.22) !important;
}

.profile-avatar-help {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

.profile-form-group {
  margin-bottom: 16px;
}

.profile-form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.5px;
}

/* Signature Editor & Live Preview */
.profile-signature-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sig-section-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--blue-primary);
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.sig-controls-box {
  transition: opacity 0.2s ease;
}

.sig-controls-box.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.sig-options-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.sig-custom-textarea {
  min-height: 64px !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  padding: 8px 10px !important;
  resize: vertical;
}

.sig-live-preview-wrap {
  margin-top: 14px;
  background: rgba(8, 8, 8, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}

.sig-preview-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.sig-preview-card {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: all 0.2s ease;
}

.sig-preview-card.is-disabled {
  opacity: 0.45;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 14px;
  font-style: italic;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.sig-preview-table {
  width: 100%;
  border-collapse: collapse;
}

.sig-preview-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: block;
}

.sig-preview-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sig-preview-pseudo {
  font-weight: 700;
  font-size: 14px;
  color: #F0F2F6;
  line-height: 1.3;
}

.sig-preview-email {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.sig-preview-text {
  font-size: 12px;
  color: #D1D5DB;
  margin-top: 4px;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* ==========================================================================
   AVATAR IMAGES IN MESSAGE LIST & MESSAGE READER
   ========================================================================== */
.mail-item-avatar-mini {
  overflow: hidden !important;
}

.mail-item-avatar-mini img,
.mail-item-avatar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.mail-avatar {
  overflow: hidden !important;
}

.mail-avatar img,
.reader-avatar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Certified verified badges (Taoyame Emerald & Enterprise Blue) */
.mail-verified-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  cursor: help !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease !important;
}

.mail-verified-badge:hover {
  transform: scale(1.18) !important;
}

.mail-verified-badge.enterprise svg {
  filter: drop-shadow(0 0 5px rgba(0, 122, 255, 0.55));
}

.mail-verified-badge.taoyame svg {
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.55));
}

/* ==========================================================================
   DEDICATED SIGNATURE TAB & REAL-TIME PREVIEW
   ========================================================================== */
#view-signature {
  background: transparent !important;
}

.sig-tab-layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(340px, 1fr);
  gap: 24px;
  align-items: flex-start;
  max-width: 1100px;
}

@media (max-width: 900px) {
  .sig-tab-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.sig-tab-card {
  background: #0D0D0D !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8) !important;
}

.sig-preview-email-simulation {
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px;
  padding: 22px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.sig-preview-sim-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  color: #94A3B8;
  line-height: 1.5;
  margin-bottom: 24px;
  padding-bottom: 16px;
}

/* ==========================================================================
   SECURITY & 2FA STYLES
   ========================================================================== */
.security-card {
  background: #0D0D0D !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8) !important;
  transition: border-color 0.25s ease;
}

.sec-status-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.sec-status-icon-badge.inactive {
  background: rgba(148, 163, 184, 0.1);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.sec-status-icon-badge.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.sec-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sec-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sec-badge.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.sec-wizard-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}

@media (max-width: 680px) {
  .sec-wizard-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .sec-qr-wrapper {
    margin: 0 auto;
  }
}

.sec-qr-wrapper {
  background: #FFFFFF;
  padding: 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.4);
}

.sec-qr-wrapper img {
  display: block;
  border-radius: 4px;
}

.sec-key-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 6px;
  color: #F8FAFC;
  letter-spacing: 1.5px;
  user-select: all;
}

.step-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF !important;
  color: #000000 !important;
  font-size: 12px;
  font-weight: 700;
}

.sec-backup-codes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .sec-backup-codes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sec-backup-code-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF !important;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 10px 8px;
  border-radius: 8px;
  text-align: center;
  letter-spacing: 1.5px;
  user-select: all;
  transition: all 0.2s ease;
}

.sec-backup-code-item:hover {
  border-color: #FFFFFF !important;
  background: #222222 !important;
}

.auth-2fa-icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.2);
}

.forgot-pass-link:hover {
  text-decoration: underline !important;
  color: #FFFFFF !important;
}

/* ==========================================================================
   STORAGE QUOTA WIDGET (SIDEBAR)
   ========================================================================== */
.sidebar-quota-box {
  margin: 12px 14px 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  transition: all 0.2s ease;
}

.sidebar-quota-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.quota-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.quota-title {
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #CBD5E1;
}

.quota-percent {
  font-weight: 700;
  font-size: 11px;
  color: #FFFFFF;
  font-family: 'JetBrains Mono', monospace;
}

.quota-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.quota-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FFFFFF, #FFFFFF);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.quota-bar-fill.warning {
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.quota-bar-fill.danger {
  background: linear-gradient(90deg, #EF4444, #F87171);
}

.quota-details {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 5px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   AUTO-SAVE DRAFTS INDICATOR
   ========================================================================== */
.draft-saved-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  display: inline-block;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.draft-saved-dot.saving {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  animation: pulse-dot 1s infinite alternate;
}

@keyframes pulse-dot {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.15); }
}

/* ==========================================================================
   SEARCH BAR CLEAR BUTTON
   ========================================================================== */
.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  margin-right: 4px;
}

.search-clear-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   PASSWORD STRENGTH METER
   ========================================================================== */
.pwd-strength-wrap {
  margin-top: 6px;
}

.pwd-strength-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.pwd-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ==========================================================================
   IMAGE ATTACHMENTS GALLERY & INTERACTIVE LIGHTBOX VIEWER
   ========================================================================== */

.mail-images-gallery-section {
  padding: 14px 24px;
  background-color: #0A0A0A !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  flex-shrink: 0;
}

.mail-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mail-gallery-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.mail-gallery-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

.btn-gallery-download-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gallery-download-all:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.mail-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.mail-image-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #111111 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.mail-image-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 14px rgba(255, 255, 255, 0.15) !important;
}

.mail-image-thumb-wrap {
  width: 100%;
  height: 135px;
  position: relative;
  overflow: hidden;
  background: #060606 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mail-image-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mail-image-card:hover .mail-image-thumb {
  transform: scale(1.06);
}

.mail-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.88) 100%) !important;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 2;
}

.mail-image-card:hover .mail-image-overlay {
  opacity: 1;
}

.mail-image-overlay-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.9) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mail-image-overlay-btn:hover {
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  color: #000000 !important;
  transform: scale(1.12);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.4) !important;
}

.mail-image-footer {
  padding: 8px 12px;
  background: #0E0E0E !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mail-image-name {
  font-size: 11.5px;
  font-weight: 500;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-image-size {
  font-size: 10.5px;
  color: #64748B;
}

/* Lightbox Modal Overlay */
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.94) !important;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInLightbox 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.lightbox-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #000000 !important;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(10, 10, 10, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(16px);
  z-index: 10;
}

.lightbox-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lightbox-counter {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.lightbox-filename {
  font-size: 13.5px;
  font-weight: 600;
  color: #F8FAFC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.lightbox-filesize {
  font-size: 12px;
  color: #94A3B8;
}

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

.lightbox-zoom-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.lightbox-tool-btn {
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #CBD5E1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.lightbox-zoom-bar .lightbox-tool-btn {
  border-radius: 0;
  border: none;
  background: transparent;
}

.lightbox-tool-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.lightbox-actions-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

.lightbox-actions .lightbox-close-btn,
.lightbox-tool-btn.lightbox-close-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: auto !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  color: #F87171 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin: 0 !important;
  transition: all 0.15s ease !important;
}

.lightbox-actions .lightbox-close-btn:hover,
.lightbox-tool-btn.lightbox-close-btn:hover {
  background: #EF4444 !important;
  border-color: #EF4444 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4) !important;
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.lightbox-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  margin: 0 12px;
  backdrop-filter: blur(8px);
}

.lightbox-nav-btn:hover {
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  color: #000000 !important;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4) !important;
}

.lightbox-nav-btn:disabled,
.lightbox-nav-btn[style*="display: none"] {
  opacity: 0.2;
  pointer-events: none;
}

.lightbox-img-viewport {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
  user-select: none;
}

.lightbox-main-image {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(255, 255, 255, 0.8);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Enhanced attachment chips */
.mail-attachment-chip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}

.mail-attachment-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mail-attachment-action-preview {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.mail-attachment-action-preview:hover {
  background: #FFFFFF;
  color: #FFFFFF;
}

.mail-attachment-action-download {
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mail-attachment-action-download:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

/* ==========================================================================
   READER EMAIL THEME & CONTRAST TOGGLE
   ========================================================================== */
#btn-toggle-mail-theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#btn-toggle-mail-theme:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}

#btn-toggle-mail-theme.active-theme-toggle {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #FBBF24;
}

.mail-html-frame.theme-light-email {
  background: #FFFFFF !important;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45) !important;
}

/* ==========================================================================
   CONTACTS (ADDRESS BOOK) STYLES
   ========================================================================== */
.contacts-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.contacts-search-wrap svg {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

.contacts-search-wrap input {
  padding: 8px 12px 8px 34px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #F0F2F6;
  outline: none;
  width: 220px;
  transition: all 0.2s ease;
}

.contacts-search-wrap input:focus {
  border-color: var(--blue-primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
  width: 260px;
}

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

.contact-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
}

.contact-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.contact-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: #FFFFFF;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255,0.3);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

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

.contact-name {
  font-size: 15px;
  font-weight: 700;
  color: #F0F2F6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-email {
  font-size: 12.5px;
  color: var(--blue-primary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.contact-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-notes-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1.4;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   AUTOCOMPLETE DROPDOWN (COMPOSE MODAL)
   ========================================================================== */
.contacts-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 36px;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: rgba(12, 12, 12, 0.98) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(255, 255, 255, 0.65);
  z-index: 10000;
  padding: 4px;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item.focused {
  background: rgba(255, 255, 255, 0.2);
}

.autocomplete-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
}

.autocomplete-details {
  flex: 1;
  min-width: 0;
}

.autocomplete-name {
  font-size: 13px;
  font-weight: 600;
  color: #F0F2F6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-email {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   CUSTOM FOLDERS & READER ACTIONS
   ========================================================================== */
.custom-folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.custom-folder-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #F0F2F6;
}

.custom-folder-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--blue-primary);
  font-weight: 600;
}

.custom-folder-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-delete-folder {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.custom-folder-item:hover .btn-delete-folder {
  opacity: 0.6;
}

.btn-delete-folder:hover {
  opacity: 1 !important;
  color: var(--red) !important;
  background: rgba(239, 68, 68, 0.15);
}

.reader-move-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: rgba(12, 12, 12, 0.98) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.6);
  padding: 4px;
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
}

.reader-move-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #F0F2F6;
  cursor: pointer;
  transition: background 0.15s ease;
}

.reader-move-item:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* ==========================================================================
   PRINT STYLESHEET (@media print)
   ========================================================================== */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  .sidebar,
  .mail-list-pane,
  .mail-reader-empty,
  .mail-reader-action-group,
  .mobile-reader-back-bar,
  .window-titlebar,
  .custom-modal,
  .compose-modal-backdrop,
  .theme-toggle-btn,
  #btn-toggle-mail-theme,
  .btn-subtle,
  .btn-primary {
    display: none !important;
  }

  .app-container,
  .main-content,
  .mail-layout,
  .mail-reader-pane,
  #mail-reader-content {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .mail-reader-header {
    border-bottom: 2pt solid #000000 !important;
    padding-bottom: 12pt !important;
    margin-bottom: 16pt !important;
  }

  .mail-reader-subject {
    font-size: 20pt !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-bottom: 8pt !important;
  }

  .mail-sender-name,
  .mail-sender-email,
  .mail-detail-date {
    color: #333333 !important;
    font-size: 11pt !important;
  }

  .mail-body-render,
  .mail-html-frame {
    color: #000000 !important;
    background: #FFFFFF !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
}

/* ==========================================================================
   SLEEK TOAST NOTIFICATION SYSTEM (REPLACES NATIVE BROWSER ALERTS)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000000;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 440px;
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: #FFFFFF;
  background: rgba(12, 12, 12, 0.96) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.15) !important;
  animation: toastSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.22s ease;
}

.toast-item.toast-success {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.65), 0 0 16px rgba(255, 255, 255, 0.2);
}
.toast-item.toast-success .toast-icon { color: #FFFFFF; }

.toast-item.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.65), 0 0 16px rgba(244, 63, 94, 0.2);
}
.toast-item.toast-error .toast-icon { color: #F43F5E; }

.toast-item.toast-info {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.65), 0 0 16px rgba(255, 255, 255, 0.2);
}
.toast-item.toast-info .toast-icon { color: var(--blue-primary); }

.toast-item.toast-warning {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.65), 0 0 16px rgba(245, 158, 11, 0.2);
}
.toast-item.toast-warning .toast-icon { color: #F59E0B; }

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.toast-text {
  flex: 1;
}

.toast-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.toast-close-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-item.toast-hiding {
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
}

/* ==========================================================================
   CUSTOM RIGHT-CLICK CONTEXT MENU FOR EMAILS
   ========================================================================== */
.mail-context-menu {
  position: fixed;
  z-index: 10000000;
  min-width: 200px;
  background: rgba(12, 12, 12, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.15) !important;
  animation: ctxFadeIn 0.12s ease forwards;
}

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

.context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #F0F2F6;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.context-item svg {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.context-item:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.context-item:hover svg {
  color: #FFFFFF;
}

.context-item.context-danger {
  color: #F87171;
}

.context-item.context-danger svg {
  color: #F87171;
}

.context-item.context-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #FFFFFF;
}

.context-item.context-danger:hover svg {
  color: #FFFFFF;
}

.context-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}

/* ==========================================================================
   PREMIUM EXECUTIVE DARK CYBER TEXT BOXES & MODAL INPUTS
   ========================================================================== */
.auth-input,
.app-text-input,
input[type="text"]:not(.auth-input-wrap input):not(.compose-field input):not(.mail-search-box input):not(.contacts-search-wrap input),
input[type="password"]:not(.auth-input-wrap input),
input[type="email"]:not(.auth-input-wrap input),
input[type="tel"]:not(.auth-input-wrap input),
input[type="url"]:not(.auth-input-wrap input),
input[type="search"]:not(.mail-search-box input):not(.contacts-search-wrap input),
input:not([type]):not(.auth-input-wrap input) {
  width: 100%;
  height: 42px;
  background: #121212 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 8px !important;
  color: #F0F2F6 !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 0 14px;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.auth-input:hover,
.app-text-input:hover,
input[type="text"]:not(.auth-input-wrap input):not(.compose-field input):not(.mail-search-box input):not(.contacts-search-wrap input):hover,
input[type="password"]:not(.auth-input-wrap input):hover,
input[type="email"]:not(.auth-input-wrap input):hover,
input[type="tel"]:not(.auth-input-wrap input):hover {
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: #161616 !important;
}

.auth-input:focus,
.app-text-input:focus,
input[type="text"]:not(.auth-input-wrap input):not(.compose-field input):not(.mail-search-box input):not(.contacts-search-wrap input):focus,
input[type="password"]:not(.auth-input-wrap input):focus,
input[type="email"]:not(.auth-input-wrap input):focus,
input[type="tel"]:not(.auth-input-wrap input):focus {
  border-color: #FFFFFF !important;
  background: #181818 !important;
  border-radius: 8px !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25) !important;
  outline: none !important;
}

.auth-input::placeholder,
.app-text-input::placeholder {
  color: #64748B !important;
  font-size: 13px !important;
}

/* Modal textareas */
textarea.compose-textarea:not(#compose-text),
textarea.auth-input,
textarea.app-text-input,
#contact-modal-notes,
#sig-tab-text {
  width: 100%;
  background: #0D0D0D !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 8px !important;
  color: #F0F2F6 !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease !important;
  line-height: 1.5 !important;
  resize: vertical;
}

textarea.compose-textarea:not(#compose-text):hover,
textarea.auth-input:hover,
textarea.app-text-input:hover,
#contact-modal-notes:hover,
#sig-tab-text:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: #141414 !important;
}

textarea.compose-textarea:not(#compose-text):focus,
textarea.auth-input:focus,
textarea.app-text-input:focus,
#contact-modal-notes:focus,
#sig-tab-text:focus {
  border-color: rgba(255, 255, 255, 0.5) !important;
  background: #161616 !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
}

/* Modal Input Wrap with leading icon */
.modal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.modal-input-wrap svg {
  position: absolute;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 16px !important;
  height: 16px !important;
  color: #64748B !important;
  pointer-events: none !important;
  transition: color 0.2s ease !important;
  z-index: 10 !important;
  flex-shrink: 0 !important;
}

.modal-input-wrap:focus-within svg {
  color: #FFFFFF !important;
}

.modal-input-wrap input,
.modal-input-wrap input[type="text"],
.modal-input-wrap input[type="email"],
.modal-input-wrap input[type="tel"],
.modal-input-wrap input[type="password"],
.modal-input-wrap input.auth-input,
.modal-input-wrap .auth-input {
  padding-left: 42px !important;
  padding-right: 14px !important;
}

/* ==========================================================================
   ADVANCED RICH WYSIWYG EMAIL EDITOR & TEMPLATES STUDIO
   ========================================================================== */

/* Maximize button in header */
.win-btn.maximize {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-btn.maximize:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Close button in windows and modal headers */
.win-btn.close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  box-sizing: border-box;
}

.win-btn.close:hover {
  background-color: #EF4444 !important;
  color: #FFFFFF !important;
  border-color: #EF4444 !important;
}

.win-btn.close svg {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

/* Sticky Rich Toolbar */
/* Sticky Rich Toolbar */
.compose-toolbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #0D0D0D !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px;
  overflow: visible;
  flex-wrap: wrap;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  user-select: none;
}

.compose-toolbar::-webkit-scrollbar {
  height: 4px;
}

.compose-toolbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.compose-toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.compose-toolbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Toolbar Buttons */
.toolbar-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94A3B8;
  height: 28px;
  min-width: 28px;
  padding: 0 5px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  border-color: rgba(255, 255, 255, 0.1);
}

.toolbar-btn:active,
.toolbar-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Modèles Pro Button - Crisp High Contrast Monochrome Pill */
.toolbar-btn.primary-template-btn {
  width: auto;
  padding: 0 11px;
  height: 28px;
  gap: 6px;
  background: #FFFFFF !important;
  border: 1px solid #FFFFFF !important;
  color: #000000 !important;
  font-weight: 700;
  font-size: 12px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
  transition: all 0.15s ease;
}

.toolbar-btn.primary-template-btn span,
.toolbar-btn.primary-template-btn svg {
  color: #000000 !important;
  stroke: #000000 !important;
}

.toolbar-btn.primary-template-btn:hover {
  background: #E4E4E7 !important;
  border-color: #E4E4E7 !important;
  color: #000000 !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Insérer and CTA Buttons */
.toolbar-btn.toolbar-insert-btn,
.toolbar-btn.insert-cta-badge {
  width: auto;
  padding: 0 10px;
  height: 28px;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #FFFFFF !important;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.toolbar-btn.toolbar-insert-btn:hover,
.toolbar-btn.insert-cta-badge:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #FFFFFF !important;
}

/* Toolbar Select Dropdowns */
/* Toolbar Select & Format Dropdowns */
.toolbar-format-btn,
.toolbar-select {
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: all 0.15s ease;
  color-scheme: dark !important;
  accent-color: #FFFFFF !important;
}

.toolbar-format-btn:focus,
.toolbar-format-btn:hover,
.toolbar-select:focus,
.toolbar-select:hover {
  border-color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

#compose-format-menu {
  position: fixed !important;
  z-index: 100060 !important;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  padding: 4px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 15px rgba(255, 255, 255, 0.1) !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#compose-format-menu .format-item {
  padding: 7px 12px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  color: #FFFFFF !important;
  transition: background-color 0.12s, color 0.12s;
  display: flex !important;
  align-items: center !important;
}

#compose-format-menu .format-item:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
}

#compose-format-menu .format-item.active {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

.toolbar-select option {
  background: #141414 !important;
  color: #FFFFFF !important;
  padding: 6px;
}

.toolbar-select option:checked,
.toolbar-select option:hover {
  background: #2E2E2E !important;
  color: #FFFFFF !important;
}

/* Palette Color Dropdowns */
.toolbar-palette-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9) !important;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, 24px);
  gap: 6px;
  animation: fadeIn 0.15s ease;
}

.palette-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.palette-swatch:hover {
  transform: scale(1.2);
  border-color: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Visual vs Source Mode Segmented Switch */
.compose-mode-switch {
  display: flex;
  background: #141414 !important;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.mode-switch-btn {
  background: transparent;
  border: none;
  color: #A1A1AA !important;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-switch-btn.active {
  background: #FFFFFF !important;
  color: #000000 !important;
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.3) !important;
}

/* Dual Mode Canvas Wrapper */
.compose-editor-wrapper {
  flex: 1;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-sm);
  background: #080808 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.compose-editor-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) !important;
}

/* Rich WYSIWYG Contenteditable Canvas */
.compose-rich-editor {
  flex: 1;
  padding: 16px 20px;
  color: #F1F5F9;
  font-size: 14.5px;
  line-height: 1.65;
  overflow-y: auto;
  outline: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 220px;
}

.compose-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  opacity: 0.65;
  pointer-events: none;
}

/* Headings inside Editor */
.compose-rich-editor h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 16px 0 10px;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.compose-rich-editor h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 14px 0 8px;
  color: #F8FAFC;
  line-height: 1.35;
}

.compose-rich-editor h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 12px 0 6px;
  color: #E2E8F0;
  line-height: 1.4;
}

.compose-rich-editor p {
  margin: 0 0 12px;
}

.compose-rich-editor blockquote {
  border-left: 3px solid #FFFFFF;
  padding: 8px 16px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0 8px 8px 0;
  color: #94A3B8;
  font-style: italic;
}

.compose-rich-editor pre {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #FFFFFF;
  overflow-x: auto;
  margin: 12px 0;
}

.compose-rich-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.compose-rich-editor th {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.compose-rich-editor td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13.5px;
  color: #CBD5E1;
}

.compose-rich-editor hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 22px 0;
}

.compose-rich-editor a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.compose-rich-editor ul,
.compose-rich-editor ol {
  padding-left: 24px;
  margin: 0 0 12px;
}

.compose-rich-editor li {
  margin-bottom: 4px;
}

.compose-rich-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

/* In-editor CTA buttons */
.compose-rich-editor .email-btn {
  display: inline-block;
  padding: 11px 24px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  margin: 10px 0;
  text-align: center;
  color: #FFFFFF !important;
}

/* Source mode textarea - Developer Grade Dark Editor */
.compose-editor-wrapper #compose-text,
.compose-editor-wrapper .compose-textarea,
textarea#compose-text {
  border: none !important;
  border-radius: 0 !important;
  background: #080808 !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  color: #E6EDF3 !important;
  caret-color: #FFFFFF !important;
  padding: 16px 20px !important;
  box-shadow: none !important;
  outline: none !important;
  resize: none !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 240px !important;
  box-sizing: border-box !important;
  letter-spacing: 0.2px !important;
  tab-size: 2 !important;
}

.compose-editor-wrapper #compose-text:hover,
.compose-editor-wrapper .compose-textarea:hover,
textarea#compose-text:hover {
  background: #080808 !important;
  border: none !important;
  box-shadow: none !important;
}

.compose-editor-wrapper #compose-text:focus,
.compose-editor-wrapper .compose-textarea:focus,
textarea#compose-text:focus {
  background: #080808 !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Dim toolbar formatting in code mode */
.compose-modal.is-code-mode .compose-toolbar-group:not(:last-child) {
  opacity: 0.32;
  pointer-events: none;
  filter: grayscale(1);
  transition: opacity 0.2s ease;
}

.compose-modal.is-code-mode .compose-toolbar {
  border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================================
   TEMPLATE STUDIO MODAL
   ========================================================================== */
.template-studio-modal {
  width: 920px;
  max-width: 96vw;
  height: 720px;
  max-height: 94vh;
}

.template-studio-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.template-studio-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.template-categories-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.template-cat-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.template-cat-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.template-cat-tab.active {
  background: var(--blue-primary);
  color: #FFFFFF;
  border-color: var(--blue-primary);
  font-weight: 600;
}

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

.template-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.template-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.5), 0 0 16px rgba(255, 255, 255, 0.15);
}

.template-card-preview-thumb {
  height: 110px;
  border-radius: 8px;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  padding: 10px;
  font-size: 9.5px;
  line-height: 1.3;
  pointer-events: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.template-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.template-badge.business { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.35); }
.template-badge.marketing { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.35); }
.template-badge.finance { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.35); }
.template-badge.event { background: rgba(245, 158, 11, 0.2); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.35); }
.template-badge.security { background: rgba(239, 68, 68, 0.2); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.template-badge.minimal { background: rgba(148, 163, 184, 0.2); color: #E2E8F0; border: 1px solid rgba(148, 163, 184, 0.35); }
.template-badge.simple { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.35); }
.template-badge.onboarding { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.35); }

/* Theme badges removed as requested */
.template-theme-badge {
  display: none !important;
}

/* Complexity Pill */
.template-complexity-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.template-complexity-pill.simple {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.template-complexity-pill.complex {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.template-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #F8FAFC;
  margin: 0;
}

.template-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.template-card-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  width: 100%;
}

.template-card-btn:hover {
  background: var(--blue-primary);
  color: #FFFFFF;
  border-color: var(--blue-primary);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.4);
}

.badge-pro-glow {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(255, 255, 255, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #FBBF24;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
}

/* ==========================================================================
   DIALOGS: CTA, TABLE, LINK, IMAGE
   ========================================================================== */
.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-form-group label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.modal-text-input {
  background: #121212 !important;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.modal-text-input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-focus-ring);
}

/* CTA presets */
.cta-style-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cta-preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.cta-preset-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.cta-preset-chip.active {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-color: var(--blue-primary);
  font-weight: 600;
}

.cta-preview-box {
  background: rgba(255, 255, 255, 0.3);
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

.cta-preview-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.cta-preview-btn.btn-blue {
  background: #FFFFFF;
  color: #FFFFFF;
}

.cta-preview-btn.btn-purple {
  background: linear-gradient(135deg, #FFFFFF, #FFFFFF);
  color: #FFFFFF;
}

.cta-preview-btn.btn-emerald {
  background: #FFFFFF;
  color: #FFFFFF;
}

.cta-preview-btn.btn-dark {
  background: #1E1E1E !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.image-preview-box {
  background: rgba(255, 255, 255, 0.3);
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   STREAMLINED INSERT DROPDOWN MENU
   ========================================================================== */
.toolbar-insert-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2E8F0;
  font-weight: 600;
  font-size: 12px;
  gap: 5px;
  padding: 0 10px;
  height: 28px;
  border-radius: 6px;
}

.toolbar-insert-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}

.toolbar-dropdown-menu {
  position: fixed;
  z-index: 100050;
  width: 230px;
  background: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px);
  animation: bubblePop 0.15s ease-out;
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
}

.dropdown-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #F8FAFC;
}

.dropdown-item-sub {
  font-size: 10px;
  color: #94A3B8;
  margin-top: 1px;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 6px;
}

/* ==========================================================================
   CONTEXTUAL 1-CLICK FLOATING INSPECTOR MENUS
   ========================================================================== */
.editor-bubble-popover {
  position: fixed;
  z-index: 100050;
  width: 320px;
  max-width: 92vw;
  background: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: bubblePop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  color: #F1F5F9;
  pointer-events: auto;
}

@keyframes bubblePop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #000000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.bubble-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF !important;
}

.bubble-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s;
}

.bubble-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.bubble-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bubble-field label {
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bubble-field input[type="text"],
.bubble-field input[type="url"] {
  width: 100%;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: #FFFFFF !important;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.bubble-field input[type="text"]:focus,
.bubble-field input[type="url"]:focus {
  border-color: #FFFFFF !important;
  background: #181818 !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18) !important;
}

.bubble-input-with-action {
  display: flex;
  gap: 6px;
  align-items: center;
}

.bubble-input-with-action input {
  flex: 1;
}

.bubble-icon-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.12s;
}

.bubble-icon-action:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #FFFFFF;
}

/* Color Swatches Grid */
.bubble-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bubble-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  padding: 0;
}

.bubble-swatch:hover {
  transform: scale(1.22);
  border-color: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.bubble-swatch.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 2px #FFFFFF;
}

.custom-picker-label {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

/* Pill Selectors */
.bubble-pill-group {
  display: flex;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.bubble-pill-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s;
  text-align: center;
  white-space: nowrap;
}

.bubble-pill-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.bubble-pill-btn.active {
  background: #FFFFFF !important;
  color: #000000 !important;
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.4);
}

/* Bubble Footer Actions */
.bubble-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bubble-btn-delete {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
}

.bubble-btn-delete:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #EF4444;
  color: #FFFFFF;
}

.bubble-btn-confirm {
  background: #FFFFFF !important;
  border: 1px solid #FFFFFF !important;
  color: #000000 !important;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}

.bubble-btn-confirm:hover {
  background: #F0F0F0 !important;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

/* Global Pure White Selection Override */
::selection,
::-moz-selection,
.compose-modal *::selection,
.compose-modal::selection,
#compose-rich-editor *::selection,
#compose-rich-editor::selection,
.editor-bubble-popover *::selection {
  background: rgba(255, 255, 255, 0.3) !important;
  color: #FFFFFF !important;
  text-shadow: none !important;
}

/* Visual Outline on Clicked Element in Editor */
.editor-element-inspecting {
  outline: 2px dashed #FFFFFF !important;
  outline-offset: 3px !important;
}

/* Visual Outline on Hovered Element in Editor */
.editor-element-hovered {
  outline: 2px dashed rgba(255, 255, 255, 0.75) !important;
  outline-offset: 3px !important;
  cursor: pointer !important;
  transition: outline 0.1s ease !important;
}

/* ==========================================================================
   FEATURE 1: DRAG & DROP OVERLAY (COMPOSE MODAL)
   ========================================================================== */
.compose-dropzone-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.92) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px dashed #FFFFFF;
  border-radius: 12px;
  z-index: 99999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
  animation: dropzonePulse 1.8s infinite ease-in-out;
}

.compose-dropzone-overlay.active {
  display: flex;
}

@keyframes dropzonePulse {
  0%, 100% {
    border-color: #FFFFFF;
    box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255, 255, 255, 0.2);
  }
  50% {
    border-color: #FFFFFF;
    box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.2), 0 0 30px rgba(255, 255, 255, 0.3);
  }
}

.compose-dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  animation: bounceDropIcon 1.2s infinite ease-in-out;
}

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

.compose-dropzone-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.compose-dropzone-subtitle {
  font-size: 13px;
  color: #94A3B8;
}

/* ==========================================================================
   FEATURE 2: SPY PIXEL BLOCKER (BOUCLIER ANTI-TRAQUEURS)
   ========================================================================== */
.blocked-spy-tracker {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.mail-tracker-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(192, 132, 252, 0.45) !important;
  color: #D8B4FE !important;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.mail-tracker-shield-badge:hover {
  background: rgba(168, 85, 247, 0.28) !important;
  border-color: #C084FC !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.45) !important;
  color: #FFFFFF !important;
}

.mail-tracker-shield-icon {
  width: 14px;
  height: 14px;
  color: #C084FC !important;
}

/* Verified Badges & Reader Shrunk Badge */
.mail-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

#reader-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 3px;
}

#reader-verified-badge svg {
  width: 12px !important;
  height: 12px !important;
  display: block;
}

.mail-tracker-popover {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 999999 !important;
  width: 340px !important;
  background: #0E0E0E !important;
  border: 1px solid rgba(192, 132, 252, 0.45) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  font-size: 12px !important;
  color: #E2E8F0 !important;
  animation: trackerFadeIn 0.18s ease-out !important;
}

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

.mail-tracker-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.mail-tracker-popover-title {
  font-weight: 700;
  font-size: 13px;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mail-tracker-list {
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.mail-tracker-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
}

.mail-tracker-item-provider {
  font-weight: 600;
  color: #FFFFFF;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mail-tracker-item-reason {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.mail-tracker-item-url {
  font-size: 10px;
  color: #64748B;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

.mail-tracker-popover-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.mail-tracker-unblock-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
  border-radius: 6px;
  font-size: 11.5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.mail-tracker-unblock-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   FEATURE 3: ACTIVE SESSIONS & DEVICE MANAGEMENT (SECURITY TAB)
   ========================================================================== */
.security-sessions-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.security-sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.security-sessions-title {
  font-size: 15px;
  font-weight: 700;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 8px;
}

.security-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s;
}

.session-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.session-card.current-session {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.05);
}

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

.session-device-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
}

.session-card.current-session .session-device-icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
}

.session-info-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-current-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.session-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 6px #FFFFFF;
  animation: pulseSessionDot 1.5s infinite;
}

@keyframes pulseSessionDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.session-info-details {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-revoke-other-sessions {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-revoke-other-sessions:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #EF4444;
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  letter-spacing: 0.2px;
}

/* Session Disconnect Action */
.session-card:not(.current-session) {
  cursor: pointer;
  transition: all 0.18s ease;
}

.session-card:not(.current-session):hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* Stacking contexts for security view cards to ensure dropdown is never covered */
#security-lock-card {
  position: relative !important;
  z-index: 50 !important;
}

#security-lock-card.dropdown-active {
  z-index: 100 !important;
}

#security-audit-card {
  position: relative !important;
  z-index: 1 !important;
}

.custom-lock-timeout-container {
  position: relative !important;
  z-index: 60 !important;
}

/* ==========================================================================
   MODERN CUSTOM DROPDOWN (LOCK SCREEN TIMEOUT & OBSIDIAN SELECT)
   ========================================================================== */
.custom-dropdown-wrap {
  position: relative;
  width: 100%;
  z-index: 70;
}

.custom-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0A0A0A !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  color: #FFFFFF !important;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  box-sizing: border-box;
}

.custom-dropdown-trigger:hover {
  background: #111111 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.custom-dropdown-trigger.open,
.custom-dropdown-trigger:focus-visible {
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) !important;
}

.custom-dropdown-trigger-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
}

.custom-dropdown-trigger-left svg {
  color: #A1A1AA;
}

.custom-dropdown-chevron {
  color: #71717A;
  transition: transform 0.2s ease;
}

.custom-dropdown-trigger.open .custom-dropdown-chevron {
  transform: rotate(180deg);
  color: #FFFFFF;
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0D0D0D !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95) !important;
  padding: 4px !important;
  z-index: 9999 !important;
  overflow: hidden;
  animation: ctxFadeIn 0.15s ease;
}

.custom-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #D4D4D8 !important;
  cursor: pointer;
  transition: all 0.12s ease;
}

.custom-dropdown-item:hover {
  background: #1A1A1A !important;
  color: #FFFFFF !important;
}

.custom-dropdown-item.selected {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  font-weight: 600;
}

.custom-dropdown-item .dropdown-item-check {
  display: none;
  color: #FFFFFF;
}

.custom-dropdown-item.selected .dropdown-item-check {
  display: block;
}

/* ==========================================================================
   FEATURE 4: THREADED CONVERSATION VIEW (FILS DE DISCUSSION)
   ========================================================================== */
.thread-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.thread-toggle-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #F8FAFC;
}

.thread-toggle-pill.active {
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  color: #000000 !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25) !important;
}

.thread-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.45);
  margin-left: 6px;
}

.mail-thread-conversation-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
}

.mail-thread-card {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px;
  background: #0A0A0A !important;
  overflow: hidden;
  transition: all 0.2s;
}

.mail-thread-card.expanded {
  background: #111111 !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.75) !important;
}

.mail-thread-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s;
}

.mail-thread-card-header:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

.mail-thread-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mail-thread-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1E1E1E !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF !important;
  flex-shrink: 0;
}

.mail-thread-card-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.mail-thread-card-author {
  font-size: 12.5px;
  font-weight: 600;
  color: #F8FAFC;
  white-space: nowrap;
}

.mail-thread-card-snippet {
  font-size: 12px;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-thread-card-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mail-thread-card-date {
  font-size: 11px;
  color: #64748B;
  font-family: 'JetBrains Mono', monospace;
}

.mail-thread-chevron {
  color: #64748B;
  transition: transform 0.2s ease;
}

.mail-thread-card.expanded .mail-thread-chevron {
  transform: rotate(180deg);
}

.mail-thread-card-body {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 14px;
  line-height: 1.6;
  color: #F8FAFC !important;
  background: #080808 !important;
}

.mail-thread-card.expanded .mail-thread-card-body {
  display: block;
}

.mail-thread-reply-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   FEATURE: 2FA & OTP CODE DETECTOR & 1-CLICK COPY
   ========================================================================== */
.mail-otp-banner-wrap {
  margin: 14px 24px 16px 24px;
  animation: otpBannerIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.mail-otp-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(38, 26, 35, 0.94) 0%, rgba(22, 15, 21, 0.98) 100%);
  border: 1px solid rgba(213, 155, 118, 0.32);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 24px rgba(213, 155, 118, 0.12), inset 0 1px 0 rgba(244, 206, 180, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
}

.mail-otp-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(244, 206, 180, 0.4) 50%, transparent 100%);
  pointer-events: none;
}

.mail-otp-left {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.mail-otp-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(213, 155, 118, 0.18) 0%, rgba(138, 77, 86, 0.25) 100%);
  border: 1px solid rgba(213, 155, 118, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F4CEB4;
  box-shadow: 0 0 16px rgba(213, 155, 118, 0.18), inset 0 1px 2px rgba(244, 206, 180, 0.2);
  flex-shrink: 0;
}

.mail-otp-icon-box svg {
  stroke: #F4CEB4;
  filter: drop-shadow(0 0 4px rgba(213, 155, 118, 0.4));
}

.mail-otp-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mail-otp-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mail-otp-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #FFF2EB;
  letter-spacing: 0.25px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mail-otp-type-badge {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(213, 155, 118, 0.3);
  color: #F4CEB4;
}

.mail-otp-subtitle {
  font-size: 11.5px;
  color: rgba(244, 206, 180, 0.72);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.otp-expires-badge {
  color: #E6BC9E;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(24, 16, 22, 0.85);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(213, 155, 118, 0.24);
}

.otp-expires-badge svg {
  stroke: #E6BC9E;
}

.otp-expires-badge.expired {
  color: #F87171;
  background: rgba(45, 16, 20, 0.85);
  border-color: rgba(239, 68, 68, 0.35);
}

.otp-expires-badge.expired svg {
  stroke: #F87171;
}

.mail-otp-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mail-otp-code-box {
  background: rgba(14, 9, 13, 0.9);
  border: 1px solid rgba(213, 155, 118, 0.38);
  border-radius: 8px;
  padding: 7px 16px;
  user-select: all;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 14px rgba(213, 155, 118, 0.1);
}

.mail-otp-code-box:hover {
  border-color: #D59B76;
  background: rgba(26, 17, 23, 0.95);
  box-shadow: 0 0 18px rgba(213, 155, 118, 0.28), inset 0 2px 6px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.mail-otp-code-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 3.5px;
  color: #FFF2EB;
  text-shadow: 0 0 16px rgba(213, 155, 118, 0.45);
}

.btn-otp-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #D59B76 0%, #B77D58 100%) !important;
  color: #120B10 !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(213, 155, 118, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.btn-otp-copy span {
  color: #120B10 !important;
  font-weight: 700 !important;
}

.btn-otp-copy svg {
  stroke: #120B10 !important;
  flex-shrink: 0;
}

.btn-otp-copy:hover {
  background: linear-gradient(135deg, #E2AC8D 0%, #C48762 100%) !important;
  border-color: rgba(244, 206, 180, 0.8) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(213, 155, 118, 0.5) !important;
}

.btn-otp-copy:active {
  transform: translateY(1px);
}

.btn-otp-copy.copied {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
  border-color: #34D399 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.45) !important;
}

.btn-otp-copy.copied span {
  color: #FFFFFF !important;
}

.btn-otp-copy.copied svg {
  stroke: #FFFFFF !important;
}

/* Inbox Mail Item OTP Micro Pill */
.mail-otp-list-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(213, 155, 118, 0.38);
  color: #F4CEB4;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  vertical-align: middle;
}

.mail-otp-list-pill svg {
  stroke: #F4CEB4;
}

.mail-otp-list-pill:hover {
  background: rgba(213, 155, 118, 0.25);
  border-color: #D59B76;
  color: #FFF2EB;
  transform: scale(1.04);
  box-shadow: 0 0 14px rgba(213, 155, 118, 0.35);
}

.mail-otp-list-pill.copied {
  background: #10B981 !important;
  border-color: #34D399 !important;
  color: #FFFFFF !important;
}

.mail-otp-list-pill.copied svg {
  stroke: #FFFFFF !important;
}

@media (max-width: 640px) {
  .mail-otp-banner-wrap {
    margin: 8px 12px 12px 12px;
  }
  .mail-otp-banner {
    padding: 12px 14px;
    gap: 12px;
  }
  .mail-otp-left {
    gap: 10px;
  }
  .mail-otp-icon-box {
    width: 36px;
    height: 36px;
  }
  .mail-otp-icon-box svg {
    width: 18px;
    height: 18px;
  }
  .mail-otp-right {
    width: 100%;
    justify-content: space-between;
  }
  .mail-otp-code-box {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
  }
  .mail-otp-code-val {
    font-size: 18px;
    letter-spacing: 2px;
  }
  .btn-otp-copy {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ==========================================================================
   ADVANCED CYBERSECURITY: SCREEN LOCK OVERLAY
   ========================================================================== */
.screen-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92) !important;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  animation: lockFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lockFadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.screen-lock-ambient-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: lockGlowPulse 6s ease-in-out infinite alternate;
}

@keyframes lockGlowPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.screen-lock-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #0D0D0D !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 0, 0, 0.5) !important;
  text-align: center;
  backdrop-filter: blur(16px);
  transition: transform 0.2s ease;
}

.screen-lock-card.lock-shake {
  animation: lockCardShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes lockCardShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.screen-lock-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.screen-lock-icon-shield {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.3);
  margin-bottom: 12px;
  animation: lockIconFloat 3s ease-in-out infinite alternate;
}

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

.screen-lock-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

.screen-lock-profile-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  text-align: left;
}

.screen-lock-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFFFFF, #FFFFFF);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.screen-lock-profile-meta {
  min-width: 0;
  flex: 1;
}

.screen-lock-username {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-lock-email {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-lock-description {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 18px 0;
}

.screen-lock-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
}

.lock-error-message {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
  font-size: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.screen-lock-bottom-links {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.screen-lock-logout-btn {
  color: var(--text-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.screen-lock-logout-btn:hover {
  color: #EF4444;
}

/* ==========================================================================
   DANGEROUS ATTACHMENT BADGES & MODAL
   ========================================================================== */
.mail-attachment-chip.dangerous-chip {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.danger-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-left: 6px;
  animation: dangerPulse 2s infinite ease-in-out;
}

@keyframes dangerPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
}

.dangerous-modal-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: #0C0C0C !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(239, 68, 68, 0.18) !important;
  border-radius: 16px;
  padding: 24px 24px;
  backdrop-filter: blur(20px);
  margin: auto;
}

.dangerous-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.dangerous-modal-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dangerous-sub-badge {
  font-size: 11px;
  font-weight: 600;
  color: #F87171;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-top: 2px;
}

.dangerous-file-meta {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.dangerous-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  padding: 4px 0;
}

.dangerous-row-label {
  color: var(--text-muted);
}

.dangerous-row-val {
  color: #FFFFFF;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dangerous-alert-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FBBF24;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 20px;
}

.dangerous-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   SECURITY AUDIT LOG TABLE & TIMELINE
   ========================================================================== */
#security-audit-card {
  background: #0D0D0D !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.security-audit-container {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #080808 !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
  background: #080808 !important;
  color: #E4E4E7 !important;
}

.audit-table thead {
  background: #111111 !important;
}

.audit-table th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #A1A1AA !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #111111 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.audit-table tbody {
  background: #080808 !important;
}

.audit-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  vertical-align: middle;
  background: #080808 !important;
  color: #F4F4F5 !important;
}

.audit-table tr {
  background: #080808 !important;
}

.audit-table tr:last-child td {
  border-bottom: none !important;
}

.audit-table tr:hover td {
  background: #121212 !important;
}

.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.audit-badge.success {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  color: #4ADE80 !important;
}

.audit-badge.danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #F87171 !important;
}

.audit-badge.warning {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #FBBF24 !important;
}

.audit-badge.info {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
}

.audit-ip-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #CBD5E1 !important;
  background: #171717 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 3px 7px;
  border-radius: 4px;
}

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

/* ==========================================================================
   LEGAL NOTICES, CGU & PRIVACY (LCEN & RGPD COMPLIANCE STYLES)
   ========================================================================== */
.auth-legal-footer {
  margin-top: 14px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(4px, 1.5vw, 8px) !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  font-size: clamp(9.5px, 2.6vw, 11px) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.auth-legal-footer a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  padding: 2px 3px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
  font-size: inherit !important;
  flex-shrink: 0 !important;
}

.auth-legal-footer a:hover {
  color: var(--blue-primary, #FFFFFF) !important;
  text-decoration: underline !important;
}

.auth-legal-sep {
  color: rgba(255, 255, 255, 0.2) !important;
  user-select: none !important;
  flex-shrink: 0 !important;
}

.auth-legal-abuse {
  color: #F87171 !important;
  font-weight: 500 !important;
}

.auth-legal-abuse:hover {
  color: #EF4444 !important;
  text-decoration: underline;
}

/* Modal Card - Pure Noir & Glassmorphism */
.legal-modal-card {
  width: 780px;
  max-width: 95vw;
  height: 86vh;
  max-height: 820px;
  background: #08080A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

.legal-modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-modal-title {
  margin: 0;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 16.5px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.legal-modal-subtitle {
  font-size: 11.5px;
  color: #8E8E93;
  margin-top: 2px;
  display: block;
}

.legal-header-ext-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #E4E4E7;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.legal-header-ext-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

/* Tabs */
.legal-tabs-row {
  display: flex;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow-x: auto;
}

.legal-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #71717A;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.legal-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
}

.legal-tab-btn.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

/* Body */
.legal-modal-body {
  flex: 1;
  padding: 24px 26px;
  overflow-y: auto;
  line-height: 1.65;
  font-size: 13.5px;
  color: #A1A1AA;
}

.legal-modal-section h4 {
  margin: 0 0 12px 0;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.legal-modal-section p {
  color: #A1A1AA;
  margin: 0 0 14px 0;
}

.legal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   CURRENT SIDEBAR: SLIM 58px ICON SPINE & RESPONSIVE DRAWER
   (Conserved per user request)
   ========================================================================== */
@media (min-width: 769px) {
  .sidebar {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    background: #000000 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 12px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-x: hidden !important;
    z-index: 20 !important;
    box-sizing: border-box !important;
  }

  /* When expanded by user toggle */
  .sidebar.expanded {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    align-items: stretch !important;
    padding: 14px 12px !important;
  }

  .sidebar:not(.expanded) .sidebar-btn-label,
  .sidebar:not(.expanded) .sidebar-label,
  .sidebar:not(.expanded) .nav-section-label,
  .sidebar:not(.expanded) .sidebar-quota-box,
  .sidebar:not(.expanded) .sidebar-user-details,
  .sidebar:not(.expanded) .sidebar-user-actions,
  .sidebar:not(.expanded) .sidebar-legal-link,
  .sidebar:not(.expanded) #custom-folders-list {
    display: none !important;
  }

  .sidebar:not(.expanded) .sidebar-bottom-section {
    padding: 8px 0 !important;
    margin-top: auto !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .sidebar:not(.expanded) .sidebar-user-card {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
  }

  .sidebar:not(.expanded) .sidebar-user-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #000000 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  }

  /* Top Logo in Spine - Pure Transparent PNG without background box */
  .sidebar-brand-spine {
    width: 38px !important;
    height: 38px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin-bottom: 14px !important;
    flex-shrink: 0 !important;
    transition: transform 0.18s ease !important;
  }

  .sidebar-brand-spine:hover {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: scale(1.1) !important;
  }

  .sidebar-spine-logo-img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.25));
  }

  .sidebar-drawer-brand-title {
    display: none;
  }

  .mobile-drawer-close-btn {
    display: none !important;
  }

  .sidebar.expanded .sidebar-brand-spine {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding-left: 6px !important;
  }

  .sidebar.expanded .sidebar-drawer-brand-title {
    display: inline-block !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
  }

  .sidebar-top-section {
    padding: 0 !important;
    margin-bottom: 12px !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .sidebar:not(.expanded) .sidebar-compose-btn {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
  }

  .sidebar:not(.expanded) .sidebar-compose-btn:hover {
    background: #E4E4E7 !important;
    border-color: #E4E4E7 !important;
    color: #000000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.35) !important;
  }

  .sidebar:not(.expanded) .sidebar-compose-btn svg {
    stroke: #000000 !important;
    width: 17px !important;
    height: 17px !important;
  }

  /* Navigation Item Spine Buttons */
  .nav-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .sidebar:not(.expanded) .nav-item {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    color: #94A3B8 !important;
    cursor: pointer !important;
    transition: all 0.12s ease !important;
  }

  .sidebar:not(.expanded) .nav-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #FFFFFF !important;
  }

  .sidebar:not(.expanded) .nav-item.active {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #FFFFFF !important;
  }

  .sidebar:not(.expanded) .nav-item.active .nav-icon {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
  }

  .sidebar:not(.expanded) .nav-item .nav-icon {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
  }

  /* In collapsed sidebar (bento spine), hide badges by default */
  .sidebar:not(.expanded) .nav-item .mail-count-badge {
    display: none !important;
  }

  /* Only display the white notification dot if there are actual new/unread items */
  .sidebar:not(.expanded) .nav-item .mail-count-badge.has-unread {
    display: block !important;
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    min-width: 6px !important;
    width: 6px !important;
    height: 6px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    pointer-events: none !important;
  }

  /* Bottom collapse toggle button */
  .sidebar-collapse-toggle {
    width: 36px !important;
    height: 28px !important;
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 6px !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 auto !important;
    transition: all 0.15s ease !important;
  }

  .sidebar-collapse-toggle:hover {
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: #181818 !important;
  }

  .sidebar.expanded .icon-toggle-expand {
    transform: rotate(180deg) !important;
  }
}

/* ==========================================================================
   STRICT ADMIN ACCESS CONTROL (HIDDEN UNLESS EXPLICITLY AUTHORIZED)
   ========================================================================== */
#nav-item-admin,
#sidebar-admin-link {
  display: none !important;
}

#nav-item-admin.is-admin-authorized {
  display: flex !important;
}

#sidebar-admin-link.is-admin-authorized {
  display: inline-flex !important;
}


/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — WEBMAIL PRO
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.22) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 1. Global Page Background (Warm Velvet Plum / Mocha) */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
}

/* 2. Ambient Background & Orbs */
.ambient-background, #ambient-bg {
  background: transparent !important;
}

.aurora-orb.orb-1 {
  background: radial-gradient(circle, rgba(213, 155, 118, 0.18) 0%, transparent 70%) !important;
}

.aurora-orb.orb-2 {
  background: radial-gradient(circle, rgba(162, 79, 107, 0.15) 0%, transparent 70%) !important;
}

.aurora-orb.orb-3 {
  background: radial-gradient(circle, rgba(244, 206, 180, 0.12) 0%, transparent 70%) !important;
}

/* 3. Auth Card (Luminous Glass) */
.auth-card {
  background: linear-gradient(165deg, rgba(34, 24, 30, 0.9) 0%, rgba(20, 15, 19, 0.96) 100%) !important;
  border: 1px solid rgba(213, 155, 118, 0.3) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 45px rgba(213, 155, 118, 0.2) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border-radius: 16px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.auth-card:hover {
  border-color: rgba(244, 206, 180, 0.48) !important;
  box-shadow: 0 32px 75px rgba(0, 0, 0, 0.85), 0 0 55px rgba(213, 155, 118, 0.28) !important;
}

.auth-header-title {
  font-family: var(--font-serif) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  background: linear-gradient(135deg, #FFFFFF 25%, #F4CEB4 65%, #D59B76 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 30px rgba(213, 155, 118, 0.3) !important;
}

.auth-header-sub {
  font-size: 13px !important;
  color: var(--rose-gold-light) !important;
  opacity: 0.85;
  letter-spacing: 0.02em !important;
}

/* 4. Auth Inputs */
.auth-input-wrap input {
  background-color: rgba(21, 15, 20, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.22) !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
  transition: all 0.2s ease !important;
}

.auth-input-wrap input:focus {
  border-color: #D59B76 !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.25) !important;
  background-color: rgba(25, 18, 24, 0.95) !important;
}

/* 5. Auth Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(181, 111, 74, 0.45) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 24px rgba(213, 155, 118, 0.65) !important;
  transform: translateY(-1px) !important;
}

.auth-tab-btn {
  border-radius: 8px !important;
  color: #BFAEA6 !important;
  transition: all 0.2s ease !important;
}

.auth-tab-btn.active {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #F4CEB4 !important;
  border: 1px solid rgba(213, 155, 118, 0.32) !important;
}

/* 6. Sidebar & Header */
.sidebar, #sidebar {
  background-color: #130E12 !important;
  border-right: 1px solid rgba(213, 155, 118, 0.15) !important;
}

.sidebar-brand-name {
  font-family: var(--font-serif) !important;
  letter-spacing: 0.08em !important;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* 7. Compose Button */
.btn-compose, .compose-btn, #btn-compose {
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(244, 206, 180, 0.5) !important;
  box-shadow: 0 4px 14px rgba(181, 111, 74, 0.4) !important;
}

.btn-compose:hover, .compose-btn:hover, #btn-compose:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 20px rgba(213, 155, 118, 0.55) !important;
}

/* 8. Active Mail Item */
.mail-item.active, .mail-item.selected, .mail-item:hover {
  background-color: rgba(213, 155, 118, 0.12) !important;
}

.mail-item.active, .mail-item.selected {
  border-left: 3px solid #D59B76 !important;
}

/* 9. Top Navigation & Search Bar */
.topbar, .header, #top-bar {
  background-color: #160F15 !important;
  border-bottom: 1px solid rgba(213, 155, 118, 0.15) !important;
}

/* 10. Modals & Dialogs */
.modal-content, .card {
  background-color: #160F15 !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
}

/* 11. Floating Petals on Background */
.petal-particle {
  position: absolute;
  top: -30px;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.65) 0%, rgba(213, 155, 118, 0.3) 65%, transparent 100%);
  border-radius: 50% 0 50% 50%;
  pointer-events: none;
  z-index: 1;
  animation: petalDrift linear infinite;
}

@keyframes petalDrift {
  0% { transform: translateY(0px) rotate(0deg) translateX(0px); opacity: 0; }
  15% { opacity: 0.4; }
  85% { opacity: 0.4; }
  100% { transform: translateY(105vh) rotate(540deg) translateX(120px); opacity: 0; }
}
/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — WEBMAIL PRO
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   Exact background identical to taoyame.com
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-velvet: #130E12;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.28) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  --bronze-rich: #B77D58;
  --bronze-deep: #925838;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 1. Global Page Background (Exact match with taoyame.com) */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
}

/* 2. Full Background Visibility for Login Backdrop */
#auth-overlay,
.compose-modal-backdrop#auth-overlay {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth-overlay .splash-ambient-glow {
  display: none !important;
}

/* Remove button arrows everywhere */
.btn-arrow-icon,
.btn-arrow-wrap {
  display: none !important;
}

/* 3. Ambient Background & Orbs (Exact match with taoyame.com) */
.ambient-bg,
#ambient-bg,
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* Large Faint Peony Flower Watermark */
.ambient-watermark {
  position: absolute !important;
  top: 8% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-6deg) !important;
  width: 680px !important;
  height: 680px !important;
  pointer-events: none !important;
  opacity: 0.075 !important;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35)) !important;
  will-change: transform !important;
  z-index: 0 !important;
}

.watermark-flower {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Radiant Floral Orbs */
.ambient-shape {
  position: absolute !important;
  will-change: transform !important;
}

.shape-orb-1, .aurora-orb.orb-1 {
  top: -5% !important;
  left: 25% !important;
  width: 600px !important;
  height: 600px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.18) 0%, rgba(213, 155, 118, 0.08) 40%, transparent 70%) !important;
  filter: blur(80px) !important;
  animation: driftOne 22s ease-in-out infinite alternate !important;
}

.shape-orb-2, .aurora-orb.orb-2 {
  top: 35% !important;
  right: -5% !important;
  width: 520px !important;
  height: 520px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(213, 155, 118, 0.16) 0%, rgba(183, 125, 88, 0.06) 45%, transparent 70%) !important;
  filter: blur(85px) !important;
  animation: driftTwo 26s ease-in-out infinite alternate !important;
}

.shape-orb-3, .aurora-orb.orb-3 {
  bottom: 0% !important;
  left: -5% !important;
  width: 480px !important;
  height: 480px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(183, 125, 88, 0.14) 0%, transparent 68%) !important;
  filter: blur(80px) !important;
  animation: driftThree 28s ease-in-out infinite alternate !important;
}

.aurora-orb.orb-4, .aurora-orb.orb-5, .aurora-beam {
  display: none !important;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}

@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(0.96); }
  50% { transform: translate(-50px, -40px) scale(1.06); }
  100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1.04); }
  50% { transform: translate(30px, -40px) scale(0.96); }
  100% { transform: translate(-30px, 30px) scale(1.05); }
}

.ambient-spotlight {
  position: absolute !important;
  width: 650px !important;
  height: 650px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.07) 0%, rgba(213, 155, 118, 0.02) 40%, transparent 70%) !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
  mix-blend-mode: screen !important;
}

/* Floating Golden Micro-Petals */
.petals-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.petal-particle {
  position: absolute !important;
  border-radius: 60% 0 60% 0 !important;
  background: linear-gradient(135deg, rgba(244, 206, 180, 0.45) 0%, rgba(213, 155, 118, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(244, 206, 180, 0.3) !important;
  pointer-events: none !important;
  will-change: transform, opacity !important;
  animation: fallPetal linear infinite !important;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  85% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(105vh) rotate(360deg) scale(1.1);
    opacity: 0;
  }
}

/* 4. Auth Card (Luminous Glass) */
.auth-card {
  background: linear-gradient(165deg, rgba(34, 24, 30, 0.9) 0%, rgba(20, 15, 19, 0.96) 100%) !important;
  border: 1px solid rgba(213, 155, 118, 0.3) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 45px rgba(213, 155, 118, 0.2) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border-radius: 16px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  z-index: 10 !important;
}

.auth-card:hover {
  border-color: rgba(244, 206, 180, 0.48) !important;
  box-shadow: 0 32px 75px rgba(0, 0, 0, 0.85), 0 0 55px rgba(213, 155, 118, 0.28) !important;
}

.auth-header-title {
  font-family: var(--font-serif) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  background: linear-gradient(135deg, #FFFFFF 25%, #F4CEB4 65%, #D59B76 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 30px rgba(213, 155, 118, 0.3) !important;
}

.auth-header-sub {
  font-size: 13px !important;
  color: var(--rose-gold-light) !important;
  opacity: 0.85;
  letter-spacing: 0.02em !important;
}

/* 5. Auth Inputs */
.auth-input-wrap input {
  background-color: rgba(21, 15, 20, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.22) !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
  transition: all 0.2s ease !important;
}

.auth-input-wrap input:focus {
  border-color: #D59B76 !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.25) !important;
  background-color: rgba(25, 18, 24, 0.95) !important;
}

/* 6. Auth Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(181, 111, 74, 0.45) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 24px rgba(213, 155, 118, 0.65) !important;
  transform: translateY(-1px) !important;
}

.auth-tab-btn {
  border-radius: 8px !important;
  color: #BFAEA6 !important;
  transition: all 0.2s ease !important;
}

.auth-tab-btn.active {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #F4CEB4 !important;
  border: 1px solid rgba(213, 155, 118, 0.32) !important;
}

/* 7. Sidebar & Header */
.sidebar, #sidebar {
  background-color: #130E12 !important;
  border-right: 1px solid rgba(213, 155, 118, 0.15) !important;
}

.sidebar-brand-name {
  font-family: var(--font-serif) !important;
  letter-spacing: 0.08em !important;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* 8. Compose Button */
.btn-compose, .compose-btn, #btn-compose {
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(244, 206, 180, 0.5) !important;
  box-shadow: 0 4px 14px rgba(181, 111, 74, 0.4) !important;
}

.btn-compose:hover, .compose-btn:hover, #btn-compose:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 20px rgba(213, 155, 118, 0.55) !important;
}

/* 9. Active Mail Item */
.mail-item.active, .mail-item.selected, .mail-item:hover {
  background-color: rgba(213, 155, 118, 0.12) !important;
}

.mail-item.active, .mail-item.selected {
  border-left: 3px solid #D59B76 !important;
}

/* 10. Top Navigation & Search Bar */
.topbar, .header, #top-bar {
  background-color: #160F15 !important;
  border-bottom: 1px solid rgba(213, 155, 118, 0.15) !important;
}

/* 11. Modals & Dialogs */
.modal-content, .card {
  background-color: #160F15 !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
}
/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — FULL-PAGE AUTH PORTAL & WEBMAIL PRO
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   No More Mini-Window Modal — Immersive Full-Screen Dual-Pane Experience
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-velvet: #130E12;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.28) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  --bronze-rich: #B77D58;
  --bronze-deep: #925838;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Body & HTML Reset */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================================
   GLOBAL FLORAL AMBIENT BACKGROUND (IDENTICAL TO TAOYAME.COM)
   ========================================================================== */
.ambient-bg,
#ambient-bg,
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.ambient-watermark {
  position: absolute !important;
  top: 8% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-6deg) !important;
  width: 680px !important;
  height: 680px !important;
  pointer-events: none !important;
  opacity: 0.075 !important;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35)) !important;
  will-change: transform !important;
  z-index: 0 !important;
}

.watermark-flower {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.ambient-shape {
  position: absolute !important;
  will-change: transform !important;
}

.shape-orb-1, .aurora-orb.orb-1 {
  top: -5% !important;
  left: 25% !important;
  width: 600px !important;
  height: 600px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.18) 0%, rgba(213, 155, 118, 0.08) 40%, transparent 70%) !important;
  filter: blur(80px) !important;
  animation: driftOne 22s ease-in-out infinite alternate !important;
}

.shape-orb-2, .aurora-orb.orb-2 {
  top: 35% !important;
  right: -5% !important;
  width: 520px !important;
  height: 520px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(213, 155, 118, 0.16) 0%, rgba(183, 125, 88, 0.06) 45%, transparent 70%) !important;
  filter: blur(85px) !important;
  animation: driftTwo 26s ease-in-out infinite alternate !important;
}

.shape-orb-3, .aurora-orb.orb-3 {
  bottom: 0% !important;
  left: -5% !important;
  width: 480px !important;
  height: 480px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(183, 125, 88, 0.14) 0%, transparent 68%) !important;
  filter: blur(80px) !important;
  animation: driftThree 28s ease-in-out infinite alternate !important;
}

.aurora-orb.orb-4, .aurora-orb.orb-5, .aurora-beam {
  display: none !important;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}

@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(0.96); }
  50% { transform: translate(-50px, -40px) scale(1.06); }
  100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1.04); }
  50% { transform: translate(30px, -40px) scale(0.96); }
  100% { transform: translate(-30px, 30px) scale(1.05); }
}

.ambient-spotlight {
  position: absolute !important;
  width: 650px !important;
  height: 650px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.07) 0%, rgba(213, 155, 118, 0.02) 40%, transparent 70%) !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
  mix-blend-mode: screen !important;
}

.petals-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.petal-particle {
  position: absolute !important;
  border-radius: 60% 0 60% 0 !important;
  background: linear-gradient(135deg, rgba(244, 206, 180, 0.45) 0%, rgba(213, 155, 118, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(244, 206, 180, 0.3) !important;
  pointer-events: none !important;
  will-change: transform, opacity !important;
  animation: fallPetal linear infinite !important;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% {
    transform: translateY(105vh) rotate(360deg) scale(1.1);
    opacity: 0;
  }
}

/* Clean Button Arrow Removal */
.btn-arrow-icon,
.btn-arrow-wrap {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION FULL-PAGE PORTAL (NO MORE MINI-WINDOW MODAL)
   ========================================================================== */
#auth-overlay,
.auth-fullpage-portal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: row !important;
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  overflow: hidden !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth-overlay.hidden {
  display: none !important;
}

/* --- LEFT SIDE: HERO BRAND PANE --- */
.auth-hero-pane {
  flex: 1.15;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  overflow: hidden;
  border-right: 1px solid rgba(213, 155, 118, 0.16);
  background: radial-gradient(circle at 30% 40%, rgba(42, 28, 36, 0.55) 0%, rgba(13, 10, 12, 0.85) 100%);
  z-index: 1;
}

.hero-pane-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 720px;
  height: 720px;
  pointer-events: none;
  opacity: 0.08;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35));
  z-index: 0;
}

.hero-pane-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
}

.hero-pane-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  margin-bottom: 40px;
  transition: transform 0.25s ease;
}

.hero-pane-brand:hover {
  transform: translateY(-2px);
}

.brand-logo-glow-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(213, 155, 118, 0.12);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(213, 155, 118, 0.3);
}

.hero-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.hero-brand-name {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-pane-message {
  margin-bottom: 36px;
}

.hero-pane-title {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-pane-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-pane-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-feature-pill {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 20px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.07);
  border: 1px solid rgba(213, 155, 118, 0.18);
  transition: all 0.25s ease;
}

.hero-feature-pill:hover {
  background: rgba(213, 155, 118, 0.14);
  border-color: rgba(244, 206, 180, 0.38);
  transform: translateX(4px);
}

.feature-icon {
  font-size: 20px;
  line-height: 1;
}

.feature-text {
  display: flex;
  flex-direction: column;
}

.feature-text strong {
  font-size: 0.94rem;
  color: #FFFFFF;
  font-weight: 600;
}

.feature-text span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hero-pane-quote {
  border-left: 2px solid rgba(213, 155, 118, 0.45);
  padding-left: 18px;
  font-style: italic;
  color: var(--rose-gold-light);
  opacity: 0.9;
  font-size: 0.94rem;
}

/* --- RIGHT SIDE: AUTH FORM COLUMN --- */
#auth-card,
.auth-form-pane {
  flex: 0.95 !important;
  min-width: 460px !important;
  max-width: 600px !important;
  height: 100vh !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 48px 56px !important;
  background: rgba(18, 13, 17, 0.82) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  border-left: 1px solid rgba(213, 155, 118, 0.16) !important;
  border-radius: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
  margin: auto;
}

.mobile-auth-brand {
  display: none;
}

.auth-header-desktop {
  margin-bottom: 24px;
}

.auth-title-large {
  font-family: var(--font-serif);
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.auth-subtitle-refined {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

/* Tabs */
.auth-tab-group {
  display: flex;
  gap: 8px;
  padding: 5px;
  background: rgba(13, 10, 12, 0.75);
  border: 1px solid rgba(213, 155, 118, 0.22);
  border-radius: 12px;
  margin-bottom: 24px;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #BFAEA6;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(213, 155, 118, 0.24) 0%, rgba(183, 125, 88, 0.18) 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(244, 206, 180, 0.4) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

/* Form Fields */
.auth-field-group {
  margin-bottom: 20px;
}

.auth-field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  width: 100% !important;
  height: 48px !important;
  padding: 0 16px !important;
  font-size: 0.96rem !important;
  background-color: rgba(26, 18, 23, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.24) !important;
  border-radius: 11px !important;
  color: #FFFFFF !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: var(--font-sans) !important;
  box-sizing: border-box !important;
}

.auth-input-wrap input:focus {
  outline: none !important;
  border-color: #D59B76 !important;
  background-color: rgba(32, 22, 29, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.28), 0 0 20px rgba(213, 155, 118, 0.2) !important;
}

.auth-input-wrap.password-wrap input {
  padding-right: 48px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #A39188;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: #FFFFFF;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.forgot-pass-link {
  font-size: 0.85rem;
  color: var(--rose-gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-pass-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Submit Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  width: 100% !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  box-shadow: 0 4px 20px rgba(181, 111, 74, 0.45) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 26px rgba(213, 155, 118, 0.65) !important;
  transform: translateY(-1px) !important;
}

.auth-back-btn {
  width: 100% !important;
  height: 40px !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-secondary) !important;
  background: rgba(213, 155, 118, 0.08) !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.auth-back-btn:hover {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #FFFFFF !important;
}

/* Legal Footer */
.auth-legal-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(213, 155, 118, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #8C7870;
}

.auth-legal-footer a {
  color: #A39188;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-legal-footer a:hover {
  color: #FFFFFF;
}

.auth-legal-sep {
  color: rgba(213, 155, 118, 0.3);
}

/* 2FA UI */
.auth-2fa-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-light);
  box-shadow: 0 0 20px rgba(213, 155, 118, 0.25);
  margin-bottom: 14px;
}

.auth-2fa-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.auth-2fa-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.input-2fa-code {
  text-align: center !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 5px !important;
  font-family: monospace !important;
}

/* Alerts */
.auth-alert-box {
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 16px;
}

.auth-alert-box.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.alert-success {
  background-color: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.35);
  color: #86EFAC;
}

/* Ensure mod-register remains spacious */
#auth-card.mode-register,
.auth-card.mode-register {
  padding: 40px 56px !important;
}

/* High z-index for floating popups and modals over full-page auth */
#legal-modal,
#forgot-password-modal,
.compose-modal-backdrop:not(#auth-overlay) {
  z-index: 2500 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 960px) {
  #auth-overlay,
  .auth-fullpage-portal {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: 100vh !important;
  }

  .auth-hero-pane {
    display: none !important;
  }

  #auth-card,
  .auth-form-pane {
    flex: 1 !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 36px 24px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-left: none !important;
  }

  .mobile-auth-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 24px !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  .mobile-logo-img {
    width: 68px !important;
    height: 68px !important;
    object-fit: contain !important;
    margin-bottom: 10px !important;
    filter: drop-shadow(0 4px 22px rgba(213, 155, 118, 0.45)) !important;
  }

  .mobile-brand-title {
    font-family: var(--font-serif) !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  .mobile-brand-sub {
    font-size: 13px !important;
    color: var(--rose-gold-light) !important;
    opacity: 0.85 !important;
  }

  .auth-header-desktop {
    display: none !important;
  }
}
/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — REFINED FULL-PAGE PORTAL
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   Harmonious Aspect Ratio, Compact Form Dimensions (Never Overflows)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-velvet: #130E12;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.28) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  --bronze-rich: #B77D58;
  --bronze-deep: #925838;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Body & HTML Reset */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* ==========================================================================
   GLOBAL FLORAL AMBIENT BACKGROUND
   ========================================================================== */
.ambient-bg,
#ambient-bg,
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.ambient-watermark {
  position: absolute !important;
  top: 8% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-6deg) !important;
  width: 680px !important;
  height: 680px !important;
  pointer-events: none !important;
  opacity: 0.075 !important;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35)) !important;
  will-change: transform !important;
  z-index: 0 !important;
}

.watermark-flower {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.ambient-shape {
  position: absolute !important;
  will-change: transform !important;
}

.shape-orb-1, .aurora-orb.orb-1 {
  top: -5% !important;
  left: 25% !important;
  width: 600px !important;
  height: 600px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.18) 0%, rgba(213, 155, 118, 0.08) 40%, transparent 70%) !important;
  filter: blur(80px) !important;
  animation: driftOne 22s ease-in-out infinite alternate !important;
}

.shape-orb-2, .aurora-orb.orb-2 {
  top: 35% !important;
  right: -5% !important;
  width: 520px !important;
  height: 520px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(213, 155, 118, 0.16) 0%, rgba(183, 125, 88, 0.06) 45%, transparent 70%) !important;
  filter: blur(85px) !important;
  animation: driftTwo 26s ease-in-out infinite alternate !important;
}

.shape-orb-3, .aurora-orb.orb-3 {
  bottom: 0% !important;
  left: -5% !important;
  width: 480px !important;
  height: 480px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(183, 125, 88, 0.14) 0%, transparent 68%) !important;
  filter: blur(80px) !important;
  animation: driftThree 28s ease-in-out infinite alternate !important;
}

.aurora-orb.orb-4, .aurora-orb.orb-5, .aurora-beam {
  display: none !important;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}

@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(0.96); }
  50% { transform: translate(-50px, -40px) scale(1.06); }
  100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1.04); }
  50% { transform: translate(30px, -40px) scale(0.96); }
  100% { transform: translate(-30px, 30px) scale(1.05); }
}

.ambient-spotlight {
  position: absolute !important;
  width: 650px !important;
  height: 650px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.07) 0%, rgba(213, 155, 118, 0.02) 40%, transparent 70%) !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
  mix-blend-mode: screen !important;
}

.petals-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.petal-particle {
  position: absolute !important;
  border-radius: 60% 0 60% 0 !important;
  background: linear-gradient(135deg, rgba(244, 206, 180, 0.45) 0%, rgba(213, 155, 118, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(244, 206, 180, 0.3) !important;
  pointer-events: none !important;
  will-change: transform, opacity !important;
  animation: fallPetal linear infinite !important;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% {
    transform: translateY(105vh) rotate(360deg) scale(1.1);
    opacity: 0;
  }
}

.btn-arrow-icon,
.btn-arrow-wrap {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION FULL-PAGE PORTAL (HARMONIOUS 50/50 ASPECT RATIO)
   ========================================================================== */
#auth-overlay,
.auth-fullpage-portal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: row !important;
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  overflow: hidden !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth-overlay.hidden {
  display: none !important;
}

/* --- LEFT SIDE: HERO BRAND PANE --- */
.auth-hero-pane {
  flex: 1.05 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 40px 60px !important;
  overflow: hidden !important;
  border-right: 1px solid rgba(213, 155, 118, 0.16) !important;
  background: radial-gradient(circle at 30% 40%, rgba(42, 28, 36, 0.5) 0%, rgba(13, 10, 12, 0.85) 100%) !important;
  z-index: 1 !important;
}

.hero-pane-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 600px;
  height: 600px;
  pointer-events: none;
  opacity: 0.08;
  filter: drop-shadow(0 0 50px rgba(244, 206, 180, 0.35));
  z-index: 0;
}

.hero-pane-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
}

.hero-pane-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-bottom: 28px;
  transition: transform 0.25s ease;
}

.hero-pane-brand:hover {
  transform: translateY(-2px);
}

.brand-logo-glow-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.12);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(213, 155, 118, 0.3);
}

.hero-brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-brand-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-pane-message {
  margin-bottom: 26px;
}

.hero-pane-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-pane-sub {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-pane-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-feature-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(213, 155, 118, 0.06);
  border: 1px solid rgba(213, 155, 118, 0.16);
  transition: all 0.25s ease;
}

.hero-feature-pill:hover {
  background: rgba(213, 155, 118, 0.12);
  border-color: rgba(244, 206, 180, 0.35);
  transform: translateX(3px);
}

.feature-icon {
  font-size: 18px;
  line-height: 1;
}

.feature-text {
  display: flex;
  flex-direction: column;
}

.feature-text strong {
  font-size: 0.88rem;
  color: #FFFFFF;
  font-weight: 600;
}

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

.hero-pane-quote {
  border-left: 2px solid rgba(213, 155, 118, 0.4);
  padding-left: 14px;
  font-style: italic;
  color: var(--rose-gold-light);
  opacity: 0.85;
  font-size: 0.86rem;
}

/* --- RIGHT SIDE: COMPACT AUTH FORM PANE --- */
#auth-card,
.auth-form-pane {
  flex: 0.95 !important;
  width: 48% !important;
  max-width: 540px !important;
  min-width: 380px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 24px 44px !important;
  background: rgba(18, 13, 17, 0.84) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  border-left: 1px solid rgba(213, 155, 118, 0.16) !important;
  border-radius: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Perfect vertical centering without clipping top on smaller screens */
.auth-form-wrapper {
  width: 100%;
  max-width: 430px;
  margin: auto !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;
}

.mobile-auth-brand {
  display: none;
}

.auth-header-desktop {
  margin-bottom: 14px;
}

.auth-title-large {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.auth-subtitle-refined {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* Tabs */
.auth-tab-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(13, 10, 12, 0.75);
  border: 1px solid rgba(213, 155, 118, 0.22);
  border-radius: 10px;
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #BFAEA6;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(213, 155, 118, 0.24) 0%, rgba(183, 125, 88, 0.18) 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(244, 206, 180, 0.4) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

/* 2-Column Responsive Form Row */
.auth-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-field-group {
  margin-bottom: 11px;
}

.auth-field-label {
  display: block;
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  width: 100% !important;
  height: 40px !important;
  padding: 0 13px !important;
  font-size: 0.88rem !important;
  background-color: rgba(26, 18, 23, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.24) !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: var(--font-sans) !important;
  box-sizing: border-box !important;
}

.auth-input-wrap input:focus {
  outline: none !important;
  border-color: #D59B76 !important;
  background-color: rgba(32, 22, 29, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.25), 0 0 16px rgba(213, 155, 118, 0.18) !important;
}

.auth-input-wrap.email-suffix-wrap input {
  padding-right: 120px !important;
}

.domain-fixed-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--rose-gold-light);
  background: rgba(213, 155, 118, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(213, 155, 118, 0.25);
  pointer-events: none;
}

.auth-input-wrap.password-wrap input {
  padding-right: 40px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #A39188;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: #FFFFFF;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.forgot-pass-link {
  font-size: 0.80rem;
  color: var(--rose-gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-pass-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Submit Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  width: 100% !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  box-shadow: 0 4px 16px rgba(181, 111, 74, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  margin-top: 4px !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 22px rgba(213, 155, 118, 0.6) !important;
  transform: translateY(-1px) !important;
}

.auth-back-btn {
  width: 100% !important;
  height: 38px !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-secondary) !important;
  background: rgba(213, 155, 118, 0.08) !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.auth-back-btn:hover {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #FFFFFF !important;
}

/* Terms Checkbox */
.auth-terms-wrap {
  margin-bottom: 12px;
}

.auth-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.terms-checkbox {
  margin-top: 2px;
  accent-color: #D59B76;
  width: 14px;
  height: 14px;
  cursor: pointer;
  border-radius: 3px;
  flex-shrink: 0;
}

.terms-text {
  font-size: 11px;
  color: #A1A1AA;
  line-height: 1.45;
}

.terms-text a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal Footer */
.auth-legal-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(213, 155, 118, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #8C7870;
}

.auth-legal-footer a {
  color: #A39188;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-legal-footer a:hover {
  color: #FFFFFF;
}

.auth-legal-sep {
  color: rgba(213, 155, 118, 0.3);
}

/* 2FA UI */
.auth-2fa-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-light);
  box-shadow: 0 0 16px rgba(213, 155, 118, 0.25);
  margin-bottom: 10px;
}

.auth-2fa-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.auth-2fa-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.input-2fa-code {
  text-align: center !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 4px !important;
  font-family: monospace !important;
}

/* Alerts */
.auth-alert-box {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.auth-alert-box.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.alert-success {
  background-color: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.35);
  color: #86EFAC;
}

/* Reset mode-register padding override */
#auth-card.mode-register,
.auth-card.mode-register {
  padding: 24px 44px !important;
}

/* High z-index for floating popups and modals over full-page auth */
#legal-modal,
#forgot-password-modal,
.compose-modal-backdrop:not(#auth-overlay) {
  z-index: 2500 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 960px) {
  #auth-overlay,
  .auth-fullpage-portal {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: 100vh !important;
  }

  .auth-hero-pane {
    display: none !important;
  }

  #auth-card,
  .auth-form-pane {
    flex: 1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 28px 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-left: none !important;
  }

  .auth-grid-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .mobile-auth-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  .mobile-logo-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    margin-bottom: 8px !important;
    filter: drop-shadow(0 4px 20px rgba(213, 155, 118, 0.45)) !important;
  }

  .mobile-brand-title {
    font-family: var(--font-serif) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  .mobile-brand-sub {
    font-size: 12.5px !important;
    color: var(--rose-gold-light) !important;
    opacity: 0.85 !important;
  }

  .auth-header-desktop {
    display: none !important;
  }
}
/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — REFINED FULL-PAGE PORTAL
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   Exact 50/50 Symmetrical Split, Perfectly Centered on Both Halves
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-velvet: #130E12;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.28) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  --bronze-rich: #B77D58;
  --bronze-deep: #925838;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Body & HTML Reset */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* ==========================================================================
   GLOBAL FLORAL AMBIENT BACKGROUND
   ========================================================================== */
.ambient-bg,
#ambient-bg,
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.ambient-watermark {
  position: absolute !important;
  top: 8% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-6deg) !important;
  width: 680px !important;
  height: 680px !important;
  pointer-events: none !important;
  opacity: 0.075 !important;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35)) !important;
  will-change: transform !important;
  z-index: 0 !important;
}

.watermark-flower {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.ambient-shape {
  position: absolute !important;
  will-change: transform !important;
}

.shape-orb-1, .aurora-orb.orb-1 {
  top: -5% !important;
  left: 25% !important;
  width: 600px !important;
  height: 600px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.18) 0%, rgba(213, 155, 118, 0.08) 40%, transparent 70%) !important;
  filter: blur(80px) !important;
  animation: driftOne 22s ease-in-out infinite alternate !important;
}

.shape-orb-2, .aurora-orb.orb-2 {
  top: 35% !important;
  right: -5% !important;
  width: 520px !important;
  height: 520px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(213, 155, 118, 0.16) 0%, rgba(183, 125, 88, 0.06) 45%, transparent 70%) !important;
  filter: blur(85px) !important;
  animation: driftTwo 26s ease-in-out infinite alternate !important;
}

.shape-orb-3, .aurora-orb.orb-3 {
  bottom: 0% !important;
  left: -5% !important;
  width: 480px !important;
  height: 480px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(183, 125, 88, 0.14) 0%, transparent 68%) !important;
  filter: blur(80px) !important;
  animation: driftThree 28s ease-in-out infinite alternate !important;
}

.aurora-orb.orb-4, .aurora-orb.orb-5, .aurora-beam {
  display: none !important;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}

@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(0.96); }
  50% { transform: translate(-50px, -40px) scale(1.06); }
  100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1.04); }
  50% { transform: translate(30px, -40px) scale(0.96); }
  100% { transform: translate(-30px, 30px) scale(1.05); }
}

.ambient-spotlight {
  position: absolute !important;
  width: 650px !important;
  height: 650px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.07) 0%, rgba(213, 155, 118, 0.02) 40%, transparent 70%) !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
  mix-blend-mode: screen !important;
}

.petals-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.petal-particle {
  position: absolute !important;
  border-radius: 60% 0 60% 0 !important;
  background: linear-gradient(135deg, rgba(244, 206, 180, 0.45) 0%, rgba(213, 155, 118, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(244, 206, 180, 0.3) !important;
  pointer-events: none !important;
  will-change: transform, opacity !important;
  animation: fallPetal linear infinite !important;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% {
    transform: translateY(105vh) rotate(360deg) scale(1.1);
    opacity: 0;
  }
}

.btn-arrow-icon,
.btn-arrow-wrap {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION FULL-PAGE PORTAL (EXACT 50% / 50% SYMMETRICAL SPLIT)
   ========================================================================== */
#auth-overlay,
.auth-fullpage-portal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: row !important;
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  overflow: hidden !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth-overlay.hidden {
  display: none !important;
}

/* --- LEFT SIDE: HERO BRAND PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
.auth-hero-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  overflow: hidden !important;
  border-right: 1px solid rgba(213, 155, 118, 0.16) !important;
  background: radial-gradient(circle at 40% 45%, rgba(42, 28, 36, 0.5) 0%, rgba(13, 10, 12, 0.85) 100%) !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
}

.hero-pane-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 580px;
  height: 580px;
  pointer-events: none;
  opacity: 0.08;
  filter: drop-shadow(0 0 50px rgba(244, 206, 180, 0.35));
  z-index: 0;
}

.hero-pane-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.hero-pane-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-bottom: 26px;
  transition: transform 0.25s ease;
}

.hero-pane-brand:hover {
  transform: translateY(-2px);
}

.brand-logo-glow-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.12);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(213, 155, 118, 0.3);
}

.hero-brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-brand-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-pane-message {
  margin-bottom: 24px;
}

.hero-pane-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-pane-sub {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-pane-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-feature-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(213, 155, 118, 0.06);
  border: 1px solid rgba(213, 155, 118, 0.16);
  transition: all 0.25s ease;
}

.hero-feature-pill:hover {
  background: rgba(213, 155, 118, 0.12);
  border-color: rgba(244, 206, 180, 0.35);
  transform: translateX(3px);
}

.feature-icon {
  font-size: 18px;
  line-height: 1;
}

.feature-text {
  display: flex;
  flex-direction: column;
}

.feature-text strong {
  font-size: 0.88rem;
  color: #FFFFFF;
  font-weight: 600;
}

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

.hero-pane-quote {
  border-left: 2px solid rgba(213, 155, 118, 0.4);
  padding-left: 14px;
  font-style: italic;
  color: var(--rose-gold-light);
  opacity: 0.85;
  font-size: 0.86rem;
}

/* --- RIGHT SIDE: AUTH FORM PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
#auth-card,
.auth-form-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  background: rgba(18, 13, 17, 0.84) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  border-left: 1px solid rgba(213, 155, 118, 0.16) !important;
  border-radius: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Form Wrapper centered inside the right 50% column */
.auth-form-wrapper {
  width: 100% !important;
  max-width: 420px !important;
  margin: auto !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;
}

.mobile-auth-brand {
  display: none;
}

.auth-header-desktop {
  text-align: center !important;
  margin-bottom: 18px !important;
}

.auth-title-large {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center !important;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.auth-subtitle-refined {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center !important;
}

/* Tabs */
.auth-tab-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(13, 10, 12, 0.75);
  border: 1px solid rgba(213, 155, 118, 0.22);
  border-radius: 10px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #BFAEA6;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(213, 155, 118, 0.24) 0%, rgba(183, 125, 88, 0.18) 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(244, 206, 180, 0.4) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

/* 2-Column Responsive Form Row */
.auth-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-field-group {
  margin-bottom: 12px;
}

.auth-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  width: 100% !important;
  height: 40px !important;
  padding: 0 13px !important;
  font-size: 0.88rem !important;
  background-color: rgba(26, 18, 23, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.24) !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: var(--font-sans) !important;
  box-sizing: border-box !important;
}

.auth-input-wrap input:focus {
  outline: none !important;
  border-color: #D59B76 !important;
  background-color: rgba(32, 22, 29, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.25), 0 0 16px rgba(213, 155, 118, 0.18) !important;
}

.auth-input-wrap.email-suffix-wrap input {
  padding-right: 120px !important;
}

.domain-fixed-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--rose-gold-light);
  background: rgba(213, 155, 118, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(213, 155, 118, 0.25);
  pointer-events: none;
}

.auth-input-wrap.password-wrap input {
  padding-right: 40px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #A39188;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: #FFFFFF;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.forgot-pass-link {
  font-size: 0.82rem;
  color: var(--rose-gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-pass-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Submit Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  width: 100% !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  box-shadow: 0 4px 16px rgba(181, 111, 74, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  margin-top: 4px !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 22px rgba(213, 155, 118, 0.6) !important;
  transform: translateY(-1px) !important;
}

.auth-back-btn {
  width: 100% !important;
  height: 38px !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-secondary) !important;
  background: rgba(213, 155, 118, 0.08) !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.auth-back-btn:hover {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #FFFFFF !important;
}

/* Terms Checkbox */
.auth-terms-wrap {
  margin-bottom: 12px;
}

.auth-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.terms-checkbox {
  margin-top: 2px;
  accent-color: #D59B76;
  width: 14px;
  height: 14px;
  cursor: pointer;
  border-radius: 3px;
  flex-shrink: 0;
}

.terms-text {
  font-size: 11px;
  color: #A1A1AA;
  line-height: 1.45;
}

.terms-text a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal Footer */
.auth-legal-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(213, 155, 118, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #8C7870;
}

.auth-legal-footer a {
  color: #A39188;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-legal-footer a:hover {
  color: #FFFFFF;
}

.auth-legal-sep {
  color: rgba(213, 155, 118, 0.3);
}

/* 2FA UI */
.auth-2fa-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-light);
  box-shadow: 0 0 16px rgba(213, 155, 118, 0.25);
  margin-bottom: 10px;
}

.auth-2fa-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.auth-2fa-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.input-2fa-code {
  text-align: center !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 4px !important;
  font-family: monospace !important;
}

/* Alerts */
.auth-alert-box {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.auth-alert-box.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.alert-success {
  background-color: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.35);
  color: #86EFAC;
}

/* High z-index for floating popups and modals over full-page auth */
#legal-modal,
#forgot-password-modal,
.compose-modal-backdrop:not(#auth-overlay) {
  z-index: 2500 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 960px) {
  #auth-overlay,
  .auth-fullpage-portal {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: 100vh !important;
  }

  .auth-hero-pane {
    display: none !important;
  }

  #auth-card,
  .auth-form-pane {
    flex: 1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 28px 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-left: none !important;
  }

  .auth-grid-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .mobile-auth-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  .mobile-logo-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    margin-bottom: 8px !important;
    filter: drop-shadow(0 4px 20px rgba(213, 155, 118, 0.45)) !important;
  }

  .mobile-brand-title {
    font-family: var(--font-serif) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  .mobile-brand-sub {
    font-size: 12.5px !important;
    color: var(--rose-gold-light) !important;
    opacity: 0.85 !important;
  }

  .auth-header-desktop {
    display: none !important;
  }
}
/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — REFINED FULL-PAGE PORTAL
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   Exact 50/50 Symmetrical Split, Perfectly Centered on Both Halves
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-velvet: #130E12;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.28) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  --bronze-rich: #B77D58;
  --bronze-deep: #925838;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Body & HTML Reset */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* ==========================================================================
   GLOBAL FLORAL AMBIENT BACKGROUND
   ========================================================================== */
.ambient-bg,
#ambient-bg,
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.ambient-watermark {
  position: absolute !important;
  top: 8% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-6deg) !important;
  width: 680px !important;
  height: 680px !important;
  pointer-events: none !important;
  opacity: 0.075 !important;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35)) !important;
  will-change: transform !important;
  z-index: 0 !important;
}

.watermark-flower {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.ambient-shape {
  position: absolute !important;
  will-change: transform !important;
}

.shape-orb-1, .aurora-orb.orb-1 {
  top: -5% !important;
  left: 25% !important;
  width: 600px !important;
  height: 600px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.18) 0%, rgba(213, 155, 118, 0.08) 40%, transparent 70%) !important;
  filter: blur(80px) !important;
  animation: driftOne 22s ease-in-out infinite alternate !important;
}

.shape-orb-2, .aurora-orb.orb-2 {
  top: 35% !important;
  right: -5% !important;
  width: 520px !important;
  height: 520px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(213, 155, 118, 0.16) 0%, rgba(183, 125, 88, 0.06) 45%, transparent 70%) !important;
  filter: blur(85px) !important;
  animation: driftTwo 26s ease-in-out infinite alternate !important;
}

.shape-orb-3, .aurora-orb.orb-3 {
  bottom: 0% !important;
  left: -5% !important;
  width: 480px !important;
  height: 480px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(183, 125, 88, 0.14) 0%, transparent 68%) !important;
  filter: blur(80px) !important;
  animation: driftThree 28s ease-in-out infinite alternate !important;
}

.aurora-orb.orb-4, .aurora-orb.orb-5, .aurora-beam {
  display: none !important;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}

@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(0.96); }
  50% { transform: translate(-50px, -40px) scale(1.06); }
  100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1.04); }
  50% { transform: translate(30px, -40px) scale(0.96); }
  100% { transform: translate(-30px, 30px) scale(1.05); }
}

.ambient-spotlight {
  position: absolute !important;
  width: 650px !important;
  height: 650px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.07) 0%, rgba(213, 155, 118, 0.02) 40%, transparent 70%) !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
  mix-blend-mode: screen !important;
}

.petals-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.petal-particle {
  position: absolute !important;
  border-radius: 60% 0 60% 0 !important;
  background: linear-gradient(135deg, rgba(244, 206, 180, 0.45) 0%, rgba(213, 155, 118, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(244, 206, 180, 0.3) !important;
  pointer-events: none !important;
  will-change: transform, opacity !important;
  animation: fallPetal linear infinite !important;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% {
    transform: translateY(105vh) rotate(360deg) scale(1.1);
    opacity: 0;
  }
}

.btn-arrow-icon,
.btn-arrow-wrap {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION FULL-PAGE PORTAL (EXACT 50% / 50% SYMMETRICAL SPLIT)
   ========================================================================== */
#auth-overlay,
.auth-fullpage-portal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: row !important;
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  overflow: hidden !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth-overlay.hidden {
  display: none !important;
}

/* --- LEFT SIDE: HERO BRAND PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
.auth-hero-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  overflow: hidden !important;
  border-right: 1px solid rgba(213, 155, 118, 0.16) !important;
  background: radial-gradient(circle at 40% 45%, rgba(42, 28, 36, 0.5) 0%, rgba(13, 10, 12, 0.85) 100%) !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
}

.hero-pane-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 580px;
  height: 580px;
  pointer-events: none;
  opacity: 0.08;
  filter: drop-shadow(0 0 50px rgba(244, 206, 180, 0.35));
  z-index: 0;
}

.hero-pane-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.hero-pane-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-bottom: 26px;
  transition: transform 0.25s ease;
}

.hero-pane-brand:hover {
  transform: translateY(-2px);
}

.brand-logo-glow-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.12);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(213, 155, 118, 0.3);
}

.hero-brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-brand-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-pane-message {
  margin-bottom: 24px;
}

.hero-pane-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-pane-sub {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-pane-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-feature-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(213, 155, 118, 0.06);
  border: 1px solid rgba(213, 155, 118, 0.16);
  transition: all 0.25s ease;
}

.hero-feature-pill:hover {
  background: rgba(213, 155, 118, 0.12);
  border-color: rgba(244, 206, 180, 0.35);
  transform: translateX(3px);
}

.feature-icon {
  font-size: 18px;
  line-height: 1;
}

.feature-text {
  display: flex;
  flex-direction: column;
}

.feature-text strong {
  font-size: 0.88rem;
  color: #FFFFFF;
  font-weight: 600;
}

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

.hero-pane-quote {
  border-left: 2px solid rgba(213, 155, 118, 0.4);
  padding-left: 14px;
  font-style: italic;
  color: var(--rose-gold-light);
  opacity: 0.85;
  font-size: 0.86rem;
}

/* --- RIGHT SIDE: AUTH FORM PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
#auth-card,
.auth-form-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  background: rgba(18, 13, 17, 0.84) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  border-left: 1px solid rgba(213, 155, 118, 0.16) !important;
  border-radius: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Form Wrapper centered inside the right 50% column */
.auth-form-wrapper {
  width: 100% !important;
  max-width: 420px !important;
  margin: auto !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;
}

.mobile-auth-brand {
  display: none;
}

.auth-header-desktop {
  text-align: center !important;
  margin-bottom: 18px !important;
}

.auth-title-large {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center !important;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.auth-subtitle-refined {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center !important;
}

/* Tabs */
.auth-tab-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(13, 10, 12, 0.75);
  border: 1px solid rgba(213, 155, 118, 0.22);
  border-radius: 10px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #BFAEA6;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(213, 155, 118, 0.24) 0%, rgba(183, 125, 88, 0.18) 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(244, 206, 180, 0.4) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

/* 2-Column Responsive Form Row */


.auth-field-group {
  margin-bottom: 12px;
}



.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  width: 100% !important;
  height: 40px !important;
  padding: 0 13px !important;
  font-size: 0.88rem !important;
  background-color: rgba(26, 18, 23, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.24) !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: var(--font-sans) !important;
  box-sizing: border-box !important;
}

.auth-input-wrap input:focus {
  outline: none !important;
  border-color: #D59B76 !important;
  background-color: rgba(32, 22, 29, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.25), 0 0 16px rgba(213, 155, 118, 0.18) !important;
}

.auth-input-wrap.email-suffix-wrap input {
  padding-right: 120px !important;
}

.domain-fixed-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--rose-gold-light);
  background: rgba(213, 155, 118, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(213, 155, 118, 0.25);
  pointer-events: none;
}

.auth-input-wrap.password-wrap input {
  padding-right: 40px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #A39188;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: #FFFFFF;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.forgot-pass-link {
  font-size: 0.82rem;
  color: var(--rose-gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-pass-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Submit Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  width: 100% !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  box-shadow: 0 4px 16px rgba(181, 111, 74, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  margin-top: 4px !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 22px rgba(213, 155, 118, 0.6) !important;
  transform: translateY(-1px) !important;
}

.auth-back-btn {
  width: 100% !important;
  height: 38px !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-secondary) !important;
  background: rgba(213, 155, 118, 0.08) !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.auth-back-btn:hover {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #FFFFFF !important;
}

/* Terms Checkbox */
.auth-terms-wrap {
  margin-bottom: 12px;
}

.auth-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.terms-checkbox {
  margin-top: 2px;
  accent-color: #D59B76;
  width: 14px;
  height: 14px;
  cursor: pointer;
  border-radius: 3px;
  flex-shrink: 0;
}

.terms-text {
  font-size: 11px;
  color: #A1A1AA;
  line-height: 1.45;
}

.terms-text a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal Footer */
.auth-legal-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(213, 155, 118, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #8C7870;
}

.auth-legal-footer a {
  color: #A39188;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-legal-footer a:hover {
  color: #FFFFFF;
}

.auth-legal-sep {
  color: rgba(213, 155, 118, 0.3);
}

/* 2FA UI */
.auth-2fa-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-light);
  box-shadow: 0 0 16px rgba(213, 155, 118, 0.25);
  margin-bottom: 10px;
}

.auth-2fa-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.auth-2fa-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.input-2fa-code {
  text-align: center !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 4px !important;
  font-family: monospace !important;
}

/* Alerts */
.auth-alert-box {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.auth-alert-box.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.alert-success {
  background-color: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.35);
  color: #86EFAC;
}

/* High z-index for floating popups and modals over full-page auth */
#legal-modal,
#forgot-password-modal,
.compose-modal-backdrop:not(#auth-overlay) {
  z-index: 2500 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 960px) {
  #auth-overlay,
  .auth-fullpage-portal {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: 100vh !important;
  }

  .auth-hero-pane {
    display: none !important;
  }

  #auth-card,
  .auth-form-pane {
    flex: 1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 28px 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-left: none !important;
  }

  

  .mobile-auth-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  .mobile-logo-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    margin-bottom: 8px !important;
    filter: drop-shadow(0 4px 20px rgba(213, 155, 118, 0.45)) !important;
  }

  .mobile-brand-title {
    font-family: var(--font-serif) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  .mobile-brand-sub {
    font-size: 12.5px !important;
    color: var(--rose-gold-light) !important;
    opacity: 0.85 !important;
  }

  .auth-header-desktop {
    display: none !important;
  }
}

/* Fixed equal height labels to guarantee perfect horizontal input alignment */
.auth-field-label {
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 5px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 15px !important;
  height: 15px !important;
}

.auth-grid-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  align-items: flex-start !important;
}

.auth-grid-row .auth-field-group {
  margin-bottom: 0 !important;
}
/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — REFINED FULL-PAGE PORTAL
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   Exact 50/50 Symmetrical Split, Perfectly Centered on Both Halves
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-velvet: #130E12;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.28) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  --bronze-rich: #B77D58;
  --bronze-deep: #925838;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Body & HTML Reset */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* ==========================================================================
   GLOBAL FLORAL AMBIENT BACKGROUND
   ========================================================================== */
.ambient-bg,
#ambient-bg,
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.ambient-watermark {
  position: absolute !important;
  top: 8% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-6deg) !important;
  width: 680px !important;
  height: 680px !important;
  pointer-events: none !important;
  opacity: 0.075 !important;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35)) !important;
  will-change: transform !important;
  z-index: 0 !important;
}

.watermark-flower {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.ambient-shape {
  position: absolute !important;
  will-change: transform !important;
}

.shape-orb-1, .aurora-orb.orb-1 {
  top: -5% !important;
  left: 25% !important;
  width: 600px !important;
  height: 600px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.18) 0%, rgba(213, 155, 118, 0.08) 40%, transparent 70%) !important;
  filter: blur(80px) !important;
  animation: driftOne 22s ease-in-out infinite alternate !important;
}

.shape-orb-2, .aurora-orb.orb-2 {
  top: 35% !important;
  right: -5% !important;
  width: 520px !important;
  height: 520px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(213, 155, 118, 0.16) 0%, rgba(183, 125, 88, 0.06) 45%, transparent 70%) !important;
  filter: blur(85px) !important;
  animation: driftTwo 26s ease-in-out infinite alternate !important;
}

.shape-orb-3, .aurora-orb.orb-3 {
  bottom: 0% !important;
  left: -5% !important;
  width: 480px !important;
  height: 480px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(183, 125, 88, 0.14) 0%, transparent 68%) !important;
  filter: blur(80px) !important;
  animation: driftThree 28s ease-in-out infinite alternate !important;
}

.aurora-orb.orb-4, .aurora-orb.orb-5, .aurora-beam {
  display: none !important;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}

@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(0.96); }
  50% { transform: translate(-50px, -40px) scale(1.06); }
  100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1.04); }
  50% { transform: translate(30px, -40px) scale(0.96); }
  100% { transform: translate(-30px, 30px) scale(1.05); }
}

.ambient-spotlight {
  position: absolute !important;
  width: 650px !important;
  height: 650px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.07) 0%, rgba(213, 155, 118, 0.02) 40%, transparent 70%) !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
  mix-blend-mode: screen !important;
}

.petals-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.petal-particle {
  position: absolute !important;
  border-radius: 60% 0 60% 0 !important;
  background: linear-gradient(135deg, rgba(244, 206, 180, 0.45) 0%, rgba(213, 155, 118, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(244, 206, 180, 0.3) !important;
  pointer-events: none !important;
  will-change: transform, opacity !important;
  animation: fallPetal linear infinite !important;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% {
    transform: translateY(105vh) rotate(360deg) scale(1.1);
    opacity: 0;
  }
}

.btn-arrow-icon,
.btn-arrow-wrap {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION FULL-PAGE PORTAL (EXACT 50% / 50% SYMMETRICAL SPLIT)
   ========================================================================== */
#auth-overlay,
.auth-fullpage-portal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: row !important;
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  overflow: hidden !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth-overlay.hidden {
  display: none !important;
}

/* --- LEFT SIDE: HERO BRAND PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
.auth-hero-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  overflow: hidden !important;
  border-right: 1px solid rgba(213, 155, 118, 0.16) !important;
  background: radial-gradient(circle at 40% 45%, rgba(42, 28, 36, 0.5) 0%, rgba(13, 10, 12, 0.85) 100%) !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
}

.hero-pane-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 580px;
  height: 580px;
  pointer-events: none;
  opacity: 0.08;
  filter: drop-shadow(0 0 50px rgba(244, 206, 180, 0.35));
  z-index: 0;
}

.hero-pane-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.hero-pane-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-bottom: 26px;
  transition: transform 0.25s ease;
}

.hero-pane-brand:hover {
  transform: translateY(-2px);
}

.brand-logo-glow-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.12);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(213, 155, 118, 0.3);
}

.hero-brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-brand-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-pane-message {
  margin-bottom: 24px;
}

.hero-pane-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-pane-sub {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-pane-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-feature-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(213, 155, 118, 0.06);
  border: 1px solid rgba(213, 155, 118, 0.16);
  transition: all 0.25s ease;
}

.hero-feature-pill:hover {
  background: rgba(213, 155, 118, 0.12);
  border-color: rgba(244, 206, 180, 0.35);
  transform: translateX(3px);
}

.feature-icon {
  font-size: 18px;
  line-height: 1;
}

.feature-text {
  display: flex;
  flex-direction: column;
}

.feature-text strong {
  font-size: 0.88rem;
  color: #FFFFFF;
  font-weight: 600;
}

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

.hero-pane-quote {
  border-left: 2px solid rgba(213, 155, 118, 0.4);
  padding-left: 14px;
  font-style: italic;
  color: var(--rose-gold-light);
  opacity: 0.85;
  font-size: 0.86rem;
}

/* --- RIGHT SIDE: AUTH FORM PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
#auth-card,
.auth-form-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  background: rgba(18, 13, 17, 0.84) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  border-left: 1px solid rgba(213, 155, 118, 0.16) !important;
  border-radius: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Form Wrapper centered inside the right 50% column */
.auth-form-wrapper {
  width: 100% !important;
  max-width: 420px !important;
  margin: auto !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;
}

.mobile-auth-brand {
  display: none;
}

.auth-header-desktop {
  text-align: center !important;
  margin-bottom: 18px !important;
}

.auth-title-large {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center !important;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.auth-subtitle-refined {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center !important;
}

/* Tabs */
.auth-tab-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(13, 10, 12, 0.75);
  border: 1px solid rgba(213, 155, 118, 0.22);
  border-radius: 10px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #BFAEA6;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(213, 155, 118, 0.24) 0%, rgba(183, 125, 88, 0.18) 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(244, 206, 180, 0.4) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

/* 2-Column Responsive Form Row */


.auth-field-group {
  margin-bottom: 12px;
}



.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  width: 100% !important;
  height: 40px !important;
  padding: 0 13px !important;
  font-size: 0.88rem !important;
  background-color: rgba(26, 18, 23, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.24) !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: var(--font-sans) !important;
  box-sizing: border-box !important;
}

.auth-input-wrap input:focus {
  outline: none !important;
  border-color: #D59B76 !important;
  background-color: rgba(32, 22, 29, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.25), 0 0 16px rgba(213, 155, 118, 0.18) !important;
}

.auth-input-wrap.email-suffix-wrap input {
  padding-right: 120px !important;
}



.auth-input-wrap.password-wrap input {
  padding-right: 40px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #A39188;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: #FFFFFF;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.forgot-pass-link {
  font-size: 0.82rem;
  color: var(--rose-gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-pass-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Submit Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  width: 100% !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  box-shadow: 0 4px 16px rgba(181, 111, 74, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  margin-top: 4px !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 22px rgba(213, 155, 118, 0.6) !important;
  transform: translateY(-1px) !important;
}

.auth-back-btn {
  width: 100% !important;
  height: 38px !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-secondary) !important;
  background: rgba(213, 155, 118, 0.08) !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.auth-back-btn:hover {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #FFFFFF !important;
}

/* Terms Checkbox */
.auth-terms-wrap {
  margin-bottom: 12px;
}

.auth-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.terms-checkbox {
  margin-top: 2px;
  accent-color: #D59B76;
  width: 14px;
  height: 14px;
  cursor: pointer;
  border-radius: 3px;
  flex-shrink: 0;
}

.terms-text {
  font-size: 11px;
  color: #A1A1AA;
  line-height: 1.45;
}

.terms-text a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal Footer */
.auth-legal-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(213, 155, 118, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #8C7870;
}

.auth-legal-footer a {
  color: #A39188;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-legal-footer a:hover {
  color: #FFFFFF;
}

.auth-legal-sep {
  color: rgba(213, 155, 118, 0.3);
}

/* 2FA UI */
.auth-2fa-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-light);
  box-shadow: 0 0 16px rgba(213, 155, 118, 0.25);
  margin-bottom: 10px;
}

.auth-2fa-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.auth-2fa-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.input-2fa-code {
  text-align: center !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 4px !important;
  font-family: monospace !important;
}

/* Alerts */
.auth-alert-box {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.auth-alert-box.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.alert-success {
  background-color: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.35);
  color: #86EFAC;
}

/* High z-index for floating popups and modals over full-page auth */
#legal-modal,
#forgot-password-modal,
.compose-modal-backdrop:not(#auth-overlay) {
  z-index: 2500 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 960px) {
  #auth-overlay,
  .auth-fullpage-portal {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: 100vh !important;
  }

  .auth-hero-pane {
    display: none !important;
  }

  #auth-card,
  .auth-form-pane {
    flex: 1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 28px 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-left: none !important;
  }

  

  .mobile-auth-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  .mobile-logo-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    margin-bottom: 8px !important;
    filter: drop-shadow(0 4px 20px rgba(213, 155, 118, 0.45)) !important;
  }

  .mobile-brand-title {
    font-family: var(--font-serif) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  .mobile-brand-sub {
    font-size: 12.5px !important;
    color: var(--rose-gold-light) !important;
    opacity: 0.85 !important;
  }

  .auth-header-desktop {
    display: none !important;
  }
}

/* Fixed equal height labels to guarantee perfect horizontal input alignment */
.auth-field-label {
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 5px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 15px !important;
  height: 15px !important;
}

.auth-grid-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  align-items: flex-start !important;
}

.auth-grid-row .auth-field-group {
  margin-bottom: 0 !important;
}


/* Suffix @taoyame.com - Pure transparent text, NO background or box */
.domain-fixed-badge {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-left: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--rose-gold-light) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  font-family: var(--font-sans) !important;
  letter-spacing: 0.02em !important;
  pointer-events: none !important;
  opacity: 0.85 !important;
}

.auth-input-wrap.email-suffix-wrap input {
  padding-right: 110px !important;
}
/* ==========================================================================
   TAOYAME FLORAL DESIGN SYSTEM — REFINED FULL-PAGE PORTAL
   Theme: Luminous Velvet Mocha, Plum-Noir & Rose-Gold Champagne
   Exact 50/50 Symmetrical Split, Perfectly Centered on Both Halves
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #0D0A0C;
  --bg-velvet: #130E12;
  --bg-app: #0D0A0C !important;
  --bg-sidebar: #130E12 !important;
  --bg-card: rgba(28, 20, 25, 0.88) !important;
  --bg-card-hover: rgba(38, 27, 34, 0.94) !important;
  --bg-input: #150F14 !important;
  
  --border-light: rgba(213, 155, 118, 0.16) !important;
  --border-card: rgba(213, 155, 118, 0.28) !important;
  --border-input: rgba(213, 155, 118, 0.28) !important;
  
  --blue-primary: #D59B76 !important;
  --blue-hover: #E2AC8D !important;
  --blue-active: #B77D58 !important;
  --blue-subtle: rgba(213, 155, 118, 0.14) !important;
  --blue-border: rgba(213, 155, 118, 0.35) !important;
  --blue-focus-ring: rgba(213, 155, 118, 0.3) !important;
  
  --rose-gold: #D59B76;
  --rose-gold-light: #F4CEB4;
  --champagne: #F1BE91;
  --bronze-rich: #B77D58;
  --bronze-deep: #925838;
  
  --font-serif: 'Cinzel', serif;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Body & HTML Reset */
html, body {
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  background-attachment: fixed !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* ==========================================================================
   GLOBAL FLORAL AMBIENT BACKGROUND
   ========================================================================== */
.ambient-bg,
#ambient-bg,
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.ambient-watermark {
  position: absolute !important;
  top: 8% !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(-6deg) !important;
  width: 680px !important;
  height: 680px !important;
  pointer-events: none !important;
  opacity: 0.075 !important;
  filter: drop-shadow(0 0 60px rgba(244, 206, 180, 0.35)) !important;
  will-change: transform !important;
  z-index: 0 !important;
}

.watermark-flower {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.ambient-shape {
  position: absolute !important;
  will-change: transform !important;
}

.shape-orb-1, .aurora-orb.orb-1 {
  top: -5% !important;
  left: 25% !important;
  width: 600px !important;
  height: 600px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.18) 0%, rgba(213, 155, 118, 0.08) 40%, transparent 70%) !important;
  filter: blur(80px) !important;
  animation: driftOne 22s ease-in-out infinite alternate !important;
}

.shape-orb-2, .aurora-orb.orb-2 {
  top: 35% !important;
  right: -5% !important;
  width: 520px !important;
  height: 520px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(213, 155, 118, 0.16) 0%, rgba(183, 125, 88, 0.06) 45%, transparent 70%) !important;
  filter: blur(85px) !important;
  animation: driftTwo 26s ease-in-out infinite alternate !important;
}

.shape-orb-3, .aurora-orb.orb-3 {
  bottom: 0% !important;
  left: -5% !important;
  width: 480px !important;
  height: 480px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(183, 125, 88, 0.14) 0%, transparent 68%) !important;
  filter: blur(80px) !important;
  animation: driftThree 28s ease-in-out infinite alternate !important;
}

.aurora-orb.orb-4, .aurora-orb.orb-5, .aurora-beam {
  display: none !important;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 20px) scale(0.96); }
}

@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(0.96); }
  50% { transform: translate(-50px, -40px) scale(1.06); }
  100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1.04); }
  50% { transform: translate(30px, -40px) scale(0.96); }
  100% { transform: translate(-30px, 30px) scale(1.05); }
}

.ambient-spotlight {
  position: absolute !important;
  width: 650px !important;
  height: 650px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(244, 206, 180, 0.07) 0%, rgba(213, 155, 118, 0.02) 40%, transparent 70%) !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
  mix-blend-mode: screen !important;
}

.petals-container {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.petal-particle {
  position: absolute !important;
  border-radius: 60% 0 60% 0 !important;
  background: linear-gradient(135deg, rgba(244, 206, 180, 0.45) 0%, rgba(213, 155, 118, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(244, 206, 180, 0.3) !important;
  pointer-events: none !important;
  will-change: transform, opacity !important;
  animation: fallPetal linear infinite !important;
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% {
    transform: translateY(105vh) rotate(360deg) scale(1.1);
    opacity: 0;
  }
}

.btn-arrow-icon,
.btn-arrow-wrap {
  display: none !important;
}

/* ==========================================================================
   AUTHENTICATION FULL-PAGE PORTAL (EXACT 50% / 50% SYMMETRICAL SPLIT)
   ========================================================================== */
#auth-overlay,
.auth-fullpage-portal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: row !important;
  background: radial-gradient(ellipse at 50% 15%, #241820 0%, #150F14 45%, #0D0A0C 100%) !important;
  overflow: hidden !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#auth-overlay.hidden {
  display: none !important;
}

/* --- LEFT SIDE: HERO BRAND PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
.auth-hero-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  overflow: hidden !important;
  border-right: 1px solid rgba(213, 155, 118, 0.16) !important;
  background: radial-gradient(circle at 40% 45%, rgba(42, 28, 36, 0.5) 0%, rgba(13, 10, 12, 0.85) 100%) !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
}

.hero-pane-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 580px;
  height: 580px;
  pointer-events: none;
  opacity: 0.08;
  filter: drop-shadow(0 0 50px rgba(244, 206, 180, 0.35));
  z-index: 0;
}

.hero-pane-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.hero-pane-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-bottom: 26px;
  transition: transform 0.25s ease;
}

.hero-pane-brand:hover {
  transform: translateY(-2px);
}

.brand-logo-glow-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.12);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(213, 155, 118, 0.3);
}

.hero-brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-brand-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-pane-message {
  margin-bottom: 24px;
}

.hero-pane-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-pane-sub {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-pane-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-feature-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(213, 155, 118, 0.06);
  border: 1px solid rgba(213, 155, 118, 0.16);
  transition: all 0.25s ease;
}

.hero-feature-pill:hover {
  background: rgba(213, 155, 118, 0.12);
  border-color: rgba(244, 206, 180, 0.35);
  transform: translateX(3px);
}

.feature-icon {
  font-size: 18px;
  line-height: 1;
}

.feature-text {
  display: flex;
  flex-direction: column;
}

.feature-text strong {
  font-size: 0.88rem;
  color: #FFFFFF;
  font-weight: 600;
}

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

.hero-pane-quote {
  border-left: 2px solid rgba(213, 155, 118, 0.4);
  padding-left: 14px;
  font-style: italic;
  color: var(--rose-gold-light);
  opacity: 0.85;
  font-size: 0.86rem;
}

/* --- RIGHT SIDE: AUTH FORM PANE (EXACT 50% WIDTH, FULLY CENTERED) --- */
#auth-card,
.auth-form-pane {
  flex: 1 1 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  min-width: 50% !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 40px !important;
  background: rgba(18, 13, 17, 0.84) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  border-left: 1px solid rgba(213, 155, 118, 0.16) !important;
  border-radius: 0 !important;
  position: relative !important;
  z-index: 10 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Form Wrapper centered inside the right 50% column */
.auth-form-wrapper {
  width: 100% !important;
  max-width: 420px !important;
  margin: auto !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;
}

.mobile-auth-brand {
  display: none;
}

.auth-header-desktop {
  text-align: center !important;
  margin-bottom: 18px !important;
}

.auth-title-large {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center !important;
  background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.auth-subtitle-refined {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center !important;
}

/* Tabs */
.auth-tab-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(13, 10, 12, 0.75);
  border: 1px solid rgba(213, 155, 118, 0.22);
  border-radius: 10px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #BFAEA6;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(213, 155, 118, 0.24) 0%, rgba(183, 125, 88, 0.18) 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(244, 206, 180, 0.4) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

/* 2-Column Responsive Form Row */


.auth-field-group {
  margin-bottom: 12px;
}



.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  width: 100% !important;
  height: 40px !important;
  padding: 0 13px !important;
  font-size: 0.88rem !important;
  background-color: rgba(26, 18, 23, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.24) !important;
  border-radius: 9px !important;
  color: #FFFFFF !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: var(--font-sans) !important;
  box-sizing: border-box !important;
}

.auth-input-wrap input:focus {
  outline: none !important;
  border-color: #D59B76 !important;
  background-color: rgba(32, 22, 29, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(213, 155, 118, 0.25), 0 0 16px rgba(213, 155, 118, 0.18) !important;
}

.auth-input-wrap.email-suffix-wrap input {
  padding-right: 120px !important;
}



.auth-input-wrap.password-wrap input {
  padding-right: 40px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #A39188;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: #FFFFFF;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.forgot-pass-link {
  font-size: 0.82rem;
  color: var(--rose-gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-pass-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Submit Buttons */
.auth-submit-btn,
button.auth-submit-btn {
  width: 100% !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  color: #140804 !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(244, 206, 180, 0.6) !important;
  box-shadow: 0 4px 16px rgba(181, 111, 74, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  margin-top: 4px !important;
}

.auth-submit-btn:hover,
button.auth-submit-btn:hover {
  background: linear-gradient(135deg, #C57D58 0%, #E2AC8D 50%, #F8DEC9 100%) !important;
  box-shadow: 0 6px 22px rgba(213, 155, 118, 0.6) !important;
  transform: translateY(-1px) !important;
}

.auth-back-btn {
  width: 100% !important;
  height: 38px !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-secondary) !important;
  background: rgba(213, 155, 118, 0.08) !important;
  border: 1px solid rgba(213, 155, 118, 0.2) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.auth-back-btn:hover {
  background: rgba(213, 155, 118, 0.16) !important;
  color: #FFFFFF !important;
}



/* Legal Footer */
.auth-legal-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(213, 155, 118, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #8C7870;
}

.auth-legal-footer a {
  color: #A39188;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-legal-footer a:hover {
  color: #FFFFFF;
}

.auth-legal-sep {
  color: rgba(213, 155, 118, 0.3);
}

/* 2FA UI */
.auth-2fa-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(213, 155, 118, 0.14);
  border: 1px solid rgba(244, 206, 180, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-gold-light);
  box-shadow: 0 0 16px rgba(213, 155, 118, 0.25);
  margin-bottom: 10px;
}

.auth-2fa-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.auth-2fa-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.input-2fa-code {
  text-align: center !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 4px !important;
  font-family: monospace !important;
}

/* Alerts */
.auth-alert-box {
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.auth-alert-box.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert-box.alert-success {
  background-color: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.35);
  color: #86EFAC;
}

/* High z-index for floating popups and modals over full-page auth */
#legal-modal,
#forgot-password-modal,
.compose-modal-backdrop:not(#auth-overlay) {
  z-index: 2500 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 960px) {
  #auth-overlay,
  .auth-fullpage-portal {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: 100vh !important;
  }

  .auth-hero-pane {
    display: none !important;
  }

  #auth-card,
  .auth-form-pane {
    flex: 1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 28px 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-left: none !important;
  }

  

  .mobile-auth-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  .mobile-logo-img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    margin-bottom: 8px !important;
    filter: drop-shadow(0 4px 20px rgba(213, 155, 118, 0.45)) !important;
  }

  .mobile-brand-title {
    font-family: var(--font-serif) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    background: linear-gradient(135deg, #FFFFFF 30%, #F4CEB4 70%, #D59B76 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  .mobile-brand-sub {
    font-size: 12.5px !important;
    color: var(--rose-gold-light) !important;
    opacity: 0.85 !important;
  }

  .auth-header-desktop {
    display: none !important;
  }
}

/* Fixed equal height labels to guarantee perfect horizontal input alignment */
.auth-field-label {
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 5px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 15px !important;
  height: 15px !important;
}

.auth-grid-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  align-items: flex-start !important;
}

.auth-grid-row .auth-field-group {
  margin-bottom: 0 !important;
}


/* Suffix @taoyame.com - Pure transparent text, NO background or box */
.domain-fixed-badge {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-left: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--rose-gold-light) !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  font-family: var(--font-sans) !important;
  letter-spacing: 0.02em !important;
  pointer-events: none !important;
  opacity: 0.85 !important;
}

.auth-input-wrap.email-suffix-wrap input {
  padding-right: 110px !important;
}


/* ==========================================================================
   UNIFIED LUXURY CUSTOM CHECKBOX (LOGIN & REGISTRATION)
   ========================================================================== */
.custom-checkbox-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  cursor: pointer !important;
  user-select: none !important;
}

.custom-checkbox-wrap input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

.custom-checkbox {
  width: 17px !important;
  height: 17px !important;
  background-color: rgba(26, 18, 23, 0.85) !important;
  border: 1px solid rgba(213, 155, 118, 0.28) !important;
  border-radius: 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.custom-checkbox svg {
  display: none !important;
  stroke: #140804 !important;
}

.custom-checkbox-wrap input[type="checkbox"]:checked + .custom-checkbox {
  background: linear-gradient(135deg, #B56F4A 0%, #D59B76 50%, #F1BE91 100%) !important;
  border-color: rgba(244, 206, 180, 0.85) !important;
  box-shadow: 0 0 12px rgba(213, 155, 118, 0.45) !important;
}

.custom-checkbox-wrap input[type="checkbox"]:checked + .custom-checkbox svg {
  display: block !important;
}

.custom-checkbox-wrap:hover .custom-checkbox {
  border-color: rgba(244, 206, 180, 0.6) !important;
}

.checkbox-label {
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  transition: color 0.15s ease !important;
}

.checkbox-label.terms-text {
  font-size: 11.5px !important;
  color: #A1A1AA !important;
  line-height: 1.45 !important;
}

.checkbox-label.terms-text a {
  color: #FFFFFF !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}
