/* ==========================================================================
   VoiceQuote Israel - Professional RTL UI Design System
   ========================================================================== */

:root {
  --bg-main: #0b1329;
  --bg-card: #152238;
  --bg-card-hover: #1e2d4a;
  --bg-input: #0f192e;
  --border-color: #2a3b5c;
  --border-focus: #0284c7;
  
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.35);
  
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);
  --font-family: 'Rubik', 'Heebo', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  padding-bottom: 90px;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

/* Container & Grid */
.app-container {
  max-width: 768px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(21, 34, 56, 0.95);
  backdrop-filter: blur(12px);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-emerald));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-info p {
  font-size: 0.8rem;
  color: var(--accent-emerald);
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover, .icon-btn:active {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Hero Recording Card */
.recording-hero {
  background: linear-gradient(180deg, #152238 0%, #0f192e 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-top: 16px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-card);
}

.mic-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 10px auto 20px;
}

.mic-btn {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #0369a1);
  border: 3px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.5);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
  outline: none;
}

.mic-btn:active {
  transform: scale(0.94);
}

.mic-btn.recording {
  background: linear-gradient(135deg, var(--accent-rose), #be123c);
  box-shadow: 0 8px 30px rgba(244, 63, 94, 0.6);
  animation: pulse-recording 1.5s infinite;
}

.mic-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary);
  opacity: 0;
  z-index: 1;
}

.mic-btn.recording + .mic-pulse-ring {
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-recording {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; border-color: var(--accent-rose); }
  100% { transform: scale(1.6); opacity: 0; border-color: var(--accent-rose); }
}

.recording-status {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.recording-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Transcript Box */
.transcript-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 70px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--text-main);
  text-align: right;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.transcript-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Section Titles */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 14px;
  color: var(--text-main);
}

