/* ============================================
   MODERN DASHBOARD UI - TITANIUM FLUID THEME
   ============================================ */

.hidden {
  display: none !important;
}

/* Core Variables for Titanium Theme */
:root {
  --fluid-bg: #000000;
  --fluid-glass: rgba(25, 25, 25, 0.4);
  --fluid-glass-hover: rgba(45, 45, 45, 0.5);
  --fluid-glass-active: rgba(255, 255, 255, 0.08);
  --fluid-border: rgba(255, 255, 255, 0.08);
  --fluid-text-primary: #ffffff;
  --fluid-text-secondary: #e8e8ec;
  --fluid-accent: #e5e5ea;
  --fluid-accent-glow: rgba(255, 255, 255, 0.1);
  --brand-accent: #56d5c4;
  --fluid-spring: cubic-bezier(
    0.25,
    1,
    0.5,
    1
  ); /* Faster, tighter Apple spring */
  --fluid-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

.modern-dashboard {
  background: var(--fluid-bg);
  min-height: 100vh;
  color: var(--fluid-text-primary);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", var(--font-sans);
}

/* ============================================
   FLUID SIDEBAR (TITANIUM GLASS)
   ============================================ */
.dashboard-shell .fluid-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: transparent !important;
  border-right: 1px solid var(--fluid-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition:
    transform 0.4s var(--fluid-smooth),
    width 0.4s var(--fluid-smooth) !important;
}

.dashboard-shell .sidebar-inner {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(40px) saturate(220%);
  -webkit-backdrop-filter: blur(40px) saturate(220%);
  border: none;
  border-radius: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 0 0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.dashboard-shell .sidebar-brand {
  padding: 0 1.25rem 1.5rem;
}

.dashboard-shell .sidebar-nav {
  padding: 0 1.25rem;
  flex: 1;
  overflow-y: auto;
}

/* Ambient glow - very subtle silver */
.dashboard-shell .sidebar-inner::before {
  content: "";
  position: absolute;
  top: -80px;
  left: -40px;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.04),
    transparent 70%
  );
  filter: blur(50px);
  border-radius: 50%;
  pointer-events: none;
  animation: sidebarAmbient 20s ease-in-out infinite alternate;
}

@keyframes sidebarAmbient {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 60px) scale(1.1); }
}

/* Sidebar Brand */
.dashboard-shell .fluid-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.75rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  position: relative;
  transition: all 0.3s var(--fluid-spring);
}

.dashboard-shell .fluid-sidebar .sidebar-brand:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.brand-logo-wrapper {
  flex-shrink: 0;
}

.dashboard-shell .fluid-shape {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff, #d1d1d6);
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.dashboard-shell .brand-text strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: #fff;
  font-weight: 700;
}

/* Redesigned Sidebar Close Button */
.dashboard-shell .sidebar-close {
  position: absolute;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--fluid-spring);
  opacity: 0.8;
}

.dashboard-shell .sidebar-close:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
  transform: rotate(90deg) scale(1.1);
}

.dashboard-shell .sidebar-close .material-symbols-rounded {
  font-size: 1.1rem;
}

/* Sidebar Navigation */
.dashboard-shell .fluid-sidebar .nav-group-title {
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 0.85rem;
  margin: 1.5rem 0 0.75rem;
  display: block;
}

.dashboard-shell .fluid-sidebar .side-item {
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.35rem;
  border: 1px solid transparent;
  transition: all 0.3s var(--fluid-spring);
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: auto;
  background: transparent;
  position: relative;
}

.dashboard-shell .nav-icon-wrapper {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.dashboard-shell .fluid-sidebar .side-item .material-symbols-rounded {
  font-size: 1.2rem;
  color: inherit;
}

.dashboard-shell .fluid-sidebar .side-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.dashboard-shell .fluid-sidebar .side-item.active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Active indicator line */
.dashboard-shell .fluid-sidebar .side-item.active::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 25%;
  height: 50%;
  width: 4px;
  background: #fff;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px #fff;
}

.dashboard-shell .fluid-sidebar .side-item.active .material-symbols-rounded {
  color: #fff;
  font-variation-settings: 'FILL' 1, 'wght' 400;
}

/* --- Header Polish & Alignment --- */
.dashboard-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.dashboard-title-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-title-block h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: -0.02em;
}

.dashboard-title-block .muted {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.6;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Minimal Footer Polish */
.dashboard-shell .minimal-foot {
  margin-top: auto;
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  gap: 0.75rem;
}

.dashboard-shell .user-quick-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s var(--fluid-spring);
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.dashboard-shell .user-quick-profile:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dashboard-shell .user-avatar-initials {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #a1a1aa);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.dashboard-shell .profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.status-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-shell .status-dot {
  width: 7px;
  height: 7px;
  background: #32d74b;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(50, 215, 75, 0.5);
  position: relative;
  flex-shrink: 0;
}

.dashboard-shell .status-dot::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.8); opacity: 0; }
}

.dashboard-shell .status-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-logout-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8e8e93;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--fluid-spring);
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: rgba(255, 69, 58, 0.12);
  border-color: rgba(255, 69, 58, 0.3);
  color: #ff453a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 69, 58, 0.1);
}

.sidebar-logout-btn .material-symbols-rounded {
  font-size: 1.25rem;
}

/* Collapsed Sidebar Adjustments */
.dashboard-shell.sidebar-collapsed .minimal-foot {
  padding: 1.25rem 0.5rem;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-shell.sidebar-collapsed .user-quick-profile {
  padding: 0;
  background: transparent;
  border: none;
  justify-content: center;
}

.dashboard-shell.sidebar-collapsed .profile-info {
  display: none;
}

.dashboard-shell.sidebar-collapsed .sidebar-logout-btn {
  margin-left: 0;
}

/* --- Admin Tab Visibility Fix --- */
.admin-tab-content {
  display: none !important;
}

.admin-tab-content.active {
  display: block !important;
  animation: fadeIn 0.4s var(--fluid-smooth);
}

/* Admin dashboard fallback layout so the page stays styled even when the
   shared admin stylesheet is unavailable or cached stale. */
.admin-body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
  color: var(--fluid-text-primary);
}

.admin-shell {
  width: 100vw;
  min-height: 100vh;
}

.admin-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(9, 9, 11, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar .sidebar-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem 1rem;
}

.admin-sidebar .sidebar-section {
  margin-bottom: 2rem;
}

.admin-sidebar .section-label {
  display: block;
  padding: 0 0.75rem;
  margin: 0 0 0.75rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.admin-sidebar .side-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.15rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #a1a1aa;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-sidebar .side-item:hover,
.admin-sidebar .side-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-sidebar .side-item .material-symbols-rounded {
  font-size: 1.15rem;
  opacity: 0.85;
}

.admin-sidebar .sidebar-footer {
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.admin-sidebar .admin-profile-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 2.5rem 3rem;
}

.admin-topbar {
  margin-bottom: 3rem;
}

.admin-topbar-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.admin-title-block h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}

.admin-title-block .muted,
.admin-status,
.page-info {
  color: var(--fluid-text-secondary);
}

