/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.list-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid #c4c5d5;
  border-radius: 0.375rem;
  background: #fff;
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.list-link:hover { background-color: #f1f3ff; }

/* Sidebar Collapse (Icon-Rail & Peeking) */
.sidebar-spacer {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 40;
  width: 16rem;
  align-self: stretch;
  min-height: 100vh;
  transition: width 200ms ease;
}
.sidebar-spacer.sidebar-collapsed {
  width: 4.5rem;
}

.sidebar-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16rem;
  overflow: hidden;
  min-height: 0;
  transition: width 200ms ease, box-shadow 200ms ease;
  z-index: 40;
  display: flex;
  flex-direction: column;
}
.sidebar-spacer.sidebar-collapsed .sidebar-panel {
  width: 4.5rem;
}
.sidebar-spacer.sidebar-collapsed.sidebar-peeking .sidebar-panel {
  width: 16rem;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 4rem;
  padding: 0 1rem;
  flex-shrink: 0;
}
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0.25rem;
  border-radius: 0.375rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #94a3b8;
  transition: color 150ms ease, background-color 150ms ease;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  color: #1e293b;
  background-color: #e2e8f0;
}
.sidebar-toggle-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
}

.sidebar-icon-collapse { display: block; }
.sidebar-icon-expand   { display: none; }
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-icon-collapse { display: none !important; }
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-icon-expand   { display: block !important; }

.sidebar-collapsed:not(.sidebar-peeking) .sidebar-header-full,
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-brand-name,
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-user-info,
.sidebar-collapsed:not(.sidebar-peeking) .sidenav-link span:not(.material-symbols-outlined),
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-link span:not(.material-symbols-outlined),
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-footer-text {
  display: none !important;
}

.sidebar-collapsed:not(.sidebar-peeking) .sidebar-header {
  justify-content: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}
.sidebar-collapsed:not(.sidebar-peeking) .sidenav-link,
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-link {
  justify-content: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  gap: 0 !important;
}
.sidebar-collapsed:not(.sidebar-peeking) .sidebar-footer-btn {
  justify-content: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  gap: 0 !important;
}

/* Sidebar Nav Links Base & Layout (Light Mode / Public Layout) */
.sidenav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: #475569;
  background-color: transparent;
  transition: background-color 150ms ease, color 150ms ease;
  cursor: pointer;
  white-space: nowrap;
}
.sidenav-link .material-symbols-outlined {
  color: #64748b;
  transition: color 150ms ease;
}
.sidenav-link:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}
.sidenav-link:hover .material-symbols-outlined {
  color: #0f172a;
}
.sidenav-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  background-color: #e2e8f0;
  color: #0f172a;
}
.sidenav-link:focus-visible .material-symbols-outlined {
  color: #0f172a;
}
.sidenav-link.active {
  background-color: #1e40af !important;
  color: #ffffff !important;
  font-weight: 700;
}
.sidenav-link.active .material-symbols-outlined {
  color: #ffffff !important;
}
.sidenav-link.active:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
}
.sidenav-link.active:focus-visible {
  outline: 2px solid #60a5fa !important;
  outline-offset: 2px;
}

