*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #000000;
  --bg-card:     #0c0c0c;
  --bg-hover:    #141414;
  --bg-input:    #080808;
  --border:      #222222;
  --border-hover:#444444;
  --border-focus:#ffffff;
  --text:        #ffffff;
  --text-muted:  #888888;
  --text-dim:    #555555;
  --radius:      8px;
  --radius-lg:   12px;
  --trans:       0.15s ease;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: #262626; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #404040; }

/* Icons */
.icon {
  width: 16px; height: 16px; stroke: currentColor; stroke-width: 2;
  fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.icon-lg { width: 22px; height: 22px; }
.icon-sm { width: 13px; height: 13px; }

/* Typography */
h1 { font-size: 2.5rem; font-weight: 900; letter-spacing: -0.04em; color: #fff; }
h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
h3 { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
p  { color: var(--text-muted); line-height: 1.6; }

/* Buttons — Pure Monochrome */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 700;
  transition: all var(--trans); border: 1px solid transparent;
  white-space: nowrap; cursor: pointer; text-transform: uppercase; letter-spacing: 0.03em;
}
.btn-primary {
  background: #ffffff; color: #000000; border-color: #ffffff;
}
.btn-primary:hover {
  background: #000000; color: #ffffff; border-color: #ffffff;
}
.btn-ghost {
  background: transparent; color: #ffffff; border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-hover); background: var(--bg-hover);
}
.btn-danger {
  background: transparent; color: #ffffff; border-color: #555555;
}
.btn-danger:hover {
  background: #222222; border-color: #ffffff;
}
.btn-vip {
  background: #ffffff; color: #000000; border-color: #ffffff; font-weight: 800;
}
.btn-vip:hover {
  background: #1a1a1a; color: #ffffff; border-color: #ffffff;
}
.btn-sm { padding: 6px 12px; font-size: 0.75rem; }
.btn-lg { padding: 12px 24px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Layout */
.layout { display: flex; min-height: 100vh; background: #000000; }

/* Sidebar */
.sidebar {
  width: 230px; min-width: 230px; background: #060606;
  border-right: 1px solid var(--border); display: flex;
  flex-direction: column; position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 100; overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 18px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo-img {
  height: 32px; width: auto; object-fit: contain; flex-shrink: 0;
}
.sidebar-logo-mark {
  width: 32px; height: 32px; background: #fff; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 900; color: #000; letter-spacing: -0.05em;
  flex-shrink: 0;
}
.sidebar-logo span {
  font-size: 1.05rem; font-weight: 900; letter-spacing: -0.03em; color: #fff; text-transform: uppercase;
}
.sidebar-nav {
  flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px;
}
.nav-section {
  font-size: 0.65rem; font-weight: 800; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.1em; padding: 14px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius); font-size: 0.84rem; font-weight: 600;
  color: var(--text-muted); transition: all var(--trans); cursor: pointer;
  border: 1px solid transparent; background: none; width: 100%; text-align: left;
}
.nav-item:hover {
  color: #fff; background: var(--bg-hover); border-color: var(--border);
}
.nav-item.active {
  color: #000; background: #ffffff; border-color: #ffffff; font-weight: 700;
}
.nav-item.active .icon { stroke: #000; }
.nav-spacer { flex: 1; }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid var(--border); }
.user-pill {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius); background: var(--bg-hover); border: 1px solid var(--border);
}
.user-pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.user-pill-info { flex: 1; min-width: 0; }
.user-pill-name { font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.user-pill-role { font-size: 0.68rem; color: var(--text-muted); }

/* Main */
.main { margin-left: 230px; flex: 1; min-height: 100vh; background: #000000; }
.topbar {
  height: 58px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em; color: #fff; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.content { padding: 32px; max-width: 1100px; }

/* Badges — Monochrome */
.badge {
  display: inline-flex; align-items: center; padding: 2px 7px;
  border-radius: 4px; font-size: 0.65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; border: 1px solid transparent;
}
.badge-admin   { background: #ffffff; color: #000000; border-color: #ffffff; }
.badge-vip     { background: #ffffff; color: #000000; border-color: #ffffff; }
.badge-free    { background: transparent; color: var(--text-muted); border-color: var(--border); }
.badge-active  { background: transparent; color: #ffffff; border-color: #ffffff; }
.badge-pending { background: #1a1a1a; color: var(--text-muted); border-color: var(--border); }
.badge-expired { background: transparent; color: var(--text-dim); border-color: var(--border); text-decoration: line-through; }

/* Cards */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.card:hover { border-color: var(--border-hover); }

/* Module cards */
.module-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px;
}
.module-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 12px; display: flex; flex-direction: column; align-items: center;
  gap: 10px; cursor: pointer; transition: all var(--trans); text-align: center; position: relative;
}
.module-card:hover {
  border-color: #ffffff; background: var(--bg-hover); transform: translateY(-2px);
}
.module-card.locked {
  opacity: 0.35; cursor: not-allowed;
}
.module-card.locked:hover {
  transform: none; border-color: var(--border); background: var(--bg-card);
}
.module-card .mc-icon { color: #ffffff; }
.module-card .mc-name { font-size: 0.76rem; font-weight: 700; color: #ffffff; }
.module-card .mc-vip {
  position: absolute; top: 6px; right: 6px; background: #ffffff; color: #000000;
  font-size: 0.55rem; font-weight: 900; padding: 1px 4px; border-radius: 3px;
  text-transform: uppercase;
}

/* Guild card */
.guild-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--trans);
}
.guild-card:hover {
  border-color: #ffffff; background: var(--bg-hover); transform: translateY(-2px);
}
.guild-card img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #1a1a1a;
  border: 1px solid var(--border);
}
.guild-card-name { font-weight: 800; font-size: 0.95rem; color: #fff; }
.guild-card-id { font-size: 0.72rem; color: var(--text-muted); font-family: monospace; margin-top: 2px; }
.guild-card-arrow { margin-left: auto; color: var(--text-muted); transition: transform var(--trans); }
.guild-card:hover .guild-card-arrow { color: #fff; transform: translateX(3px); }

/* Stats */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px;
}
.stat-label {
  font-size: 0.68rem; font-weight: 800; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}
.stat-value {
  font-size: 2rem; font-weight: 900; letter-spacing: -0.04em; color: #fff; line-height: 1;
}

/* Grid layout */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Section headers */
.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.section-title { font-size: 1rem; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.04em; }
.section-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

/* Form Controls */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 0.78rem; font-weight: 700; color: #ffffff; text-transform: uppercase; letter-spacing: 0.04em; }
.form-hint { font-size: 0.72rem; color: var(--text-muted); }
.form-input {
  width: 100%; padding: 10px 14px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius); color: #ffffff;
  font-size: 0.85rem; transition: border-color var(--trans); outline: none;
}
.form-input:focus { border-color: #ffffff; }
.form-input::placeholder { color: var(--text-dim); }
textarea.form-input { resize: vertical; min-height: 70px; }
select.form-input { cursor: pointer; }

/* Toggle Row — Monochrome */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
}
.toggle-row label { font-size: 0.85rem; font-weight: 600; color: #fff; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #1a1a1a; border: 1px solid var(--border);
  border-radius: 11px; cursor: pointer; transition: all var(--trans);
}
.toggle-slider::before {
  content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px;
  background: #555555; border-radius: 50%; transition: transform var(--trans), background var(--trans);
}
.toggle input:checked + .toggle-slider {
  background: #ffffff; border-color: #ffffff;
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px); background: #000000;
}

/* Tables — Monochrome */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
thead th {
  padding: 10px 14px; text-align: left; font-size: 0.68rem; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: #fff;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); }

/* Alerts — Pure Monochrome */
.alert {
  padding: 14px 18px; border-radius: var(--radius); font-size: 0.84rem;
  margin-bottom: 18px; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); background: var(--bg-card); color: #fff;
}
.alert-info    { border-color: var(--border); color: var(--text-muted); }
.alert-success { border-color: #ffffff; background: #111111; color: #ffffff; }
.alert-danger  { border-color: #555555; background: #111111; color: #ffffff; }
.alert-vip     { border-color: #ffffff; background: #111111; color: #ffffff; }

/* VIP Banner */
.vip-banner {
  background: #090909; border: 1px solid #ffffff;
  border-radius: var(--radius-lg); padding: 22px; display: flex; align-items: center;
  gap: 18px; margin-bottom: 24px;
}
.vip-banner-icon {
  width: 44px; height: 44px; background: #ffffff; color: #000000;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vip-banner-title { font-size: 1rem; font-weight: 800; color: #ffffff; text-transform: uppercase; letter-spacing: 0.03em; }
.vip-banner-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }

/* Spinner */
.spinner {
  width: 16px; height: 16px; border: 2px solid #333333;
  border-top-color: #ffffff; border-radius: 50%;
  animation: spin 0.6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 70px 0; color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
}

/* Avatar */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #1a1a1a;
  object-fit: cover; flex-shrink: 0; border: 1px solid var(--border);
}

/* Empty State */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-icon { margin: 0 auto 14px; width: 36px; height: 36px; opacity: 0.3; color: #fff; }
.empty-state p { font-size: 0.85rem; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Toasts */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column;
  gap: 8px; z-index: 9999;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius); font-size: 0.82rem; font-weight: 700;
  min-width: 240px; max-width: 360px; display: flex; align-items: center; gap: 10px;
  animation: slideIn 0.2s ease; border: 1px solid #ffffff; background: #000000; color: #ffffff;
}
.toast-error { border-color: #666666; }
@keyframes slideIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

/* Payment Methods Selector */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.pay-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 12px;
  cursor: pointer; text-align: center; transition: all var(--trans); background: var(--bg-input);
}
.pay-card:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.pay-card.selected {
  border-color: #ffffff; background: #141414;
}
.pay-card .pay-icon { margin: 0 auto 8px; color: var(--text-muted); }
.pay-card.selected .pay-icon { color: #ffffff; }
.pay-card .pay-name { font-size: 0.8rem; font-weight: 800; color: #fff; text-transform: uppercase; }
.pay-details {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: none;
}
.pay-details.visible { display: block; }
.pay-detail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.84rem; color: #fff;
}
.pay-detail-row:last-child { border-bottom: none; }
.copy-btn {
  font-size: 0.72rem; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; gap: 4px; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 4px; background: var(--bg-hover);
}
.copy-btn:hover { color: #fff; border-color: #fff; }

/* Pricing Cards */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px;
}
.pricing-card.featured {
  border-color: #ffffff; background: #080808;
}
.pricing-tier {
  font-size: 0.72rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 10px;
}
.pricing-card.featured .pricing-tier { color: #ffffff; }
.pricing-price {
  font-size: 3rem; font-weight: 900; letter-spacing: -0.05em; color: #fff; margin-bottom: 2px;
}
.pricing-price .period { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-sub { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }
.pricing-features {
  list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px;
}
.pricing-features li {
  font-size: 0.84rem; display: flex; align-items: center; gap: 10px; color: #ffffff;
}
.pricing-features li.no { color: var(--text-dim); }
.pricing-features li .feat-icon { flex-shrink: 0; color: #ffffff; }
.pricing-features li.no .feat-icon { color: var(--text-dim); }

/* Discord Embed Live Preview */
.discord-embed-preview {
  background: #1e1f22; border-radius: 6px; padding: 16px; border-left: 4px solid #ffffff;
  display: flex; flex-direction: column; gap: 8px; color: #dbdee1; font-size: 0.88rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.dep-author { font-size: 0.78rem; font-weight: 700; color: #ffffff; }
.dep-title { font-size: 1rem; font-weight: 700; color: #ffffff; margin-bottom: 2px; }
.dep-desc { font-size: 0.84rem; color: #dbdee1; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.dep-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 6px; }
.dep-field-name { font-size: 0.75rem; font-weight: 700; color: #ffffff; }
.dep-field-val { font-size: 0.78rem; color: #dbdee1; }
.dep-image { width: 100%; border-radius: 4px; margin-top: 8px; max-height: 220px; object-fit: cover; border: 1px solid #333; }
.dep-thumbnail { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; float: right; margin-left: 12px; border: 1px solid #333; }
.dep-footer { font-size: 0.7rem; color: #949ba4; margin-top: 8px; padding-top: 6px; border-top: 1px solid #2b2d31; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content { padding: 18px; }
  .grid-2, .grid-3, .pricing-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pay-methods { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}
