/* ==============================================================================
   ChequePrint Pro - Premium Glassmorphic Design System (Vanilla CSS)
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg-dark: #070913;
  --bg-gradient: linear-gradient(135deg, #070913 0%, #0f132a 50%, #151a3d 100%);

  /* Glassmorphic Surfaces */
  --glass-bg: rgba(18, 22, 47, 0.65);
  --glass-bg-hover: rgba(26, 32, 69, 0.8);
  --glass-bg-active: rgba(35, 43, 92, 0.95);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-glow: rgba(46, 102, 255, 0.35);

  /* Solid Brand Colors */
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.3);
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);

  --secondary: #8b5cf6;
  --secondary-glow: rgba(139, 92, 246, 0.3);
  --secondary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);

  --accent: #f43f5e;
  --accent-glow: rgba(244, 63, 94, 0.3);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Utility Specs */
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Courier New', monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --sidebar-width: 260px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==============================================================================
   1. AUTH PORTAL (GUEST MODE)
   ============================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.auth-container {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.auth-sidebar {
  background: linear-gradient(135deg, rgba(15, 19, 42, 0.9) 0%, rgba(7, 9, 19, 0.95) 100%);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--glass-border);
  position: relative;
}

.auth-sidebar::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 120px;
  height: 120px;
  background: var(--primary);
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--primary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: white;
}

