/* ═══════════════════════════════════════════════════════
   Hirisito — Panel Stylesheet
   Dark, minimal, professional.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Design Tokens ─── */
:root {
  --bg:         #0f0f11;
  --bg-card:    #161618;
  --bg-input:   #1c1c1f;
  --bg-hover:   #232326;
  --border:     #27272a;
  --border-light:#323236;
  --text:       #ededed;
  --text-muted: #a1a1aa;
  --text-dim:   #71717a;
  --accent:     #b53389;
  --accent-dim: #962a71;
  --danger:     #f87171;
  --danger-dim: #dc2626;
  --warning:    #fbbf24;
  --warning-dim:#d97706;
  --info:       #60a5fa;
  --font-main:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;
  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 4px 12px rgba(0,0,0,0.4);
  --transition: 200ms ease;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(181, 51, 137, 0.15), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
}

/* ─── Glass & Gradient Utils ─── */
.glass {
  background: rgba(22, 22, 24, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.text-gradient {
  background: linear-gradient(135deg, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-dim);
}

::selection {
  background: rgba(181, 51, 137, 0.2);
  color: #fff;
}

/* ─── Layout ─── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-lg {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Navbar ─── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 17, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.navbar-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}

.navbar-brand span {
  color: var(--text-muted);
  font-weight: 400;
}

.navbar-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.navbar-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.navbar-links a:hover {
  color: var(--text);
}

/* ─── Cards ─── */
.card {
  background: rgba(22, 22, 24, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  transition: transform var(--transition), border-color var(--transition);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.card-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── Pricing Cards ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-card {
  background: rgba(22, 22, 24, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s ease;
}

.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.pricing-card:hover::before {
  background: rgba(255, 255, 255, 0.2);
}

.pricing-card.featured {
  border-color: rgba(181, 51, 137, 0.4);
  box-shadow: 0 0 32px rgba(181, 51, 137, 0.15);
}
.pricing-card.featured::before {
  background: var(--accent);
}

.pricing-card .plan-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pricing-card .plan-duration {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pricing-card .plan-price {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
}

.pricing-card .plan-price .currency {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  vertical-align: super;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled),
a.btn-primary:hover {
  background: var(--accent-dim);
  color: #fff;   /* prevent a:hover from overriding */
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger-dim);
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #000;
}
.btn-warning:hover:not(:disabled) {
  background: var(--warning-dim);
  color: #000;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled),
a.btn-outline:hover {
  border-color: var(--border-light);
  background: var(--bg-hover);
  color: var(--text);
}

/* Discord blurple button */
.btn-discord {
  background: #5865F2;
  color: #fff;
}
.btn-discord:hover:not(:disabled),
a.btn-discord:hover {
  background: #4752c4;
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-icon:hover {
  border-color: var(--border-light);
  color: var(--text);
}

/* ─── Inputs ─── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14px;
  transition: border-color var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  font-size: 15px;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ─── Key Display ─── */
.key-display {
  font-family: var(--font-mono);
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius);
  letter-spacing: 0.1em;
  font-size: 15px;
  color: var(--accent);
  display: inline-block;
  user-select: all;
}

.key-display-block {
  display: block;
  width: 100%;
}

/* ─── Status Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-active {
  background: rgba(181, 51, 137, 0.1);
  color: var(--accent);
}
.badge-active::before {
  background: var(--accent);
}

.badge-expired {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
}
.badge-expired::before {
  background: var(--danger);
}

.badge-banned {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}
.badge-banned::before {
  background: var(--danger);
}

.badge-frozen {
  background: rgba(96, 165, 250, 0.1);
  color: var(--info);
}
.badge-frozen::before {
  background: var(--info);
}

.badge-pending {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}
.badge-pending::before {
  background: var(--warning);
}

.badge-lifetime {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}
.badge-lifetime::before {
  background: var(--warning);
}

/* ─── Tables ─── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-hover);
}

.td-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.td-truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

/* ─── Modals ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text);
}

.modal-footer {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─── Info Row (used on dashboard) ─── */
.info-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.info-label {
  color: var(--text-muted);
  font-weight: 500;
}

.info-value {
  color: var(--text);
}

/* ─── Stat Cards (admin dashboard) ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Divider ─── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ─── Alerts ─── */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success {
  background: rgba(181, 51, 137, 0.08);
  border: 1px solid rgba(181, 51, 137, 0.2);
  color: var(--accent);
}

.alert-error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--danger);
}

.alert-warning {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: var(--warning);
}

.alert-info {
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--info);
}

/* ─── Toast Notification — see full definition near end of file ─── */

/* ─── Hero Section ─── */
.hero {
  text-align: center;
  padding: 100px 0 60px;
  position: relative;
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero .tagline {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 500;
}

.hero .tagline span {
  margin: 0 6px;
  color: var(--text-dim);
}

/* ─── Features Section ─── */
.features-section {
  padding: 40px 0;
}

.features-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.feature-category {
  background: rgba(22, 22, 24, 0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}
.feature-category:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(22, 22, 24, 0.5);
  transform: translateY(-2px);
}

.feature-category h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feature-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-category li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-category li::before {
  content: '›';
  color: var(--text-dim);
  font-weight: 700;
}

/* ─── Footer ─── */
.footer {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer a {
  color: var(--text-muted);
  margin: 0 10px;
}
.footer a:hover {
  color: var(--text);
}

/* ─── Tabs (admin panel) ─── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 0;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  font-family: var(--font-main);
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-main);
  transition: all var(--transition);
}
.page-btn:hover {
  border-color: var(--border-light);
  color: var(--text);
}
.page-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ─── Filter Bar ─── */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar .form-input {
  max-width: 240px;
}

.filter-bar select.form-input {
  max-width: 160px;
}

/* ─── Login Page ─── */
.login-card {
  max-width: 400px;
  margin: 80px auto;
}

.login-card .card-header {
  text-align: center;
}

.login-row {
  display: flex;
  gap: 10px;
}

.login-row .form-input {
  flex: 1;
}

/* ─── Utility Classes ─── */
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-mono    { font-family: var(--font-mono); }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 12px; }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mt-4  { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }

.d-none    { display: none; }
.d-flex    { display: flex; }
.gap-1     { gap: 8px; }
.gap-2     { gap: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.w-100 { width: 100%; }

/* ─── Spinner ─── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Collapse Animation ─── */
.section-hidden {
  display: none;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ─── Toast Notifications ─── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  min-width: 260px;
  max-width: 480px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
  z-index: 9999;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-success { background: #3a0d2a; border-color: var(--accent); color: var(--accent); }
.toast.toast-error   { background: #450a0a; border-color: var(--danger); color: var(--danger); }
.toast.toast-info    { background: #1e3a5f; border-color: var(--info);   color: var(--info);   }
.toast.toast-warning { background: #451a03; border-color: var(--warning); color: var(--warning); }

/* ─── My Keys Table ─── */
.keys-row-current {
  background: rgba(181, 51, 137, 0.04);
}
.keys-row-current td {
  border-bottom-color: rgba(181, 51, 137, 0.15);
}

.keys-switch-btn {
  padding: 4px 12px;
  font-size: 12px;
}

