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

:root {
  --primary-deep: #064e3b;
  --primary-emerald: #059669;
  --primary-light: #ecfdf5;
  --accent-gold: #d97706;
  --accent-amber: #f59e0b;
  --accent-light: #fef3c7;
  --dark-slate: #0a0f1d;
  --dark-navy: #0f172a;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #059669;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 8px 30px rgba(5, 150, 105, 0.15);
  --shadow-gold: 0 8px 25px rgba(217, 119, 6, 0.25);
  --shadow-paper: 0 20px 40px -10px rgba(15, 23, 42, 0.2), 0 0 1px 1px rgba(0,0,0,0.05);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LUXURY APP HEADER & GLASS NAVIGATION
   ========================================================================== */
.app-header {
  background: linear-gradient(135deg, #09131e 0%, #0d1b2a 45%, #062b20 100%);
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gold Gradient Top Accent Line */
.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 25%, #10b981 50%, #f59e0b 75%, #d97706 100%);
}

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

.brand-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.3s ease;
}

.brand-logo-badge:hover {
  transform: scale(1.05) rotate(3deg);
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.brand-text p {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.badge-tag {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* SLEEK GLASS FLOATING NAVIGATION TABS */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.nav-tab {
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-tab.active {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 4px 15px rgba(4, 120, 87, 0.4);
}

.tab-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
  animation: pulseBadge 2s infinite;
}

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

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

/* User & Notification Controls */
.header-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.user-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 800;
}

/* Action Header Buttons */
.btn-ai-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  transition: all 0.25s ease;
}

.btn-ai-header:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
  filter: brightness(1.08);
}

.btn-pdf-header {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
  transition: all 0.25s ease;
}

.btn-pdf-header:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.6);
  filter: brightness(1.08);
}

/* ==========================================================================
   APP BODY & MODERN FLOATING QUICK BAR
   ========================================================================== */
.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 28px;
  max-width: 1720px;
  margin: 0 auto;
  width: 100%;
  gap: 18px;
}

/* Elevated Quick Bar */
.quick-bar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.quick-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.control-item:focus-within {
  border-color: var(--primary-emerald);
}

.control-item label {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-deep);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.control-select {
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  cursor: pointer;
}

.control-input-num {
  border: none;
  background: transparent;
  width: 60px;
  font-size: 13px;
  font-weight: 800;
  color: var(--dark-slate);
  outline: none;
}

/* Modern Buttons */
.btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--primary-deep);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.3);
}

.btn-primary:hover {
  background: #044333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.4);
}

.btn-accent {
  background: var(--accent-gold);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
  background: #b45309;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.btn-outline {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #334155;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-whatsapp {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.btn-whatsapp:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
}

/* ==========================================================================
   STUDIO TWO-COLUMN LAYOUT & SHOWROOM PREVIEW
   ========================================================================== */
.studio-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1300px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Editor Panel */
.editor-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Accordion Sections */
.form-section {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.section-header {
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-deep);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

/* Hotel Option Cards */
.hotel-opt-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hotel-opt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-deep);
}

/* Itinerary Day Form Items */
.day-edit-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-edit-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--dark-slate);
}

/* Right Studio: Velvet Luxury Showroom Backdrop */
.preview-panel {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 850px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
}

.preview-toolbar {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 10px;
  color: #ffffff;
}

.trackable-tag {
  background: #064e3b;
  border: 1px solid #10b981;
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* THE B2B PDF SHEET (Printed & Rendered) */
.b2b-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 900px;
  padding: 28px 34px;
  border-radius: 8px;
  box-shadow: var(--shadow-paper);
  border-top: 8px solid var(--primary-deep);
  position: relative;
  font-size: 12px;
  line-height: 1.4;
  color: #1e293b;
}

.sheet-meta-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 10px;
  color: #475569;
  margin-bottom: 14px;
}

.sheet-meta-bar .meta-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 14px;
  margin-bottom: 14px;
  gap: 12px;
}

.sheet-brand {
  display: flex;
  flex-direction: column;
}

.sheet-brand .brand-main {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 900;
  color: var(--primary-deep);
  letter-spacing: 0.8px;
  line-height: 1.1;
}