.auth-welcome h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-welcome p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.auth-features-list {
  margin-top: 30px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-feature-item svg {
  color: var(--success);
  flex-shrink: 0;
}

.auth-form-side {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 30px;
  border: 1px solid var(--glass-border);
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: var(--glass-bg-active);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: var(--transition);
}

.form-input-wrapper:focus-within {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-icon {
  flex-shrink: 0;
  margin-left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input-wrapper input {
  flex: 1;
  min-width: 0;
  padding: 12px 10px;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: white;
  outline: none;
}

.form-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.form-input-wrapper input:focus {
  outline: none;
  box-shadow: none;
  border: none;
  background: transparent;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  margin-top: 10px;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ── Password Eye Toggle ── */

.pw-toggle-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
  outline: none;
  line-height: 0;
}

.pw-toggle-btn:hover,
.pw-toggle-btn.pw-visible {
  color: var(--primary);
}

/* ── Forgot Password link ── */
.forgot-pw-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.forgot-pw-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.2px;
}

.forgot-pw-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ── Password Strength ── */
.pw-strength-wrap {
  margin-top: 10px;
}

.pw-strength-bar {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.4s ease, background 0.4s ease;
  background: var(--text-muted);
}

.pw-strength-fill.weak   { background: #f43f5e; }
.pw-strength-fill.fair   { background: #f59e0b; }
.pw-strength-fill.good   { background: #3b82f6; }
.pw-strength-fill.strong { background: var(--success); }

.pw-req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
}

.pw-req {
  font-size: 11px;
  color: var(--text-muted);
  transition: color 0.25s;
}

.pw-req.met {
  color: var(--success);
}

/* ── Forgot Password Modal ── */
.fp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.fp-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.fp-modal {
  background: linear-gradient(135deg, rgba(18, 22, 47, 0.97) 0%, rgba(10, 14, 36, 0.99) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
}

.fp-modal-overlay.active .fp-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.fp-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  position: relative;
}

.fp-modal-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.fp-modal-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.fp-modal-header p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.fp-modal-close {
  position: absolute;
  top: -4px;
  right: -4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  line-height: 1;
}

.fp-modal-close:hover {
  background: rgba(244,63,94,0.12);
  border-color: rgba(244,63,94,0.3);
  color: var(--accent);
}

/* ==============================================================================
   2. DASHBOARD LAYOUT & SIDEBAR
   ============================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  margin-bottom: 35px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item button {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: var(--transition);
  text-align: left;
}

.menu-item button svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: var(--transition);
}

.menu-item button:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.menu-item button:hover svg {
  color: var(--primary);
}

.menu-item.active button {
  background: rgba(59, 130, 246, 0.15);
  color: #fff;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.menu-item.active button svg {
  color: var(--primary);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-profile-badge {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  background: var(--secondary-gradient);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-plan {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.profile-plan.free {
  color: var(--text-muted);
}

.profile-plan.premium {
  color: var(--secondary);
  background: rgba(139, 92, 246, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.logout-btn {
  background: rgba(244, 63, 94, 0.05) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(244, 63, 94, 0.1) !important;
}

.logout-btn:hover {
  background: rgba(244, 63, 94, 0.15) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
  color: #fff !important;
}

/* ==============================================================================
   3. MAIN WORKSPACE / VIEWS
   ============================================================================== */
.main-workspace {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 40px;
  min-height: 100vh;
  position: relative;
}

.view-section {
  display: none;
  animation: fadeIn 0.35s ease-out forwards;
}

.view-section.active {
  display: block;
}

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

.view-header {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-title h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.view-title p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* ==============================================================================
   4. DASHBOARD HOMEPAGE VIEW
   ============================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 24px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.stats-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-glow);
}

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

.stats-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stats-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}

.stats-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-card.blue .stats-icon-wrap {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.stats-card.purple .stats-icon-wrap {
  background: rgba(139, 92, 246, 0.1);
  color: var(--secondary);
}

.stats-card.cyan .stats-icon-wrap {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

/* Membership Upgrade Banner */
.upgrade-banner {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, rgba(59, 130, 246, 0.2) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 24px 30px;
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 4px 30px rgba(139, 92, 246, 0.1);
}

.upgrade-text h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.upgrade-text p {
  color: var(--text-secondary);
  font-size: 14px;
}

.upgrade-btn {
  background: var(--secondary-gradient);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Charts Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}

.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.chart-wrapper {
  position: relative;
  height: 280px;
}

/* ==============================================================================
   5. DYNAMIC WORKSPACE COMPONENT (PRINTER & TEMPLATE EDITOR)
   ============================================================================== */
.creator-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
  align-items: start;
}

.creator-panel-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: -14px;
  margin-bottom: 20px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-select,
.form-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: white;
  outline: none;
  transition: var(--transition);
}

.form-select:focus,
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-select option {
  background: var(--bg-dark);
  color: white;
}

/* Amount field with words checkbox integration */
.amt-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.amt-row .form-field {
  flex: 1;
  margin-bottom: 0;
}

.amt-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  color: var(--text-secondary);
}

.amt-toggle-btn:hover {
  border-color: var(--primary);
}

.amt-toggle-btn.active {
  background: var(--primary-gradient);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.words-display-panel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 18px;
  display: none;
}

.words-display-panel.active {
  display: block;
}

.words-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.words-val {
  font-size: 12px;
  font-style: italic;
  color: var(--success);
  line-height: 1.5;
}

.form-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.form-toggle-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Custom switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--glass-border);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.switch input:checked+.slider {
  background-color: var(--primary);
}

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

.btn-block {
  width: 100%;
}

.btn-primary-glow {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-success-glow {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-success-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: var(--glass-border-glow);
}

.btn-upload {
  border-style: dashed;
  background: rgba(59, 130, 246, 0.03);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--primary);
}

.btn-upload:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--primary);
}

.clear-btn {
  border-color: rgba(244, 63, 94, 0.2);
  color: var(--accent);
  background: rgba(244, 63, 94, 0.02);
}

.clear-btn:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: var(--accent);
}

/* Date Spacing Slider styling */
.slider-group {
  margin-bottom: 20px;
}

.slider-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.slider-title label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.slider-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

.slider-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-controls button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: white;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.slider-controls button:hover {
  border-color: var(--primary);
}

.custom-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
  transition: var(--transition);
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

/* Two-column input row (used for px/cm canvas size controls) */
.props-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==============================================================================
   6. LIVE PREVIEW WRAPPER (CANVAS)
   ============================================================================== */
.preview-panel-wrap {
  position: sticky;
  top: 30px;
}

.preview-badge-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  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);
  }
}