.admin-content-wrapper {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.admin-analytics-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table th {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.02);
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table-controls,
.admin-table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-table-controls {
  justify-content: space-between;
  align-items: flex-end;
  margin: 2rem 0;
}

.admin-table-search {
  flex: 2;
  min-width: 300px;
}

.admin-table-filters {
  flex: 3;
  align-items: flex-end;
}

.admin-table-filters .fluid-input-group {
  flex: 1;
  min-width: 160px;
}

.admin-table-filters .fluid-input-group.compact {
  flex: 0 0 100px;
  min-width: 100px;
}

.admin-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.admin-models-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.admin-status {
  margin-top: 1rem;
  min-height: 1.25rem;
}

.compact-btn {
  height: 36px !important;
  font-size: 0.8rem !important;
  padding: 0 0.85rem !important;
  margin-top: 1.25rem;
}

@media (max-width: 980px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .admin-sidebar .sidebar-scroll-area {
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
  }

  .admin-sidebar .sidebar-section {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .admin-sidebar .section-label {
    display: none;
  }

  .admin-sidebar .side-item {
    width: auto;
    white-space: nowrap;
  }

  .admin-sidebar .sidebar-footer {
    display: none;
  }

  .admin-main {
    padding: 1.5rem;
  }

  .admin-stats-grid,
  .admin-analytics-bento {
    grid-template-columns: 1fr;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.dashboard-main {
  padding: 0; /* Remove top-level padding to allow header to span */
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  position: relative;
  background: var(--fluid-bg);
}

@media (min-width: 981px) {
  .dashboard-shell .sidebar-backdrop {
    display: none;
  }
}

.fluid-header {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--fluid-border);
  padding: 1.25rem 2.5rem;
  margin-bottom: 2rem;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-header-inner {
  max-width: 1600px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0; /* Keep it left-aligned */
}

.dashboard-title-block h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.dashboard-title-block .muted {
  font-size: 0.85rem;
  color: var(--fluid-text-secondary);
  font-weight: 500;
}

/* Tab Panel Show/Hide */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Dashboard Content Wrapper */
.dashboard-content-wrapper {
  padding: 0 2.5rem 3rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 1600px) {
  .fluid-header {
    padding-left: 4rem;
    padding-right: 4rem;
  }
  .dashboard-content-wrapper {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (max-width: 1200px) {
  .fluid-header {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .dashboard-content-wrapper {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 980px) {
  .fluid-header {
    padding: 1rem 1.5rem;
  }
  .dashboard-content-wrapper {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 768px) {
  .fluid-header {
    padding: 1rem 1.25rem;
  }
  .dashboard-content-wrapper {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .fluid-header {
    padding: 0.75rem 1rem;
  }
  .dashboard-content-wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1.5rem;
  }
}

/* Refined Quota Pill & Ring */
.quota-ring-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.5rem 0.35rem 1rem;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.quota-ring-container:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.quota-pill {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff !important;
  box-shadow: none !important;
}

.quota-pill .material-symbols-rounded {
  color: var(--brand-accent) !important;
  font-size: 1.1rem !important;
}

/* Fluid Buttons & Elements */
.fluid-btn {
  border-radius: 12px;
  transition: all 0.3s var(--fluid-spring);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
}

.fluid-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fluid-btn:active {
  transform: scale(0.97) translateY(0);
}

.btn-primary.fluid-btn {
  background: #fff;
  color: #000;
  border: none;
}

.btn-primary.fluid-btn:hover {
  background: #e5e5ea;
  box-shadow: 0 4px 25px rgba(255, 255, 255, 0.1);
}

.btn-ghost.fluid-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-ghost.fluid-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fluid-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  color: var(--fluid-text-primary);
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Fluid Panels & Cards */
.fluid-panel {
  background: transparent;
  border: 1px solid var(--fluid-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: none;
  position: relative;
  transition: border-color 0.3s ease;
}

.fluid-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.fluid-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--fluid-border);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--fluid-spring);
}

.fluid-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── Gemini Live Settings ────────────────────────── */
.live-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.live-settings-grid .full-width {
  grid-column: 1 / -1;
}

.live-settings-grid .fluid-input-group textarea {
  background: transparent !important;
  border: none !important;
  color: #fff;
  padding: 0.25rem 0 !important;
  font-size: 0.9rem;
  box-shadow: none !important;
  border-radius: 0 !important;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  width: 100%;
}

.live-settings-grid .fluid-input-group textarea:focus {
  outline: none;
}

.live-settings-grid .fluid-input-group select {
  background: transparent !important;
  border: none !important;
  color: #fff;
  padding: 0.25rem 0 !important;
  font-size: 0.9rem;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 100%;
  cursor: pointer;
  appearance: auto;
}

.live-settings-grid .fluid-input-group select option {
  background: #1c1c1e;
  color: #fff;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--fluid-text-secondary);
  opacity: 0.7;
  margin: 0.25rem 0 0;
}

.form-hint a {
  color: var(--brand-accent);
  text-decoration: underline;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.form-hint a:hover {
  opacity: 1;
}

.live-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fluid-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--fluid-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  color: var(--fluid-text-primary);
}

.fluid-checkbox-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.fluid-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-accent);
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.form-actions .admin-status {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.version-meta-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .live-settings-grid {
    grid-template-columns: 1fr;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.card-icon {
  font-size: 1.5rem !important;
  color: var(--fluid-text-primary);
  margin-bottom: 1rem;
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.6rem;
  border-radius: 10px;
}

/* Fluid Banners */
.fluid-banner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

/* iOS Grouped Form Inputs */
.fluid-input-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--fluid-border);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fluid-input-group label {
  font-size: 0.75rem;
  color: var(--fluid-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.fluid-input-group input {
  background: transparent !important;
  border: none !important;
  color: #fff;
  padding: 0.25rem 0 !important;
  font-size: 1rem;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.fluid-input-group input:focus {
  outline: none;
  transform: none;
}

.fluid-input-group:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.fluid-input-group select option {
  background: #1c1c1e;
  color: #fff;
}

.fluid-input-group select option:hover,
.fluid-input-group select option:active,
.fluid-input-group select option:checked {
  background: #2c2c2e;
  color: #fff;
}

/* Danger Zone */
.danger-fluid {
  background: rgba(255, 59, 48, 0.05);
  border-color: rgba(255, 59, 48, 0.2);
}
.btn-danger.fluid-btn {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.2);
}
.btn-danger.fluid-btn:hover {
  background: rgba(255, 59, 48, 0.2);
}

/* Modal Fluid */
.fluid-modal-backdrop {
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.4);
}

.fluid-modal {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s var(--fluid-spring);
}

.fluid-modal-backdrop:not(.hidden) .fluid-modal {
  transform: scale(1);
  opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 980px) {
  .fluid-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%) !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(40px) saturate(200%);
    z-index: 110;
  }

  .sidebar-inner {
    background: transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-open .fluid-sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-open .sidebar-backdrop {
    z-index: 105;
  }

  #sidebar-close {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .fluid-panel {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .fluid-header {
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
  }

  .model-card {
    padding: 1.25rem;
  }

  .plan-card {
    padding: 1.5rem !important;
  }

  .models-bento-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .plans-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .metric-grid,
  .referral-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .journey-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }

  .model-card-featured {
    grid-column: span 1;
  }

  .empty-state {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .dashboard-main {
    padding: 1rem;
  }

  .fluid-panel {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .fluid-header {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
  }

  .dashboard-header-actions {
    gap: 0.35rem;
  }

  #quota-pill-text {
    display: none;
  }

  .quota-ring-svg {
    width: 28px;
    height: 28px;
  }

  .quota-pill {
    padding: 0.4rem 0.55rem;
  }

  .dashboard-title-block h1 {
    font-size: 1.1rem;
  }

  .dashboard-title-block p {
    display: none;
  }

  .dashboard-header-actions .btn-ghost {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  .models-bento-grid {
    grid-template-columns: 1fr;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .referral-stats-grid {
    grid-template-columns: 1fr;
  }

  .journey-grid {
    grid-template-columns: 1fr;
  }

  .model-card {
    padding: 1rem;
    border-radius: 16px !important;
  }

  .plan-card {
    padding: 1.25rem !important;
  }

  .fluid-modal {
    padding: 1.25rem;
    margin: 0.75rem;
    width: calc(100% - 1.5rem);
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

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

  .referral-code-display {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .referral-code-display code {
    text-align: center;
  }

  .referral-link-input-group {
    flex-direction: column;
    padding: 0.75rem;
  }

  .referral-link-input-group input {
    width: 100%;
    text-align: center;
  }

  .referral-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .empty-state {
    padding: 1.5rem 1rem;
  }

  .danger-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .side-item {
    min-height: 44px;
    padding: 0.7rem 0.75rem;
  }

  .btn, .fluid-btn {
    min-height: 44px;
  }
}

@media (min-width: 1600px) {
  .dashboard-main {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

/* Sidebar Collapsed State (Desktop) */
.dashboard-shell.sidebar-collapsed .fluid-sidebar {
  width: 100px !important;
}

.dashboard-shell.sidebar-collapsed .brand-text,
.dashboard-shell.sidebar-collapsed .nav-group-title,
.dashboard-shell.sidebar-collapsed .nav-label,
.dashboard-shell.sidebar-collapsed .profile-info {
  opacity: 0;
  width: 0;
  display: none;
}

.dashboard-shell.sidebar-collapsed .nav-icon-wrapper {
  margin: 0 auto;
}

.dashboard-shell.sidebar-collapsed .user-quick-profile {
  justify-content: center;
}
/* ============================================
   GRID LAYOUTS & BENTO BOXES
   ============================================ */
.metric-grid,
.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.models-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* ============================================
   CARD ENHANCEMENTS & GLOW PHYSICS
   ============================================ */
.fluid-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.fluid-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fff;
}

.fluid-card p {
  color: var(--fluid-text-secondary);
  font-size: 0.95rem;
}

.card-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle closest-side,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  transform: translate(-50%, -50%); /* Center on cursor */
  will-change: transform, opacity;
}

/* ============================================
   UI COMPONENTS (Banners, Steps, Badges)
   ============================================ */
.insight-banner {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.insight-banner .material-symbols-rounded {
  color: var(--brand-accent);
  font-size: 1.5rem;
}

.insight-banner p {
  margin: 0;
  font-weight: 500;
  color: #e5e5ea;
}

.journey-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--fluid-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.journey-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.fluid-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-header-with-action h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.modern-form .form-group {
  margin-bottom: 1.25rem;
}

.fluid-input-group {
  transition:
    border-color 0.3s var(--fluid-spring),
    background 0.3s var(--fluid-spring);
}

.fluid-input-group label {
  color: #aeaeb2;
}

/* ============================================
   REFERRAL UI
   ============================================ */
.referral-code-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #1c1c1e;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  width: fit-content;
}

.referral-code-display code {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-accent);
}

.referral-link-input-group {
  flex-direction: row;
  align-items: center;
  padding: 0.25rem 0.25rem 0.25rem 1rem;
  background: rgba(0, 0, 0, 0.4);
}

.referral-link-input-group input {
  flex: 1;
  font-family: monospace;
  color: #8e8e93;
}

.referral-list-section {
  border-top: 1px solid var(--fluid-border);
  padding-top: 1.5rem;
}

/* ============================================
   MODALS
   ============================================ */
.fluid-modal {
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  margin: auto;
  position: relative;
  z-index: 1001;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.fluid-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--fluid-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  transition: border-color 0.3s ease;
}

.fluid-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Danger modal specifics */
.text-danger {
  color: #ff453a;
}
.btn-danger {
  background: #ff453a;
  color: #fff;
  border: none;
}
.btn-danger:hover {
  background: #ff5147;
  transform: scale(1.02);
}
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   BENTO MODEL CARDS (OVERRIDING OLD STYLES)
   ============================================ */
.model-card {
  background: linear-gradient(
    145deg,
    rgba(30, 30, 32, 0.7),
    rgba(15, 15, 18, 0.8)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  padding: 1.75rem;
  transition: all 0.4s var(--fluid-spring) !important;
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
}

.model-card:hover {
  transform: translateY(-6px) scale(1.01) !important;
  background: linear-gradient(
    145deg,
    rgba(40, 40, 45, 0.8),
    rgba(20, 20, 25, 0.9)
  ) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 
    0 20px 40px -12px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.12) !important;
}

/* ============================================
   PREMIUM MODEL CARDS (iOS OBSIDIAN)
   ============================================ */
.model-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 2.25rem 2rem;
  transition: all 0.4s var(--fluid-spring) !important;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
}

.model-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

.model-card-featured {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.model-card-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.model-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.model-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
}

.badge-thinking { 
  background: rgba(144, 112, 240, 0.08) !important; 
  color: #c792ea !important; 
  border-color: rgba(144, 112, 240, 0.2) !important;
}

.badge-fast { 
  background: rgba(244, 213, 131, 0.08) !important; 
  color: #f4d583 !important; 
  border-color: rgba(244, 213, 131, 0.2) !important;
}

.badge-pro { 
  background: rgba(255, 255, 255, 0.08) !important; 
  color: #ffffff !important; 
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.badge-free { 
  background: rgba(255, 255, 255, 0.03) !important; 
  color: rgba(255, 255, 255, 0.4) !important; 
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.model-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin: 0;
}

.model-card-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.model-card .cost-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  width: fit-content;
}

.model-card .cost-indicator .material-symbols-rounded {
  font-size: 1.15rem;
  color: #fff;
  opacity: 0.5;
}

.cost-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.cost-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.model-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5) !important;
  font-weight: 500;
}

/* ============================================
   PHASE 2: ULTRA POLISH & DETAILING
   ============================================ */

/* Sleek Titanium Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Page Load Animation (Native App feel) */
.dashboard-shell {
  display: flex;
  min-height: 100vh;
  animation: smoothReveal 0.6s var(--fluid-spring);
}
@keyframes smoothReveal {
  from {
    opacity: 0;
    transform: translateY(15px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Refined Sidebar Active State (Physical Pill effect) */
.fluid-sidebar .side-item.active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

/* Mobile Header True Frosted Glass & Sticky */
@media (max-width: 980px) {
  .fluid-header {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .dashboard-title-block h1 {
    font-size: 1.25rem;
  }
  .dashboard-title-block p {
    display: none;
  }
}

/* ============================================
   PREMIUM DASHBOARD PANELS (iOS OBSIDIAN)
   ============================================ */
.fluid-panel {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 32px !important;
  padding: 3rem !important;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
  margin-bottom: 2rem;
}

.card-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.fluid-panel h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin: 0;
}

.fluid-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.badge-success.fluid-badge {
  background: rgba(50, 215, 75, 0.1) !important;
  color: #32d74b !important;
  border-color: rgba(50, 215, 75, 0.2) !important;
}

/* Premium Form Elements */
.fluid-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transition: all 0.3s var(--ease-fluid);
  margin-bottom: 1rem;
}

.fluid-input-group:focus-within {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.fluid-input-group label {
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fluid-input-group input {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  width: 100%;
}

.fluid-input-group input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.fluid-input-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.25rem;
}

/* Danger Zone Refinement */
.danger-fluid {
  border-color: rgba(255, 69, 58, 0.2) !important;
  background: rgba(255, 69, 58, 0.02) !important;
}

.danger-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.danger-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ff453a;
  letter-spacing: -0.03em;
  margin: 0;
}

.danger-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.danger-desc p strong {
  font-size: 1.1rem;
  color: #fff;
}

.btn-danger.fluid-btn {
  background: #ff453a !important;
  color: #fff !important;
  border: none;
  font-weight: 700;
}

.btn-danger.fluid-btn:hover {
  background: #ff5b52 !important;
  box-shadow: 0 10px 30px rgba(255, 69, 58, 0.3);
}

/* ============================================
   PHASE 3: MODAL & TOAST REFINEMENTS
   ============================================ */

/* Soft Toast Notifications */
.form-message {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s var(--fluid-spring);
}

.form-message.show {
  opacity: 1;
  transform: translateY(0);
}

.text-success {
  color: #32d74b;
}
.text-error {
  color: #ff453a;
}

/* Modal specific inputs */
.modal-body p {
  color: var(--fluid-text-secondary);
}

.modal-body ul {
  list-style: none;
  padding: 0;
}
.modal-body ul li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
}
.modal-body ul li::before {
  content: "�";
  position: absolute;
  left: 0;
  color: var(--brand-accent);
}
/* Pricing Layout Refinements */
.pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pricing-header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pricing-header .muted {
  font-size: 0.95rem;
  max-width: 500px;
}

.current-plan-pill.fluid-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pricing-status {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: #a1a1aa;
}

/* ============================================
   PRICING PLAN CARDS (TITANIUM PRECISION)
   ============================================ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.plan-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 2.5rem 2rem !important;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.2, 1, 0.2, 1) !important;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.plan-card:hover {
  transform: translateY(-6px) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
}

.plan-card-featured {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.01)
  ) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

.plan-card-featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.plan-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  display: inline-block;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-card-featured .plan-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.plan-card h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.plan-price {
  font-size: 2.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

.plan-price span {
  font-size: 1rem;
  color: #8e8e93;
  font-weight: 500;
  letter-spacing: 0;
}

.plan-quota {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.25rem;
  display: block;
}

.plan-head .muted {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #a1a1aa !important;
  margin-bottom: 2rem;
  min-height: 3rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: #e5e5ea;
  font-size: 0.9rem;
  line-height: 1.4;
}

.plan-features li::before {
  content: "check";
  font-family: 'Material Symbols Rounded';
  font-size: 1.1rem;
  color: #fff;
  opacity: 0.5;
}

/* Button & Action Styling */
.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plan-purchase-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s var(--fluid-spring);
  text-decoration: none;
}

.btn-primary.plan-purchase-btn {
  background: #fff;
  color: #000;
  border: none;
}

.btn-primary.plan-purchase-btn:hover {
  background: #e5e5ea;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-ghost.plan-purchase-btn {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost.plan-purchase-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.plan-current-state {
  display: flex;
  justify-content: flex-start;
  padding: 0.85rem 0;
}

.current-plan-chip {
  color: #8e8e93;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   REFERRAL LIST ITEMS (OVERRIDING OLD STYLES)
   ============================================ */
.referral-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1rem !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--fluid-border) !important;
  border-radius: 12px !important;
  margin-bottom: 0.5rem !important;
  transition: all 0.3s var(--fluid-spring) !important;
}

.referral-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateX(4px) !important;
}

.referral-item-info {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

.referral-item-info .material-symbols-rounded {
  color: var(--fluid-text-secondary) !important;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 1.25rem !important;
}

.referral-item-info strong {
  display: block;
  font-size: 0.95rem !important;
  color: #fff;
  font-weight: 500;
}

.referral-item-email {
  font-size: 0.8rem !important;
  color: var(--fluid-text-secondary) !important;
}
/* ============================================
   OVERRIDES FOR LEGACY GREEN/TEAL ACCENTS
   ============================================ */

/* Force overriding legacy glowing elements in styles.css */
.dashboard-shell .sidebar::before,
.dashboard-shell .sidebar::after {
  display: none !important;
}

.dashboard-shell .sidebar,
.fluid-sidebar {
  border-right: 1px solid var(--fluid-border) !important;
}

/* Force override of Quota Pill colors */
#quota-pill {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--fluid-text-primary) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
}

#quota-pill .material-symbols-rounded {
  color: var(--fluid-text-secondary) !important;
}

/* Force override the Active Tab color in sidebar */
.fluid-sidebar .side-item.active {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
}

/* Ensure no green pulse glow */
.btn,
.fluid-btn,
.metric-card,
.model-card {
  box-shadow: none !important;
}
/* ============================================
   ENHANCED MODEL CARDS (TITANIUM 3D)
   ============================================ */

/* Re-style Bento Model Cards */
.model-card {
  background: linear-gradient(
    145deg,
    rgba(30, 30, 32, 0.4),
    rgba(15, 15, 18, 0.6)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.model-card:hover {
  background: linear-gradient(
    145deg,
    rgba(40, 40, 42, 0.5),
    rgba(20, 20, 22, 0.7)
  ) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

.model-card-featured {
  background: linear-gradient(
    145deg,
    rgba(45, 45, 48, 0.4),
    rgba(25, 25, 28, 0.6)
  ) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Neutralize the Green Quota Cost indicator */
.model-card .cost-indicator {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.model-card .cost-indicator .material-symbols-rounded {
  color: var(--fluid-text-secondary) !important;
}

/* Model Badges Polish */
.model-badges .badge {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #d1d1d6 !important;
  backdrop-filter: blur(10px);
}

/* Headings and Typography Polish */
.model-card h3 {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", var(--font-sans) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

.model-card-body p {
  color: #a1a1aa !important; /* Brighter grey for readability */
}

.model-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.provider-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cost-info {
  display: flex;
  flex-direction: column;
}

/* Sidebar Refinements */
.fluid-sidebar .side-item.active {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.fluid-sidebar .side-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
}

.nav-label {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Typography Polish */
h1, h2, h3 {
  color: #fff;
  letter-spacing: -0.02em;
}

.muted {
  color: #8e8e93 !important;
}

/* ---- 1. Skeleton Loading Shimmer ---- */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: 8px;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
  display: inline-block;
  min-height: 1em;
}

.skeleton-card {
  min-height: 120px;
  border-radius: 16px;
  width: 100%;
}

.skeleton-text {
  min-height: 14px;
  margin-bottom: 8px;
  width: 60%;
}

.skeleton-text.short {
  width: 35%;
}
.skeleton-text.long {
  width: 85%;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.skeleton-grid .skeleton-card {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  padding: 1.5rem;
}

.skeleton-grid .skeleton-card .skeleton-text {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

/* ---- Skeleton Loading Placeholders ---- */
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

.skeleton-line {
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-line:last-child {
  width: 60%;
}

.skeleton-pill {
  height: 32px;
  width: 120px;
  border-radius: 999px;
}

.skeleton-card {
  height: 120px;
  border-radius: 16px;
  padding: 1rem;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* Dashboard Content Wrapper - min-height */
.dashboard-content-wrapper {
  position: relative;
  min-height: 50vh;
}

@media (max-width: 768px) {
  .dashboard-content-wrapper {
    min-height: 40vh;
  }
}

@media (max-width: 480px) {
  .dashboard-content-wrapper {
    min-height: 30vh;
  }
}

/* ---- 3. Quota Circular Progress Ring ---- */
.quota-ring-container {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
}

.quota-ring-svg {
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}

.quota-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 3;
}

.quota-ring-fill {
  fill: none;
  stroke: #e5e5ea;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.quota-ring-fill.low {
  stroke: #ff453a;
}

.quota-ring-fill.medium {
  stroke: #ffd60a;
}

.quota-ring-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fluid-text-primary);
  white-space: nowrap;
}

/* ---- 5. Enhanced Empty States ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  gap: 0.75rem;
}

.empty-state .material-symbols-rounded {
  font-size: 3rem !important;
  color: rgba(255, 255, 255, 0.1);
  margin-bottom: 0.5rem;
}

.empty-state h3 {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 500;
  margin: 0;
}

.empty-state p {
  color: var(--fluid-text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
  margin: 0;
}

/* ---- 6. Animated Counter Numbers ---- */
.counter-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ---- 7. Staggered Entry Animation for Cards ---- */
@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.metric-card,
.journey-card,
.model-card,
.plan-card,
.referral-card {
  animation: cardEntry 0.5s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.metric-card:nth-child(1) {
  animation-delay: 0.02s;
}
.metric-card:nth-child(2) {
  animation-delay: 0.08s;
}
.metric-card:nth-child(3) {
  animation-delay: 0.14s;
}
.metric-card:nth-child(4) {
  animation-delay: 0.2s;
}

.journey-card:nth-child(1) {
  animation-delay: 0.05s;
}
.journey-card:nth-child(2) {
  animation-delay: 0.1s;
}
.journey-card:nth-child(3) {
  animation-delay: 0.15s;
}

.model-card:nth-child(1) {
  animation-delay: 0.03s;
}
.model-card:nth-child(2) {
  animation-delay: 0.07s;
}
.model-card:nth-child(3) {
  animation-delay: 0.11s;
}
.model-card:nth-child(4) {
  animation-delay: 0.15s;
}
.model-card:nth-child(5) {
  animation-delay: 0.19s;
}
.model-card:nth-child(6) {
  animation-delay: 0.23s;
}

.plan-card:nth-child(1) {
  animation-delay: 0.05s;
}
.plan-card:nth-child(2) {
  animation-delay: 0.1s;
}
.plan-card:nth-child(3) {
  animation-delay: 0.15s;
}

/* ---- 8. Enhanced Integrations Panel ---- */
.panel-card .empty-state {
  margin: 1rem 0;
}

/* ---- 9. Metric Card Number Value Polish ---- */
.metric-card p code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: #e5e5ea;
  font-size: 0.85rem;
}

.metric-card .metric-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", var(--font-sans);
  letter-spacing: -0.02em;
}

/* ---- 10. Sidebar Nav Scroll Refinement ---- */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

/* ---- 11. Touch Optimizations ---- */
.btn,
.fluid-btn,
.side-item,
button,
a {
  touch-action: manipulation;
}

.side-item {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ---- 12. Safe Area Padding for Notched Phones ---- */
@supports (padding-top: env(safe-area-inset-top)) {
  .sidebar-inner {
    padding-top: calc(2rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  @media (max-width: 980px) {
    .fluid-sidebar {
      padding-top: env(safe-area-inset-top, 0px);
    }
  }
}

/* ============================================
   UTILITY CLASSES & DASHBOARD REFINEMENTS
   ============================================ */

.modern-dashboard .section-header {
  text-align: left !important;
  margin-bottom: 0 !important;
}

.mt-12 { margin-top: 3rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mt-8 { margin-top: 2rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mt-4 { margin-top: 1rem !important; }
.text-left { text-align: left !important; }

.action-card {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--fluid-border);
  font-family: inherit;
  color: inherit;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--fluid-spring);
  position: relative;
  overflow: hidden;
}

.action-card:focus {
  outline: 2px solid rgba(255, 255, 255, 0.2);
  outline-offset: 4px;
}

.action-card:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-4px) !important;
}

.action-card:active {
  transform: scale(0.98) translateY(-2px) !important;
}

.action-card h3 {
  transition: color 0.3s ease;
}

.action-card:hover h3 {
  color: #fff;
}

.action-card .card-icon {
  transition: transform 0.3s var(--fluid-spring);
}

.action-card:hover .card-icon {
  transform: scale(1.1) rotate(-5deg);
  background: rgba(255, 255, 255, 0.08);
}

/* Neutralize Insight Banner for Titanium Theme */
.insight-banner {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2) !important;
}

.insight-banner .material-symbols-rounded {
  color: rgba(255, 255, 255, 0.6) !important;
}

.banner-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05), transparent 50%);
  pointer-events: none;
}

/* ============================================
   TASKS & REWARDS UI
   ============================================ */

/* ── Streak Banner ── */
.streak-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 1.75rem 2rem !important;
}

.streak-banner-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.streak-fire {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.streak-fire .material-symbols-rounded {
  font-size: 2rem;
  color: #ff9f43;
  animation: streakPulse 2s ease-in-out infinite;
}

@keyframes streakPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.streak-count {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 1;
}

.streak-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.streak-calendar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.streak-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s var(--fluid-spring);
}

.streak-dot-active {
  background: rgba(50, 215, 75, 0.2);
  border: 1px solid rgba(50, 215, 75, 0.4);
  box-shadow: 0 0 12px rgba(50, 215, 75, 0.15);
}

.streak-dot-active::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #32d74b;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(50, 215, 75, 0.5);
}

.streak-dot-inactive {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.streak-dot-inactive::after {
  content: "";
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.streak-dot-label {
  position: absolute;
  bottom: -18px;
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.streak-message {
  width: 100%;
  font-size: 0.85rem;
  margin: 0;
  color: #a1a1aa;
}

@media (max-width: 640px) {
  .streak-banner-content {
    gap: 1.25rem;
  }
  .streak-fire .material-symbols-rounded { font-size: 1.5rem; }
  .streak-count { font-size: 1.75rem; }
  .streak-dot { width: 26px; height: 26px; }
  .streak-calendar { gap: 0.25rem; }
}

/* ── Task Cards ── */
.tasks-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  transition: all 0.35s var(--fluid-spring);
}

.task-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.task-card.task-completed {
  background: rgba(50, 215, 75, 0.04);
  border-color: rgba(50, 215, 75, 0.15);
  opacity: 0.85;
}

.task-card.task-completed:hover {
  opacity: 1;
}

.task-card-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.task-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: all 0.3s var(--fluid-spring);
}

.task-icon-wrapper .material-symbols-rounded {
  font-size: 1.25rem;
  color: #a1a1aa;
}

.task-icon-done {
  background: rgba(50, 215, 75, 0.1);
  border-color: rgba(50, 215, 75, 0.2);
}

.task-icon-done .material-symbols-rounded {
  color: #32d74b;
}

.task-info {
  min-width: 0;
}

.task-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}

.task-info p {
  font-size: 0.82rem;
  margin: 0;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.task-reward {
  font-size: 1rem;
  font-weight: 800;
  color: #ffd60a;
  letter-spacing: -0.01em;
  font-family: var(--font-display);
  transition: all 0.3s var(--fluid-spring);
}

.task-reward-claimed {
  transform: scale(1.3);
  color: #32d74b;
}

.task-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s var(--fluid-spring);
}

.task-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.task-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.task-btn .material-symbols-rounded {
  font-size: 1.1rem;
}

.task-btn-done {
  background: rgba(50, 215, 75, 0.1);
  border-color: rgba(50, 215, 75, 0.2);
  color: #32d74b;
  cursor: default;
}

.task-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

/* ── Tasks Summary ── */
.tasks-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #a1a1aa;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 2rem;
}

.tasks-summary .material-symbols-rounded {
  font-size: 1.15rem;
  color: #ffd60a;
}

/* ── Rewards Grid ── */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rewards-grid .metric-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.rewards-grid .metric-card .card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #a1a1aa;
}

.rewards-grid .metric-card h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8e8e93;
  margin-bottom: 0.5rem;
}

.rewards-grid .metric-card p {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

/* Task reward animation */
@keyframes rewardPop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.task-reward-claimed {
  animation: rewardPop 0.5s var(--fluid-spring);
  color: #32d74b;
}

/* ── Task Auto-Complete Glow ── */
@keyframes taskCompleteGlow {
  0% { box-shadow: 0 0 0 0 rgba(50, 215, 75, 0); }
  50% { box-shadow: 0 0 20px 4px rgba(50, 215, 75, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(50, 215, 75, 0); }
}

.task-card.task-completed {
  animation: taskCompleteGlow 0.8s var(--fluid-spring);
}

/* ── Task Card Entrance Animation ── */
@keyframes taskCardSlideIn {
  0% { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

#tasks-container .task-card {
  animation: taskCardSlideIn 0.4s var(--fluid-spring) both;
}

#tasks-container .task-card:nth-child(1) { animation-delay: 0.05s; }
#tasks-container .task-card:nth-child(2) { animation-delay: 0.1s; }
#tasks-container .task-card:nth-child(3) { animation-delay: 0.15s; }
#tasks-container .task-card:nth-child(4) { animation-delay: 0.2s; }
#tasks-container .task-card:nth-child(5) { animation-delay: 0.25s; }
#tasks-container .task-card:nth-child(6) { animation-delay: 0.3s; }

/* ── Confetti burst on all tasks complete ── */
@keyframes confettiDrop {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(60px) rotate(720deg); opacity: 0; }
}

.tasks-summary .material-symbols-rounded {
  animation: streakPulse 2s ease-in-out infinite;
}

/* ── Task Hover Shimmer Effect ── */
.task-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
  border-radius: 18px;
}

.task-card:hover::before {
  left: 100%;
}

.task-card {
  position: relative;
  overflow: hidden;
}

/* ── Staggered Leaderboard Entrance ── */
@keyframes leaderboardFadeIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes leaderboardRowSlide {
  0% { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

.leaderboard-list .leaderboard-row {
  animation: leaderboardRowSlide 0.4s var(--fluid-spring) both;
}

/* Stagger each row with increasing delay */
.leaderboard-list .leaderboard-row:nth-child(1) { animation-delay: 0.05s; }
.leaderboard-list .leaderboard-row:nth-child(2) { animation-delay: 0.1s; }
.leaderboard-list .leaderboard-row:nth-child(3) { animation-delay: 0.15s; }
.leaderboard-list .leaderboard-row:nth-child(4) { animation-delay: 0.2s; }
.leaderboard-list .leaderboard-row:nth-child(5) { animation-delay: 0.25s; }
.leaderboard-list .leaderboard-row:nth-child(6) { animation-delay: 0.3s; }
.leaderboard-list .leaderboard-row:nth-child(7) { animation-delay: 0.35s; }
.leaderboard-list .leaderboard-row:nth-child(8) { animation-delay: 0.4s; }
.leaderboard-list .leaderboard-row:nth-child(9) { animation-delay: 0.45s; }
.leaderboard-list .leaderboard-row:nth-child(10) { animation-delay: 0.5s; }
.leaderboard-list .leaderboard-row:nth-child(11) { animation-delay: 0.55s; }
.leaderboard-list .leaderboard-row:nth-child(12) { animation-delay: 0.6s; }
.leaderboard-list .leaderboard-row:nth-child(13) { animation-delay: 0.65s; }
.leaderboard-list .leaderboard-row:nth-child(14) { animation-delay: 0.7s; }
.leaderboard-list .leaderboard-row:nth-child(15) { animation-delay: 0.75s; }

/* ── Daily Rotation Banner ── */
.leaderboard-rotation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 14px;
  animation: leaderboardFadeIn 0.5s var(--fluid-spring);
}

.rotation-banner-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c8c8cc;
}

.rotation-banner-left .material-symbols-rounded {
  font-size: 1.15rem;
  color: #ffd60a;
  animation: rotateGlow 3s ease-in-out infinite;
}

@keyframes rotateGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 6px rgba(255, 214, 10, 0.3)); }
}

