/* ====================================================
   CSS/currenttrip.css — Premium Trip Dashboard v2
   ==================================================== */

:root {
  /* aliased to the shared Windowseat palette in main.css — --ink/--muted inherit from there */
  --ring: var(--glass-line-strong);
  --card: rgba(10, 20, 35, 0.7);
  --card-solid: var(--sapphire-2);
  --card-border: rgba(100, 150, 250, 0.2);
  --card-border-hover: rgba(100, 150, 250, 0.4);
  --card-glow: rgba(100, 150, 250, 0.15);
  --err: var(--danger);
  --brand: var(--royal-2);
  --g1: var(--royal);
  --g2: var(--ok);
  --g3: var(--platinum-deep);
  --base1: var(--sapphire-3);
  --base2: var(--sapphire-2);
  --base3: var(--sapphire);
  --accent: var(--royal-2);
  --accent-soft: var(--platinum);
  --accent-gradient: linear-gradient(135deg, var(--royal-deep) 0%, var(--royal-2) 100%);
  --btn-border: var(--glass-line-strong);
  --glass-blur: 10px;
}

body.lp-page {
  color: var(--ink);
  background: transparent;
  min-height: 100dvh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.lp-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(4, 10, 25, 0.1);
  pointer-events: none;
}

/* =============================================
   AURORA BACKGROUND (Enhanced) -> IMMERSIVE LANDSCAPE
   ============================================= */
.lp-aurora {
  position: fixed;
  inset: -5vmax;
  z-index: -2;
  pointer-events: none;
  background: url('../assets/stars-bg.png') center/cover no-repeat;
  filter: blur(12px) brightness(0.5);
  transform: scale(1.05);
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: rgba(8, 14, 28, 0.5);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* =============================================
   SHELL
   ============================================= */
.ct-shell {
  padding: 88px 28px 56px;
  max-width: 1260px;
  margin: 0 auto;
}

/* =============================================
   HERO SECTION — Title + Quick Actions
   ============================================= */
.ct-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  padding-top: 16px;
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.ct-hero-text {
  flex: 1;
}

.ct-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #c9d3e0 40%, #5f7ce8 80%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ct-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 440px;
}

.ct-hero-actions {
  display: flex;
  gap: 8px;
}

.ct-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ct-hero-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.ct-hero-btn--accent {
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--accent-soft);
}

.ct-hero-btn--accent:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.08);
  color: #fff;
}

.ct-hero-btn svg {
  flex-shrink: 0;
}

/* =============================================
   CONTROLS BAR — Filters + Edit Mode
   ============================================= */
.ct-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.ct-filter-group,
.ct-edit-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Filter chips */
.filter-toggle {
  display: flex;
  gap: 2px;
  background: rgba(12, 18, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  backdrop-filter: blur(var(--glass-blur));
}

.btn-chip {
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  letter-spacing: 0.2px;
}

.btn-chip:hover:not(.active) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.btn-chip.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Edit toggle */
.ct-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ct-edit-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.ct-edit-btn svg { flex-shrink: 0; }

.ct-action-pill {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ct-action-pill:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}

.edit-only.hidden { display: none; }
.view-only.hidden { display: none; }
.edit-only-input:disabled { opacity: 0.4; pointer-events: none; }

.sel-count {
  font-size: 11px;
  color: var(--accent-soft);
  border: 1px dashed rgba(99, 102, 241, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.05);
  font-weight: 700;
}

.tooltip[data-tip] { position: relative; }
.tooltip[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(8, 12, 24, 0.95);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 11.5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

/* =============================================
   INFO STRIP — Trip metadata cards
   ============================================= */
.ct-info-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  transition: all 0.25s ease;
}

.info-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 2px 16px var(--card-glow);
}

.info-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.12);
  flex-shrink: 0;
}

.info-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.info-card-label {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.info-card-value {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  background: transparent;
}

.info-card-chip {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--accent-soft);
  width: fit-content;
}

