/* ==========================================================================
   JioFinance Sync Dashboard - Executive Dark Slate Design System
   ========================================================================== */

:root {
  /* JioFinance Official Brand Colors (PANTONE Shades) */
  --brand-gold: #D5A963;            /* Primary Gold 1700 / PANTONE 4024 C */
  --brand-gold-hover: #c49650;
  --brand-gold-light: rgba(213, 169, 99, 0.18);

  --brand-purple: #6D17CE;          /* Secondary Purple 800 / PANTONE 266 C */
  --brand-purple-hover: #580eb0;
  --brand-purple-light: rgba(109, 23, 206, 0.2);

  --brand-sky: #278BC1;             /* Sparkle Sky 1200 / PANTONE 6122 C */
  --brand-sky-hover: #1f76a6;
  --brand-sky-light: rgba(39, 139, 193, 0.2);

  --brand-navy: #00065A;            /* Background Reliance 300 / PANTONE 2758 C */
  --brand-navy-card: rgba(2, 10, 80, 0.85);
  --brand-navy-card-border: rgba(213, 169, 99, 0.22);
  --brand-navy-input: rgba(10, 24, 115, 0.65);
  --brand-navy-header: #02094D;

  /* System Color Mapping */
  --bg-slate: var(--brand-navy);
  --bg-card: var(--brand-navy-card);
  --bg-card-border: var(--brand-navy-card-border);
  --bg-input: var(--brand-navy-input);
  --bg-input-border: rgba(213, 169, 99, 0.25);

  --text-main: #FFFFFF;
  --text-muted: #CBD5E1;
  --text-subtle: #94A3B8;

  --accent-indigo: var(--brand-purple);
  --accent-indigo-hover: var(--brand-purple-hover);
  --accent-indigo-light: var(--brand-purple-light);

  --accent-emerald: #10b981;
  --accent-emerald-light: rgba(16, 185, 129, 0.18);

  --accent-amber: var(--brand-gold);
  --accent-amber-light: var(--brand-gold-light);

  --accent-cyan: var(--brand-sky);
  --accent-cyan-light: var(--brand-sky-light);

  --accent-rose: #f43f5e;
  --accent-rose-light: rgba(244, 63, 94, 0.18);

  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-main: 0 12px 36px -10px rgba(0, 3, 40, 0.75);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--brand-navy);
  color: var(--text-main);
  min-height: 100vh;
  background-image: 
    radial-gradient(at 0% 0%, rgba(109, 23, 206, 0.4) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(39, 139, 193, 0.3) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(213, 169, 99, 0.22) 0px, transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
}

/* Utility Helpers */
.hidden { display: none !important; }
.text-indigo { color: var(--accent-indigo) !important; }
.text-emerald { color: var(--accent-emerald) !important; }
.text-amber { color: var(--accent-amber) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-neutral { color: var(--text-muted) !important; }
.text-subvalue { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.bg-indigo-light { background-color: var(--accent-indigo-light); }
.bg-emerald-light { background-color: var(--accent-emerald-light); }
.bg-amber-light { background-color: var(--accent-amber-light); }
.bg-cyan-light { background-color: var(--accent-cyan-light); }

/* Screen Views */
.screen-view {
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: #1e293b;
  border: 1px solid var(--bg-card-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideInRight 0.3s ease;
}

.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast-error { border-left: 4px solid var(--accent-rose); }
.toast-info { border-left: 4px solid var(--accent-indigo); }

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

/* ==========================================================================
   Login View
   ========================================================================== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.brand-badge {
  width: auto;
  max-width: 220px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(0, 6, 90, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  padding: 8px 18px;
  border: 1px solid var(--brand-gold-light);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.brand-logo-img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-indigo);
}

.login-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);

}

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

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

.input-icon-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-input);
  border: 1px solid var(--bg-input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.input-icon-wrapper input:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(213, 169, 99, 0.25);
}

.btn-icon-alt {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.btn-icon-alt:hover { color: var(--text-main); }

.login-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.footer-icon {
  width: 12px;
  height: 12px;
  vertical-align: middle;
}

/* Alert Boxes */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
}

.alert-error {
  background: var(--accent-rose-light);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-purple) 0%, #4f0fa3 100%);
  color: #fff;
  border: 1px solid rgba(213, 169, 99, 0.3);
  box-shadow: 0 4px 16px rgba(109, 23, 206, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(109, 23, 206, 0.55);
  border-color: var(--brand-gold);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.05); }

.btn-excel {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-excel:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4); }

