/* ==========================================================================
   TaxEasy AI - Comprehensive Modern Design System & Stylesheet
   ========================================================================== */

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --accent: #3b82f6;
  --accent-gold: #f59e0b;

  --bg-gradient: radial-gradient(circle at 15% 15%, #0f172a 0%, #020617 100%);
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --border: #e2e8f0;
  --border-focus: #10b981;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  --bot-bubble-bg: #f8fafc;
  --bot-bubble-border: #e2e8f0;
  --user-bubble-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
  --user-bubble-text: #ffffff;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-bangla: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-latin: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-bangla);
  background-color: #f1f5f9;
  color: var(--text-main);
  line-height: 1.6;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  z-index: 100;
  color: #fff;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-latin);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.ai-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-left: 4px;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
  font-family: var(--font-latin);
}

.model-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.model-status-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.pulse {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-bangla);
}

.nav-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-btn.outline {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.nav-btn.outline:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: #ef4444;
}

/* ==========================================================================
   Main Application Layout
   ========================================================================== */
.main-wrapper {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  height: calc(100vh - 65px);
  overflow: hidden;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 1.25rem;
  height: 100%;
}

/* ==========================================================================
   Chat Section (Left Column)
   ========================================================================== */
.chat-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.chat-header {
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bot-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 1.4rem;
}

.status-online {
  width: 11px;
  height: 11px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
}

.bot-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
}

.bot-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.icon-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: #e2e8f0;
}

/* Chat Stream */
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  scroll-behavior: smooth;
  background: radial-gradient(circle at 50% 0%, #f8fafc 0%, #ffffff 80%);
}

.chat-stream::-webkit-scrollbar {
  width: 6px;
}
.chat-stream::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Messages */
.message-row {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
  animation: fadeInSlide 0.25s ease-out forwards;
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-row.bot {
  align-self: flex-start;
}

.message-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.message-row.bot .msg-avatar {
  background: #ecfdf5;
  border: 1px solid #10b981;
}

.msg-bubble {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  position: relative;
  word-break: break-word;
  white-space: pre-line;
}

.message-row.bot .msg-bubble {
  background: var(--bot-bubble-bg);
  border: 1px solid var(--bot-bubble-border);
  color: var(--text-main);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.message-row.user .msg-bubble {
  background: var(--user-bubble-bg);
  color: var(--user-bubble-text);
  border-top-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.msg-meta {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.message-row.user .msg-meta {
  justify-content: flex-end;
  color: rgba(255, 255, 255, 0.8);
}

/* Quick Replies within Chat */
.quick-replies-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.quick-reply-btn {
  background: #ffffff;
  border: 1.5px solid #10b981;
  color: #047857;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-bangla);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-reply-btn:hover {
  background: #059669;
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.quick-reply-btn:active {
  transform: translateY(0);
}

/* Multi-Select Interactive Component */
.multi-select-wrapper {
  margin-top: 0.75rem;
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
  animation: fadeInSlide 0.25s ease-out;
}

.multi-select-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: #047857;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #d1fae5;
  padding-bottom: 0.35rem;
}

.multi-select-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}

.multi-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.multi-chip {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  font-family: var(--font-bangla);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.multi-chip .chip-box {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1.5px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #ffffff;
  color: transparent;
  transition: all 0.15s ease;
}

.multi-chip:hover {
  background: #f1f5f9;
  border-color: #10b981;
  transform: translateY(-1px);
}

.multi-chip.selected {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.18);
}

.multi-chip.selected .chip-box {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.multi-chip.exclusive {
  border-style: dashed;
}

.multi-confirm-btn {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  font-family: var(--font-bangla);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.multi-confirm-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.8;
}

.multi-confirm-btn:not(:disabled):hover {
  background: #047857;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

.typing-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

/* Suggestion Bar */
.suggestion-bar {
  padding: 0.5rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
}

.suggestion-bar::-webkit-scrollbar {
  display: none;
}

.suggestion-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.suggestion-chips {
  display: flex;
  gap: 0.45rem;
}

.chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--secondary);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: var(--font-bangla);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Chat Input Wrapper */
.chat-input-wrapper {
  padding: 0.75rem 1.25rem 0.9rem;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.input-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.5rem;
  transition: all 0.2s ease;
}

.input-container:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.mic-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mic-btn:hover {
  background: #e2e8f0;
}

.mic-btn.recording {
  background: #ef4444;
  color: #ffffff;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.input-container input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.4rem 0.35rem;
  font-size: 0.95rem;
  font-family: var(--font-bangla);
  color: var(--text-main);
  outline: none;
}

.input-container input::placeholder {
  color: #94a3b8;
}

.send-btn {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-bangla);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.send-btn:hover {
  background: #047857;
  transform: translateY(-1px);
}

.input-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
}

kbd {
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-latin);
  font-size: 0.7rem;
}

/* ==========================================================================
   Sidebar Section (Right Column)
   ========================================================================== */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  overflow-y: auto;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.65rem;
}

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary);
}

