:root {
  --bg-primary: #060912;
  --bg-secondary: #0b1020;
  --bg-card: #10172a;
  --bg-card-hover: #141d34;
  --bg-input: #0c1220;
  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(245, 158, 11, 0.4);
  --text-primary: #eef2f8;
  --text-secondary: #94a3c0;
  --text-muted: #5c6b88;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-dim: rgba(245, 158, 11, 0.1);
  --accent-glow: rgba(245, 158, 11, 0.18);
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.1);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.1);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.1);
  --purple: #8b5cf6;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.08);
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --topbar-h: 64px;
  --sidebar-w: 260px;
  --bottom-nav-h: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse at 0% 0%,
      rgba(245, 158, 11, 0.04) 0%,
      transparent 45%),
    radial-gradient(ellipse at 100% 100%,
      rgba(16, 185, 129, 0.04) 0%,
      transparent 45%),
    radial-gradient(ellipse at 50% 50%,
      rgba(59, 130, 246, 0.03) 0%,
      transparent 70%);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  padding: 10px 16px;
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) var(--bg-primary);
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: rgba(10, 14, 28, 0.88);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: var(--topbar-h);
  z-index: 100;
}

.topbar-spacer {
  flex: 1;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 40px;
  transition: var(--transition);
}

.user-chip:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.user-chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #0a0a0a;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.user-chip-role {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
}

.btn-logout-text {
  display: inline;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-right: auto;
}

.logo i {
  -webkit-text-fill-color: #f59e0b;
  font-size: 18px;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-admin {
  background: linear-gradient(135deg,
      rgba(245, 158, 11, 0.2),
      rgba(245, 158, 11, 0.08));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-user {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0a0a0a;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 14px rgba(245, 158, 11, 0.25);
}

.btn-accent:hover {
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.btn-accent:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-lg {
  padding: 13px 18px;
  font-size: 14px;
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.25);
}

.btn-outline:hover {
  background: rgba(245, 158, 11, 0.06);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 11.5px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 10.5px;
  border-radius: 6px;
}

.btn-danger {
  background: var(--red-dim);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-icon.accent:hover {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(245, 158, 11, 0.2);
}

.btn-icon.danger:hover {
  color: #f87171;
  background: var(--red-dim);
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-icon.warn:hover {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

/* MAIN */
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(10, 14, 28, 0.65);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-section {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  padding: 14px 12px 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.18);
  font-weight: 600;
}

.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px var(--accent-glow);
}

.sidebar-item i {
  width: 18px;
  text-align: center;
  font-size: 13px;
}

/* CONTENT */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: fadeSlide 0.25s ease;
}

#panelGenerator.panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* user full-page */
.user-full {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

/* CARDS */
.card {
  background: linear-gradient(165deg,
      rgba(255, 255, 255, 0.02) 0%,
      transparent 40%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  font-size: 15px;
}

.card-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-accent {
  color: var(--accent);
}

.stat-green {
  color: var(--green);
}

.stat-blue {
  color: var(--blue);
}

.stat-purple {
  color: var(--purple);
}

/* FORMS */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input,
select.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

.form-input.has-icon {
  padding-left: 40px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 14px;
}

.password-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238895b3' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  color: var(--text-primary);
  background-color: var(--bg-input);
}

select.form-input option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 10px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row>* {
  flex: 1;
}

/* RATIO */
.ratio-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ratio-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  outline: none;
}

.ratio-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 14px var(--accent-glow);
}

.ratio-val {
  font-weight: 700;
  font-size: 14px;
  min-width: 44px;
  text-align: center;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* LINKS */
.links-container {
  max-height: 360px;
  overflow-y: auto;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.links-container.links-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-family: var(--font-mono);
  transition: var(--transition);
}

.link-item:hover {
  border-color: rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.02);
}

.link-num {
  color: var(--text-muted);
  font-size: 10.5px;
  min-width: 32px;
  font-weight: 600;
}

.link-url {
  flex: 1;
  word-break: break-all;
  color: var(--text-secondary);
}

/* TABLE */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 13px;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* TAGS */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
}