/* Dark Sidebar Variant (Used in Admin Portal & Mobile Overlay) */
.sidebar-panel-dark .sidenav-link,
aside.sidebar-panel-dark .sidenav-link,
aside[style*="background:#1e293b"] .sidenav-link,
aside[style*="background: #1e293b"] .sidenav-link,
#mobile-sidebar .sidenav-link {
  color: #e2e8f0;
  background-color: transparent;
}
.sidebar-panel-dark .sidenav-link .material-symbols-outlined,
aside.sidebar-panel-dark .sidenav-link .material-symbols-outlined,
aside[style*="background:#1e293b"] .sidenav-link .material-symbols-outlined,
aside[style*="background: #1e293b"] .sidenav-link .material-symbols-outlined,
#mobile-sidebar .sidenav-link .material-symbols-outlined {
  color: #94a3b8;
}
.sidebar-panel-dark .sidenav-link:hover,
aside.sidebar-panel-dark .sidenav-link:hover,
aside[style*="background:#1e293b"] .sidenav-link:hover,
aside[style*="background: #1e293b"] .sidenav-link:hover,
#mobile-sidebar .sidenav-link:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}
.sidebar-panel-dark .sidenav-link:hover .material-symbols-outlined,
aside.sidebar-panel-dark .sidenav-link:hover .material-symbols-outlined,
aside[style*="background:#1e293b"] .sidenav-link:hover .material-symbols-outlined,
aside[style*="background: #1e293b"] .sidenav-link:hover .material-symbols-outlined,
#mobile-sidebar .sidenav-link:hover .material-symbols-outlined {
  color: #ffffff !important;
}
.sidebar-panel-dark .sidenav-link:focus-visible,
aside.sidebar-panel-dark .sidenav-link:focus-visible,
aside[style*="background:#1e293b"] .sidenav-link:focus-visible,
aside[style*="background: #1e293b"] .sidenav-link:focus-visible,
#mobile-sidebar .sidenav-link:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px;
  background-color: #334155 !important;
  color: #ffffff !important;
}
.sidebar-panel-dark .sidenav-link:focus-visible .material-symbols-outlined,
aside.sidebar-panel-dark .sidenav-link:focus-visible .material-symbols-outlined,
aside[style*="background:#1e293b"] .sidenav-link:focus-visible .material-symbols-outlined,
aside[style*="background: #1e293b"] .sidenav-link:focus-visible .material-symbols-outlined,
#mobile-sidebar .sidenav-link:focus-visible .material-symbols-outlined {
  color: #ffffff !important;
}
.sidebar-panel-dark .sidenav-link.active,
aside.sidebar-panel-dark .sidenav-link.active,
aside[style*="background:#1e293b"] .sidenav-link.active,
aside[style*="background: #1e293b"] .sidenav-link.active,
#mobile-sidebar .sidenav-link.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
}
.sidebar-panel-dark .sidenav-link.active .material-symbols-outlined,
aside.sidebar-panel-dark .sidenav-link.active .material-symbols-outlined,
aside[style*="background:#1e293b"] .sidenav-link.active .material-symbols-outlined,
aside[style*="background: #1e293b"] .sidenav-link.active .material-symbols-outlined,
#mobile-sidebar .sidenav-link.active .material-symbols-outlined {
  color: #ffffff !important;
}
.sidebar-panel-dark .sidenav-link.active:hover,
aside.sidebar-panel-dark .sidenav-link.active:hover,
aside[style*="background:#1e293b"] .sidenav-link.active:hover,
aside[style*="background: #1e293b"] .sidenav-link.active:hover,
#mobile-sidebar .sidenav-link.active:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Sidebar Footer Buttons */
.sidebar-footer-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #475569;
  font-family: inherit;
  transition: background-color 150ms ease, color 150ms ease;
  width: 100%;
}
.sidebar-footer-btn .material-symbols-outlined {
  color: #64748b;
  transition: color 150ms ease;
}
.sidebar-footer-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}
.sidebar-footer-btn:hover .material-symbols-outlined {
  color: #0f172a;
}
.sidebar-footer-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  background-color: #e2e8f0;
}
.sidebar-panel-dark .sidebar-footer-btn,
aside.sidebar-panel-dark .sidebar-footer-btn,
aside[style*="background:#1e293b"] .sidebar-footer-btn,
aside[style*="background: #1e293b"] .sidebar-footer-btn,
#mobile-sidebar .sidebar-footer-btn {
  color: #e2e8f0;
}
.sidebar-panel-dark .sidebar-footer-btn .material-symbols-outlined,
aside.sidebar-panel-dark .sidebar-footer-btn .material-symbols-outlined,
aside[style*="background:#1e293b"] .sidebar-footer-btn .material-symbols-outlined,
aside[style*="background: #1e293b"] .sidebar-footer-btn .material-symbols-outlined,
#mobile-sidebar .sidebar-footer-btn .material-symbols-outlined {
  color: #94a3b8;
}
.sidebar-panel-dark .sidebar-footer-btn:hover,
aside.sidebar-panel-dark .sidebar-footer-btn:hover,
aside[style*="background:#1e293b"] .sidebar-footer-btn:hover,
aside[style*="background: #1e293b"] .sidebar-footer-btn:hover,
#mobile-sidebar .sidebar-footer-btn:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}
.sidebar-panel-dark .sidebar-footer-btn:hover .material-symbols-outlined,
aside.sidebar-panel-dark .sidebar-footer-btn:hover .material-symbols-outlined,
aside[style*="background:#1e293b"] .sidebar-footer-btn:hover .material-symbols-outlined,
aside[style*="background: #1e293b"] .sidebar-footer-btn:hover .material-symbols-outlined,
#mobile-sidebar .sidebar-footer-btn:hover .material-symbols-outlined {
  color: #ffffff !important;
}
.sidebar-panel-dark .sidebar-footer-btn:focus-visible,
aside.sidebar-panel-dark .sidebar-footer-btn:focus-visible,
aside[style*="background:#1e293b"] .sidebar-footer-btn:focus-visible,
aside[style*="background: #1e293b"] .sidebar-footer-btn:focus-visible,
#mobile-sidebar .sidebar-footer-btn:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px;
  background-color: #334155 !important;
  color: #ffffff !important;
}