.btn-excel-outline {
  background: transparent;
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: var(--accent-emerald);
}
.btn-excel-outline:hover { background: var(--accent-emerald-light); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.05); color: var(--text-main); border: 1px solid var(--bg-card-border); }
.btn-icon:hover { background: rgba(255, 255, 255, 0.12); }

/* Spinner */
.btn-spinner, .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Authenticated Dashboard View
   ========================================================================== */

.navbar {
  margin: 20px 20px 0;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon-bg {
  height: 48px;
  padding: 6px 16px;
  border-radius: 12px;
  background: rgba(0, 6, 90, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-gold-light);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.nav-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  padding: 6px 14px 6px 8px;
  border-radius: 30px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-indigo);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.role-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}

.badge-admin { background: var(--accent-indigo-light); color: var(--accent-indigo); border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-viewer { background: var(--accent-cyan-light); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }

/* Main Container Layout */
.main-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Metrics Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.metric-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

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

.metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon {
  width: 22px;
  height: 22px;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.metric-trend {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* Filter Panel */
.filter-panel {
  padding: 22px;
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bg-card-border);
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.section-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-indigo);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.filter-search {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .filter-search { grid-column: span 1; }
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-item input, .filter-item select, .form-select {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--bg-input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.filter-item input:focus, .filter-item select:focus, .form-select:focus {
  border-color: var(--accent-indigo);
}

/* Table Section */
.table-section {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.count-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.rows-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.select-sm { padding: 6px 10px; font-size: 0.8rem; }

.export-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Table Responsive Viewport */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-card-border);
}

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

.custom-table th {
  background: var(--brand-navy-header);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--brand-gold-light);
  white-space: nowrap;
}

.custom-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.custom-table th.sortable:hover { color: var(--text-main); }

.sort-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.5;
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  color: var(--text-main);
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-yes { background: var(--accent-emerald-light); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-golden { background: var(--accent-amber-light); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-no { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.2); }
.badge-gold-denom {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(251, 191, 36, 0.15) 100%);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-amber-light);
  color: var(--accent-amber);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
}

.credits-badge.clickable-breakdown-btn {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.credits-badge.clickable-breakdown-btn:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  filter: brightness(1.15);
}

/* Notes Breakdown Modal Styling */
.breakdown-attendee-header {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(11, 15, 25, 0.7);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.breakdown-table th {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
}

.breakdown-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.breakdown-table tfoot th {
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 14px;
  font-size: 0.92rem;
  border-top: 2px solid rgba(245, 158, 11, 0.3);
}

.denom-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.82rem;
}

.uuid-code {
  font-family: monospace;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Empty & Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 10;
  border-radius: var(--radius-lg);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--text-subtle);
}

/* Pagination Controls */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 10px;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.btn-pag {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-pag:hover:not(:disabled) { background: var(--accent-indigo); border-color: var(--accent-indigo); }
.btn-pag:disabled { opacity: 0.3; cursor: not-allowed; }

.pagination-numbers {
  display: flex;
  gap: 6px;
}

.btn-pag-num {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-pag-num.active {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
}

/* ==========================================================================
   Edit Record Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

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

.modal-card {
  width: 100%;
  max-width: 580px;
  padding: 30px;
}

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon { width: 24px; height: 24px; }

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: monospace;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.full-width { grid-column: span 2; }

@media (max-width: 550px) {
  .form-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: span 1; }
}

/* Toggle Switch */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-top: 4px;
}

.toggle-switch input { display: none; }

.toggle-slider {
  width: 46px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  position: relative;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-emerald);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.toggle-text {
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--bg-card-border);
}

/* Google Sheets Button */
.btn-gsheet {
  background: linear-gradient(135deg, #0f9d58 0%, #0b8043 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(15, 157, 88, 0.25);
}

.btn-gsheet:hover {
  background: linear-gradient(135deg, #13b566 0%, #0f9d58 100%);
  box-shadow: 0 6px 16px rgba(15, 157, 88, 0.35);
}

/* Email Status Badges */
.badge-email-sent {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-email-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-email-queued {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-email-failed {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

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

/* Email Status Modal Styles */
.modal-lg {
  max-width: 800px;
}

.email-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 600px) {
  .email-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.email-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}

.email-stat-card h4 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 6px 0 0 0;
}

.email-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.border-green { border-color: rgba(16, 185, 129, 0.4); }
.border-amber { border-color: rgba(245, 158, 11, 0.4); }
.border-red { border-color: rgba(244, 63, 94, 0.4); }

.email-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--bg-card-border);
}