#printer-canvas-container-wrap,
#template-canvas-container-wrap {
  width: 100%;
  position: relative;
  background: white;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  aspect-ratio: 660 / 270;
}

#p-cheque-svg,
#t-cheque-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#p-cheque-bg-img,
#t-cheque-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: none;
  z-index: 2;
}

.cheque-field-item {
  position: absolute;
  font-family: var(--font-mono);
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58%;
  user-select: none;
  cursor: default;
  z-index: 3;
}

.cheque-field-item.draggable {
  cursor: grab;
  border: 1.5px dashed #3b82f6;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
}

.cheque-field-item.draggable:active {
  cursor: grabbing;
}

#cf-amtWords {
  max-width: 74%;
  white-space: normal;
  line-height: 1.35;
}

/* Transform Resize Outlines */
#transform-box {
  position: absolute;
  border: 1.5px solid #3b82f6;
  pointer-events: none;
  z-index: 10;
}

#transform-box::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -16px;
  width: 1px;
  height: 16px;
  background: #3b82f6;
  transform: translateX(-50%);
}

.th-rot {
  position: absolute;
  left: 50%;
  top: -20px;
  width: 8px;
  height: 8px;
  border: 1.5px solid #3b82f6;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: all;
  cursor: crosshair;
  border-radius: 50%;
}

.th-res {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid #3b82f6;
  background: #fff;
  pointer-events: all;
}

#th-tl {
  top: -4px;
  left: -4px;
  cursor: nwse-resize;
}

#th-tr {
  top: -4px;
  right: -4px;
  cursor: nesw-resize;
}

#th-bl {
  bottom: -4px;
  left: -4px;
  cursor: nesw-resize;
}

#th-br {
  bottom: -4px;
  right: -4px;
  cursor: nwse-resize;
}

#th-ml {
  top: 50%;
  left: -4px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

#th-mr {
  top: 50%;
  right: -4px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.canvas-controls-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}

/* Template properties card when field is clicked */
.props-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.props-btn-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.prop-modifier-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.prop-modifier-btn:hover {
  border-color: var(--primary);
  color: white;
}

.prop-modifier-btn.active {
  background: var(--primary-gradient);
  border-color: var(--primary);
  color: white;
}

/* Predefined list of user templates */
.tpl-accordian {
  border-top: 1px solid var(--glass-border);
  margin-top: 20px;
  padding-top: 15px;
}

.tpl-acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.tpl-acc-header h4 {
  font-size: 14px;
  font-weight: 700;
}

.tpl-acc-arrow {
  font-size: 11px;
  color: var(--text-muted);
  transition: var(--transition);
}

.tpl-acc-arrow.open {
  transform: rotate(180deg);
}

.tpl-acc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.tpl-acc-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.tpl-acc-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border-glow);
}

.tpl-acc-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.tpl-acc-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  padding: 4px;
  border-radius: 6px;
}

.tpl-acc-delete-btn:hover {
  color: var(--accent);
  background: rgba(244, 63, 94, 0.1);
}

/* ==============================================================================
   7. PRINT HISTORY VIEW (DATATABLE)
   ============================================================================== */
.table-filter-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-wrapper input {
  padding-left: 40px !important;
}

.search-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.table-panel-box {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.premium-datatable {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.premium-datatable th {
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 16px 20px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-datatable td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.premium-datatable tr:last-child td {
  border-bottom: none;
}

.premium-datatable tbody tr {
  transition: var(--transition);
}

.premium-datatable tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-ac-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.table-ac-badge.yes {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.table-ac-badge.no {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
}

.table-actions-row {
  display: flex;
  gap: 8px;
}

.table-action-icon-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.table-action-icon-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-glow);
  color: white;
}

.table-action-icon-btn.delete:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent);
}

.table-empty-notice {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ==============================================================================
   8. MEMBERSHIP SUITE VIEW (PAYPRO BILLING SECTIONS)
   ============================================================================== */
.membership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.pricing-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.pricing-card.premium {
  border-color: var(--secondary);
  background: linear-gradient(180deg, rgba(18, 22, 47, 0.65) 0%, rgba(139, 92, 246, 0.05) 100%);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.15);
}