.tag-on {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.tag-off {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tag-on .tag-dot {
  background: #34d399;
}

.tag-off .tag-dot {
  background: #f87171;
}

/* MODAL */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 14, 0.75);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.overlay.active {
  display: flex;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 560px;
  max-width: 94vw;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow);
  animation: modalIn 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  margin-bottom: 14px;
}

.modal-footer {
  flex-shrink: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* TOAST */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  pointer-events: auto;
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(16, 22, 40, 0.95);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.toast.toast-out {
  animation: toastOut 0.28s ease forwards;
}

.toast i {
  font-size: 16px;
  flex-shrink: 0;
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(40, 16, 20, 0.95);
}

.toast.error i {
  color: #f87171;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(12, 32, 26, 0.95);
}

.toast.success i {
  color: #34d399;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(16px);
  }
}

/* LOGIN */
.login-wrap {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 12s ease-in-out infinite;
}

.login-orb-1 {
  width: 420px;
  height: 420px;
  background: rgba(245, 158, 11, 0.12);
  top: -120px;
  left: -80px;
}

.login-orb-2 {
  width: 360px;
  height: 360px;
  background: rgba(59, 130, 246, 0.1);
  bottom: -100px;
  right: -60px;
  animation-delay: -6s;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    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: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(20px, -15px) scale(1.05);
  }
}

.login-card {
  background: rgba(12, 16, 32, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius) + 4px);
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 158, 11, 0.06);
  text-align: left;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(24px);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-dim), rgba(245, 158, 11, 0.02));
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.15);
}

.login-card h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-card .sub {
  color: var(--text-muted);
  font-size: 12.5px;
}

.login-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.login-hint i {
  color: var(--accent);
  opacity: 0.7;
}

.login-error {
  background: var(--red-dim);
  color: #f87171;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* PROGRESS */
.progress-bar {
  height: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* TABS */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tabs-pill {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}

.tab {
  padding: 9px 18px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

.tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

/* USER NAV */
.user-nav-wrap {
  margin-bottom: 10px;
}

.tabs-compact {
  margin-bottom: 10px !important;
}

.tabs-compact .tab {
  padding: 8px 16px;
  font-size: 12px;
}

/* SITE WALLET */
.site-wallet-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-bottom: 12px;
  padding-bottom: 2px;
  background: linear-gradient(180deg,
      var(--bg-primary) 70%,
      transparent 100%);
}

.site-wallet-bar {
  background: rgba(12, 16, 30, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.site-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  min-height: 20px;
}

.site-wallet-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-wallet-title i {
  color: var(--accent);
  font-size: 11px;
}

.site-wallet-active {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
  text-align: right;
}

.site-wallet-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-wallet-scroll::-webkit-scrollbar {
  display: none;
}

.site-wallet-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 128px;
  max-width: 180px;
  padding: 8px 12px 8px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-align: left;
  color: inherit;
  position: relative;
}

.site-wallet-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.site-wallet-card.active {
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.site-wallet-check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 7px;
  display: none;
  align-items: center;
  justify-content: center;
}

.site-wallet-card.active .site-wallet-check {
  display: flex;
}

.site-wallet-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.site-wallet-card.active .site-wallet-icon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent);
}

.site-wallet-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.site-wallet-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-wallet-site {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-wallet-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 4px;
}

/* EARNINGS INLINE */
.earnings-inline {
  padding: 14px 16px;
  margin-bottom: 12px;
}

.earnings-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.earnings-inline-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.earnings-inline-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.earnings-inline-title i {
  color: var(--accent);
  font-size: 12px;
}

