/* Amadeus PNR Translator - Refined macOS & Compact Desktop Theme */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --whatsapp-green: #16a34a;
  --whatsapp-hover: #15803d;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #3b82f6;
  --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --font-base: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 24px;
}

/* Header */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 18px;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  background: var(--primary-light);
  color: var(--primary);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 1px solid #dbeafe;
}

.brand-logo svg {
  width: 14px;
  height: 14px;
}

.brand-titles {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-titles h1 {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.brand-titles p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language Switcher */
.lang-switch-group {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 2px;
  border: 1px solid var(--border-color);
  height: 26px;
  align-items: center;
}

.lang-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  padding: 2px 7px;
  height: 20px;
  line-height: 1;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.lang-btn:hover {
  color: #0f172a;
}

.lang-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 12px;
  max-width: 1380px;
  margin: 12px auto;
  padding: 0 14px;
}

@media (max-width: 1120px) {
  .main-layout {
    grid-template-columns: 310px 1fr;
    gap: 10px;
    padding: 0 10px;
  }
}

@media (max-width: 860px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Panel Containers */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

.panel-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.panel-header h2 {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  width: 100%;
}

.form-group label {
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.input-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 400;
}

textarea.pnr-textarea {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.35;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background-color: #fcfdfe;
  resize: vertical;
  min-height: 95px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  color: #0f172a;
  transition: border-color 0.15s;
}

textarea.pnr-textarea:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.form-row > .form-group {
  min-width: 0;
}

input[type="text"],
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 400;
  font-family: var(--font-base);
  color: #0f172a;
  background-color: #ffffff;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 26px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action Buttons */
.button-row {
  display: flex;
  gap: 6px;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  font-size: 12px;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  height: 28px;
  border: 1px solid transparent;
  transition: all 0.12s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: white;
  height: 32px;
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-whatsapp {
  background: var(--whatsapp-green);
  color: white;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: #475569;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.btn-sm {
  padding: 3px 8px;
  height: 26px;
  font-size: 11.5px;
}

.btn-xs {
  padding: 2px 6px;
  height: 22px;
  font-size: 11px;
  border-radius: var(--radius-xs);
  gap: 4px;
}

.btn-danger {
  color: #ef4444;
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #dc2626;
}

.btn-subtle-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.btn-subtle-danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

/* Toolbar for Expand All / Collapse All */
.accordion-global-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.offers-count-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

.toolbar-actions {
  display: flex;
  gap: 6px;
}

/* Accordion Item in Multi-offer List */
.option-accordion-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease;
  overflow: hidden;
}

.option-accordion-item:hover {
  border-color: #cbd5e1;
}

.option-accordion-header {
  padding: 6px 10px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
  min-height: 38px;
}

.option-accordion-header:hover {
  background: #f8fafc;
}

.option-accordion-item.is-open .option-accordion-header {
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.header-summary-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.summary-route {
  font-size: 12.5px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.summary-route strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.summary-trip-tag {
  font-size: 10px;
  font-weight: 500;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
}

.summary-meta {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.summary-price-pill {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.summary-luggage-pill {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.summary-luggage-pill svg {
  flex-shrink: 0;
}

.header-right .btn-copy-single,
.header-right .btn-delete-offer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: var(--radius-xs);
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  cursor: pointer;
}

.chevron-toggle {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.option-accordion-item.is-open .chevron-toggle {
  transform: rotate(180deg);
}

.option-accordion-item.is-closed .option-accordion-body {
  display: none;
}

.option-accordion-item.is-open .option-accordion-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.option-number-badge {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

/* Inline Editable Quotation Card inside Expanded Offer */
.option-inline-edit-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 2px;
}

.inline-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.inline-edit-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.inline-edit-hint {
  font-size: 10.5px;
  color: var(--text-muted);
}

.inline-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.inline-edit-grid .full-width {
  grid-column: 1 / -1;
}

.inline-edit-grid input[type="text"] {
  height: 26px;
  padding: 2px 6px;
  font-size: 11.5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-xs);
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 10px;
  background: #f8fafc;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  height: 34px;
}

.tab-btn {
  padding: 0 10px;
  height: 34px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
  background: transparent;
}

.tab-content {
  display: none;
  padding: 10px 12px;
}

.tab-content.active {
  display: block;
}

/* Output Card Container */
.itinerary-cards-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.itinerary-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f5f9;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.route-badge-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-type-badge {
  background: #3b82f6;
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.route-badge-title h2 {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.pnr-badge {
  font-size: 11px;
  color: #475569;
  background: white;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid #cbd5e1;
}

/* Journey Group */
.journey-group {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.journey-group-header {
  background: #f8fafc;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.journey-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.journey-title h3 {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
}

.journey-date-pill {
  font-size: 10.5px;
  color: #475569;
  font-weight: 500;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
}

.journey-duration {
  font-size: 11px;
  color: #475569;
  font-weight: 500;
}

/* Flight Card */
.flight-card {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.flight-card:last-child {
  border-bottom: none;
}

.flight-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.airline-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.airline-code-badge {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.2px;
}

.airline-name {
  font-weight: 600;
  font-size: 12px;
  color: #0f172a;
}

.flight-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.flight-equip {
  display: flex;
  gap: 6px;
}

.equip-badge,
.duration-badge {
  background: #f8fafc;
  color: #475569;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-size: 10.5px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

/* Timeline Row */
.flight-timeline-row {
  display: grid;
  grid-template-columns: 115px 1fr 115px;
  align-items: center;
  gap: 8px;
  margin: 4px 0 2px;
}

.time-col {
  display: flex;
  flex-direction: column;
}

.dep-col {
  text-align: left;
}

.arr-col {
  text-align: right;
}

.time-val {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.arr-col .time-val {
  justify-content: flex-end;
}

.next-day-tag {
  background: #ef4444;
  color: white;
  font-size: 9.5px;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 600;
}

.airport-code {
  font-size: 12.5px;
  font-weight: 600;
  color: #2563eb;
}

.city-name {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.airport-name-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Timeline Visual */
.timeline-visual {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 6px;
}

.line-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid #3b82f6;
  background: white;
  z-index: 2;
}

.line-path {
  flex: 1;
  height: 1px;
  background: #cbd5e1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flight-vector-marker {
  position: absolute;
  background: #ffffff;
  padding: 0 3px;
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flight-vector-marker svg {
  width: 12px;
  height: 12px;
}

.nonstop-label {
  position: absolute;
  top: -13px;
  font-size: 9.5px;
  font-weight: 500;
  color: #64748b;
  background: white;
  padding: 0 4px;
}

.terminal-tag {
  font-size: 10px;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid #dbeafe;
  margin-left: 3px;
  vertical-align: middle;
}

.journey-vector-icon {
  color: #2563eb;
  display: flex;
  align-items: center;
}

.journey-duration,
.duration-badge,
.footer-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Layover Card */
.layover-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  margin: 3px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #475569;
}

.layover-card.layover-tight {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.layover-card.layover-long {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.layover-icon {
  color: #64748b;
  display: flex;
  align-items: center;
}

.airport-change-warning,
.layover-warning {
  font-size: 10.5px;
  font-weight: 600;
  margin-top: 1px;
}

/* Remarks */
.flight-remarks {
  margin-top: 6px;
  display: gap;
  gap: 4px;
  flex-wrap: wrap;
}

.remark-pill {
  background: #fff7ed;
  color: #c2410c;
  font-size: 10.5px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid #ffedd5;
}

/* Footer Quotation Card */
.itinerary-footer-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.price-item {
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.price-value {
  font-size: 15px;
  font-weight: 600;
  color: #059669;
}

.footer-label {
  font-weight: 500;
  color: #475569;
}

.footer-value {
  color: #1e293b;
  font-weight: 500;
}

/* Text Areas for WhatsApp & Email */
.copy-box {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.45;
  width: 100%;
  min-height: 320px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #fcfdfe;
  color: #1e293b;
  resize: vertical;
}

.text-tab-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.empty-state-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #94a3b8;
  margin-bottom: 8px;
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.empty-state h3 {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 11.5px;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #0f172a;
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Account Menu & Subscription Status */
.account-container {
  display: flex;
  align-items: center;
}

.auth-state-block {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.subscription-pill {
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.pill-trial {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.pill-trial .sub-dot {
  background: #f59e0b;
}

.pill-active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.pill-active .sub-dot {
  background: #10b981;
}

.pill-expired {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.pill-expired .sub-dot {
  background: #ef4444;
}

.user-dropdown-container {
  position: relative;
}

.user-dropdown-trigger {
  height: 26px;
  padding: 0 8px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #334155;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.user-dropdown-trigger:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.user-email-text {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.dropdown-header {
  padding: 8px 12px;
  background: #fafbfc;
}

.dropdown-email {
  font-size: 11.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
}

.dropdown-item {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
  height: auto;
}

.dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.dropdown-item.text-danger {
  color: #dc2626;
}

.dropdown-item.text-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* Modals & Auth Overlay */
/* ==========================================
   MODERN MODALS & DIALOGS (Linear / macOS Style)
   ========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalOverlayFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card {
  max-width: 450px;
}

.subscription-card,
.profile-card {
  max-width: 500px;
}

@keyframes modalSlideUp {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  padding: 18px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #ffffff;
}

.modal-header-titles h3,
.auth-brand h3,
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.015em;
  margin: 0;
}

.modal-subtext,
.auth-brand p {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.4;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-close-modal {
  width: 28px;
  height: 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-close-modal:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Segmented Pill Tabs for Auth */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  margin: 16px 24px 0;
  border: 1px solid #e2e8f0;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 7px;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab-btn:hover {
  color: #0f172a;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-trial-tag {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.modal-body {
  padding: 20px 24px 24px;
}

.auth-card .modal-body,
.subscription-card .modal-body,
.profile-card .modal-body {
  padding: 20px 24px 24px;
}

.modal-body .form-group {
  margin-bottom: 14px;
}

.modal-body .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body input[type='text'],
.modal-body input[type='email'],
.modal-body input[type='password'],
.modal-body input[type='number'],
.modal-body select {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 0 12px;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-body input:focus,
.modal-body select:focus,
.profile-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.profile-textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  color: #0f172a;
  resize: vertical;
  min-height: 80px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.modal-actions .btn-outline,
.modal-actions .btn-primary {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.auth-alert {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.auth-submit-btn {
  width: 100%;
  height: 40px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: #94a3b8;
  font-size: 11.5px;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-separator span {
  padding: 0 10px;
}

.auth-magic-btn {
  width: 100%;
  height: 36px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.auth-magic-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.auth-footer-note {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* Subscription Details Card */
.sub-status-box {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-status-box.status-trial {
  background: #fffbeb;
  border-color: #fde68a;
}

.sub-status-box.status-active {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.sub-status-box.status-expired {
  background: #fef2f2;
  border-color: #fca5a5;
}

.sub-status-badge {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-trial .sub-status-badge { color: #92400e; }
.status-active .sub-status-badge { color: #065f46; }
.status-expired .sub-status-badge { color: #991b1b; }

.sub-status-expiry {
  font-size: 11.5px;
  color: #475569;
  margin-top: 2px;
}

.sub-status-email {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

.gumroad-plans-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.gumroad-plan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  gap: 12px;
  transition: all 0.15s ease;
}

.gumroad-plan-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.gumroad-plan-item.plan-yearly {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #86efac;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.plan-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plan-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.plan-badge-save {
  font-size: 10px;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid #bbf7d0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price-num {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.plan-price-period {
  font-size: 11.5px;
  color: #64748b;
}

.btn-plan-buy {
  text-decoration: none;
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  flex-shrink: 0;
  line-height: 1;
}

.license-activation-box {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.license-activation-box label {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  display: block;
  margin-bottom: 6px;
}

.license-input-row {
  display: flex;
  gap: 8px;
}

.license-input-row input {
  flex: 1;
  height: 36px;
  font-size: 12px;
  border-radius: 8px;
}

.license-input-row button {
  height: 36px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Combined Currency & Amount Input Group */
.input-currency-group {
  display: flex;
  align-items: stretch;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-currency-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.input-currency-group input {
  flex: 1;
  border: none !important;
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  min-width: 0;
}

.input-currency-group select {
  border: none !important;
  border-left: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  padding: 0 8px !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: none !important;
  height: 30px !important;
  border-radius: 0 !important;
  width: auto !important;
}

.price-client-preview {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 7px;
  border-radius: 4px;
}

/* Commission Group in Left Panel */
.commission-group {
  margin-top: 2px;
}

.commission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.commission-type-toggle {
  display: flex;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  gap: 2px;
}

.comm-type-btn {
  border: none;
  background: transparent;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.comm-type-btn:hover {
  color: #0f172a;
}

.comm-type-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.commission-input-row {
  display: flex;
  align-items: center;
  position: relative;
}

.commission-input-row input {
  width: 100%;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.commission-input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
  outline: none;
}

.commission-unit-label {
  position: absolute;
  right: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}

/* Inline card preview calculation */
.inline-calc-preview {
  font-size: 10.5px;
  font-weight: 500;
  color: #059669;
  background: #ecfdf5;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #a7f3d0;
  margin-left: 6px;
}


/* Print Stylesheet */
@media print {
  .option-inline-edit-card, .option-actions, .inline-edit-header {
    display: none !important;
  }
  body {
    background: white;
    padding: 0;
  }
  .app-header,
  .panel-input-side,
  .tabs-nav,
  .text-tab-actions,
  .header-actions {
    display: none !important;
  }
  .main-layout {
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .panel {
    border: none;
    box-shadow: none;
  }
  .tab-content {
    display: block !important;
    padding: 0 !important;
  }
  #tab-whatsapp,
  #tab-email {
    display: none !important;
  }
}
