:root {
  /* Lineage W Style Palette - Brightened Version */
  --stone-dark: #12151a;
  --stone-panel: #1c2127;
  --stone-deep: #0a0c10;
  --gold-classic: #a8681f;
  --gold-bright: #d4af37;
  --gold-dim: rgba(168, 104, 31, 0.4);
  --blood-red: #b4463d;
  --text-primary: #e2e8f0;
  --text-dim: #94a3b8;
  
  --gold: #fbbf24;
  --gold-dark: #b45309;
  --danger: #ef4444;
  --success: #10b981;
  --info: #3b82f6;
  --sidebar-w: 270px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--stone-dark);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, .nav-link span, .brand-card h1 {
  font-family: 'Cinzel', serif;
}

/* Item 2: Custom Premium Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(168, 104, 31, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 104, 31, 0.8);
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 32px;
  max-width: 1800px;
  margin: 0 auto;
  padding: 40px;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 600px;
  height: 600px;
  border-radius: 999px;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.15;
}

.ambient-a {
  top: -100px;
  right: -100px;
  background: var(--gold-classic);
}

.ambient-b {
  bottom: -150px;
  left: -200px;
  background: var(--blood-red);
}

.panel,
.dialog-card,
.sidebar-card,
.brand-card {
  padding: 24px 16px !important;
  background: var(--stone-panel);
  border: 1px solid rgba(168, 104, 31, 0.3);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel::after,
.brand-card::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(168, 104, 31, 0.05);
  pointer-events: none;
}

.panel:hover {
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.sidebar {
  position: sticky;
  top: 40px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 32px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  padding-right: 4px;
}

.brand-card,
.sidebar-card {
  padding: 32px 18px; /* Reduced horizontal padding */
  background: var(--stone-panel);
  color: var(--text-primary);
  border: 1px solid var(--gold-dim);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
}

.brand-card h1 {
  font-size: clamp(1.4rem, 5vw, 1.7rem); /* Responsive font size */
  line-height: 1.2;
  color: var(--gold-bright);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-bright);
  background: rgba(168, 104, 31, 0.15);
  border-left-color: var(--gold-classic);
  box-shadow: inset 5px 0 15px rgba(168, 104, 31, 0.1);
}

.sidebar .eyebrow {
  white-space: nowrap;
  font-family: 'Cinzel', serif;
  color: var(--gold-classic);
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  margin-bottom: 10px;
  color: rgba(236, 241, 245, 0.76);
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(45, 55, 72, 0.4);
  color: #cbd5e1;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-link:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-link.is-active {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 8px 16px rgba(180, 83, 9, 0.3);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-badge-soft {
  background: rgba(243, 211, 164, 0.2);
}

.nav-badge-warn {
  background: rgba(180, 70, 61, 0.2);
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
  list-style: none;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.nav-group-header::-webkit-details-marker {
  display: none;
}

.nav-group-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-group-header .chevron {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

details[open] .nav-group-header .chevron {
  transform: rotate(180deg);
}

.nav-group-content {
  display: grid;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  margin-left: 4px;
}

.nav-child {
  padding: 14px 16px;
  font-size: 0.95rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.nav-child:hover {
  background: rgba(30, 87, 98, 0.05); /* Match the lightness */
  transform: translateX(3px);
  color: var(--ink);
}

.nav-child.is-active {
  background: linear-gradient(135deg, rgba(245, 214, 160, 0.25), rgba(96, 166, 155, 0.25));
  border-color: rgba(242, 222, 189, 0.35);
  color: var(--ink);
  font-weight: bold;
}

.quick-actions,
.compact-form {
  display: grid;
  gap: 12px;
}

.main-shell {
  display: grid;
  gap: 24px;
  min-width: 0;
  align-content: start;
}

.topbar,
.panel,
.dialog-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  background: var(--panel);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.topbar-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.page-view {
  display: grid;
  gap: 24px;
}

.page-grid {
  display: grid;
  gap: 24px;
}

.page-grid-2 {
  grid-template-columns: 1.12fr 0.88fr;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.96), rgba(255, 237, 206, 0.72));
  border: 1px solid rgba(168, 104, 31, 0.12);
  box-shadow: var(--shadow);
  animation: riseIn 0.7s ease-out both;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-family: var(--font-display);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.hero-text,
.helper-text {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.card-heading,
.panel-heading,
.subpanel-head,
.dialog-actions,
.item-row,
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-heading {
  margin-bottom: 18px;
}

.stack-list,
.dashboard-list,
.review-list,
.stack-form,
.subpanel,
.detail-view {
  display: grid;
  gap: 16px;
}

.distribution-card {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: grid;
  gap: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
}

.distribution-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.distribution-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-strong);
  border-color: rgba(180, 83, 9, 0.15);
}

.distribution-card:hover::before {
  opacity: 1;
}

.distribution-card.is-selected {
  border-color: var(--gold);
  background: var(--panel-strong);
  box-shadow: 0 0 0 2px var(--gold-soft), var(--shadow-strong);
}

.meta-line,
.badge-row,
.detail-grid,
.image-preview,
.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-top {
  align-items: baseline;
}

.card-title {
  margin: 0;
  font-size: 1.18rem;
}

.meta-line {
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(30, 87, 98, 0.08);
  color: var(--sea);
  font-size: 0.86rem;
  font-weight: 700;
}

.badge.positive {
  background: rgba(38, 114, 81, 0.12);
  color: var(--success);
}

.badge.warn {
  background: rgba(180, 70, 61, 0.12);
  color: var(--danger);
}

.badge.soft {
  background: rgba(168, 104, 31, 0.12);
  color: var(--gold);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.025em;
  user-select: none;
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.3);
  filter: brightness(1.1);
}