.earnings-inline-site {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.earnings-inline-body {
  min-height: 0;
}

.earnings-compact-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.earnings-compact-grid::-webkit-scrollbar {
  display: none;
}

.earn-pill {
  flex: 1 0 88px;
  min-width: 88px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.earn-pill-val {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
  font-family: var(--font-mono);
}

.earn-pill-lbl {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-top: 3px;
}

.earnings-progress-wrap,
.earnings-progress-card {
  margin-top: 10px;
}

.earnings-progress-card .earnings-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trx-val {
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.trx-sym {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 4px;
  padding: 1px 4px;
  margin-right: 4px;
  vertical-align: middle;
  font-family: inherit;
}

.progress-bar-sm {
  flex: 1;
  height: 5px;
  margin-top: 0;
}

.earnings-progress-label {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

.earnings-loading,
.earnings-empty {
  text-align: center;
  padding: 14px 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.earnings-empty i {
  margin-right: 6px;
  opacity: 0.6;
}

.earnings-error {
  color: #f87171;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 12px;
  line-height: 1.5;
}

/* BOTTOM NAV (mobile users) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: rgba(10, 14, 28, 0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 90;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  padding: 8px 4px;
  max-width: 120px;
}

.bottom-nav-item i {
  font-size: 18px;
}

.bottom-nav-item:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.bottom-nav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* UTILS */
.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 12px;
}

.text-xs {
  font-size: 10px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.flex {
  display: flex;
  align-items: center;
}

.gap-6 {
  gap: 6px;
}

.gap-10 {
  gap: 10px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.space-between {
  justify-content: space-between;
}

.font-mono {
  font-family: var(--font-mono);
}

.w-full {
  width: 100%;
}

/* TOGGLE */
.toggle-wrap {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.toggle-knob {
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}

/* ADMIN DASHBOARD */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}

.dash-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.dash-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.dash-icon.accent {
  background: var(--accent-dim);
  color: var(--accent);
}

.dash-icon.green {
  background: var(--green-dim);
  color: var(--green);
}

.dash-icon.blue {
  background: var(--blue-dim);
  color: var(--blue);
}

.dash-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple);
}

.dash-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.dash-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

.dash-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.filter-bar .form-input {
  width: auto;
  min-width: 140px;
  padding: 8px 12px;
  font-size: 12.5px;
}

.filter-search {
  flex: 1;
  min-width: 180px !important;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 4px;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-btns {
  display: flex;
  gap: 6px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.2);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.expand-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 12px;
}

.expand-btn:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

tr.detail-row td {
  background: rgba(0, 0, 0, 0.2);
  padding: 0;
}

.detail-inner {
  padding: 14px 20px 16px 48px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.detail-item {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-xs);
  font-size: 12px;
}

.detail-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.earnings-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
}

.links-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.progress-mini {
  height: 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 6px;
}

.progress-mini-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.online-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--green-dim);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: #34d399;
}

#adminMobileNav {
  display: none;
}

#adminMobileNav.admin-ready {
  overflow-x: auto;
  gap: 6px;
  padding: 10px 0 14px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

#adminMobileNav .mob-nav-item {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  transition: var(--transition);
}

#adminMobileNav .mob-nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.2);
}

@media (max-width: 768px) {
  .sidebar {
    display: none !important;
  }

  .topbar {
    padding: 0 14px;
    gap: 8px;
  }

  .user-chip-meta {
    display: none;
  }

  .user-chip {
    padding: 4px;
    border: none;
    background: transparent;
  }

  .btn-logout-text {
    display: none;
  }

  .content {
    padding: 16px;
  }

  .app-shell.has-user-bottom-nav .content {
    padding-bottom: calc(var(--bottom-nav-h) + 20px);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    flex-direction: column;
  }

  .modal {
    width: 96%;
    padding: 22px;
  }

  #adminMobileNav.admin-ready {
    display: flex;
  }

  #userBottomNav.user-bottom-visible {
    display: flex;
  }

  .filter-bar .form-input {
    min-width: 100%;
  }

  .filter-search {
    min-width: 100% !important;
  }

  .tabs-pill {
    display: none;
  }

  #toastContainer {
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .app-shell.has-user-bottom-nav #toastContainer {
    bottom: calc(var(--bottom-nav-h) + 12px);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .login-orb {
    animation: none;
  }
}

/* WORKSPACE APP LAYOUT */
.content.workspace-mode {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  max-width: none;
  margin: 0;
}

.content.workspace-mode .site-wallet-wrap {
  flex-shrink: 0;
  margin-bottom: 8px;
  position: sticky;
  top: 0;
  z-index: 45;
}

.content.workspace-mode>#panelGenerator.panel.active {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.workspace-app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  overflow: hidden;
}