.rotation-date {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.06);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  flex-shrink: 0;
}

/* Mobile: stack banner */
@media (max-width: 640px) {
  .leaderboard-rotation-banner {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ============================================
   LEADERBOARD
   ============================================ */

.leaderboard-container {
  margin-top: 1.5rem;
}

/* ── Podium (Top 3) ── */
.leaderboard-podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: end;
}

.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.35s var(--fluid-spring);
  position: relative;
  overflow: hidden;
}

.podium-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.podium-rank-1 {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
  border-color: rgba(255, 215, 0, 0.2);
  padding-top: 2.5rem;
  order: 2;
}

.podium-rank-1 .podium-medal {
  color: #ffd700;
  font-size: 2.5rem;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3));
}

.podium-rank-1 .podium-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.podium-rank-1 .podium-stats {
  font-size: 0.85rem;
  color: #ffd700;
  font-weight: 700;
}

.podium-rank-2 {
  order: 1;
  padding-top: 1.5rem;
}

.podium-rank-2 .podium-medal {
  color: #c0c0c0;
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(192, 192, 192, 0.2));
}

.podium-rank-2 .podium-name {
  font-size: 1rem;
  font-weight: 700;
  color: #e5e5ea;
}

.podium-rank-2 .podium-stats {
  font-size: 0.8rem;
  color: #a1a1aa;
  font-weight: 600;
}

