/* Luxury admin — dark shell + gold accents */
:root {
  --lx-bg: #08070b;
  --lx-surface: #12101a;
  --lx-surface-2: #1a1624;
  --lx-border: rgba(201, 162, 39, 0.22);
  --lx-gold: #c9a227;
  --lx-gold-bright: #e8cf6a;
  --lx-gold-dim: #7a6220;
  --lx-text: #f2ede3;
  --lx-muted: #9a9388;
  --lx-success: #3ecf8e;
  --lx-danger: #f07178;
  --lx-warning: #e8b339;
  --lx-radius: 14px;
  --lx-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lux-admin {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--lx-text);
  /* Align Bootstrap text variables with dark shell (tables/cards inherit correctly) */
  --bs-body-color: #f2ede3;
  --bs-body-bg: #08070b;
  --bs-emphasis-color: #faf7f0;
  --bs-secondary-color: #c4bdb2;
  --bs-tertiary-color: #9a9388;
  background: radial-gradient(900px 500px at 15% -10%, rgba(201, 162, 39, 0.08), transparent 50%),
    linear-gradient(165deg, #050408 0%, #0c0a10 40%, #08060c 100%);
}

.lux-app {
  display: flex;
  min-height: 100vh;
}

.lux-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(10, 8, 14, 0.98) 0%, rgba(14, 11, 20, 0.98) 100%);
  border-right: 1px solid var(--lx-border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.9rem;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  z-index: 20;
}

.lux-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
  margin-bottom: 1rem;
}

.lux-sidebar-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--lx-gold-bright), var(--lx-gold) 50%, var(--lx-gold-dim));
  color: #1a1204;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.lux-sidebar-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.lux-sidebar-sub {
  font-size: 0.72rem;
  color: var(--lx-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lux-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow-y: auto;
}

.lux-nav-link {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  color: var(--lx-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.lux-nav-link:hover {
  color: var(--lx-text);
  background: rgba(201, 162, 39, 0.06);
}

.lux-nav-link.is-active {
  color: #1a1204;
  background: linear-gradient(135deg, var(--lx-gold-bright), var(--lx-gold));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.25);
}

.lux-sidebar-foot {
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.12);
  margin-top: auto;
}

.lux-sidebar-user {
  font-size: 0.8rem;
  color: var(--lx-muted);
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.lux-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--lx-border);
  color: var(--lx-text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  transition: border-color 0.15s, color 0.15s;
}

.lux-btn-ghost:hover {
  border-color: var(--lx-gold);
  color: var(--lx-gold-bright);
}

.lux-btn-block {
  width: 100%;
  margin-bottom: 0.5rem;
}

.lux-site-link {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: var(--lx-muted);
}

.lux-site-link:hover {
  color: var(--lx-gold-bright);
}

.lux-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lux-topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.75rem 0.75rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.1);
  background: rgba(8, 7, 11, 0.65);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.lux-page-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

.lux-topbar-meta {
  font-size: 0.8rem;
  color: var(--lx-muted);
}

.lux-content {
  padding: 1.25rem 1.75rem 2.5rem;
  flex: 1;
}

@media (max-width: 991px) {
  .lux-app {
    flex-direction: column;
  }
  .lux-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
  .lux-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 auto;
  }
  .lux-sidebar-foot {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }
  .lux-btn-block {
    width: auto;
  }
}

/* Bootstrap overrides inside admin */
.lux-admin .card {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  color: var(--lx-text);
  box-shadow: var(--lx-shadow);
}

.lux-admin .card-header {
  background: rgba(201, 162, 39, 0.06);
  border-bottom: 1px solid var(--lx-border);
  color: var(--lx-gold-bright);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--lx-radius) var(--lx-radius) 0 0 !important;
}

.lux-admin .table {
  --bs-table-bg: transparent;
  --bs-table-color: #f4f0e8;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.06);
  --bs-table-striped-color: #f4f0e8;
  --bs-table-hover-bg: rgba(201, 162, 39, 0.12);
  --bs-table-hover-color: #faf7f0;
  --bs-table-active-bg: rgba(201, 162, 39, 0.15);
  --bs-table-active-color: #fff;
  border-color: rgba(201, 162, 39, 0.18);
  color: #f4f0e8;
}

