/* ==========================================================================
   LMP to EDD Reply Tracker — Master Stylesheet (High Contrast & Clean Colors)
   Ultra-Legible Bengali Typography, Vibrant Accents & Glassmorphism
   ========================================================================== */

:root {
  /* Dark Theme Palette (High Contrast & Razor Sharp Readability) */
  --bg-primary: #0a0e1a;
  --bg-secondary: #131b2e;
  --bg-card: rgba(22, 30, 49, 0.92);
  --bg-card-hover: rgba(28, 38, 62, 0.98);
  --bg-input: #0e1626;
  --bg-output: #111a2f;
  
  --border-color: rgba(255, 255, 255, 0.14);
  --border-card: rgba(148, 163, 184, 0.2);
  --border-focus: #a855f7;
  --border-glow: rgba(168, 85, 247, 0.4);

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #ffffff;

  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #3b82f6 100%);
  --accent-gradient-hover: linear-gradient(135deg, #f43f5e 0%, #9333ea 50%, #2563eb 100%);
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.22);
  --success-text: #34d399;
  --success-border: rgba(16, 185, 129, 0.45);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.22);
  --warning-text: #fcd34d;
  --warning-border: rgba(245, 158, 11, 0.45);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.22);
  --danger-text: #fca5a5;
  --danger-border: rgba(239, 68, 68, 0.45);

  --info: #38bdf8;
  --info-bg: rgba(56, 189, 248, 0.2);
  --info-text: #7dd3fc;
  --info-border: rgba(56, 189, 248, 0.4);

  --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.4);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-family: 'Hind Siliguri', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-output: #f8fafc;
  
  --border-color: rgba(0, 0, 0, 0.12);
  --border-card: rgba(0, 0, 0, 0.1);
  --border-focus: #7c3aed;
  --border-glow: rgba(124, 58, 237, 0.25);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #ffffff;

  --success: #059669;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --success-border: #6ee7b7;

  --warning: #d97706;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --warning-border: #fcd34d;

  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --danger-border: #fca5a5;

  --info: #0284c7;
  --info-bg: #e0f2fe;
  --info-text: #075985;
  --info-border: #7dd3fc;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 28px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Ambient Glows */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  transition: var(--transition);
}

.glow-1 {
  top: -10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #8b5cf6, transparent);
}

.glow-2 {
  top: 40%;
  right: -5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ec4899, transparent);
}

.glow-3 {
  bottom: -10%;
  left: 30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3b82f6, transparent);
}

/* Container */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checked-by-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}

.checked-by-pill i {
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.checked-by-pill .label {
  color: var(--text-secondary);
  font-weight: 600;
}

.agent-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  font-family: var(--font-family);
  width: 120px;
  outline: none;
  font-size: 0.95rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.total { background: rgba(139, 92, 246, 0.25); color: #c4b5fd; }
.stat-icon.replied { background: var(--success-bg); color: var(--success-text); }
.stat-icon.pending { background: var(--warning-bg); color: var(--warning-text); }
.stat-icon.clarification { background: var(--danger-bg); color: var(--danger-text); }

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

.stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

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

.card-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.card-header h2 i {
  color: var(--accent-primary);
}

.badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

/* Form Styles */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.text-action-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.text-action-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

textarea, input[type="text"], input[type="date"], select {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  width: 100%;
  outline: none;
}

textarea:focus, input[type="text"]:focus, input[type="date"]:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
  background: var(--bg-secondary);
}

textarea::placeholder, input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.parse-feedback {
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  font-weight: 600;
}

/* Date Mode Tabs */
.date-input-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 5px;
  gap: 6px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Date Picker Wrapper */
.date-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.small-pill-btn {
  white-space: nowrap;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.2);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  color: #ddd6fe;
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.small-pill-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Manual Date Grid */
.manual-date-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1.2fr;
  gap: 12px;
}

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

.sub-field label {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Alert Box */
.alert-box {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  align-items: flex-start;
  animation: fadeIn 0.3s ease;
}

.alert-box.warning {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning-border);
  color: var(--warning-text);
}

.alert-box.warning .alert-icon {
  font-size: 1.4rem;
  color: var(--warning);
  margin-top: 2px;
}