.podium-rank-3 {
  order: 3;
  padding-top: 1.5rem;
}

.podium-rank-3 .podium-medal {
  color: #cd7f32;
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(205, 127, 50, 0.2));
}

.podium-rank-3 .podium-name {
  font-size: 1rem;
  font-weight: 700;
  color: #e5e5ea;
}

.podium-rank-3 .podium-stats {
  font-size: 0.8rem;
  color: #a1a1aa;
  font-weight: 600;
}

.podium-crown {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.podium-rank-1 .podium-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.15rem;
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.1);
}

.podium-medal {
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.podium-name {
  margin-bottom: 0.15rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-stats {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.podium-stats .material-symbols-rounded {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ── Rankings List ── */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s var(--fluid-spring);
}

.leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.leaderboard-row.is-me {
  background: rgba(255, 215, 0, 0.04);
  border-color: rgba(255, 215, 0, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.1);
}

.leaderboard-row.is-me .leaderboard-rank {
  color: #ffd700;
  font-weight: 800;
}

.leaderboard-rank {
  width: 28px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a1a1aa;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.leaderboard-row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d1d6;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-row-name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e5ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-row-name .is-me-tag {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffd700;
  margin-left: 0.4rem;
  opacity: 0.7;
}

.leaderboard-row-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.leaderboard-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a1a1aa;
}

.leaderboard-stat .material-symbols-rounded {
  font-size: 0.9rem;
  opacity: 0.6;
}

.leaderboard-stat-value {
  font-weight: 700;
  color: #d1d1d6;
  font-variant-numeric: tabular-nums;
}

.leaderboard-stat-quota {
  color: #ffd60a;
}

.leaderboard-streak-icon {
  color: #ff9f43;
  font-size: 0.9rem;
}

/* ── Leaderboard empty/loading ── */
.leaderboard-empty {
  text-align: center;
  padding: 2rem;
  color: #8e8e93;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.01);
}

.leaderboard-empty .material-symbols-rounded {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.3;
}

.leaderboard-empty h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #a1a1aa;
  margin-bottom: 0.4rem;
}

.leaderboard-empty p {
  font-size: 0.85rem;
  margin: 0;
}

/* ── My Rank Badge ── */
.leaderboard-my-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 215, 0, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.12);
  border-radius: 14px;
}