.sheet-brand .brand-sub {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.sheet-center-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.partnership-badge {
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  border: 1.5px solid #d97706;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
  display: inline-block;
  white-space: nowrap;
}

.sheet-hero {
  text-align: center;
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #022c22 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 15px rgba(6, 78, 59, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.sheet-hero h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 16.5px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sheet-hero-pills {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 10px;
  font-weight: 700;
  color: #a7f3d0;
  margin-top: 6px;
  flex-wrap: wrap;
}

.sheet-hero-pills span {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sheet-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-deep);
  margin-top: 14px;
  margin-bottom: 6px;
  text-transform: uppercase;
  border-left: 4px solid var(--accent-gold);
  padding-left: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  font-size: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.sheet-table th {
  background-color: var(--primary-deep);
  color: #ffffff;
  text-align: left;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sheet-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.sheet-table tr:nth-child(even) {
  background-color: #fafbfc;
}

/* Rate Cell Box (No redundant text, high-end styling) */
.rate-cell-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rate-usd-line {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.rate-usd-val {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: #064e3b;
  letter-spacing: -0.2px;
}

.rate-usd-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.rate-inr-tag {
  font-size: 10px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 7px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-block;
  letter-spacing: 0.2px;
}

.sheet-itinerary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.sheet-day-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 10px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sheet-day-card strong {
  color: var(--primary-deep);
  font-size: 11px;
  display: block;
  margin-bottom: 3px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 2px;
}

.sheet-day-card ul {
  margin: 0;
  padding-left: 12px;
  color: #334155;
}

.sheet-day-card .day-stay {
  margin-top: 4px;
  font-weight: 700;
  font-size: 9px;
  color: #b45309;
}

.sheet-boxes {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.sheet-box {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.35;
}

.sheet-box h4 {
  margin: 0 0 4px 0;
  color: var(--primary-deep);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 3px;
}

.sheet-box ul {
  margin: 0;
  padding-left: 14px;
}

.sheet-strip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 10px;
}

/* Official Registered Entities & Address Letterhead Box */
.sheet-address-letterbox {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
}

.address-box-col {
  flex: 1;
  font-size: 9px;
  line-height: 1.35;
  color: #475569;
}

.address-box-col:first-child {
  border-right: 1px solid #e2e8f0;
  padding-right: 10px;
}

.entity-badge {
  font-size: 8.5px;
  font-weight: 900;
  color: #064e3b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.entity-legal-name {
  font-weight: 800;
  color: #0f172a;
  font-size: 9.5px;
  margin-bottom: 2px;
}

.entity-line {
  margin-bottom: 1px;
}

.entity-line strong {
  color: #334155;
}

.sheet-footer {
  margin-top: 10px;
  background: var(--dark-slate);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-contacts {
  display: flex;
  gap: 16px;
}

.footer-contacts span strong {
  color: var(--accent-amber);
}

/* ==========================================================================
   TABLES, CARDS & PIPELINE
   ========================================================================== */
.data-table-wrap {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  text-align: left;
  padding: 12px 16px;
  font-weight: 800;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.4px;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
}

.data-table tr:hover {
  background: #f8fafc;
}

/* Pipeline Badges */
.status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-pill.stage-new { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.status-pill.stage-followup { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.status-pill.stage-converted { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.status-pill.stage-completed { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.status-pill.stage-lost { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* Filter Tabs */
.pipeline-filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.pipeline-filter-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.pipeline-filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.pipeline-filter-btn.active {
  background: var(--primary-deep);
  color: #ffffff;
  border-color: var(--primary-deep);
}

.pipeline-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
}

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

.stat-card {
  background: #ffffff;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stat-card .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--primary-deep);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 29, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.2s ease-out;
}

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

.modal-header {
  padding: 16px 22px;
  background: linear-gradient(135deg, #09131e 0%, #0f172a 100%);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent-gold);
}

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   LUXURY FULL-SCREEN LOGIN GATEWAY
   ========================================================================== */
.login-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #09131e 0%, #0d1b2a 50%, #062b20 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(245, 158, 11, 0.3);
  width: 100%;
  max-width: 440px;
  padding: 34px 28px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d97706, #f59e0b, #10b981, #d97706);
}

.login-brand-area {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  border: 2px solid #f59e0b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
  box-shadow: 0 8px 25px rgba(4, 120, 87, 0.5);
}

.login-brand-area h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-transform: uppercase;
}

.login-brand-area p {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}

.login-form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-form-group label {
  font-size: 11px;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.login-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.login-input:focus {
  border-color: #10b981;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 50%, #064e3b 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #ffffff;
  padding: 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
  transition: all 0.25s ease;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.6);
  filter: brightness(1.08);
}

.quick-team-select {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.quick-team-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.team-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.team-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateX(2px);
}

/* User Menu Dropdown */
.user-dropdown-menu {
  position: absolute;
  top: 52px;
  right: 24px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  width: 230px;
  display: none;
  flex-direction: column;
  z-index: 1500;
  overflow: hidden;
  animation: modalPop 0.15s ease-out;
}

.user-dropdown-menu.active {
  display: flex;
}

.dropdown-user-header {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-item {
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dropdown-item.danger {
  color: #ef4444;
  border-top: 1px solid var(--border-color);
}

.dropdown-item.danger:hover {
  background: #fef2f2;
}

/* ==========================================================================
   MOBILE STUDIO VIEW SEGMENTED TOGGLE (Editor vs Preview)
   ========================================================================== */
.mobile-view-toggle {
  display: none;
  background: #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  margin-top: 12px;
  gap: 4px;
}

.mobile-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #475569;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mobile-toggle-btn.active {
  background: #ffffff;
  color: var(--primary-deep);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   ULTRA-RESPONSIVE MOBILE & TABLET STYLES
   ========================================================================== */
@media (max-width: 900px) {
  .mobile-view-toggle {
    display: flex;
  }

  .editor-panel.mobile-hidden,
  .showroom-stage.mobile-hidden {
    display: none !important;
  }

  .app-body {
    padding: 12px 10px;
    gap: 12px;
  }

  .studio-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    margin-top: 12px !important;
  }

  .editor-panel {
    max-height: none;
    overflow-y: visible;
  }

  .showroom-stage {
    padding: 12px 4px;
    max-height: none;
    overflow: visible;
  }

  .sheet-preview-paper {
    padding: 14px 10px;
    max-width: 100%;
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  /* Header & Navigation */
  .app-header {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-area {
    gap: 8px;
  }

  .brand-logo-badge {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .brand-text h1 {
    font-size: 13px;
  }

  .brand-text p {
    display: none;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    justify-content: flex-start;
    padding: 4px 2px;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2px;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .header-actions {
    gap: 5px;
  }

  #header-user-name {
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-ai-header, .btn-pdf-header {
    padding: 6px 9px;
    font-size: 11px;
  }

  /* Floating Quick Bar */
  .quick-bar {
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .quick-bar-left, .quick-bar-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .control-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .control-select, .control-input-num {
    width: 100% !important;
    min-width: 100% !important;
  }

  .quick-bar-right .btn {
    width: 100%;
    justify-content: center;
  }

  /* Sheet Preview Card on Mobile */
  .sheet-double-crest {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .seal-badge {
    align-self: flex-start;
  }

  .sheet-boxes {
    flex-direction: column;
    gap: 8px;
  }

  .sheet-address-letterbox {
    flex-direction: column;
    gap: 8px;
  }

  .address-box-col:first-child {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding-right: 0;
    padding-bottom: 8px;
  }

  .sheet-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer-contacts {
    flex-direction: column;
    gap: 3px;
  }

  /* Tables & Lists */
  .data-table-wrap {
    padding: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pipeline-filter-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 6px;
  }

  .pipeline-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .pipeline-tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 11px;
    padding: 6px 12px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Task Cards */
  .task-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .task-card .task-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Modals */
  .modal-dialog {
    max-width: 96vw;
    margin: 8px auto;
    max-height: 90vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-body {
    padding: 14px 16px;
  }

  .modal-footer {
    padding: 10px 16px;
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* Login Screen */
  .login-card {
    padding: 24px 16px;
    max-width: 94vw;
    border-radius: 16px;
  }

  .login-brand-area h2 {
    font-size: 17px;
  }
}