/* Inbound Emails Compact Toolbar & Single-line Stats */
.inbound-imap-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  color: #374151;
}
.inbound-imap-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  cursor: default;
  user-select: none;
  list-style: none;
  white-space: nowrap;
  overflow: hidden;
}
.inbound-imap-left {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbound-filter-bar {
  background: transparent;
  padding: 0;
  border: 0;
  border-radius: 0;
  margin-bottom: 0.5rem;
  width: 100%;
}
.inbound-filter-bar form,
.inbound-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
}
.inbound-filter-search {
  flex: 1 1 8rem;
  min-width: 7rem;
  max-width: 12.5rem;
}
.inbound-filter-bar input,
.inbound-filter-bar select,
.inbound-filter-bar .admin-input,
.inbound-filter-bar .admin-select {
  box-sizing: border-box;
  min-width: 0;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  line-height: 1;
  background-color: #ffffff;
  color: #1e293b;
}
.inbound-filter-bar select,
.inbound-filter-bar .admin-select {
  padding-right: 1.5rem;
}
.inbound-filter-bar input:focus,
.inbound-filter-bar select:focus {
  border-color: #1e40af;
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}
.inbound-filter-bar .admin-btn {
  height: 2rem;
  padding: 0 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Inline stats in the same toolbar level */
.inbound-stats-inline,
.inbound-stats-grid {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.inbound-stat-chip,
.inbound-stat-card {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 2rem;
  padding: 0 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.inbound-stat-chip:hover,
.inbound-stat-card:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}
.inbound-stat-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}
.inbound-stat-value {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .inbound-filter-bar form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
  }
  .inbound-filter-bar .inbound-filter-search {
    grid-column: span 2;
    min-width: 0;
    max-width: 100%;
  }
  .inbound-filter-bar select {
    width: 100%;
    min-width: 0;
  }
  .inbound-filter-bar .admin-btn {
    width: 100%;
    justify-content: center;
  }
  .inbound-stats-inline,
  .inbound-stats-grid {
    grid-column: span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: 0;
    margin-top: 0.25rem;
  }
  .inbound-stat-chip,
  .inbound-stat-card {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 0.375rem;
  }
}

.inbound-table-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Compact list pagination (public inbound mailbox) */
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.75rem;
  color: #64748b;
}
.admin-pagination-range {
  margin: 0;
}
.admin-pagination-page-meta {
  color: #94a3b8;
  margin-left: 0.25rem;
}
.admin-pagination-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.admin-pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.admin-pagination-link:hover {
  border-color: #7dd3fc;
  background: #f0f9ff;
  color: #0369a1;
}
.admin-pagination-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}
.admin-pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  background: #0ea5e9;
  color: #ffffff;
  font-weight: 700;
}
html[data-theme="dark"] .admin-pagination {
  border-top-color: #334155;
  color: #94a3b8;
}
html[data-theme="dark"] .admin-pagination-link {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .admin-pagination-link:hover {
  background: #334155;
  border-color: #38bdf8;
  color: #7dd3fc;
}
html[data-theme="dark"] .admin-pagination-current {
  background: #0284c7;
}
.inbound-table {
  width: 100%;
  font-size: 0.75rem;
  border-collapse: collapse;
  text-align: left;
}
.inbound-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.375rem 0.5rem;
  white-space: nowrap;
}
.inbound-table td {
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
  vertical-align: middle;
}
.inbound-table tr:hover {
  background-color: #f1f5f9;
}
.inbound-table tr:last-child td {
  border-bottom: none;
}
.inbound-subject-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
}
.inbound-subject-text {
  font-weight: 500;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .inbound-table thead {
    display: none;
  }
  .inbound-table,
  .inbound-table tbody,
  .inbound-table tr {
    display: block;
    width: 100%;
  }
  .inbound-table tr {
    position: relative;
    padding: 0.625rem 0.75rem 0.625rem 2.625rem;
    border-bottom: 1px solid #e2e8f0;
  }
  .inbound-table tr:last-child {
    border-bottom: none;
  }
  .inbound-table td {
    display: block;
    width: 100%;
    padding: 0;
    border-bottom: none;
    white-space: normal;
  }
  .inbound-table td.admin-col-detail {
    position: absolute;
    left: 0.5rem;
    top: 0.625rem;
    width: 1.75rem;
    height: 1.75rem;
  }
  .inbound-table td.inbound-col-sender {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    max-width: 100%;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.125rem;
  }
  .inbound-table td.inbound-col-subject {
    max-width: 100%;
    margin-bottom: 0.375rem;
  }
  .inbound-table td.inbound-col-subject .inbound-subject-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
  }
  .inbound-table td.inbound-col-subject .inbound-subject-text {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .inbound-table td.inbound-col-category,
  .inbound-table td.inbound-col-status,
  .inbound-table td.inbound-col-publish,
  .inbound-table td.inbound-col-time {
    display: inline-flex;
    vertical-align: middle;
    width: auto;
    margin-right: 0.25rem;
    margin-bottom: 0.125rem;
  }
  .inbound-table td.inbound-col-time {
    margin-right: 0;
    font-size: 0.6875rem;
    color: #94a3b8;
  }
}