.leaderboard-my-rank-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #a1a1aa;
}

.leaderboard-my-rank-label .material-symbols-rounded {
  color: #ffd700;
  font-size: 1.15rem;
}

.leaderboard-my-rank-value {
  font-size: 1rem;
  font-weight: 800;
  color: #ffd700;
  font-family: var(--font-display);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .leaderboard-podium {
    gap: 0.5rem;
  }
  .podium-card {
    padding: 1rem 0.75rem;
  }
  .podium-rank-1 {
    padding-top: 1.75rem;
  }
  .podium-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  .podium-rank-1 .podium-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  .podium-medal {
    font-size: 1.5rem;
  }
  .podium-rank-1 .podium-medal {
    font-size: 2rem;
  }
  .podium-name {
    font-size: 0.8rem;
  }
  .podium-stats {
    font-size: 0.7rem;
  }
  .leaderboard-row-stats {
    gap: 0.5rem;
  }
  .leaderboard-stat {
    font-size: 0.7rem;
  }
  .leaderboard-row {
    padding: 0.6rem 0.75rem;
  }
}

/* ── Dummy User Styles (Community Placeholders) ── */
.podium-dummy {
  opacity: 0.75;
  filter: saturate(0.85);
}

.podium-dummy-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  margin-left: 0.35rem;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-row-dummy {
  opacity: 0.7;
  filter: saturate(0.8);
}

