:root {
  --bg-dark: #000000;
  --bg-surface: #0a0a0a;
  --bg-card: #0e0e0e;
  --bg-card-hover: #141414;
  --bg-input: #0a0a0a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);

  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  --primary: #ffffff;
  --primary-text: #000000;
  --primary-hover: #e4e4e7;

  --btn-secondary-bg: #18181b;
  --btn-secondary-hover: #27272a;
  --btn-secondary-text: #f4f4f5;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.8);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: #18181b;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.badge-version {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
  border-color: var(--border-light);
}

.btn-danger {
  background: transparent;
  color: #a1a1aa;
  border-color: var(--border-color);
}

.btn-danger:hover {
  background: #27272a;
  color: #ffffff;
  border-color: var(--border-light);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.btn-glow {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  padding: 10px 20px;
  border: 1px solid #ffffff;
}

.btn-glow:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

/* Hero / Banner Card */
.banner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.banner-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  width: fit-content;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.banner-details h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.banner-details p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.arl-preview-box {
  flex: 1;
  min-width: 260px;
  background: #050505;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  color: #d4d4d8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Documentation Sections */
.docs-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

.section-title-wrap h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-title-wrap p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.doc-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-block h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.doc-block p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.doc-block pre {
  background: #050505;
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  color: #e4e4e7;
  line-height: 1.5;
}

.code-example-wrap {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-lang {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

/* Table Section (Admin Only) */
.table-section {
  padding: 0;
  overflow: hidden;
}

.table-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.table-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.counter {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 9999px;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-wrap {
  position: relative;
  width: 220px;
}

.search-input-wrap i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  width: 14px;
  height: 14px;
}

.search-input-wrap input {
  width: 100%;
  background: #050505;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px 6px 30px;
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--border-light);
}

.filter-pills {
  display: flex;
  background: #050505;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.pill-btn.active {
  background: #27272a;
  color: #fff;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 18px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 18px;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

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

.table-empty {
  text-align: center;
  padding: 36px !important;
  color: var(--text-dim);
}

.acc-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.acc-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #18181b;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.acc-names {
  display: flex;
  flex-direction: column;
}

.acc-names strong {
  font-size: 0.88rem;
  color: #fff;
}

.acc-names small {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.tier-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: #a1a1aa;
}

.status-ACTIVE {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.status-EXPIRED, .status-BLOCKED, .status-INVALID_CREDENTIALS {
  color: #71717a;
  border-color: rgba(255, 255, 255, 0.05);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #0d0d0d;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: #18181b;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.modal-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-title-wrap p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  color: #fff;
}

.modal-form {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input {
  background: #050505;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
}

.form-group input:focus {
  border-color: var(--border-light);
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.form-hint code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.toast {
  background: #111111;
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  font-size: 0.84rem;
  font-weight: 500;
  color: #ffffff;
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 0 12px;
  color: var(--text-dim);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.footer a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Spin Animation */
.spinning {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .navbar { flex-direction: column; gap: 14px; align-items: flex-start; }
  .nav-actions { width: 100%; justify-content: space-between; }
  .banner-actions { width: 100%; flex-direction: column; }
  .arl-preview-box { max-width: 100%; width: 100%; }
  .btn-glow { width: 100%; }
}