.pricing-card.premium::before {
  content: 'POPULAR';
  position: absolute;
  top: 15px;
  right: -30px;
  background: var(--secondary-gradient);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 30px;
  transform: rotate(45deg);
  letter-spacing: 1px;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-tier {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.pricing-card.premium .pricing-tier {
  color: var(--secondary);
}

.pricing-price {
  margin-bottom: 25px;
}

.price-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: white;
}

.price-period {
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  margin-bottom: 40px;
  flex: 1;
}

.pricing-feature-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-feature-line svg {
  color: var(--primary);
  flex-shrink: 0;
}

.pricing-card.premium .pricing-feature-line svg {
  color: var(--secondary);
}

/* ==============================================================================
   9. INTERACTIVE FLOATING AI CHATBOT SYSTEM
   ============================================================================== */
.chatbot-trigger-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transition: var(--transition);
  z-index: 999;
}

.chatbot-trigger-btn:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.6);
}

.chatbot-widget-panel {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 520px;
  background: rgba(18, 22, 47, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 998;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatbot-widget-panel.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chatbot-header {
  background: linear-gradient(135deg, rgba(15, 19, 42, 0.6) 0%, rgba(7, 9, 19, 0.6) 100%);
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-bot-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.bot-title {
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.bot-status {
  font-size: 11px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bot-status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.chatbot-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.chatbot-close-btn:hover {
  color: white;
}

.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: popIn 0.3s ease-out forwards;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.chat-message.user {
  align-self: flex-end;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-message.bot .message-bubble {
  background: var(--glass-bg-hover);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-message.user .message-bubble {
  background: var(--primary-gradient);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.message-bubble p {
  margin-bottom: 8px;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble ul,
.message-bubble ol {
  margin-left: 18px;
  margin-bottom: 8px;
}

.message-timestamp {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  align-self: flex-end;
}

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

/* Bot suggestion pills */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 10px;
}

.suggestion-pill {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.suggestion-pill:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--primary);
  color: white;
}

/* Chat Input Bar */
.chatbot-input-bar {
  border-top: 1px solid var(--glass-border);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
}

.chat-field {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: white;
  outline: none;
  transition: var(--transition);
}

.chat-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.chat-send-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.chat-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Loading dots indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 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 bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1.0);
  }
}

/* ==============================================================================
   10. MOBILE COMPATIBILITY & PRINTER STYLES
   ============================================================================== */
@media (max-width: 1024px) {
  .creator-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel-wrap {
    position: static;
  }
}

@media (max-width: 860px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 16px;
  }

  .sidebar-logo {
    margin-bottom: 15px;
  }

  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .menu-item {
    flex: 1;
    min-width: 120px;
  }

  .sidebar-bottom {
    display: none;
    /* Hide profile summary on mobile to conserve space */
  }

  .main-workspace {
    margin-left: 0;
    padding: 20px;
  }

  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-sidebar {
    display: none;
  }
}

@media print {
  body>*:not(#print-area) {
    display: none !important;
  }

  #print-area {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    background: white;
  }

  @page {
    size: landscape;
    margin: 5mm;
  }
}

/* ==============================================================================
   6. CHEQUE BOOKS & LEAVES STYLES
   ============================================================================== */
.chequebook-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  transition: var(--transition);
}

.chequebook-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-glow);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