/* Bootstrap 5.3 sets per-cell color; force readable copy on dark cards */
.lux-admin .table > :not(caption) > * > * {
  color: #f4f0e8;
  border-bottom-color: rgba(201, 162, 39, 0.12);
}

.lux-admin .table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e8cf6a;
  font-weight: 600;
  border-bottom-color: var(--lx-border);
  background: rgba(0, 0, 0, 0.25);
}

.lux-admin .lux-table-members {
  font-size: 0.9rem;
}

.lux-admin .lux-table-members td {
  font-weight: 500;
}

.lux-admin .form-label {
  color: var(--lx-muted);
  font-size: 0.82rem;
}

.lux-admin .form-control,
.lux-admin .form-select {
  background: var(--lx-surface-2);
  border: 1px solid rgba(201, 162, 39, 0.18);
  color: var(--lx-text);
  border-radius: 10px;
}

.lux-admin .form-control:focus,
.lux-admin .form-select:focus {
  border-color: var(--lx-gold);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.15);
  background: var(--lx-surface-2);
  color: var(--lx-text);
}

.lux-admin .form-control::placeholder {
  color: #6e675c;
}

.lux-admin .btn-primary {
  background: linear-gradient(135deg, var(--lx-gold-bright), var(--lx-gold));
  border: none;
  color: #1a1204;
  font-weight: 600;
  border-radius: 10px;
}

.lux-admin .btn-primary:hover {
  filter: brightness(1.05);
  color: #1a1204;
}

.lux-admin .btn-outline-primary {
  border-color: var(--lx-gold);
  color: var(--lx-gold-bright);
  border-radius: 10px;
}

.lux-admin .btn-outline-primary:hover {
  background: rgba(201, 162, 39, 0.15);
  color: var(--lx-gold-bright);
}

.lux-admin .btn-outline-secondary,
.lux-admin .btn-outline-danger {
  border-radius: 10px;
}

.lux-admin .btn-group .btn {
  border-color: rgba(201, 162, 39, 0.25);
  color: var(--lx-muted);
}

.lux-admin .btn-group .btn.active {
  background: rgba(201, 162, 39, 0.2);
  color: var(--lx-gold-bright);
  border-color: var(--lx-gold);
}

.lux-admin .alert-success {
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.35);
  color: #b8f5d9;
  border-radius: 10px;
}

.lux-admin .alert-danger {
  background: rgba(240, 113, 120, 0.1);
  border: 1px solid rgba(240, 113, 120, 0.35);
  color: #ffc8cb;
  border-radius: 10px;
}

.lux-admin .text-muted {
  color: var(--lx-muted) !important;
}

.lux-admin .badge.text-bg-success {
  background: rgba(62, 207, 142, 0.25) !important;
  color: var(--lx-success) !important;
}

.lux-admin .badge.text-bg-warning {
  background: rgba(232, 179, 57, 0.2) !important;
  color: var(--lx-warning) !important;
}

.lux-admin .badge.text-bg-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--lx-muted) !important;
}

.table-actions {
  white-space: nowrap;
}

/* Dashboard stat cards */
.lux-amount-words {
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.lux-dash-hero {
  margin-bottom: 1.75rem;
}

.lux-dash-welcome {
  font-size: 0.95rem;
  color: var(--lx-muted);
  margin-bottom: 0.35rem;
}

.lux-dash-welcome strong {
  color: var(--lx-gold-bright);
}

.lux-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.lux-stat-card {
  position: relative;
  border-radius: var(--lx-radius);
  padding: 1.15rem 1.1rem;
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  box-shadow: var(--lx-shadow);
  overflow: hidden;
}

.lux-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lx-gold), transparent);
}

.lux-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lx-muted);
  margin-bottom: 0.35rem;
}

.lux-stat-value {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--lx-text);
}

.lux-stat-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lx-gold-bright);
  text-decoration: none;
}

.lux-stat-link:hover {
  text-decoration: underline;
}

.lux-dash-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.lux-panel-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: var(--lx-gold-bright);
}

.lux-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--lx-border);
}

/* Admin login page (body.lux-login) */
body.lux-login {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  background: radial-gradient(800px 400px at 50% 0%, rgba(201, 162, 39, 0.12), transparent 55%),
    linear-gradient(180deg, #050408, #0e0c12);
  color: var(--lx-text);
}

.lux-login-card {
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--lx-radius);
  border: 1px solid var(--lx-border);
  background: rgba(18, 16, 26, 0.95);
  box-shadow: var(--lx-shadow);
}