.leaderboard-row-dummy:hover {
  opacity: 1;
}

.avatar-dummy {
  border-style: dashed !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.dummy-tag {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.25);
  margin-left: 0.3rem;
  opacity: 0.6;
}

/* ── Streak Milestone Celebration ── */
@keyframes milestoneFirework {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.streak-count.milestone-reached {
  animation: milestoneFirework 0.6s var(--fluid-spring);
  color: #ffd700 !important;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* ── Rewards Card Entrance ── */
@keyframes rewardCardRise {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

.rewards-grid .metric-card {
  animation: rewardCardRise 0.5s var(--fluid-spring) both;
}

.rewards-grid .metric-card:nth-child(1) { animation-delay: 0.1s; }
.rewards-grid .metric-card:nth-child(2) { animation-delay: 0.2s; }
.rewards-grid .metric-card:nth-child(3) { animation-delay: 0.3s; }

/* ── Tasks Tab Header Animation ── */
.section-header h2 .material-symbols-rounded {
  vertical-align: middle;
  margin-right: 0.3rem;
}

/* ============================================
   NEW: CONFETTI CELEBRATION
   ============================================ */

.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 100;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confettiFall var(--duration, 2s) ease-in forwards;
  opacity: 0.9;
  font-size: 16px;
  line-height: 1;
  will-change: transform, opacity;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(calc(100vh)) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* ============================================
   NEW: TASKS PROGRESS BAR
   ============================================ */

.tasks-progress-container {
  margin-bottom: 1rem;
  padding: 0.25rem 0;
}

.tasks-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.tasks-progress-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8e8e93;
}

.tasks-progress-percent {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a1a1aa;
}

.tasks-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.tasks-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #32d74b, #30d158);
  border-radius: 99px;
  transition: width 0.6s var(--fluid-spring);
  min-width: 0;
}

/* ============================================
   NEW: ALL-TASKS BONUS CHIP
   ============================================ */

.alltasks-bonus-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  animation: chipSlideIn 0.5s var(--fluid-spring);
  transition: all 0.3s var(--fluid-spring);
}

@keyframes chipSlideIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.alltasks-bonus-available {
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.08), rgba(255, 214, 10, 0.02));
  border: 1px solid rgba(255, 214, 10, 0.2);
  color: #ffd60a;
}

.alltasks-bonus-available .material-symbols-rounded {
  color: #ffd60a;
  animation: bonusPulse 2s ease-in-out infinite;
}

@keyframes bonusPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.alltasks-bonus-claimed {
  background: rgba(50, 215, 75, 0.06);
  border: 1px solid rgba(50, 215, 75, 0.15);
  color: #32d74b;
}

.alltasks-claim-btn {
  margin-left: auto;
  padding: 0.4rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 214, 10, 0.15);
  border: 1px solid rgba(255, 214, 10, 0.25);
  color: #ffd60a;
  cursor: pointer;
  transition: all 0.25s var(--fluid-spring);
  white-space: nowrap;
}

.alltasks-claim-btn:hover:not(:disabled) {
  background: rgba(255, 214, 10, 0.25);
  transform: translateY(-1px);
}

.alltasks-claim-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.alltasks-claim-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ============================================
   NEW: STREAK FREEZES BADGE
   ============================================ */

