/* Quotation Archive & History Page Styles */
:root {
  --primary-orange: #FFCC00;
  --primary-orange-hover: #E5A900;
  --bg-dark: #0a0f1a;
  --card-bg: #0f172a;
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --emerald-accent: #10b981;
}

body.dark-theme {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.archive-main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
}

/* STATS DASHBOARD GRID */
.archive-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 204, 0, 0.3);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-meta {
  min-width: 0;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  line-height: 1.15;
}

/* TOOLBAR & FILTERS */
.archive-toolbar-card {
  background: #0c1424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.archive-toolbar-card.compact-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
}

.archive-toolbar-card.compact-toolbar .toolbar-search-wrap {
  flex: 1 1 320px;
}

.compact-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-search-wrap {
  position: relative;
  width: 100%;
}

.toolbar-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.88rem;
}

.toolbar-search-wrap .search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 34px 8px 34px;
  color: #ffffff;
  font-size: 0.88rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toolbar-search-wrap .search-input:focus {
  border-color: #FFCC00;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.15);
}

.toolbar-search-wrap .clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
}

.toolbar-search-wrap .clear-search-btn:hover {
  color: #f1f5f9;
}

.compact-filters-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.compact-filters-grid .filter-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 6px 10px;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
  height: 36px;
  outline: none;
  cursor: pointer;
  flex: 1;
  min-width: 130px;
  box-sizing: border-box;
}

.compact-filters-grid .filter-select:focus {
  border-color: #FFCC00;
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.2);
}

.compact-filters-grid .filter-select option {
  background: #0f172a;
  color: #ffffff;
}

.filter-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.view-mode-toggle,
.view-btn {
  display: none !important;
}

.btn-export-excel {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10B981;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-export-excel:hover {
  background: #10B981;
  color: #0a0f1a;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-refresh {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  box-sizing: border-box;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* RECORDS HEADER */
.records-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.records-count-info {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
}

.btn-outline-orange {
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid rgba(255, 204, 0, 0.35);
  color: #FFCC00;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-orange:hover {
  background: rgba(255, 204, 0, 0.18);
  color: #ffffff;
}

/* GRID VIEW */
.records-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.record-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.record-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #FFCC00;
}

.record-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 204, 0, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.record-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.record-customer-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.2px;
}