.step-hint-text {
  display: block;
  font-size: 0.7rem;
  color: #10b981;
  font-weight: 500;
  margin-top: 1px;
}

.step-counter {
  font-size: 0.75rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Stepper List */
.stepper-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.85rem;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
  position: relative;
  border: 1px solid transparent;
}

.step-item:hover {
  background: #f0fdf4;
  color: #065f46;
  border-color: #a7f3d0;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.step-item .step-jump-icon {
  margin-left: auto;
  font-size: 0.75rem;
  color: #10b981;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.step-item:hover .step-jump-icon {
  opacity: 1;
  transform: translateX(0);
}

.step-item.active {
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  border-color: #6ee7b7;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
}

.step-item.active .step-jump-icon {
  opacity: 1;
  transform: translateX(0);
  color: #059669;
}

.step-item.completed {
  color: #0f172a;
}

.step-item.completed:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.step-item.jump-pulse {
  animation: stepJumpPulse 0.35s ease-out;
}

@keyframes stepJumpPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03) translateX(6px); background: #dcfce7; }
  100% { transform: scale(1); }
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-latin);
}

.step-item.active .step-num {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.step-item.completed .step-num {
  background: #047857;
  color: white;
  border-color: #047857;
}

/* Live Data Summary Card */
.summary-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #f1f5f9;
  padding-bottom: 0.35rem;
}

.summary-row.vertical {
  flex-direction: column;
  gap: 0.3rem;
  border-bottom: none;
}

.summary-key {
  color: var(--text-muted);
}

.summary-val {
  font-weight: 600;
  color: var(--secondary);
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 2px;
}