.button-secondary {
  background: var(--gold-soft);
  color: var(--gold);
}

.button-danger {
  background: #fef2f2;
  color: var(--danger);
  border-color: rgba(190, 18, 60, 0.1);
}

.button-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.button-ghost:hover {
  background: rgba(30, 41, 59, 0.04);
}

.button-wide {
  width: 100%;
}

/* Page Transition Effects */
.page-view {
  animation: fadeIn 0.4s ease-out forwards;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
}

.field span {
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1.5px solid rgba(168,104,31,0.2);
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
}
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font: inherit;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px var(--gold-glow);
}

.sidebar .field input {
  background: rgba(255, 255, 255, 0.96);
}

.field textarea {
  resize: vertical;
}

.inline-field {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 252, 246, 0.92);
  border: 1px solid rgba(58, 66, 79, 0.1);
}

.inline-field input {
  width: auto;
}

.form-grid,
.item-row,
.detail-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.item-row {
  grid-template-columns: 1fr 1fr 1fr 90px auto;
  align-items: end;
}

.subpanel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 241, 0.74);
  border: 1px solid rgba(58, 66, 79, 0.08);
}

.upload-zone {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(30, 87, 98, 0.26);
  background: rgba(197, 237, 232, 0.16);
  color: var(--muted);
}

.thumb {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(58, 66, 79, 0.12);
  box-shadow: 0 10px 18px rgba(45, 56, 71, 0.1);
}

.empty-state {
  min-height: 220px;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.92), rgba(243, 232, 211, 0.7)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.2),
      rgba(255, 255, 255, 0.2) 10px,
      transparent 10px,
      transparent 20px
    );
}

.dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(24, 28, 34, 0.42);
  backdrop-filter: blur(8px);
}

.dialog-card {
  width: min(92vw, 620px);
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

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

@keyframes driftA {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-26px, 16px, 0) scale(1.08);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(22px, -18px, 0) scale(1.06);
  }
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .stats-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-grid-2,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar {
    position: static;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .sidebar-nav,
  .stats-grid,
  .form-grid,
  .detail-grid,
  .item-row {
    grid-template-columns: 1fr;
  }

  .brand-card,
  .sidebar-card,
  .panel,
  .topbar,
  .dialog-card {
    padding: 18px;
    border-radius: 22px;
  }

  .card-heading,
  .dialog-actions,
  .card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Task 12: Drawer logic if we had a toggle, but for now stack simply */
  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 16px;
  }

  .sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .nav-link {
    padding: 10px;
    justify-content: center;
    border-radius: 12px;
  }

  .brand-logo {
    font-size: 1.4rem;
  }

  .topbar {
    margin-bottom: 4px;
  }
}

/* Item 6 & 2: Advanced Feedback & Depth */
.toast {
  padding: 14px 24px;
  background: var(--sidebar);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--gold); }

/* Skeleton Placeholder Effect */
.page-loading {
  pointer-events: none;
}

.page-loading > * {
  position: relative;
  overflow: hidden;
}

.page-loading > *::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.4) 50%, 
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes toastIn {
  to { transform: translateY(0); opacity: 1; }
}

/* Standalone Auth Screen - Lineage W Edition */
#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #050608;
  overflow-y: auto;
  padding: 60px 0;
  font-family: 'Cinzel', serif;
}

#auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(168, 104, 31, 0.15) 0%, transparent 70%),
    url('https://www.transparenttextures.com/patterns/dark-matter.png');
  opacity: 0.8;
}