.record-status-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-downloaded {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-closed {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* INTERACTIVE STATUS DROPDOWN */
.record-status-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 20px 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 10px 10px;
  display: inline-block;
  line-height: 1.4;
}

.record-status-select:hover {
  filter: brightness(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.record-status-select:focus {
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.4);
}

.record-status-select.status-active {
  background-color: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2338bdf8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.record-status-select.status-downloaded {
  background-color: rgba(16, 185, 129, 0.14);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2310B981' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.record-status-select.status-closed {
  background-color: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.record-status-select option {
  background: #0f172a;
  color: #f1f5f9;
  font-weight: 700;
  padding: 6px 10px;
}

.record-top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.record-qtn-badge {
  font-family: 'Outfit', monospace;
  font-size: 0.74rem;
  font-weight: 800;
  color: #E5A900;
  background: rgba(255, 204, 0, 0.12);
  border: 1px solid rgba(255, 204, 0, 0.32);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.record-meta-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.meta-chip {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.chip-phone {
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-phone:hover {
  background: rgba(37, 211, 102, 0.25);
}

.chip-duration {
  background: rgba(255, 204, 0, 0.15);
  color: #FFCC00;
  border: 1px solid rgba(255, 204, 0, 0.3);
  font-weight: 800;
}

.chip-vehicle {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.record-tour-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.35;
  margin: 6px 0 3px 0;
}

.record-route-text {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.record-route-text i {
  color: #38bdf8;
  margin-top: 2px;
  flex-shrink: 0;
}

.record-fare-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  margin-top: 6px;
}

.record-grand-fare {
  font-size: 1.35rem;
  font-weight: 900;
  color: #10B981;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.record-fare-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.record-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.record-btn {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-preview {
  background: rgba(255, 204, 0, 0.12);
  border: 1px solid rgba(255, 204, 0, 0.4) !important;
  color: #FFCC00;
}

.btn-preview:hover {
  background: #FFCC00;
  color: #0a0f1a;
}

.btn-download {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #10B981;
}

.btn-download:hover {
  background: #10B981;
  color: #ffffff;
}

.btn-edit {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8;
}

.btn-edit:hover {
  background: #38bdf8;
  color: #0a0f1a;
}

.record-secondary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  color: #64748b;
}

/* TABLE VIEW */
.records-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.archive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.archive-table th {
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.archive-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.archive-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* EMPTY & LOADING STATES */
.archive-empty-state, .archive-loading-state {
  grid-column: 1 / -1;
  background: #0f172a;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
}

.empty-icon, .loading-icon {
  font-size: 2.8rem;
  color: #FFCC00;
  margin-bottom: 14px;
}

.empty-title, .loading-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-sub, .loading-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 480px;
  margin: 0 auto;
}

.sidebar-header-brand {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-header-brand img {
  width: 100%;
  max-width: 220px;
  max-height: 54px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.sidebar-header-brand img:hover {
  transform: scale(1.02);
}

.studio-header {
  background: linear-gradient(180deg, #111827 0%, #0d121f 100%);
  border-bottom: 1px solid rgba(255, 204, 0, 0.25);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

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

.studio-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-title-icon {
  color: #FFCC00;
  font-size: 1rem;
  flex-shrink: 0;
}

.btn-new-quote-head {
  background: #FFCC00;
  color: #0a0f1a !important;
  font-weight: 800;
  border-radius: 6px;
  padding: 7px 15px;
  font-size: 0.84rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(255, 204, 0,0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-new-quote-head:hover {
  background: #ff8c1a;
  transform: translateY(-1px);
}

.btn-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.18s ease;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-sidebar-toggle:hover {
  background: rgba(255, 204, 0, 0.2);
  border-color: #FFCC00;
  color: #FFCC00;
  transform: translateY(-1px);
}

.btn-sidebar-toggle:active {
  transform: scale(0.95);
}

@media (max-width: 1024px) {
  .btn-sidebar-toggle,
  #btn-mobile-sidebar-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1.05rem !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
    flex-shrink: 0 !important;
  }

  .btn-sidebar-toggle:hover,
  #btn-mobile-sidebar-toggle:hover {
    background: rgba(255, 204, 0, 0.2) !important;
    border-color: #FFCC00 !important;
    color: #FFCC00 !important;
  }

  .btn-sidebar-toggle:active,
  #btn-mobile-sidebar-toggle:active {
    transform: scale(0.95) !important;
  }

  .itin-portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 280px;
    max-width: 82vw;
    z-index: 99999;
    transform: translateX(-100%);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85);
    background: #090e1c;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .itin-portal-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
  }

  .sidebar-mobile-backdrop.active {
    display: block;
  }
}

@media (max-width: 768px) {
  .studio-header {
    padding: 10px 14px;
    height: auto;
    min-height: 52px;
    gap: 8px;
  }

  .studio-header-left {
    gap: 8px;
    min-width: 0;
  }

  .studio-title {
    font-size: 0.88rem;
  }

  .btn-new-quote-head {
    padding: 6px 11px;
    font-size: 0.78rem;
    gap: 4px;
    border-radius: 6px;
  }

  .archive-main-container {
    padding: 12px 10px 60px 10px;
  }

  .records-grid-view {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .archive-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .compact-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .compact-filters-grid .filter-select {
    width: 100%;
    min-width: 0;
    font-size: 0.80rem;
    height: 36px;
  }

  .filter-actions-group {
    grid-column: span 2;
    display: flex;
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }

  .filter-actions-group .btn-export-excel {
    flex: 1;
    height: 36px;
    justify-content: center;
    font-size: 0.80rem;
  }

  .filter-actions-group .btn-refresh {
    width: 42px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
  }

  .record-card {
    padding: 14px;
    gap: 10px;
  }

  .record-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .record-btn {
    min-height: 36px;
    font-size: 0.80rem;
    padding: 6px 4px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .archive-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .stat-card {
    padding: 8px 10px;
    gap: 6px;
  }

  .stat-label {
    font-size: 0.66rem;
  }

  .stat-value {
    font-size: 1.05rem;
  }

  .record-card {
    padding: 12px;
  }

  .record-customer-name {
    font-size: 0.94rem;
  }

  .record-grand-fare {
    font-size: 1.20rem;
  }

  .record-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
  }

  .record-btn {
    min-height: 34px;
    font-size: 0.76rem;
    padding: 5px 3px;
    gap: 4px;
  }

  .record-secondary-actions {
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
  }

  .itin-login-card {
    padding: 22px 16px;
  }
}

.toast-container {
  display: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   CUSTOM LUXURY DIALOG MODAL (CONFIRM & ALERT)
   Replaces default browser alert() and confirm() with themed dialogs
   ========================================================================== */
.custom-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 250000;
  background: rgba(4, 8, 18, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dialog-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.custom-dialog-box {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(165deg, #0f1a2e 0%, #080d19 100%);
  border: 1px solid rgba(255, 204, 0, 0.32);
  border-radius: 18px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 204, 0, 0.15);
  padding: 28px 24px 22px;
  text-align: center;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.custom-dialog-overlay.active .custom-dialog-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.custom-dialog-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
}

.custom-dialog-icon-wrap.warning {
  background: rgba(255, 204, 0, 0.15);
  border: 1.5px solid rgba(255, 204, 0, 0.4);
  color: #FFCC00;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.25);
}

.custom-dialog-icon-wrap.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.custom-dialog-icon-wrap.info {
  background: rgba(56, 189, 248, 0.15);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.custom-dialog-icon-wrap.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.custom-dialog-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  font-family: inherit;
}

.custom-dialog-message {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0 0 24px;
  font-weight: 500;
  word-break: break-word;
}

.custom-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.custom-dialog-btn {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.90rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.custom-dialog-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.custom-dialog-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.custom-dialog-btn-confirm {
  border: none;
}

.custom-dialog-btn-confirm.warning {
  background: linear-gradient(135deg, #FFCC00, #E5A900);
  color: #060a12;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 204, 0, 0.35);
}

.custom-dialog-btn-confirm.warning:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 204, 0, 0.45);
}

.custom-dialog-btn-confirm.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.custom-dialog-btn-confirm.danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.custom-dialog-btn-confirm.info {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #060a12;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.custom-dialog-btn-confirm.info:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.custom-dialog-btn-confirm.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #060a12;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.custom-dialog-btn-confirm.success:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