.info-card input[type="date"] {
  padding: 6px 8px;
  border: 1px solid rgba(42, 53, 80, 0.5);
  border-radius: 8px;
  background: rgba(10, 20, 40, 0.5);
  color: #fff;
  font-size: 12.5px;
  outline: none;
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.info-card input[type="date"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

@media (max-width: 900px) {
  .ct-info-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .ct-info-strip { grid-template-columns: 1fr; }
}

/* =============================================
   CONTENT GRID
   ============================================= */
.ct-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

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

.ct-main-col {
  min-width: 0;
}

/* Section heading */
.ct-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 12px;
}

.ct-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.subhead {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =============================================
   GROUP CARDS
   ============================================= */
.ct-groups { display: grid; gap: 14px; margin-bottom: 8px; }

.group-card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.group-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.5;
}

.group-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 4px 24px var(--card-glow);
}

.group-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.group-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.group-title {
  font-weight: 800; margin: 0; font-size: 14px;
  outline: none; padding: 2px 6px; border-radius: 6px;
  transition: background 0.2s ease;
}

.group-title[contenteditable="true"]:focus {
  background: rgba(255, 255, 255, 0.05);
}

.group-actions-row { display: flex; gap: 6px; align-items: center; }

.group-actions-row .btn-sm {
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted); cursor: pointer; font-weight: 700; font-size: 11px;
  transition: all 0.2s ease;
}

.group-actions-row .btn-sm:hover {
  color: var(--ink); border-color: rgba(255, 255, 255, 0.15);
}

.group-actions-row .danger:hover {
  border-color: rgba(239, 68, 68, 0.4); color: #fca5a5;
}

.group-items { display: grid; gap: 8px; }
.group-select { display: flex; align-items: center; gap: 8px; }

/* =============================================
   TRIP ITEM CARDS
   ============================================= */
.ct-items { display: grid; gap: 10px; }