.cb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.cb-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.cb-card-bank {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.cb-card-acc {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.cb-badge {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.cb-card-stats {
  margin: 15px 0;
}

.cb-progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin: 8px 0;
}

.cb-progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

.cb-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.cb-leaves-detail {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.cb-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.cb-status-badge {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.cb-status-badge.unused {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.cb-status-badge.printed,
.cb-status-badge.used {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.cb-status-badge.cleared {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cb-status-badge.bounced {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

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

/* ==============================================================================
   SETTINGS PANEL
   ============================================================================== */
.settings-accordion {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.settings-accordion-hdr {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.settings-accordion-hdr:hover {
  background: rgba(255,255,255,0.03);
}

.settings-accordion-hdr.active {
  border-bottom-color: var(--glass-border);
  color: #fff;
}

.accordion-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.settings-accordion-hdr.active .accordion-chevron {
  transform: rotate(180deg);
}

.settings-accordion-body {
  padding: 24px;
  display: none;
}

.settings-accordion-hdr.active + .settings-accordion-body {
  display: block;
}

.settings-row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  margin-top: 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
}

.settings-row-label:first-child {
  margin-top: 0;
}

.settings-prefixsuffix-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ps-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 130px;
}

.ps-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ps-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
}

.ps-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.ps-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: white;
  width: 100%;
}

.ps-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.ps-clear-btn:hover {
  color: var(--accent);
}

/* Toggle Row */
.ps-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 2px;
}

.ps-toggle-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Toggle Switch */
.ws-toggle-switch {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.ws-toggle-switch input {
  display: none;
}

.ws-toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
}

.ws-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.ws-toggle-switch input:checked + .ws-toggle-track {
  background: var(--primary);
  border-color: var(--primary);
}

.ws-toggle-switch input:checked + .ws-toggle-track .ws-toggle-thumb {
  left: 23px;
  background: #fff;
}

/* Preview Row */
.ws-preview-row {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-preview-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.ws-preview-value {
  font-size: 13px;
  font-style: italic;
  color: var(--success);
  line-height: 1.4;
}

/* PDC Action Column Buttons */
.pdc-actions-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.btn-pdc-clear {
  background: #0fa57c;
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(15, 165, 124, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pdc-clear:hover {
  background: #0d906b;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 165, 124, 0.5);
}

.btn-pdc-bounce {
  background: transparent;
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 5px 13px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pdc-bounce:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: #f43f5e;
  transform: translateY(-1px);
}

.btn-pdc-void {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 5px 13px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pdc-void:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Active / selected states */
.btn-pdc-clear.active {
  background: #0fa57c;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 165, 124, 0.4);
  opacity: 1;
}

.btn-pdc-bounce.active {
  background: #f43f5e;
  color: #ffffff;
  border-color: #f43f5e;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
  opacity: 1;
}

.btn-pdc-void.active {
  background: #64748b;
  color: #ffffff;
  border-color: #64748b;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
  opacity: 1;
}

/* If one is active, the others are slightly faded */
.pdc-actions-container.has-active .btn-pdc-clear:not(.active),
.pdc-actions-container.has-active .btn-pdc-bounce:not(.active),
.pdc-actions-container.has-active .btn-pdc-void:not(.active) {
  opacity: 0.35;
  box-shadow: none;
}

/* ==============================================================================
   PDC ROW DATE HIGHLIGHTS
   ============================================================================== */

/* Due TODAY — amber/gold pulse to demand attention */
tr.pdc-due-today {
  background: rgba(245, 158, 11, 0.10) !important;
  border-left: 3px solid #f59e0b !important;
  animation: pdcPulseToday 2.4s ease-in-out infinite;
}

tr.pdc-due-today td {
  color: #fde68a !important;
}

tr.pdc-due-today td:first-child {
  font-weight: 800 !important;
  color: #f59e0b !important;
}

@keyframes pdcPulseToday {
  0%, 100% { background: rgba(245, 158, 11, 0.10); }
  50%       { background: rgba(245, 158, 11, 0.20); }
}

/* Due TOMORROW — soft blue-violet tint, no animation */
tr.pdc-due-tomorrow {
  background: rgba(139, 92, 246, 0.10) !important;
  border-left: 3px solid #8b5cf6 !important;
}

tr.pdc-due-tomorrow td {
  color: #ddd6fe !important;
}

tr.pdc-due-tomorrow td:first-child {
  font-weight: 700 !important;
  color: #a78bfa !important;
}

/* Badge chips shown next to the date for extra clarity */
.pdc-due-chip {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.pdc-due-chip.today {
  background: rgba(245, 158, 11, 0.25);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.pdc-due-chip.tomorrow {
  background: rgba(139, 92, 246, 0.20);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

/* ==============================================================================
   QUICK PAYEE MANAGER — Payee input row + modal styles
   ============================================================================== */

/* ── "+" Payees button row next to the Payee Name input ── */
.payee-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.payee-input-row .form-input {
  flex: 1;
  min-width: 0;
}

.payee-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  letter-spacing: 0.3px;
}

.payee-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.55);
}

.payee-add-btn:active {
  transform: translateY(0);
}

/* ── Modal box ── */
.quick-payee-modal-box {
  background: linear-gradient(160deg, rgba(15, 19, 50, 0.98) 0%, rgba(10, 14, 38, 0.99) 100%);
  border: 1px solid var(--glass-border-glow);
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  margin: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(59, 130, 246, 0.12);
  animation: qpModalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

@keyframes qpModalIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Modal header ── */
.quick-payee-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(59, 130, 246, 0.04);
  flex-shrink: 0;
}

.quick-payee-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.quick-payee-close-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent);
}

/* ── Two-column layout inside modal ── */
.quick-payee-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* ── Left column ── */
.quick-payee-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.quick-payee-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.quick-payee-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
}

.quick-payee-search-input::placeholder {
  color: var(--text-muted);
}

.quick-payee-add-new-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 12px 6px;
  padding: 9px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 9px;
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.quick-payee-add-new-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary);
}

.quick-payee-add-new-btn.active {
  background: rgba(59, 130, 246, 0.22);
  border-style: solid;
  border-color: var(--primary);
}

/* ── Payee list ── */
.quick-payee-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
}

.quick-payee-list::-webkit-scrollbar { width: 5px; }
.quick-payee-list::-webkit-scrollbar-track { background: transparent; }
.quick-payee-list::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }

.quick-payee-list-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 30px 10px;
}

.quick-payee-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  margin-bottom: 3px;
}