.alert-content strong {
  font-size: 1.05rem;
  color: var(--warning-text);
}

.alert-content p {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-top: 4px;
  font-weight: 500;
}

/* Output Preview Card */
.output-card {
  background: var(--bg-output);
  border: 1.5px solid rgba(139, 92, 246, 0.45);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
  animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.output-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  background: var(--bg-secondary);
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.output-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.output-badge {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.output-badge.edd {
  color: #f472b6;
}

.output-val-bn {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.output-val-en {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.output-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--accent-primary);
  font-size: 1.2rem;
}

.days-tag {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.3);
  color: #e9d5ff;
  font-weight: 700;
}

/* Reply Section */
.reply-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.template-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.mini-select {
  padding: 6px 10px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  width: auto;
  font-weight: 600;
}

.reply-box-wrapper {
  position: relative;
}

.reply-textarea {
  background: #090d16;
  border: 1.5px solid rgba(236, 72, 153, 0.45);
  font-size: 1.05rem;
  line-height: 1.7;
  padding: 16px 16px 48px 16px;
  border-radius: var(--radius-lg);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .reply-textarea {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #ec4899;
}

.copy-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
  transition: var(--transition);
}

.copy-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.6);
}

.copy-btn.copied {
  background: var(--success);
}

/* Form Action Buttons */
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  flex: 1.4;
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid var(--border-color);
  flex: 1;
}

[data-theme="light"] .btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Helper Card */
.helper-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rule-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.rule-box h4 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
}

.rule-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.rule-box li {
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
}

.rule-box li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--accent-primary);
  font-size: 1.3rem;
  line-height: 1;
}

.rule-box li strong {
  color: var(--text-primary);
}

.clarification-helper h4, .quick-sample-box h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
}

.quick-template-pill {
  background: var(--warning-bg);
  border: 1.5px dashed var(--warning-border);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--warning-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.5;
  transition: var(--transition);
}

.quick-template-pill:hover {
  background: rgba(245, 158, 11, 0.3);
}

.mini-copy-btn {
  background: transparent;
  border: none;
  color: var(--warning);
  font-size: 1.2rem;
  cursor: pointer;
}

.sample-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sample-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-family: var(--font-family);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="light"] .sample-btn {
  background: #f1f5f9;
  color: #334155;
}

.sample-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Tracker Table Section */
.table-card {
  margin-top: 10px;
}

.table-header-flex {
  flex-wrap: wrap;
  gap: 16px;
}

.table-header-flex .subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 240px;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.search-box input {
  padding-left: 40px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 0.92rem;
}

.filter-select {
  padding: 10px 14px;
  font-size: 0.92rem;
  width: auto;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.btn-outline-sm {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-outline-sm:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger-sm {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--danger-bg);
  border: 1.5px solid var(--danger-border);
  color: var(--danger-text);
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger-sm:hover {
  background: var(--danger);
  color: #ffffff;
}

/* Table */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

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

.tracker-table th {
  background: rgba(15, 23, 42, 0.95);
  padding: 16px 18px;
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1.5px solid var(--border-color);
  white-space: nowrap;
}

[data-theme="light"] .tracker-table th {
  background: #f1f5f9;
  color: #1e293b;
}

.tracker-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-primary);
}

.tracker-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.comment-cell {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.comment-cell.empty {
  color: var(--text-muted);
  font-style: italic;
}

.reply-cell {
  position: relative;
  max-width: 280px;
}

.reply-text-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 500;
}

.table-copy-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #ddd6fe;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  transition: var(--transition);
}

.table-copy-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.status-badge.Replied {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.status-badge.Pending {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.status-badge['Needs Clarification'], .status-badge.Needs-Clarification {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

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

.action-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.92rem;
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.action-icon-btn.delete:hover {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

/* Empty State */
.empty-state {
  padding: 50px 20px;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
}

.empty-state i {
  font-size: 2.8rem;
  color: var(--text-muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.icon-btn-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 10px;
}

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

.toast {
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--info);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.hidden {
  display: none !important;
}

/* Utility Helpers */
.text-success { color: var(--success-text); }
.text-warning { color: var(--warning-text); }
.text-danger { color: var(--danger-text); }
.text-secondary { color: var(--text-secondary); }