.workspace-primary {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-columns {
  display: grid;
  grid-template-columns: minmax(0, 70%) minmax(240px, 30%);
  gap: 10px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

.workspace-gen-card,
.workspace-earnings-card,
.workspace-links-card {
  margin-bottom: 0;
}

.workspace-gen-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.workspace-card-head {
  margin-bottom: 10px;
  flex-shrink: 0;
}

.workspace-gen-card .stats-grid-compact {
  flex-shrink: 0;
}

.workspace-gen-card .workspace-gen-actions {
  margin-top: auto;
  flex-shrink: 0;
}

.workspace-earnings-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.workspace-earnings-card .earnings-inline-head {
  flex-shrink: 0;
}

.workspace-earnings-card .earnings-inline-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-earnings-card .earnings-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  overflow: visible;
  flex: 1;
  align-content: start;
}

.workspace-earnings-card .earn-pill-lg {
  padding: 12px 10px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.workspace-earnings-card .earn-pill-val {
  font-size: 15px;
}

.workspace-earnings-card .earn-pill-val .trx-sym {
  font-size: 9px;
}

.workspace-earnings-card .earnings-progress-card {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.workspace-earnings-card .earnings-progress-label {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 11px;
  width: 100%;
}

.earnings-site-box {
  flex-shrink: 0;
  margin-top: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg,
      rgba(59, 130, 246, 0.08) 0%,
      rgba(245, 158, 11, 0.06) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-xs);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.earnings-site-box-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.earnings-site-box-label i {
  color: var(--blue);
  font-size: 10px;
}

.earnings-site-box-url {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.45;
  word-break: break-all;
  letter-spacing: -0.2px;
}

.earnings-site-box-url a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  transition: color 0.2s ease;
}

.earnings-site-box-url a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.earnings-site-box-url a i {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 4px;
}

.workspace-gen-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.workspace-links-card {
  flex: 0 0 clamp(176px, 32vh, 280px);
  min-height: 176px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 12px;
  overflow: hidden;
}

.workspace-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.links-count-badge {
  color: var(--accent);
  font-weight: 800;
  margin-left: 4px;
}

.stats-grid-compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-card-sm {
  padding: 10px 8px;
}

.stat-card-sm .stat-value {
  font-size: 18px;
}

.stat-card-sm .stat-label {
  font-size: 9px;
  margin-top: 2px;
}

.form-row-tight .form-group {
  margin-bottom: 10px;
}

.empty-state-compact {
  padding: 28px 16px;
}

.empty-state-compact .empty-state-icon {
  width: 40px;
  height: 40px;
  font-size: 16px;
  margin-bottom: 10px;
}

/* GEN SUCCESS POPUP */
.gen-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 14, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.gen-success-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gen-success-card {
  background: linear-gradient(165deg,
      rgba(245, 158, 11, 0.12) 0%,
      rgba(16, 22, 40, 0.98) 45%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 36px 24px;
  text-align: center;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(245, 158, 11, 0.12);
  transform: scale(0.88) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  min-width: 240px;
}

.gen-success-overlay.active .gen-success-card {
  transform: scale(1) translateY(0);
}

.gen-success-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.4);
  animation: successPop 0.5s cubic-bezier(0.34, 1.5, 0.64, 1) 0.1s both;
}

@keyframes successPop {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.gen-success-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.gen-success-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

@media (max-width: 900px) {
  .workspace-columns {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .workspace-gen-card {
    max-height: 42vh;
  }

  .workspace-earnings-card .earnings-compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workspace-links-card {
    flex: 0 0 clamp(144px, 28vh, 240px);
    max-height: 240px;
  }
}

@media (max-width: 768px) {
  .content.workspace-mode {
    padding: 6px 8px;
  }
}

/* Production polish */
.content {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.content.workspace-mode {
  max-width: none;
  margin: 0;
}

.settings-section {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.settings-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.token-preview {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
  margin-top: 8px;
}

.app-footer {
  text-align: center;
  padding: 14px 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.form-input[readonly] {
  opacity: 0.75;
  cursor: not-allowed;
}

#userBottomNav.user-bottom-visible {
  display: none;
}