.ct-empty {
  padding: 56px 24px;
  text-align: center;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.ct-empty::before {
  content: '✈️';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
  animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

.ct-empty {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}

.ct-empty a {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dashed rgba(165, 180, 252, 0.3);
  transition: all 0.2s ease;
}

.ct-empty a:hover {
  color: #fff;
  border-color: rgba(165, 180, 252, 0.6);
}

:root { --ct-thumb: clamp(28px, 20vw, 64px); }

.ct-item {
  display: grid;
  grid-template-columns: 28px var(--ct-thumb) 1fr auto;
  gap: 14px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 14px;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ct-item:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 4px 24px var(--card-glow);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .ct-item { grid-template-columns: 28px 48px 1fr; }
}

.ct-item.selected {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 4px 20px rgba(99, 102, 241, 0.08);
}

.sel-box { display: grid; place-items: center; }
.sel-box input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.sel-box input[disabled] { cursor: not-allowed; opacity: 0.35; }

.ct-thumb {
  width: var(--ct-thumb); height: var(--ct-thumb);
  border-radius: 10px; overflow: hidden;
  display: grid; place-items: center;
  background: rgba(15, 24, 43, 0.5);
  color: var(--muted); font-weight: 800; font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.ct-thumb img {
  width: 100%; height: 100%;
  display: block; object-fit: cover; border-radius: inherit;
}

.ct-body h3 { margin: 0 0 5px; font-size: 14px; font-weight: 700; }

.ct-meta-row {
  display: flex; flex-wrap: wrap;
  gap: 5px; color: var(--muted); font-size: 11.5px;
}

.badge {
  padding: 3px 8px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600; font-size: 10.5px;
}

.badge.days::before { content: "🗓️ "; }

.badge.completed {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.badge.ongoing {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  animation: pulseCyan 2s infinite;
}
@keyframes pulseCyan {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}
.badge.upcoming {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.ct-actions-col { display: flex; flex-direction: column; align-items: end; gap: 6px; }

.price {
  font-weight: 800; font-size: 14px;
  color: var(--accent-soft);
}

.qty {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px; overflow: hidden;
}

.qty button {
  width: 28px; height: 28px; border: 0;
  background: rgba(255, 255, 255, 0.03);
  color: #fff; cursor: pointer; font-weight: 800; font-size: 13px;
  transition: background 0.15s ease;
}

.qty button:hover:not([disabled]) { background: rgba(255, 255, 255, 0.08); }

.qty input {
  width: 36px; text-align: center; border: 0;
  background: transparent; color: #fff; font-weight: 700; font-size: 12px;
}

.ct-row-btns { display: flex; gap: 5px; }

.btn-sm {
  padding: 6px 10px; border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted); cursor: pointer; font-weight: 700; font-size: 11px;
  transition: all 0.2s ease;
}

.btn-sm:hover:not([disabled]) { color: var(--ink); border-color: rgba(255, 255, 255, 0.14); }
.btn-sm.primary { border-color: rgba(99, 102, 241, 0.3); background: var(--accent-gradient); color: #fff; }
.btn-sm[disabled] { opacity: 0.35; cursor: not-allowed; }

/* Legacy field compat */
.field { display: flex; flex-direction: column; gap: 6px; }
.label {
  font-size: 10.5px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.chip {
  padding: 5px 10px; border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  background: rgba(99, 102, 241, 0.08);
  font-size: 12px; font-weight: 700; color: var(--accent-soft);
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.inline { display: flex; align-items: center; gap: 6px; }

.field input[type="date"],
.field input[type="text"],
.field input[type="number"] {
  padding: 8px 10px; border: 1px solid rgba(42, 53, 80, 0.4);
  border-radius: 8px; background: rgba(10, 20, 40, 0.4);
  color: #fff; font-size: 12px; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =============================================
   SUMMARY SIDEBAR — Premium
   ============================================= */
.ct-summary {
  position: sticky;
  top: 82px;
  height: fit-content;
  border-radius: 20px;
  position: relative;
  overflow: visible;
}

.summary-glow {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    rgba(99, 102, 241, 0.2) 0%,
    rgba(99, 102, 241, 0.05) 30%,
    rgba(139, 92, 246, 0.1) 100%
  );
  z-index: 0;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.ct-summary:hover .summary-glow {
  opacity: 1;
}

.summary-inner {
  position: relative;
  z-index: 1;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.summary-title-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-gradient);
  color: #fff;
  flex-shrink: 0;
}

.ct-summary h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.summary-hint {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.4;
}

/* Breakdown */
.sum-breakdown {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  color: rgba(200, 210, 240, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.sum-row strong {
  color: var(--ink);
  font-weight: 700;
}

/* Total */
.sum-total-wrap {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  padding: 4px 14px;
  margin: 12px 0 16px;
}

.sum-row.total {
  font-weight: 900;
  font-size: 18px;
  padding: 8px 0;
  color: var(--ink);
}

.sum-row.total strong {
  background: linear-gradient(135deg, #22d3ee 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 22px;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

/* Stats grid */
.sum-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
}

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

.stat-value {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

/* Actions */
.sum-actions {
  display: grid;
  gap: 6px;
}

.btn-primary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--btn-border);
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%; left: -100%;
  width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-primary:hover::after { left: 150%; }
.btn-primary:hover { box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px) scale(0.98); }

.btn-clear {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
}

.btn-clear:hover {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* =============================================
   SKELETONS
   ============================================= */
.ct-skel {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
}

.shine {
  background: linear-gradient(90deg, #0b162c 25%, #152550 50%, #0b162c 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

.ct-skel .s1 { width: 100%; aspect-ratio: 1/1; border-radius: 10px; }
.ct-skel .s2 { height: 14px; border-radius: 7px; width: 55%; margin-bottom: 8px; }
.ct-skel .s3 { height: 10px; border-radius: 5px; width: 85%; margin-bottom: 6px; }
.ct-skel .s4 { height: 10px; border-radius: 5px; width: 35%; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* =============================================
   DIALOGS
   ============================================= */
.ct-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.ct-dialog {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  max-width: 520px;
  background: rgba(12, 18, 35, 0.97);
  backdrop-filter: blur(24px);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.08);
  animation: dialogReveal 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.ct-dialog h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }

.pkg-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.pkg-btn {
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff; font-weight: 700; font-size: 12.5px;
  cursor: pointer; transition: all 0.2s ease;
}

.pkg-btn:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
}

/* Ghost button for dialogs */
.btn-ghost {
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted); font-weight: 700; font-size: 12.5px;
  cursor: pointer; transition: all 0.2s ease;
}

.btn-ghost:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.15); }

/* =============================================
   TOASTS
   ============================================= */
.lp-toasts {
  position: fixed; right: 16px; bottom: 16px;
  display: grid; gap: 8px; z-index: 9999; pointer-events: none;
}

.lp-toast {
  --bg: rgba(10, 16, 32, 0.93);
  --bd: rgba(255, 255, 255, 0.06);
  --fg: #eaf0ff;
  --toast-accent: #5f7ce8;
  min-width: 280px; max-width: min(92vw, 360px);
  color: var(--fg); background: var(--bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bd);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  padding: 12px 14px;
  display: grid; grid-template-columns: 28px 1fr auto;
  align-items: start; gap: 10px;
  pointer-events: auto;
  animation: toastSlide 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(20px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.lp-toast[data-type="success"] { --toast-accent: #22c55e; }
.lp-toast[data-type="error"]   { --toast-accent: #ef4444; }
.lp-toast[data-type="warning"] { --toast-accent: #f59e0b; }

.lp-toast .icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--toast-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--toast-accent) 30%, transparent);
  display: grid; place-items: center; font-size: 13px;
}

.lp-toast .content { line-height: 1.3; }
.lp-toast .title { font-weight: 800; margin: 0 0 2px; font-size: 13px; }
.lp-toast .msg { margin: 0; font-size: 12px; color: var(--muted); }
.lp-toast .close {
  appearance: none; border: 0; background: transparent;
  color: var(--muted); font-size: 16px; cursor: pointer; padding: 0; opacity: 0.6;
  transition: opacity 0.2s;
}
.lp-toast .close:hover { opacity: 1; }

.lp-toast .bar {
  grid-column: 1/-1; height: 2px; border-radius: 999px;
  overflow: hidden; background: rgba(255, 255, 255, 0.04);
}
.lp-toast .bar > span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--toast-accent), var(--accent));
  transform-origin: left center;
  animation: toastBar linear forwards;
}

@keyframes toastBar { to { transform: scaleX(0); } }

/* Compat: .muted used by JS */
.muted { color: var(--muted); margin: 0; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 640px) {
  .ct-shell { padding: 78px 14px 36px; }
  .ct-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ct-hero-actions { width: 100%; }
  .ct-hero-btn { flex: 1; justify-content: center; }
  .ct-controls { flex-direction: column; align-items: stretch; }
  .ct-filter-group { justify-content: center; }
  .ct-edit-group { justify-content: center; }
  .ct-item { padding: 10px; border-radius: 12px; }
  .summary-inner { padding: 18px; border-radius: 16px; }
  .ct-dialog { padding: 18px; border-radius: 16px; margin: 12px; }
}

/* =============================================
   NEW: MODERNIZATION UPDATES
   ============================================= */

/* Fee Breakdown Accordion */
.sum-breakdown-details {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
}
.sum-breakdown-details summary {
  outline: none;
  font-weight: 700;
  color: var(--muted);
}
.sum-breakdown-details summary::-webkit-details-marker {
  display: none;
}
.sum-breakdown-details[open] summary svg {
  transform: rotate(180deg);
}
.sum-breakdown-details summary svg {
  transition: transform 0.2s ease;
}

/* Accordion States for Groups */
.group-collapsed .group-items {
  display: none;
}
.group-head {
  cursor: pointer;
}
.group-head .card-icon-halo {
  transition: transform 0.3s ease;
}
.group-collapsed .group-head .card-icon-halo {
  transform: rotate(-90deg);
}

/* Timeline View */
.ct-items.view-timeline {
  position: relative;
  padding-left: 24px;
}
.ct-items.view-timeline::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 11px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.ct-items.view-timeline .ct-item {
  position: relative;
}
.ct-items.view-timeline .ct-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -20px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateY(-50%);
  border: 2px solid #080e1c;
  z-index: 1;
}

/* Drag and Drop Visuals */
.ct-item[draggable="true"] {
  cursor: grab;
}
.ct-item.dragging {
  opacity: 0.5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: grabbing;
}
.ct-item.drag-over {
  border-top: 2px solid var(--accent);
}

/* Hover-based Actions & Pills */
.ct-actions-col .ct-row-btns {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ct-item:hover .ct-actions-col .ct-row-btns {
  opacity: 1;
}
.qty-wrap.hidden {
  display: none !important;
}

/* Date Pill Button Style */
.input-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-soft);
  font-weight: 700;
  border-radius: 12px;
  padding: 6px 12px;
  cursor: pointer;
}
.input-pill::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.5;
  cursor: pointer;
}
