.manage-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 18px 80px;
}
.manage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.manage-title {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.manage-sub {
  margin: 6px 0 0;
  opacity: .78;
}
.manage-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
h2 {
  margin-bottom: 24px !important;
}
a {
  text-decoration: none;
}
@media (max-width: 980px) {
  .manage-grid { grid-template-columns: 1fr; }
}
.manage-list {
  display: grid;
  gap: 12px;
}
.manage-auth-gate {
  margin-top: 14px;
}

/* Booking cards inside lists */
.booking-card {
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(2,6,23,.55);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 8px;
  padding-bottom: 24px;
}
.booking-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.booking-ref {
  font-weight: 800;
  letter-spacing: .02em;
}
.booking-meta {
  opacity: .75;
  font-size: .92rem;
}
.booking-items {
  opacity: .85;
  font-size: .95rem;
  margin-bottom: 24px;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid rgba(148,163,184,.22);
}
.timeline li {
  position: relative;
  padding: 10px 10px 10px 16px;
  margin-left: 10px;
  opacity: .65;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148,163,184,.45);
  border: 2px solid rgba(2,6,23,.9);
}
.timeline .done { opacity: 1; }
.timeline .done::before { background: rgba(34,197,94,.95); }
.timeline .muted { opacity: .42; }
.timeline .today {
  opacity: 1;
  border-radius: 12px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.22);
}
.timeline .today::before { background: rgba(34,197,94,.95); }
.qr-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(2,6,23,.55);
  border: 1px dashed rgba(148,163,184,.25);
  display: flex;
  align-items: center;
  gap: 12px;
}
.qr-img {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  background: rgba(148,163,184,.12);
  border: 1px solid rgba(148,163,184,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .06em;
  opacity: .9;
}
.qr-copy {
  opacity: .85;
  font-size: .95rem;
}
#manageDraftList a {
  margin-bottom: 16px !important;
}
#managePaidList .booking-card {
  padding-bottom: 0px !important;
}
.today {
  margin-bottom: 24px !important;
}

/* =========================================================
   MANAGE – EMPTY STATES (APP FEEL)
========================================================= */
.manage-empty {
  border: 1px dashed rgba(148,163,184,.25);
  border-radius: 20px;
  padding: 28px 26px;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(34,197,94,.10),
      transparent 55%
    ),
    rgba(2,6,23,.55);
  text-align: center;
}
.manage-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(148,163,184,.14);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #22C55E;
}
.manage-empty-title {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 6px;
}
.manage-empty-sub {
  opacity: .8;
  max-width: 360px;
  margin: 0 auto 18px;
  line-height: 1.5;
}
.timeline li.active {
  position: relative;
}
.timeline li.pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.35);
  animation: dgPulse 1.6s infinite;
  pointer-events: none;
}
@keyframes dgPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
  70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.timeline li.active strong { opacity: 1; }

.manage-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .manage-split { grid-template-columns: 1fr; }
}
.manage-box {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
}
.manage-box-title {
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.manage-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  font-size: 14px;
}
.manage-notes-body {
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.95;
}

/* --- Items list (manage) --- */
.mi-list { 
  margin-top: 12px; 
  display: grid; 
  gap: 10px; 
}
.mi-row {
  display: flex; 
  align-items: center; 
  gap: 12px;
  padding: 12px 56px 12px 12px;   /* more right padding for chevron + fade */
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.18);
  text-decoration: none;
  position: relative;               /* for absolute chevron */
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.mi-row:hover {
  transform: translateY(-1px);
  border-color: rgba(148,163,184,0.32);
  background: rgba(255,255,255,0.06);
}
.mi-thumb {
  width: 44px; 
  height: 44px; 
  border-radius: 12px;
  object-fit: cover; 
  flex: 0 0 44px;
  border: 1px solid rgba(148,163,184,0.22);
}
.mi-thumb--ph {
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: rgba(226,232,240,0.7);
  background: rgba(255,255,255,0.05);
}
.mi-main { 
  min-width: 0; 
  flex: 1; 
}
.mi-name {
  font-weight: 700;
  color: rgba(248,250,252,0.95);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;          /* ← main truncation mechanism */

  /* Keep the mask as progressive fade, but now safe */
  position: relative;
  -webkit-mask-image: linear-gradient(
    to right,
    black 0%,
    black calc(100% - 48px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    black 0%,
    black calc(100% - 48px),
    transparent 100%
  );
}
@media (max-width: 480px) {
  .mi-name {
    -webkit-mask-image: linear-gradient(
      to right,
      black 0%,
      black calc(100% - 36px),
      rgba(0,0,0,0) 100%
    );
    mask-image: linear-gradient(
      to right,
      black 0%,
      black calc(100% - 36px),
      rgba(0,0,0,0) 100%
    );
  }
}
.mi-sub {
  margin-top: 2px;
  font-size: 13px;
  color: rgba(148,163,184,0.95);
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap;
}
.mi-chev {
  color: rgba(148,163,184,0.7);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;                        /* stays above fade */
  font-size: 1.1rem;
}

/* --- Badges --- */
.manage-badges { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}
.badge {
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  padding: 6px 10px; 
  border-radius: 999px;
  font-size: 12px; 
  font-weight: 700;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(255,255,255,0.04);
  color: rgba(248,250,252,0.9);
}
.badge-green { border-color: rgba(34,197,94,0.35); }
.badge-blue { border-color: rgba(59,130,246,0.35); }
.badge-amber { border-color: rgba(245,158,11,0.40); }
.badge-slate { border-color: rgba(148,163,184,0.30); }

/* --- Map preview --- */
.map-preview {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}
.map-preview img {
  width: 100%; 
  height: 180px; 
  object-fit: cover; 
  display: block;
}
.map-preview-foot {
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.map-preview-addr {
  color: rgba(248,250,252,0.9);
  font-weight: 600;
  font-size: 13px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  flex: 1;
}
.map-preview-cta {
  color: rgba(148,163,184,0.95);
  font-size: 12px;
  white-space: nowrap;
}

/* Payment / Balance */
.balance-pay {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(2,6,23,0.55);
}
.balance-pay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.balance-pay-title { font-weight: 800; }
.balance-pay-amt { opacity: .9; font-weight: 800; }
.balance-pay-field {
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(255,255,255,0.03);
  padding: 12px;
}
.balance-pay-actions {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.balance-pay-msg { margin-top: 10px; }
.balance-pay-msg.success { opacity: .85; }
.balance-pay-msg.error { color: #fb7185; opacity: 1; }