.quick-payee-item:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.15);
}

.quick-payee-item.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.35);
}

.qpi-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qpi-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Print directory button ── */
.quick-payee-print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  margin: 8px 12px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.quick-payee-print-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Right column: Form ── */
.quick-payee-right {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.quick-payee-right::-webkit-scrollbar { width: 5px; }
.quick-payee-right::-webkit-scrollbar-track { background: transparent; }
.quick-payee-right::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }

.quick-payee-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.quick-payee-form-header span:first-child {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.qp-form-mode-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
  text-transform: uppercase;
}

.qp-form-mode-badge.edit {
  background: rgba(139, 92, 246, 0.15);
  color: var(--secondary);
  border-color: rgba(139, 92, 246, 0.25);
}

/* ── Form fields ── */
.qp-field {
  margin-bottom: 12px;
}

.qp-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.qp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Alert messages ── */
.qp-form-error {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.5;
}

.qp-form-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Action buttons row ── */
.qp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
  gap: 8px;
  flex-wrap: wrap;
}

.qp-save-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 9px 18px !important;
  font-size: 13px !important;
}

.qp-use-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 9px;
  color: var(--success);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.qp-use-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--success);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.qp-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 9px;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.qp-delete-btn:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.2);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .quick-payee-layout {
    grid-template-columns: 1fr;
  }
  .quick-payee-left {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    max-height: 200px;
  }
  .qp-two-col {
    grid-template-columns: 1fr;
  }
}

/* ── Payee Autocomplete Suggestions Dropdown ── */
.payee-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(15, 19, 50, 0.98) 0%, rgba(10, 14, 38, 0.99) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border-glow);
  border-radius: 8px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.payee-autocomplete-dropdown::-webkit-scrollbar {
  width: 4px;
}
.payee-autocomplete-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.payee-autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 2px;
}

.payee-autocomplete-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.payee-autocomplete-item:hover,
.payee-autocomplete-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
}

.payee-autocomplete-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