.auth-card {
  background: linear-gradient(135deg, #1c2127 0%, #12151a 100%);
  border: 1px solid rgba(168, 104, 31, 0.4);
  border-radius: 4px; /* Lineage style is more sharp/classic */
  padding: clamp(20px, 4vh, 60px) clamp(20px, 5vw, 60px);
  width: min(95vw, 500px);
  min-height: min-content;
  box-shadow: 
    0 50px 100px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(168, 104, 31, 0.1);
  position: relative;
  z-index: 1;
  text-align: center;
  margin: auto; /* Uses margin auto for safe flex centering */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(168, 104, 31, 0.3);
  pointer-events: none;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(168, 104, 31, 0.1);
  pointer-events: none;
}

/* Corner Accents */
.auth-card .corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--gold-classic);
  pointer-events: none;
}
.auth-card .top-left { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.auth-card .top-right { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.auth-card .bottom-left { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.auth-card .bottom-right { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.auth-card h2 {
  font-weight: 700;
  font-size: clamp(2rem, 12vh, 4.5rem);
  letter-spacing: 0.1em;
  margin: 0;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(168, 104, 31, 0.5);
  line-height: 1;
}

.auth-field {
  width: 100%;
  text-align: left;
  margin-top: 40px;
}

.auth-field label {
  color: var(--gold-classic);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
}

.auth-field input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #2a2d33;
  color: #fff;
  border-radius: 0;
  padding: 16px;
  font-family: serif;
}

.btn-auth {
  background: #a8681f;
  background: linear-gradient(180deg, #a8681f 0%, #7d4d16 100%);
  border: 1px solid #d4af37;
  color: gold;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  padding: 20px;
  margin-top: 40px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.topbar {
  padding: 16px 32px;
  margin-bottom: 32px;
}

.user-status-area {
  transition: all 0.3s ease;
}

.user-status-area .button-ghost:hover {
  background: rgba(168, 104, 31, 0.08);
  transform: translateY(-1px);
}

.guild-emblem {
  filter: drop-shadow(0 0 30px rgba(168, 104, 31, 0.4));
  margin-bottom: 30px;
  transition: all 0.5s ease;
}

.guild-emblem.large {
  width: clamp(100px, 20vh, 200px);
  height: auto;
  margin-bottom: 10px;
}

.guild-emblem.small {
  width: 72px; /* Increased from 60px */
  height: 72px;
  border-radius: 12px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 15px rgba(168, 104, 31, 0.4));
  border: 1px solid rgba(168, 104, 31, 0.3);
  object-fit: contain;
}

/* Distribution Card Redeisgn */
.distribution-card {
  background: var(--stone-panel);
  border: 1px solid rgba(168,104,31,0.2);
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 2px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.distribution-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(168,104,31,0.1);
  pointer-events: none;
}

.distribution-card:hover {
  border-color: rgba(168,104,31,0.5);
  transform: translateY(-4px);
  box-shadow: 0 15px 45px rgba(0,0,0,0.6);
}

.distribution-card.is-selected {
  border-color: var(--gold-bright);
  box-shadow: 0 0 30px rgba(168,104,31,0.3);
}

.dist-filter-bar input,
.dist-filter-bar select {
  background: rgba(0,0,0,0.6) !important;
  color: var(--gold-bright) !important;
  border: 1px solid rgba(168,104,31,0.3) !important;
  padding: 12px 18px !important;
  border-radius: 12px !important;
  font-family: 'Cinzel', serif;
}

.dist-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.dist-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold-bright);
  margin: 0 0 6px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.dist-card-revenue {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.3);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,0.2);
  margin-bottom: 20px;
  width: fit-content;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-badge.open {
  background: rgba(168,104,31,0.2);
  color: var(--gold-bright);
  border: 1px solid rgba(168,104,31,0.5);
  box-shadow: 0 0 15px rgba(168,104,31,0.2);
}

.status-badge.settled {
  background: rgba(148,163,184,0.1);
  color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.3);
}

.dist-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  background: rgba(255,255,255,0.03);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.05);
}

.stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  opacity: 0.5;
  text-transform: uppercase;
  margin-top: 4px;
}

.diamond-icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  margin-right: 4px;
  filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
  position: relative;
  top: -1px;
}

.btn-auth:hover {
  background: #c08c4e;
  color: #fff;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.app-shell {
  display: flex; /* Ensure it stays flex but we toggle visibility of shell */
}

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
  min-height: 1em;
}

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

/* Item 4: Quick Action Cards */
.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quick-action-card {
  padding: 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.quick-action-card:hover {
  background: var(--panel-strong);
  transform: translateY(-4px);
  border-color: var(--gold-soft);
  box-shadow: var(--shadow);
}

.quick-action-card i {
  color: var(--gold);
}

/* Item 1: SVG Chart styling */
.chart-container {
  width: 100%;
  height: 200px;
  position: relative;
  margin-top: 16px;
}

.chart-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 6px rgba(180, 83, 9, 0.2));
}

.chart-area {
  fill: url(#chart-gradient);
  opacity: 0.1;
}

.chart-dot {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 2;
  transition: r 0.2s ease;
}

.chart-dot:hover {
  r: 6;
}