/* Global & Inbound SVG Icon Safety Rules */
svg {
  max-width: 100%;
}
.inbound-icon-svg {
  width: 0.875rem !important;
  height: 0.875rem !important;
  min-width: 0.875rem !important;
  min-height: 0.875rem !important;
  max-width: 0.875rem !important;
  max-height: 0.875rem !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Inbound Email Detail Design System Tokens */
.inbound-detail-container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.inbound-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.inbound-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  background-color: #f8fafc;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.inbound-card-body {
  padding: 0.75rem;
}
.inbound-body-container {
  overflow-x: hidden;
  background-color: #ffffff;
  padding: 0.875rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #1e293b;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.inbound-body-container img,
.inbound-body-container video,
.inbound-body-container canvas {
  max-width: 100% !important;
  max-height: 480px !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  margin: 0.5rem 0 !important;
  border-radius: 6px !important;
}
.inbound-body-container svg:not(.inbound-icon-svg) {
  max-width: 100% !important;
  max-height: 480px !important;
  height: auto !important;
}
.inbound-body-container table {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  overflow-x: auto !important;
  border-collapse: collapse !important;
  margin: 0.5rem 0 !important;
}
.inbound-body-container pre,
.inbound-body-container code {
  max-width: 100% !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}
.inbound-body-container p {
  margin-bottom: 0.5rem;
}
.inbound-body-container p:last-child {
  margin-bottom: 0;
}

/* Attachment row */
.inbound-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.375rem 0.625rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background-color: #f8fafc;
  font-size: 0.75rem;
  transition: background-color 0.15s ease-in-out;
}
.inbound-attachment-row:hover {
  background-color: #f1f5f9;
}

/* Inbound Email Timeline Step Control */
.inbound-timeline-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.375rem;
  padding: 0.375rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}