.data-chip {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.chip-empty {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.8rem;
}

.badge-action-btn {
  background: transparent;
  border: none;
  color: #3b82f6;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.badge-action-btn:hover {
  background: #eff6ff;
}

.card-footer {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.action-btn {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font-bangla);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-btn:not(:disabled):hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.action-btn.download-btn {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.action-btn.download-btn:not(:disabled):hover {
  background: #d1fae5;
}

/* Info Card */
.info-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.info-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.info-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.info-row strong {
  color: var(--secondary);
  display: block;
  margin-bottom: 2px;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box.large {
  max-width: 800px;
}

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

.modal-header {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

.modal-close:hover {
  color: #0f172a;
}

.modal-body {
  padding: 1.25rem;
}

.setting-item {
  margin-bottom: 1.15rem;
}

.setting-item label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.setting-item input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: monospace;
}

.setting-item small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.setting-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid #10b981;
}

.modal-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.primary-btn {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:hover { background: var(--primary-hover); }

.secondary-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.secondary-btn:hover { background: #e2e8f0; }

.test-feedback {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: none;
}

/* Track Timeline */
.track-input-group {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.track-input-group input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-latin);
}

.track-search-btn {
  background: #0f172a;
  color: white;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e2e8f0;
}

.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid white;
}

.timeline-step.completed::before {
  background: #10b981;
}

.timeline-step.active::before {
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.timeline-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Admin Table */
.admin-table-wrapper {
  max-height: 450px;
  overflow-y: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th, .admin-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--secondary);
}

/* ==========================================================================
   Printable Official PDF Template
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  #printReceiptSection, #printReceiptSection * {
    visibility: visible;
  }
  #printReceiptSection {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block !important;
    padding: 2rem;
    background: white;
  }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  body {
    height: auto;
    overflow-y: auto;
  }
  .main-wrapper {
    height: auto;
    overflow: visible;
  }
  .app-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .chat-section {
    height: 75vh;
  }
}

/* ==========================================================================
   Mode Navigation Bar (Chatbot vs Smart Form)
   ========================================================================== */
.mode-navigation-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mode-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 1.5rem;
}

.mode-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-bangla);
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.mode-tab.active {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
}

.new-pill {
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Smart Form Wizard View
   ========================================================================== */
.smart-form-view {
  max-width: 1050px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.form-wizard-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.wizard-header {
  padding: 1.5rem 2rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.wizard-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.wizard-step-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 0.35rem;
  border: 1px solid #a7f3d0;
}

.wizard-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
}

.btn-wizard-reset {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #64748b;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-wizard-reset:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.wizard-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transition: width 0.3s ease;
}

.wizard-step-dots {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-latin);
  transition: all 0.2s ease;
}

.step-dot.active {
  background: #059669;
  border-color: #059669;
  color: white;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
}

.step-dot.completed {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

/* Wizard Step Panels */
.wizard-step-panel {
  padding: 2rem;
  animation: fadeIn 0.25s ease-out;
}

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

.panel-intro {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.85rem;
}

.panel-intro h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.panel-intro p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-error-alert {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.form-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.form-group label .required {
  color: #ef4444;
}

.form-group label .optional {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.8rem;
}

.form-group input, .form-group select {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Period Selection */
.period-selection-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.period-label-main {
  font-size: 0.95rem;
  color: var(--secondary);
  display: block;
}

.period-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0.85rem;
}

.period-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.period-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.period-radio-card:hover {
  border-color: #10b981;
  background: #f0fdf4;
}

.period-radio-card input {
  margin-top: 4px;
}

.radio-content {
  display: flex;
  flex-direction: column;
}

.period-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--secondary);
}

.period-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Selection Cards Grid */
.selection-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.selection-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.selection-card:hover {
  border-color: #10b981;
  background: #f8fafc;
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-sm);
}

.selection-card.selected {
  background: #ecfdf5;
  border-color: #059669;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.15);
}

.selection-card.exclusive-card {
  border-style: dashed;
}

.card-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1.5px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: #ffffff;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.selection-card.selected .card-checkbox {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.card-label strong {
  font-size: 0.92rem;
  color: #1e293b;
  display: block;
}

.active-selection-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.summary-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.active-badge {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.active-badge.expense-badge {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.badge-empty {
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
}

/* Dynamic Question Cards */
.dynamic-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.question-block {
  background: #ffffff;
  border: 1.5px solid #d1fae5;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.06);
}

.question-block.expense-q-block {
  border-color: #fde68a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.06);
}

.question-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.q-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: 4px;
}

.expense-q-block .q-num {
  color: #b45309;
  background: #fffbeb;
}

.question-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
  flex: 1;
}

.period-pill {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 12px;
}

.amount-input-group {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 320px;
}

.amount-input-group.small {
  max-width: 200px;
}

.currency-symbol {
  padding: 0.6rem 0.85rem;
  background: #e2e8f0;
  font-weight: 800;
  color: #334155;
  font-size: 1.1rem;
}

.amount-field {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
}