.streak-freezes {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: rgba(100, 200, 255, 0.08);
  border: 1px solid rgba(100, 200, 255, 0.15);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64c8ff;
  white-space: nowrap;
}

.streak-freezes .material-symbols-rounded {
  font-size: 1rem;
  color: #64c8ff;
}

/* ============================================
   NEW: STREAK DOT "TODAY" MARKER
   ============================================ */

.streak-dot-today {
  box-shadow: 0 0 0 2px rgba(255, 214, 10, 0.3);
}

.streak-dot-today-marker {
  position: absolute;
  bottom: -28px;
  font-size: 0.5rem;
  font-weight: 800;
  color: rgba(255, 214, 10, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ============================================
   NEW: ALL-TASKS PROGRESS IN REWARDS GRID
   ============================================ */

#rewards-alltasks .alltasks-progress-text {
  font-size: 1rem;
  font-weight: 700;
  color: #a1a1aa;
  margin-bottom: 0.5rem;
}

#rewards-alltasks .alltasks-progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

#rewards-alltasks .alltasks-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #32d74b, #30d158);
  border-radius: 99px;
  transition: width 0.6s var(--fluid-spring);
  min-width: 0;
}

#rewards-alltasks.alltasks-ready {
  border-color: rgba(255, 214, 10, 0.2);
}

#rewards-alltasks.alltasks-ready .card-icon {
  color: #ffd60a;
}

#rewards-alltasks.alltasks-ready .alltasks-progress-text {
  color: #ffd60a;
}

/* ── Freezes Card ── */
#rewards-freezes .freezes-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: #64c8ff;
}

#rewards-freezes .card-icon {
  color: #64c8ff;
}

/* ── Reward card animation delays for new cards ── */
.rewards-grid .metric-card:nth-child(4) { animation-delay: 0.4s; }
.rewards-grid .metric-card:nth-child(5) { animation-delay: 0.5s; }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN LEADERBOARD
   ══════════════════════════════════════════════════════════════════════════ */

.admin-leaderboard-stats {
  margin-bottom: 2rem;
}

.admin-podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0;
  align-items: end;
}

.admin-podium .podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.35s var(--fluid-spring, ease);
  position: relative;
  overflow: hidden;
}

.admin-podium .podium-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-podium .podium-rank-1 {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
  border-color: rgba(255, 215, 0, 0.2);
  padding-top: 2.5rem;
  order: 2;
}

.admin-podium .podium-rank-1 .podium-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.15rem;
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.1);
}

.admin-podium .podium-rank-2 { order: 1; padding-top: 1.5rem; }
.admin-podium .podium-rank-3 { order: 3; padding-top: 1.5rem; }

.admin-podium .podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.admin-podium .podium-medal {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.admin-podium .podium-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e4e4e7;
  margin-bottom: 0.35rem;
}

.admin-podium .podium-crown {
  position: absolute;
  top: 8px;
  font-size: 1.2rem;
}

.admin-podium .podium-stats {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 215, 0, 0.7);
  font-weight: 600;
}

.admin-podium .podium-stats .material-symbols-rounded {
  font-size: 0.85rem;
}

/* Admin table plan pill */
.admin-table .plan-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plan-free {
  background: rgba(150, 150, 150, 0.1);
  color: #999;
  border: 1px solid rgba(150, 150, 150, 0.15);
}

.plan-starter {
  background: rgba(99, 179, 237, 0.1);
  color: #63b3ed;
  border: 1px solid rgba(99, 179, 237, 0.15);
}

.plan-pro {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd60a;
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.plan-enterprise {
  background: rgba(159, 122, 234, 0.1);
  color: #9f7aea;
  border: 1px solid rgba(159, 122, 234, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
  .admin-podium {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .admin-podium .podium-card {
    order: unset !important;
    padding-top: 1.5rem;
  }
}

/* ============================================
   FEEDBACK & SUPPORT — USER + ADMIN
   ============================================ */

/* ── Character Counter ── */
.feedback-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--fluid-text-secondary);
  opacity: 0.5;
  margin-top: 0.25rem;
  font-family: "SF Mono", "Fira Code", monospace;
  letter-spacing: 0.03em;
}

/* ── Upload Area ── */
.feedback-upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--fluid-smooth);
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.feedback-upload-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(86, 213, 196, 0.04), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feedback-upload-area:hover {
  border-color: rgba(86, 213, 196, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.feedback-upload-area:hover::before {
  opacity: 1;
}

.feedback-upload-area.drag-over {
  border-color: var(--brand-accent);
  background: rgba(86, 213, 196, 0.08);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-placeholder .material-symbols-rounded {
  font-size: 2.5rem;
  color: var(--brand-accent);
  opacity: 0.6;
}

.upload-placeholder p {
  margin: 0;
  color: var(--fluid-text-secondary);
  font-size: 0.9rem;
}

.upload-preview {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.upload-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  border: 1px solid var(--fluid-border);
  object-fit: contain;
  cursor: zoom-in;
}

.upload-remove-btn {
  position: absolute !important;
  top: -8px;
  right: -8px;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(255, 75, 75, 0.9) !important;
  border: 2px solid rgba(0, 0, 0, 0.5);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  z-index: 2;
}

.upload-remove-btn .material-symbols-rounded {
  font-size: 1rem;
  color: white;
}

/* ── Feedback History Cards ── */
.feedback-history {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feedback-history-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--fluid-border);
  border-radius: 14px;
  transition: background 0.2s;
}

.feedback-history-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.feedback-history-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.feedback-history-icon .material-symbols-rounded {
  font-size: 1.1rem;
  color: white;
}

.feedback-history-body {
  flex: 1;
  min-width: 0;
}

.feedback-history-body h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  color: var(--fluid-text-primary);
}

.feedback-history-body p {
  font-size: 0.8rem;
  margin: 0 0 0.4rem;
  color: var(--fluid-text-secondary);
  opacity: 0.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feedback-history-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feedback-history-meta span {
  font-size: 0.7rem;
  color: var(--fluid-text-secondary);
  opacity: 0.5;
}

.feedback-history-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feedback-history-has-screenshot {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: var(--brand-accent);
  opacity: 0.7;
}

/* ── Admin Feedback Cards ── */
.admin-feedback-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-feedback-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--fluid-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.admin-feedback-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-feedback-card[data-status="new"] {
  border-left: 3px solid var(--brand-accent);
}

.admin-feedback-card[data-status="reviewed"] {
  border-left: 3px solid #6bb3ff;
}

.admin-feedback-card[data-status="resolved"] {
  border-left: 3px solid rgba(136, 136, 136, 0.5);
}

.feedback-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.feedback-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.feedback-card-user .user-cell {
  display: flex;
  flex-direction: column;
}

.feedback-card-user .user-cell strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fluid-text-primary);
}

.feedback-card-user .user-cell span {
  font-size: 0.8rem;
  color: var(--fluid-text-secondary);
  opacity: 0.6;
}

.feedback-card-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feedback-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid color-mix(in srgb, var(--badge-color) 30%, transparent);
  background: color-mix(in srgb, var(--badge-color) 10%, transparent);
  color: var(--badge-color);
  white-space: nowrap;
}

.feedback-badge .material-symbols-rounded {
  font-size: 0.85rem;
}

.feedback-badge-status {
  border-color: var(--badge-bg, transparent);
  background: var(--badge-bg, rgba(0, 0, 0, 0.1));
}

.feedback-card-date {
  font-size: 0.75rem;
  color: var(--fluid-text-secondary);
  opacity: 0.5;
  white-space: nowrap;
  font-family: "SF Mono", "Fira Code", monospace;
}

.feedback-card-body {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.feedback-card-message {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--fluid-text-secondary);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.feedback-card-screenshot {
  margin-top: 0.75rem;
  position: relative;
}

.feedback-card-screenshot img {
  max-width: 100%;
  max-height: 350px;
  border-radius: 10px;
  border: 1px solid var(--fluid-border);
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s var(--fluid-smooth);
}

.feedback-card-screenshot img:hover {
  transform: scale(1.01);
}

.screenshot-zoom-hint {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--fluid-text-secondary);
  opacity: 0.4;
}

.screenshot-zoom-hint .material-symbols-rounded {
  font-size: 0.85rem;
}