.inbound-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.25rem;
  border-radius: 0.375rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-align: center;
}
.inbound-timeline-step:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}
.inbound-timeline-step:has(input:checked) {
  border-color: #0369a1 !important;
  background-color: #f0f9ff !important;
  box-shadow: 0 1px 2px 0 rgba(3, 105, 161, 0.15);
}
.inbound-timeline-step:has(input:checked) .inbound-timeline-title {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* Inbound Email Category Radio Options */
.inbound-radio-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.375rem;
}
@media (min-width: 640px) {
  .inbound-radio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.inbound-radio-label {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  min-height: 36px !important;
  padding: 0.375rem 0.625rem !important;
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.5rem !important;
  background-color: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
}
.inbound-radio-label:hover {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
.inbound-radio-label:has(input:checked) {
  border-color: #0369a1 !important;
  background-color: #f0f9ff !important;
}
.inbound-radio-input {
  position: static !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  flex: 0 0 16px !important;
  margin: 0 !important;
  accent-color: #0284c7 !important;
  cursor: pointer !important;
}
.inbound-radio-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  line-height: 1.25 !important;
}
.inbound-radio-label:has(input:checked) .inbound-radio-text {
  color: #0369a1 !important;
  font-weight: 600 !important;
}

/* Compact inbound detail controls */
.inbound-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}
.inbound-status-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: min(100%, 34rem);
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font: 600 0.75rem/1.25rem inherit;
  text-align: left;
}
.inbound-status-summary:hover,
.inbound-status-summary:focus-visible {
  border-color: #7dd3fc;
  background: #f8fafc;
  outline: none;
}
.inbound-status-summary-more {
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 500;
}
.inbound-compact-alert {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid #fde68a;
  border-radius: 0.375rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.75rem;
  line-height: 1.35;
}
.inbound-compact-alert strong { flex-shrink: 0; }
.inbound-category-group {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
}
.inbound-category-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  color: #334155;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  list-style: none;
}
.inbound-category-group > summary::-webkit-details-marker { display: none; }
.inbound-category-group > summary::after { content: "＋"; color: #94a3b8; }
.inbound-category-group[open] > summary::after { content: "－"; }
.inbound-category-group > summary:hover { background: #f8fafc; }
.inbound-category-hint { color: #94a3b8; font-size: 0.6875rem; font-weight: 500; }
.inbound-category-group > .inbound-timeline-bar,
.inbound-category-group > .inbound-radio-grid { margin: 0 0.625rem 0.625rem; }
.inbound-attachment-details { border-top: 1px solid #f1f5f9; }
.inbound-attachment-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #475569;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  list-style: none;
}
.inbound-attachment-details > summary::-webkit-details-marker { display: none; }
.inbound-attachment-details > summary:hover { background: #f8fafc; }
.inbound-status-dialog {
  width: min(28rem, calc(100% - 2rem));
  max-width: 28rem;
}
.inbound-status-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.inbound-status-dialog-head h2 { margin: 0; color: #1e293b; font-size: 1rem; font-weight: 700; }
.inbound-status-dialog-badges { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.inbound-status-dialog-note {
  margin: 0.875rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
}
@media (max-width: 639px) {
  .inbound-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.375rem;
  }
  .inbound-status-summary {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: auto;
  }
}

/* Shared light/dark theme */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--app-theme-toggle-size, 2.25rem);
  height: var(--app-theme-toggle-size, 2.25rem);
  min-width: var(--app-theme-toggle-size, 2.25rem);
  min-height: var(--app-theme-toggle-size, 2.25rem);
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  overflow: visible;
  line-height: 1;
  transition: color 150ms ease, background-color 150ms ease;
}
.theme-toggle:hover {
  color: #1e293b;
  background: #f1f5f9;
}
.theme-toggle:focus-visible {
  color: #1e293b;
  background: #f1f5f9;
  outline: 2px solid #1e40af;
  outline-offset: 2px;
}
.theme-toggle:active {
  color: #0f172a;
  background: #e2e8f0;
}
.theme-toggle .material-symbols-outlined {
  font-size: 22px !important;
  width: 1.375rem;
  height: 1.375rem;
  line-height: 1.375rem;
  display: block;
  overflow: visible;
  flex-shrink: 0;
}
.theme-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-theme="dark"] body {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] header[style],
html[data-theme="dark"] nav[style*="background:#f9f9ff"],
html[data-theme="dark"] nav[style*="background: #f9f9ff"] {
  background: #111827 !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] aside[data-admin-sidebar-target="sidebar"] {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] aside[data-admin-sidebar-target="sidebar"] [style*="color:#00288e"],
html[data-theme="dark"] aside[data-admin-sidebar-target="sidebar"] [style*="color:#1e293b"] {
  color: #93c5fd !important;
}
html[data-theme="dark"] aside[data-admin-sidebar-target="sidebar"] [style*="color:#585f6c"],
html[data-theme="dark"] aside[data-admin-sidebar-target="sidebar"] [style*="color:#757684"] {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .sidebar-panel {
  background-color: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .sidebar-header {
  border-color: #334155 !important;
}
html[data-theme="dark"] .sidebar-footer {
  border-color: #334155 !important;
}
html[data-theme="dark"] .sidebar-toggle-btn {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .sidebar-toggle-btn:hover,
html[data-theme="dark"] .sidebar-toggle-btn:focus-visible {
  color: #f1f5f9 !important;
  background-color: #334155 !important;
}
html[data-theme="dark"] .sidebar-spacer.sidebar-collapsed.sidebar-peeking .sidebar-panel {
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .theme-toggle {
  background: transparent !important;
  border-color: transparent !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible {
  background: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .theme-toggle:active {
  background: #475569 !important;
}
html[data-theme="dark"] .list-link,
html[data-theme="dark"] .inbound-status-summary {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .list-link:hover,
html[data-theme="dark"] .inbound-status-summary:hover {
  background: #334155 !important;
  border-color: #64748b !important;
}
html[data-theme="dark"] .detail-icon-btn {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .detail-icon-btn:hover,
html[data-theme="dark"] .detail-icon-btn:focus-visible {
  color: #93c5fd !important;
  background: #334155 !important;
}
html[data-theme="dark"] .ds-table-card,
html[data-theme="dark"] .stack-table thead {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .stack-table tbody tr:hover,
html[data-theme="dark"] .inbound-table tr:hover,
html[data-theme="dark"] tr.hover\:bg-\[\#e8f4ff\]:hover {
  background-color: #334155 !important;
}
html[data-theme="dark"] .admin-input,
html[data-theme="dark"] .admin-select,
html[data-theme="dark"] .inbound-filter-bar input,
html[data-theme="dark"] .inbound-filter-bar select {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .admin-btn-primary {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .admin-btn-primary:hover,
html[data-theme="dark"] .admin-btn-primary:focus-visible {
  background-color: #1d4ed8 !important;
}
html[data-theme="dark"] .admin-btn-ghost,
html[data-theme="dark"] .admin-btn-delete {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .admin-btn-ghost:hover,
html[data-theme="dark"] .admin-btn-ghost:focus-visible {
  background-color: #334155 !important;
  border-color: #64748b !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .admin-btn-reject {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .admin-btn-reject:hover,
html[data-theme="dark"] .admin-btn-reject:focus-visible {
  background-color: #b91c1c !important;
}
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .card,
html[data-theme="dark"] .booking-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .inbound-card,
html[data-theme="dark"] section.bg-white,
html[data-theme="dark"] details.bg-white {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .bg-transparent,
html[data-theme="dark"] button.bg-transparent,
html[data-theme="dark"] form.button_to button.bg-transparent {
  background-color: transparent !important;
  background: transparent !important;
}
html[data-theme="dark"] .bg-gray-50,
html[data-theme="dark"] .bg-gray-50\/80,
html[data-theme="dark"] .bg-gray-100,
html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] .bg-slate-100,
html[data-theme="dark"] .bg-surface,
html[data-theme="dark"] .bg-background,
html[data-theme="dark"] .inbound-card-header {
  background-color: #111827 !important;
}
html[data-theme="dark"] .bg-gray-200,
html[data-theme="dark"] .bg-gray-300,
html[data-theme="dark"] .bg-slate-200,
html[data-theme="dark"] .bg-slate-300,
html[data-theme="dark"] button:disabled,
html[data-theme="dark"] input[type="submit"]:disabled {
  background-color: #334155 !important;
  color: #64748b !important;
  border-color: #475569 !important;
}
html[data-theme="dark"] .border-gray-50,
html[data-theme="dark"] .border-gray-100,
html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-300,
html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-300,
html[data-theme="dark"] .border-outline-variant {
  border-color: #334155 !important;
}
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-slate-700,
html[data-theme="dark"] .text-slate-600,
html[data-theme="dark"] .text-on-background,
html[data-theme="dark"] .text-on-surface,
html[data-theme="dark"] .app-topbar-title {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-gray-400,
html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-400 {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .text-gray-300,
html[data-theme="dark"] .text-slate-300 {
  color: #475569 !important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .admin-input:focus,
html[data-theme="dark"] .admin-select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
  outline: none !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .data-table thead,
html[data-theme="dark"] .inbound-table th {
  background-color: #334155 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .data-table tbody tr:hover {
  background-color: #334155 !important;
}
html[data-theme="dark"] .sidenav-link {
  color: #e2e8f0 !important;
  background-color: transparent !important;
}
html[data-theme="dark"] .sidenav-link .material-symbols-outlined {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .sidenav-link:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .sidenav-link:hover .material-symbols-outlined {
  color: #ffffff !important;
}
html[data-theme="dark"] .sidenav-link:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
  background-color: #334155 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .sidenav-link:focus-visible .material-symbols-outlined {
  color: #ffffff !important;
}
html[data-theme="dark"] .sidenav-link.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .sidenav-link.active .material-symbols-outlined {
  color: #ffffff !important;
}
html[data-theme="dark"] .sidenav-link.active:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .sidebar-footer-btn {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .sidebar-footer-btn .material-symbols-outlined {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .sidebar-footer-btn:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .sidebar-footer-btn:hover .material-symbols-outlined {
  color: #ffffff !important;
}
html[data-theme="dark"] .sidebar-footer-btn:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
  background-color: #334155 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .inbound-attachment-row,
html[data-theme="dark"] .inbound-category-group,
html[data-theme="dark"] .inbound-timeline-step,
html[data-theme="dark"] .inbound-radio-label,
html[data-theme="dark"] .inbound-stat-card,
html[data-theme="dark"] .inbound-imap-section,
html[data-theme="dark"] .inbound-filter-bar,
html[data-theme="dark"] .inbound-table-container {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .inbound-stat-card:hover {
  background-color: #334155 !important;
}
html[data-theme="dark"] .inbound-stat-label {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .inbound-subject-text {
  color: #f8fafc !important;
}
html[data-theme="dark"] .inbound-table tr:hover .inbound-subject-text {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .inbound-timeline-bar {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .inbound-timeline-step:hover,
html[data-theme="dark"] .inbound-radio-label:hover,
html[data-theme="dark"] .inbound-category-group > summary:hover,
html[data-theme="dark"] .inbound-attachment-details > summary:hover,
html[data-theme="dark"] summary:hover {
  background-color: #334155 !important;
}
html[data-theme="dark"] .inbound-timeline-step:has(input:checked),
html[data-theme="dark"] .inbound-radio-label:has(input:checked),
html[data-theme="dark"] [class*="has-[:checked]:bg-sky-50"] {
  background-color: #082f49 !important;
  border-color: #38bdf8 !important;
}
html[data-theme="dark"] .inbound-timeline-step:has(input:checked) .inbound-timeline-title,
html[data-theme="dark"] .inbound-radio-label:has(input:checked) .inbound-radio-text {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .inbound-radio-label:has(input:focus-visible),
html[data-theme="dark"] .inbound-timeline-step:has(input:focus-visible) {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 1px !important;
}
html[data-theme="dark"] .inbound-body-container {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .inbound-body-container .prose,
html[data-theme="dark"] .inbound-body-container .prose * {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .inbound-compact-alert {
  background: #422006 !important;
  border-color: #92400e !important;
  color: #fde68a !important;
}

/* Palette badge overrides for high contrast dark mode */
html[data-theme="dark"] .alert-notice,
html[data-theme="dark"] .bg-emerald-50,
html[data-theme="dark"] .bg-emerald-100 {
  background-color: #064e3b !important;
  color: #a7f3d0 !important;
  border-color: #047857 !important;
}
html[data-theme="dark"] .alert-warning,
html[data-theme="dark"] .bg-rose-50,
html[data-theme="dark"] .bg-rose-100,
html[data-theme="dark"] .bg-red-50,
html[data-theme="dark"] .bg-red-100 {
  background-color: #450a0a !important;
  color: #fecaca !important;
  border-color: #991b1b !important;
}
html[data-theme="dark"] .bg-sky-50,
html[data-theme="dark"] .bg-sky-100 {
  background-color: #082f49 !important;
  color: #bae6fd !important;
  border-color: #0369a1 !important;
}
html[data-theme="dark"] .bg-blue-50,
html[data-theme="dark"] .bg-blue-100 {
  background-color: #172554 !important;
  color: #bfdbfe !important;
  border-color: #1d4ed8 !important;
}
html[data-theme="dark"] .bg-amber-50,
html[data-theme="dark"] .bg-amber-50\/90,
html[data-theme="dark"] .bg-amber-100 {
  background-color: #451a03 !important;
  color: #fde68a !important;
  border-color: #92400e !important;
}
html[data-theme="dark"] .bg-orange-50,
html[data-theme="dark"] .bg-orange-100 {
  background-color: #431407 !important;
  color: #fed7aa !important;
  border-color: #c2410c !important;
}
html[data-theme="dark"] .bg-purple-50,
html[data-theme="dark"] .bg-purple-100 {
  background-color: #3b0764 !important;
  color: #e9d5ff !important;
  border-color: #7e22ce !important;
}
html[data-theme="dark"] .bg-teal-50,
html[data-theme="dark"] .bg-teal-100 {
  background-color: #042f2e !important;
  color: #99f6e4 !important;
  border-color: #0f766e !important;
}
html[data-theme="dark"] .bg-indigo-50,
html[data-theme="dark"] .bg-indigo-100 {
  background-color: #1e1b4b !important;
  color: #c7d2fe !important;
  border-color: #4338ca !important;
}
html[data-theme="dark"] .bg-lime-50,
html[data-theme="dark"] .bg-lime-100 {
  background-color: #1a2e05 !important;
  color: #d9f99d !important;
  border-color: #4d7c0f !important;
}
html[data-theme="dark"] .bg-stone-50,
html[data-theme="dark"] .bg-stone-100,
html[data-theme="dark"] .bg-stone-200 {
  background-color: #1c1917 !important;
  color: #e7e5e4 !important;
  border-color: #44403c !important;
}
html[data-theme="dark"] .bg-neutral-50,
html[data-theme="dark"] .bg-neutral-100 {
  background-color: #171717 !important;
  color: #e5e5e5 !important;
  border-color: #404040 !important;
}

/* Palette text overrides for high contrast dark mode */
html[data-theme="dark"] .text-sky-600,
html[data-theme="dark"] .text-sky-700,
html[data-theme="dark"] .text-sky-800,
html[data-theme="dark"] .text-sky-900 {
  color: #7dd3fc !important;
}
html[data-theme="dark"] .text-blue-600,
html[data-theme="dark"] .text-blue-700,
html[data-theme="dark"] .text-blue-800,
html[data-theme="dark"] .text-blue-900 {
  color: #93c5fd !important;
}
html[data-theme="dark"] .text-amber-600,
html[data-theme="dark"] .text-amber-700,
html[data-theme="dark"] .text-amber-800,
html[data-theme="dark"] .text-amber-900 {
  color: #fcd34d !important;
}
html[data-theme="dark"] .text-orange-600,
html[data-theme="dark"] .text-orange-700,
html[data-theme="dark"] .text-orange-800,
html[data-theme="dark"] .text-orange-900 {
  color: #fdba74 !important;
}
html[data-theme="dark"] .text-emerald-600,
html[data-theme="dark"] .text-emerald-700,
html[data-theme="dark"] .text-emerald-800,
html[data-theme="dark"] .text-emerald-900 {
  color: #a7f3d0 !important;
}
html[data-theme="dark"] .text-rose-600,
html[data-theme="dark"] .text-rose-700,
html[data-theme="dark"] .text-rose-800,
html[data-theme="dark"] .text-rose-900,
html[data-theme="dark"] .text-red-600,
html[data-theme="dark"] .text-red-700,
html[data-theme="dark"] .text-red-800 {
  color: #fda4af !important;
}
html[data-theme="dark"] .text-purple-600,
html[data-theme="dark"] .text-purple-700,
html[data-theme="dark"] .text-purple-800,
html[data-theme="dark"] .text-purple-900 {
  color: #e9d5ff !important;
}
html[data-theme="dark"] .text-teal-600,
html[data-theme="dark"] .text-teal-700,
html[data-theme="dark"] .text-teal-800 {
  color: #99f6e4 !important;
}
html[data-theme="dark"] .text-indigo-600,
html[data-theme="dark"] .text-indigo-700,
html[data-theme="dark"] .text-indigo-800 {
  color: #c7d2fe !important;
}
html[data-theme="dark"] .text-lime-600,
html[data-theme="dark"] .text-lime-700,
html[data-theme="dark"] .text-lime-800 {
  color: #d9f99d !important;
}
html[data-theme="dark"] .text-stone-600,
html[data-theme="dark"] .text-stone-700,
html[data-theme="dark"] .text-stone-800 {
  color: #e7e5e4 !important;
}
html[data-theme="dark"] .text-neutral-600,
html[data-theme="dark"] .text-neutral-700,
html[data-theme="dark"] .text-neutral-800 {
  color: #cbd5e1 !important;
}

/* Palette border overrides */
html[data-theme="dark"] .border-blue-200,
html[data-theme="dark"] .border-blue-300 {
  border-color: #1d4ed8 !important;
}
html[data-theme="dark"] .border-sky-200,
html[data-theme="dark"] .border-sky-300 {
  border-color: #0284c7 !important;
}
html[data-theme="dark"] .border-amber-200,
html[data-theme="dark"] .border-amber-300,
html[data-theme="dark"] .border-amber-200\/60 {
  border-color: #92400e !important;
}
html[data-theme="dark"] .border-emerald-200,
html[data-theme="dark"] .border-emerald-300 {
  border-color: #047857 !important;
}
html[data-theme="dark"] .border-rose-200,
html[data-theme="dark"] .border-rose-300 {
  border-color: #991b1b !important;
}
html[data-theme="dark"] .border-purple-200,
html[data-theme="dark"] .border-purple-300 {
  border-color: #7e22ce !important;
}
html[data-theme="dark"] .border-orange-200,
html[data-theme="dark"] .border-orange-300 {
  border-color: #c2410c !important;
}
html[data-theme="dark"] .border-teal-200,
html[data-theme="dark"] .border-teal-300 {
  border-color: #0f766e !important;
}
html[data-theme="dark"] .border-indigo-200,
html[data-theme="dark"] .border-indigo-300 {
  border-color: #4338ca !important;
}
html[data-theme="dark"] .border-lime-200,
html[data-theme="dark"] .border-lime-300 {
  border-color: #4d7c0f !important;
}
html[data-theme="dark"] .border-stone-200,
html[data-theme="dark"] .border-stone-300,
html[data-theme="dark"] .border-stone-400 {
  border-color: #44403c !important;
}

/* Dialog & Backdrop */
html[data-theme="dark"] .inbound-status-dialog {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}
html[data-theme="dark"] .inbound-status-dialog-head h2 {
  color: #f8fafc !important;
}
html[data-theme="dark"] .inbound-status-dialog-note {
  color: #94a3b8 !important;
  border-color: #475569 !important;
}
html[data-theme="dark"] dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
}

/* Comprehensive inline style overrides for dark mode */
html[data-theme="dark"] button[style*="background:#fff"],
html[data-theme="dark"] button[style*="background: #fff"],
html[data-theme="dark"] button[style*="background:#ffffff"],
html[data-theme="dark"] button[style*="background: #ffffff"] {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"] {
  background-color: #1e293b !important;
}
html[data-theme="dark"] [style*="background:#f9f9ff"],
html[data-theme="dark"] [style*="background: #f9f9ff"] {
  background-color: #0f172a !important;
}
html[data-theme="dark"] [style*="color:#00288e"],
html[data-theme="dark"] [style*="color: #00288e"] {
  color: #93c5fd !important;
}
html[data-theme="dark"] [style*="color:#1e293b"],
html[data-theme="dark"] [style*="color: #1e293b"] {
  color: #f8fafc !important;
}
html[data-theme="dark"] [style*="color:#334155"],
html[data-theme="dark"] [style*="color: #334155"] {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] [style*="color:#475569"],
html[data-theme="dark"] [style*="color: #475569"] {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] [style*="color:#585f6c"],
html[data-theme="dark"] [style*="color: #585f6c"] {
  color: #94a3b8 !important;
}
html[data-theme="dark"] [style*="color:#757684"],
html[data-theme="dark"] [style*="color: #757684"] {
  color: #94a3b8 !important;
}
html[data-theme="dark"] [style*="border: 1px solid #c4c5d5"],
html[data-theme="dark"] [style*="border:1px solid #c4c5d5"],
html[data-theme="dark"] [style*="border-color:#c4c5d5"],
html[data-theme="dark"] [style*="border-bottom:1px solid #c4c5d5"],
html[data-theme="dark"] [style*="border-top:1px solid #c4c5d5"] {
  border-color: #334155 !important;
}
html[data-theme="dark"] [style*="border: 1px solid #e2e8f0"],
html[data-theme="dark"] [style*="border:1px solid #e2e8f0"],
html[data-theme="dark"] [style*="border-color:#e2e8f0"],
html[data-theme="dark"] [style*="border-bottom:1px solid #e2e8f0"],
html[data-theme="dark"] [style*="border-top:1px solid #e2e8f0"] {
  border-color: #334155 !important;
}