.lux-login-card .card-body {
  padding: 2rem;
}

.lux-login-card .form-control {
  background: var(--lx-surface-2);
  border: 1px solid rgba(201, 162, 39, 0.2);
  color: var(--lx-text);
}

.lux-login-card .btn-primary {
  background: linear-gradient(135deg, var(--lx-gold-bright), var(--lx-gold));
  border: none;
  color: #1a1204;
  font-weight: 700;
}

/* —— Admin packages: same card design as public investment plans —— */
.lux-pkg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.lux-pkg-single-stage {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 2rem;
}

.lux-pkg-grid-head {
  padding: 0.25rem 0;
}

.lux-pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.lux-pkg-preview-wrap .lux-pkg-card {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.lux-pkg-card {
  --lux-pkg-bg: #1a0d0d;
  --lux-pkg-hero-a: #c43a30;
  --lux-pkg-hero-b: #f1c40f;
  --lux-pkg-row: rgba(255, 255, 255, 0.06);
  --lux-pkg-ic-bg: rgba(0, 0, 0, 0.35);
  --lux-pkg-radius: 20px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.2rem 1.35rem;
  border-radius: var(--lux-pkg-radius);
  background: var(--lux-pkg-bg);
  border: 1px solid rgba(241, 196, 15, 0.22);
  box-shadow:
    0 0 0 1px rgba(196, 58, 48, 0.25),
    0 0 24px rgba(196, 58, 48, 0.18),
    0 20px 40px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lux-pkg-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(241, 196, 15, 0.3),
    0 0 28px rgba(232, 90, 58, 0.22),
    0 22px 44px rgba(0, 0, 0, 0.58);
}

.lux-pkg-card--inactive {
  opacity: 0.72;
  filter: saturate(0.85);
}

.lux-pkg-card--single {
  width: 100%;
  max-width: 380px;
}

.lux-pkg-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.lux-pkg-card__badge {
  font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7dc6f 0%, #f1c40f 100%);
  color: #1a0d0d;
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.35);
}

.lux-pkg-card__num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: #f1c40f;
  text-shadow:
    0 0 20px rgba(241, 196, 15, 0.55),
    0 0 36px rgba(196, 58, 48, 0.3);
}

.lux-pkg-card__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 248, 231, 0.88);
  margin: 0 0 0.5rem;
  text-align: center;
  letter-spacing: 0.02em;
}

.lux-pkg-card__inactive-flag,
.lux-pkg-card__preview-flag {
  font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 0.65rem;
  color: var(--lx-warning);
}

.lux-pkg-card__preview-flag {
  color: var(--lx-gold-bright);
}

.lux-pkg-card__hero {
  text-align: center;
  padding: 1.05rem 0.95rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(105deg, var(--lux-pkg-hero-a) 0%, #e67e22 42%, var(--lux-pkg-hero-b) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  margin-bottom: 1.05rem;
}

.lux-pkg-card__amount {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  color: #0d0606;
  margin: 0;
  letter-spacing: 0.02em;
}

.lux-pkg-card__amount-label {
  font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(13, 6, 6, 0.88);
  margin: 0.3rem 0 0;
}

.lux-pkg-card__stats {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.lux-pkg-card__stat {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  background: var(--lux-pkg-row);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lux-pkg-card__stat-ic {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--lux-pkg-ic-bg);
  color: #f1c40f;
}

.lux-pkg-card__stat-ic svg {
  display: block;
}

.lux-pkg-card__stat-label {
  font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.7);
}

.lux-pkg-card__stat-val {
  font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff8e7;
  text-align: right;
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.22);
}

.lux-pkg-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.lux-pkg-card__btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.65rem 0.75rem;
  border-radius: 999px;
  font-family: "Montserrat", "DM Sans", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lux-pkg-card__btn--ghost {
  color: rgba(255, 248, 231, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(241, 196, 15, 0.25);
}

.lux-pkg-card__btn--ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(241, 196, 15, 0.4);
}

.lux-pkg-card__btn--gold {
  color: #1a0d0d;
  background: linear-gradient(180deg, #fceabb 0%, #f1c40f 45%, #d4ac0d 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(241, 196, 15, 0.28);
}

.lux-pkg-card__btn--gold:hover {
  color: #0d0606;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(241, 196, 15, 0.38);
}