.feedback-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.feedback-card-user-agent {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.feedback-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feedback-status-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.35rem 2rem 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--fluid-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fluid-text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: border-color 0.2s;
}

.feedback-status-select:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.feedback-status-select:focus {
  outline: none;
  border-color: var(--brand-accent);
}

/* ── Admin Feedback Empty State ── */
.admin-feedback-cards .empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.admin-feedback-cards .empty-state .material-symbols-rounded {
  font-size: 3rem;
  color: var(--fluid-text-secondary);
  opacity: 0.2;
  margin-bottom: 1rem;
  display: block;
}

.admin-feedback-cards .empty-state h3 {
  font-size: 1rem;
  color: var(--fluid-text-secondary);
  opacity: 0.6;
}

.admin-feedback-cards .empty-state p {
  font-size: 0.85rem;
  color: var(--fluid-text-secondary);
  opacity: 0.4;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .feedback-card-header {
    flex-direction: column;
  }

  .feedback-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-feedback-card {
    padding: 1rem;
  }

  .feedback-upload-area {
    padding: 1.5rem 1rem;
  }

  .feedback-history-item {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   SUPPORT TICKET SYSTEM
   ============================================ */

/* ── Ticket List Cards ── */
.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticket-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--fluid-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s var(--fluid-smooth);
}

.ticket-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.ticket-card.ticket-unread {
  border-left: 3px solid var(--brand-accent);
  background: rgba(86, 213, 196, 0.03);
}

.ticket-card-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.ticket-card-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fluid-text-secondary);
  opacity: 0.5;
  white-space: nowrap;
  font-family: "SF Mono", "Fira Code", monospace;
  padding-top: 0.15rem;
}

.ticket-card-info {
  flex: 1;
  min-width: 0;
}

.ticket-card-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  color: var(--fluid-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-card-preview {
  font-size: 0.78rem;
  color: var(--fluid-text-secondary);
  opacity: 0.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
  margin: 0 0 0.3rem;
}

.ticket-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--fluid-text-secondary);
  opacity: 0.6;
}

.ticket-card-separator {
  opacity: 0.3;
}

.ticket-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.ticket-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
}

.ticket-card-time {
  font-size: 0.72rem;
  color: var(--fluid-text-secondary);
  opacity: 0.4;
  white-space: nowrap;
}

/* ── Ticket Status Dot ── */
.ticket-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Ticket Detail Panel ── */
.ticket-detail-panel {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.ticket-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.ticket-detail-header h2 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.ticket-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ticket-number-badge,
.ticket-status-badge,
.ticket-category-badge,
.ticket-priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticket-number-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fluid-text-secondary);
  font-family: "SF Mono", "Fira Code", monospace;
}

.ticket-status-badge {
  background: rgba(86, 213, 196, 0.15);
  color: #56d5c4;
}

.ticket-category-badge {
  background: rgba(255, 255, 255, 0.04);
}

.ticket-priority-badge {
  background: rgba(255, 255, 255, 0.04);
}

/* ── Admin ticket user info bar ── */
.admin-ticket-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--fluid-border);
  border-top: 1px solid var(--fluid-border);
  font-size: 0.82rem;
}

.admin-ticket-user-info .material-symbols-rounded {
  font-size: 1rem;
  color: var(--brand-accent);
}

#admin-ticket-user-name {
  font-weight: 600;
  color: var(--fluid-text-primary);
}

#admin-ticket-user-email {
  font-size: 0.78rem;
  opacity: 0.5;
}

/* ── Admin ticket actions bar ── */
.admin-ticket-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Ticket Chat Thread ── */
.ticket-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 200px;
  max-height: 50vh;
}

.ticket-message {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
  animation: fadeInUp 0.25s var(--fluid-smooth);
}

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

.ticket-message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ticket-message-admin {
  align-self: flex-start;
}

.ticket-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.ticket-message-avatar .material-symbols-rounded {
  font-size: 1rem;
}

.avatar-user {
  background: rgba(86, 213, 196, 0.15);
  color: var(--brand-accent);
}

.avatar-admin {
  background: rgba(107, 179, 255, 0.15);
  color: #6bb3ff;
}

.ticket-message-content {
  flex: 1;
  min-width: 0;
}

.ticket-message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.ticket-message-header strong {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fluid-text-primary);
}

.ticket-message-time {
  font-size: 0.68rem;
  color: var(--fluid-text-secondary);
  opacity: 0.4;
}

.ticket-message-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--fluid-text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--fluid-border);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket-message-user .ticket-message-text {
  background: rgba(86, 213, 196, 0.06);
  border-color: rgba(86, 213, 196, 0.12);
}

.ticket-message-admin .ticket-message-text {
  background: rgba(107, 179, 255, 0.06);
  border-color: rgba(107, 179, 255, 0.12);
}

.ticket-message-screenshot {
  margin-top: 0.5rem;
}

.ticket-message-screenshot img {
  max-width: 100%;
  max-height: 250px;
  border-radius: 10px;
  border: 1px solid var(--fluid-border);
  object-fit: contain;
  cursor: zoom-in;
}

/* ── Ticket Reply Area ── */
.ticket-reply-area {
  padding: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid var(--fluid-border);
  background: rgba(0, 0, 0, 0.2);
}

.ticket-reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticket-reply-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.ticket-reply-input-row textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--fluid-border);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  color: var(--fluid-text-primary);
  font-size: 0.85rem;
  line-height: 1.5;
  resize: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.ticket-reply-input-row textarea:focus {
  outline: none;
  border-color: var(--brand-accent);
}

.ticket-reply-input-row textarea::placeholder {
  color: var(--fluid-text-secondary);
  opacity: 0.35;
}

.ticket-reply-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.ticket-reply-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.ticket-reply-preview img {
  max-height: 60px;
  max-width: 120px;
  border-radius: 8px;
  object-fit: contain;
}

/* ── Closed ticket banner ── */
.ticket-closed-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(136, 136, 136, 0.08);
  border-top: 1px solid var(--fluid-border);
  color: var(--fluid-text-secondary);
  opacity: 0.6;
  font-size: 0.82rem;
}

.ticket-closed-banner .material-symbols-rounded {
  font-size: 1.1rem;
}

/* ── Ticket Empty States ── */
.tickets-list .empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.tickets-list .empty-state .material-symbols-rounded {
  font-size: 3rem;
  color: var(--fluid-text-secondary);
  opacity: 0.15;
  margin-bottom: 0.75rem;
  display: block;
}

.tickets-list .empty-state h3 {
  font-size: 1rem;
  color: var(--fluid-text-secondary);
  opacity: 0.6;
}

.tickets-list .empty-state p {
  font-size: 0.85rem;
  color: var(--fluid-text-secondary);
  opacity: 0.4;
}

/* ── Ticket Responsive ── */
@media (max-width: 768px) {
  .ticket-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .ticket-card-right {
    flex-direction: row;
    align-items: center;
    margin-left: 0;
    gap: 0.75rem;
  }

  .ticket-card-preview {
    max-width: 100%;
  }

  .ticket-message {
    max-width: 95%;
  }

  .ticket-thread {
    padding: 1rem;
  }

  .ticket-reply-area {
    padding: 0.75rem 1rem;
  }

  .ticket-detail-header {
    flex-direction: column;
  }

  .admin-ticket-actions {
    margin-top: 0.5rem;
  }

  .ticket-detail-meta {
    gap: 0.35rem;
  }
}

/* ============================================
   AUTO-DELETE PICKER + COUNTDOWN
   ============================================ */

.auto-delete-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: fadeIn 0.2s ease;
}

.auto-delete-label {
  font-size: 0.72rem;
  color: var(--fluid-text-secondary);
  opacity: 0.6;
  white-space: nowrap;
  font-weight: 500;
}

.auto-delete-picker .feedback-status-select {
  min-width: 90px;
}

.ticket-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 159, 107, 0.1);
  border: 1px solid rgba(255, 159, 107, 0.2);
  font-size: 0.72rem;
  font-weight: 600;
  color: #ff9f6b;
  white-space: nowrap;
  animation: fadeIn 0.2s ease;
}

.ticket-countdown .material-symbols-rounded {
  font-size: 0.9rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .auto-delete-picker {
    flex-wrap: wrap;
  }

  .admin-ticket-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .ticket-countdown {
    font-size: 0.68rem;
  }
}