.section-title span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card Component */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.form-group.full-width {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

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

input, textarea, select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  direction: rtl;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Line Items Table */
.items-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.item-row {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  transition: border-color 0.2s ease;
}

.item-row:hover {
  border-color: rgba(2, 132, 199, 0.4);
}

.item-total {
  font-weight: 700;
  color: var(--accent-emerald);
  font-size: 1rem;
  text-align: left;
  direction: ltr;
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.btn-remove:hover {
  background: rgba(244, 63, 94, 0.15);
}

.btn-add-item {
  background: rgba(16, 185, 129, 0.1);
  border: 1px dashed var(--accent-emerald);
  color: var(--accent-emerald);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-item:hover {
  background: var(--accent-emerald);
  color: white;
}

/* Quote Totals Card */
.summary-card {
  background: linear-gradient(135deg, #1e2d4a 0%, #152238 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.summary-row.total {
  border-bottom: none;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-emerald);
  padding-top: 14px;
}

/* App Footer */
.app-footer {
  max-width: 768px;
  margin: 28px auto 36px;
  padding: 16px 20px 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  box-sizing: border-box;
}

.footer-promo-link {
  color: var(--primary-light);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.85;
}

.footer-promo-link:hover {
  color: #fff;
  text-decoration: underline;
  opacity: 1;
}

/* Legal Navigation in Footer - Clean Links */
.footer-legal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  margin: 2px 0 6px 0;
}

.footer-legal-link,
.footer-legal-btn {
  background: none;
  border: none;
  box-shadow: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 400;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  transition: color 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.footer-legal-link:hover,
.footer-legal-btn:hover {
  color: var(--primary-light);
  text-decoration: underline;
  background: none;
  border: none;
  box-shadow: none;
  transform: none;
}

.footer-legal-sep {
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 0.7rem;
  user-select: none;
}

/* Modal Legal Tabs */
.modal-legal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-legal-tab-btn {
  flex: 1;
  min-width: 100px;
  padding: 7px 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all 0.2s ease;
}

.modal-legal-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.modal-legal-tab-btn.active {
  background: linear-gradient(135deg, var(--primary), #0369a1);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.8;
}

/* Floating Action Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 25, 46, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  max-width: 768px;
  margin: 0 auto;
  z-index: 90;
  box-sizing: border-box;
}

.btn-primary {
  flex: 2;
  min-width: 0;
  box-sizing: border-box;
  background: linear-gradient(135deg, var(--primary), #0369a1);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.btn-whatsapp {
  flex: 1.8;
  min-width: 0;
  box-sizing: border-box;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  border: none;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  white-space: nowrap;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

body.modal-open {
  overflow: hidden !important;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-overlay:not(.active) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 94vw;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  box-sizing: border-box;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

/* Welcoming banner for introducing registration */
.auth-demand-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.16), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(2, 132, 199, 0.4);
  color: #e0f2fe;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.15);
  animation: fadeInDemand 0.3s ease-out;
}

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

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

/* PDF Printable Template Container (Completely hidden off-screen to prevent background leak) */
#pdf-template-wrapper {
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: -9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  width: 794px; /* Standard A4 width in px at 96 DPI */
  background: #ffffff;
  color: #1e293b;
  font-family: 'Rubik', sans-serif;
  direction: rtl;
  padding: 40px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

#pdf-template-wrapper.pdf-render-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 99999 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid #0284c7;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.pdf-business-info h2 {
  font-size: 24px;
  color: #0284c7;
  font-weight: 800;
  margin-bottom: 4px;
}

.pdf-business-info p {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.pdf-logo-box img {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
}

.pdf-title-bar {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.pdf-title-bar h1 {
  font-size: 20px;
  color: #0f172a;
}

.pdf-meta-item {
  font-size: 13px;
  color: #475569;
}

.pdf-client-card {
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.pdf-client-card h3 {
  font-size: 14px;
  color: #0284c7;
  margin-bottom: 8px;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.pdf-table th {
  background: #0284c7;
  color: white;
  padding: 10px 14px;
  font-size: 13px;
  text-align: right;
}

.pdf-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #334155;
}

.pdf-table tr:nth-child(even) {
  background: #f8fafc;
}

.pdf-totals-box {
  width: 300px;
  margin-right: auto;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 30px;
}

.pdf-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: #475569;
}

.pdf-total-row.grand {
  border-top: 2px solid #0284c7;
  padding-top: 10px;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0284c7;
}

.pdf-footer {
  margin-top: 40px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 12px;
  color: #64748b;
}

.signature-line {
  border-top: 1px dashed #94a3b8;
  width: 180px;
  text-align: center;
  padding-top: 6px;
  font-weight: 500;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Comprehensive Mobile & Desktop Responsive Design Engine
   ========================================================================== */

@media (max-width: 640px) {
  .app-header {
    padding: 10px 12px;
  }
  
  .brand-logo {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .brand-info h1 {
    font-size: 0.95rem;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-actions {
    gap: 5px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .app-container {
    padding: 10px;
    padding-bottom: 100px;
  }

  .recording-hero {
    padding: 16px 10px;
  }

  .mic-btn {
    width: 72px;
    height: 72px;
    font-size: 32px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
  }

  .item-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    padding: 10px;
  }

  .item-row .item-desc-input {
    grid-column: 1 / -1;
    font-size: 0.95rem;
  }

  .item-row .item-qty-input,
  .item-row .item-price-input {
    font-size: 0.9rem;
    padding: 8px;
  }

  .bottom-bar {
    padding: 8px 10px;
    gap: 8px;
  }

  .bottom-bar .btn-primary,
  .bottom-bar .btn-whatsapp {
    padding: 12px 6px;
    font-size: 0.85rem;
    gap: 4px;
  }

  .modal-card {
    width: 94vw;
    padding: 16px;
    max-height: 88vh;
    box-sizing: border-box;
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .item-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .item-total {
    text-align: right;
  }
  .bottom-bar {
    padding: 10px 5px;
    gap: 5px;
  }
  .bottom-bar .btn-primary {
    padding: 11px 4px;
    font-size: 0.8rem;
    gap: 3px;
  }
  .bottom-bar .btn-whatsapp {
    flex: 1.8;
    padding: 11px 4px;
    font-size: 0.8rem;
    gap: 3px;
  }
}

@media (max-width: 380px) {
  .brand-info h1 {
    display: none;
  }
  
  .bottom-bar .btn-primary,
  .bottom-bar .btn-whatsapp {
    font-size: 0.78rem;
    padding: 10px 4px;
  }
}

/* --- Off-canvas Left-to-Right Customer Drawer Styling --- */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
  transition: opacity 0.42s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.42s cubic-bezier(0.25, 1, 0.5, 1);
}

.drawer-backdrop.active {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.customer-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 90%;
  max-width: 420px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 1300;
  transform: translateX(-100%);
  transition: transform 0.42s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.customer-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-tabs {
  display: flex;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-color);
}

.drawer-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.drawer-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
  background: rgba(2, 132, 199, 0.08);
}

.drawer-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.drawer-tab-view {
  display: none;
}

.drawer-tab-view.active {
  display: block;
}

.drawer-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-quote-card, .customer-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.2s ease;
}

.saved-quote-card:hover, .customer-card:hover {
  border-color: var(--primary);
}

.quote-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.quote-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.btn-drawer-action {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-drawer-action:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-drawer-action.danger:hover {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
}

/* --- Off-canvas Right-to-Left Custom Price List Drawer Styling --- */
.price-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 90%;
  max-width: 420px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 1300;
  transform: translateX(100%);
  transition: transform 0.42s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.price-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

#price-add-form input {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.price-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.price-item-card:hover {
  border-color: var(--primary);
}

.btn-add-price-to-quote {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  padding: 0;
}

.btn-add-price-to-quote:hover {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-add-price-to-quote:active {
  transform: scale(0.94);
}

/* --- Startup Splash Screen --- */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0f172a, #020617);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-screen.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.splash-content {
  text-align: center;
  padding: 30px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-logo {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: splashPulse 1.8s infinite ease-in-out;
}

@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.splash-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 6px 0 24px 0;
}

.splash-spinner {
  width: 36px;
  height: 36px;
  border: 3.5px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: splashSpin 0.9s linear infinite;
  margin-bottom: 16px;
}

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

.splash-status {
  font-size: 0.85rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* AI Disclaimer Banner in Recording Section */
.ai-disclaimer-notice {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #f1f5f9;
  line-height: 1.45;
  text-align: right;
  direction: rtl;
}

.ai-disclaimer-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ai-disclaimer-text strong {
  color: #fbbf24;
}

/* PDF Verification & Disclaimer Box */
.pdf-verify-disclaimer-box {
  transition: all 0.25s ease;
}

.pdf-verify-disclaimer-box.highlight-pulse,
#reg-terms-box.highlight-pulse {
  animation: verifyPulse 0.8s ease infinite alternate;
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.18) !important;
}

@keyframes verifyPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  100% {
    transform: scale(1.015);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* Terms modal styling */
.terms-content {
  scrollbar-width: thin;
  scrollbar-color: #334155 #1e293b;
}

.terms-content::-webkit-scrollbar {
  width: 6px;
}

.terms-content::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 4px;
}

.terms-content::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}



