/* ============================================================
   Livasta Admin — Upgraded Premium Design System
   ============================================================ */

:root {
  --pine: #007A7A;        /* brand teal — primary */
  --pine-light: #0E9C95;  /* lighter teal */
  --pine-dark: #00605E;
  --cream: #FFFFFF;       /* light surfaces */
  --canvas: #F0F4F1;      /* soft canvas background matching listings page */
  --coral: #EB6F4A;       /* warm accent */
  --coral-dark: #D65A36;
  --gold: #D9A35A;
  --ink: #1E2D34;         /* deep slate text */
  --sage: #DCE8DF;        /* sage border tint */
  --muted: #5E727A;       /* balanced muted text */
  --violet: #6D5AE6;      /* indigo/violet highlight accent */
  --violet-soft: #ECE9FB;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 999px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.11);
}

/* ---------- Reset & Base ---------- */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--canvas);
  color: var(--ink);
}

.font-display {
  font-family: 'Fraunces', serif;
}

.rail {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rail::-webkit-scrollbar {
  display: none;
}

/* ---------- Tab Links (hybrid SPA navbar) ---------- */
.tab-link {
  position: relative;
  transition: color 0.2s ease;
}
.tab-link.active {
  color: var(--violet) !important;
}
.tab-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--pine), var(--violet)) !important;
  box-shadow: 0 3px 10px rgba(109, 90, 230, 0.35);
}
.tab-link.active::before {
  content: '';
  position: absolute;
  inset: 4px -11px 8px;
  z-index: -1;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(0,122,122,.09), rgba(109,90,230,.10));
}
.tab-link:not(.active) {
  color: var(--muted);
}
.tab-link:not(.active):hover {
  color: var(--violet);
}

.mtab-link.active {
  background: linear-gradient(135deg, var(--pine), var(--violet)) !important;
  color: white !important;
}

.section-panel {
  display: none;
}
.section-panel.active {
  display: block;
}

/* ---------- Switches ---------- */
.switch {
  width: 40px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--sage);
  position: relative;
  transition: background 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch.on {
  background: var(--pine);
}
.switch.on::after {
  left: 20px;
}

/* ---------- Badges ---------- */
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.badge-success { background: #E3F1E6; color: #2F7D4F; }
.badge-warning { background: #FBF0DD; color: #B5792A; }
.badge-danger { background: #FBE7E1; color: #C5502E; }
.badge-info { background: #EEF3F0; color: var(--pine); }
.badge-muted { background: #EFEAE0; color: var(--muted); }
.badge-coral { background: var(--coral); color: white; }

.filter-btn.active {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}

#mobile-panel {
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
#mobile-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#account-pop {
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
#account-pop.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Cards with dynamic hover ---------- */
.card-lift {
  background-color: var(--cream);
  border-radius: var(--radius-xl);
  border: 1px solid var(--sage);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -16px rgba(0, 122, 122, 0.2);
  border-color: rgba(0, 122, 122, 0.25);
}

/* ---------- Premium KPI Cards ---------- */
.kpi-card {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--sage);
  border-left-width: 4px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 36px -16px rgba(0, 122, 122, 0.25);
  border-color: rgba(0, 122, 122, 0.25);
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
  pointer-events: none;
}
.kpi-card:hover::after {
  left: 150%;
}
.kpi-card-pine { border-left-color: var(--pine); }
.kpi-card-gold { border-left-color: var(--gold); }
.kpi-card-coral { border-left-color: var(--coral); }
.kpi-card-violet { border-left-color: var(--violet); }

/* ---------- Quick Actions Bar ---------- */
.qa-bar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  border: 1px solid var(--sage);
  box-shadow: var(--shadow-sm);
  padding: 8px;
}
.qa-btn {
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.qa-btn:hover {
  background: var(--pine);
  color: var(--cream);
}

/* ---------- 3D Hero Banner ---------- */
.hero-3d {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #071D1B, #007A7A 50%, #00605E);
  border-radius: var(--radius-2xl);
  box-shadow: 0 12px 35px -10px rgba(0, 122, 122, 0.3);
}
.hero-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px circle at 15% -10%, rgba(235, 111, 74, 0.22), transparent 60%);
  pointer-events: none;
}
.hero-3d::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: skewX(-18deg);
  animation: shine 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine {
  0%, 60% { left: -30% }
  100% { left: 130% }
}

#globeCanvas {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: min(44%, 400px);
  aspect-ratio: 1;
  opacity: 0.95;
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 768px) {
  #globeCanvas {
    opacity: 0.25;
    width: 65%;
    right: -10%;
  }
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7BC894;
  box-shadow: 0 0 0 0 rgba(123, 200, 148, 0.6);
  animation: livepulse 2s infinite;
}
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(123, 200, 148, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(123, 200, 148, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 200, 148, 0); }
}

/* ---------- Avatar Ring ---------- */
.ring-avatar {
  position: relative;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 180deg, var(--coral), var(--gold), var(--pine), var(--coral));
}
.ring-avatar img, .ring-avatar .init {
  border-radius: 50%;
  display: block;
}
.init {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--cream);
}

.meter {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--sage);
  overflow: hidden;
}
.meter > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.feed-item {
  position: relative;
  padding-left: 24px;
}
.feed-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: -16px;
  width: 2px;
  background: var(--sage);
}
.feed-item:last-child::before {
  display: none;
}
.feed-dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 1px var(--sage);
}

.tick-row {
  transition: background 0.25s ease;
}
.tick-row:hover {
  background: rgba(220, 232, 223, 0.25);
}

.chip-num {
  font-variant-numeric: tabular-nums;
}

.gcell {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gcell:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px -8px rgba(0, 122, 122, 0.3);
  z-index: 2;
}

.fade-panel {
  animation: panelIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Table upgrades ---------- */
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  color: var(--ink);
}

/* ---------- Responsive Layout Fixes ---------- */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .hero-3d {
    padding: 1.5rem !important;
    border-radius: var(--radius-xl);
  }
  .hero-3d h1 {
    font-size: 1.5rem !important;
  }
  .card-lift {
    border-radius: var(--radius-lg);
  }
}

/* ---------- Notification Panel (Slide-in sidebar) ---------- */
.notification-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-left: 1px solid var(--sage);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
  display: flex;
  flex-direction: column;
}

.notification-panel.open {
  transform: translateX(0);
}

.notification-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 51, 44, 0.35);
  z-index: 59;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.notification-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.notification-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sage);
}

.notification-panel .panel-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--pine);
}

.notification-panel .notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(220, 232, 223, 0.5);
  transition: background 0.15s ease;
  cursor: pointer;
}

.notif-item:hover {
  background: rgba(220, 232, 223, 0.25);
}

.notif-item.unread {
  background: rgba(235, 111, 74, 0.04);
  border-left: 3px solid var(--coral);
}

.notif-item .notif-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon.booking { background: #E3F1E6; color: #2F7D4F; }
.notif-icon.message { background: #E8EFF9; color: #3B6EC2; }
.notif-icon.review { background: #FBF0DD; color: #B5792A; }
.notif-icon.alert { background: #FBE7E1; color: #C5502E; }
.notif-icon.payout { background: var(--sage); color: var(--pine); }

.notif-item .notif-content {
  flex: 1;
  min-width: 0;
}

.notif-item .notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.notif-item .notif-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.notif-item .notif-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