.input-hint-row {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.live-total-bar {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  color: #047857;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.live-total-bar.expense-total {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.other-entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.other-entry-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.entry-fields {
  display: flex;
  gap: 1rem;
  flex: 1;
  flex-wrap: wrap;
}

.entry-fields .field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 180px;
}

.entry-fields label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.btn-remove-entry {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.btn-add-entry {
  background: #ffffff;
  border: 1.5px dashed #059669;
  color: #047857;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-add-entry:hover {
  background: #ecfdf5;
}

/* Review Box */
.review-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.review-profile-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.profile-info-item {
  font-size: 0.85rem;
}

.profile-info-item .label {
  color: #64748b;
  margin-right: 4px;
}

.period-tag {
  background: #059669;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.78rem;
}

.btn-edit-section {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.financial-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1.25rem;
}

.kpi-card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid transparent;
}

.kpi-card.income-kpi {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.kpi-card.expense-kpi {
  background: #fffbeb;
  border-color: #fde68a;
}

.kpi-card.balance-kpi {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.kpi-val {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 4px 0;
}

.income-kpi .kpi-val { color: #059669; }
.expense-kpi .kpi-val { color: #b45309; }
.balance-kpi .kpi-val.surplus { color: #0284c7; }
.balance-kpi .kpi-val.deficit { color: #dc2626; }

.kpi-sub {
  font-size: 0.75rem;
  color: #64748b;
}

.review-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 0 1.25rem 1.25rem;
}

.review-table-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.table-card-header {
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-card-header.income-header {
  background: #ecfdf5;
  color: #047857;
  border-bottom: 1px solid #a7f3d0;
}

.table-card-header.expense-header {
  background: #fffbeb;
  color: #b45309;
  border-bottom: 1px solid #fde68a;
}

.btn-edit-pill {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid currentColor;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  cursor: pointer;
}

.review-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.review-data-table th, .review-data-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.review-data-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
}

.table-total-row {
  background: #f8fafc;
  border-top: 2px solid #cbd5e1;
}

/* Wizard Action Buttons */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1.25rem;
}

.wizard-actions.right-align {
  justify-content: flex-end;
}

.btn-wizard-next, .btn-wizard-submit {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-wizard-next:hover, .btn-wizard-submit:hover {
  background: #047857;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-wizard-next:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-wizard-back {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-wizard-back:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Confirmation Page Card */
.confirmation-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.conf-badge {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.conf-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #059669;
  margin-bottom: 0.35rem;
}

.conf-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1.75rem;
}

.conf-details-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  max-width: 550px;
  margin: 0 auto 2rem;
  padding: 1.25rem 1.5rem;
  text-align: left;
}

.conf-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.9rem;
}

.conf-row:last-child {
  border-bottom: none;
}

.highlight-id {
  font-family: monospace;
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 4px;
}

.conf-actions-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-download-pdf-large {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border: none;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn-secondary-action {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline-action {
  background: transparent;
  border: 1.5px solid #059669;
  color: #059669;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

/* Spinner Card */
.submitting-spinner-card {
  text-align: center;
  padding: 4rem 1.5rem;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid #d1fae5;
  border-top-color: #059669;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

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

/* Admin Tabs & Badges */
.admin-tab-nav {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.25rem;
  gap: 0.5rem;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tab-btn.active {
  color: #059669;
  border-bottom-color: #059669;
}

.admin-filter-bar {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-filter-bar input, .admin-filter-bar select {
  padding: 0.5rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
}

.admin-filter-bar input {
  flex: 1;
  min-width: 200px;
}

.period-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.period-badge.yearly {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.period-badge.monthly {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.status-pill.status-submitted {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.status-verified {
  background: #e0e7ff;
  color: #3730a3;
}

.status-pill.status-approved {
  background: #dcfce7;
  color: #166534;
}

.status-pill.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.table-action-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.table-action-btn:hover {
  background: #e2e8f0;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #printReceiptSection, #printReceiptSection * {
    visibility: visible;
  }
  #printReceiptSection {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    display: block !important;
  }
}


