/* ============================================
   League Software — Design amélioré
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark:    #08090b;
  --bg-card:    #0f1114;
  --bg-card-hover: #13161a;
  --bg-input:   #0a0c0e;
  --border:     #1c1f24;
  --border-light: #252a32;
  --border-focus: #3d4553;
  --text:       #e8eaed;
  --text-muted: #9ca3af;
  --text-dim:   #6b7280;
  --accent:     #4b5563;
  --accent-hover: #6b7280;
  --link:       #94a3b8;
  --link-hover: #cbd5e1;
  --success-bg: rgba(148, 163, 184, 0.1);
  --success-border: #64748b;
  --success-text: #cbd5e1;
  --error-bg:   rgba(100, 116, 139, 0.18);
  --error-border: #475569;
  --error-text: #94a3b8;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  16px;
  --shadow:    0 24px 48px -20px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --transition: 0.2s ease;
  --font:       'Outfit', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(148, 163, 184, 0.25); color: #fff; }
a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0 0 0.5em 0; font-weight: 600; color: #f1f3f5; }
h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; letter-spacing: -0.01em; }

/* ========== LANDING ========== */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #050608;
}
.landing-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(148, 163, 184, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 50%, rgba(203, 213, 225, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse 60% 80% at 0% 80%, rgba(148, 163, 184, 0.04) 0%, transparent 45%);
}
.landing-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 15%, transparent 65%);
}
.landing-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: landing-glow-float 22s ease-in-out infinite;
}
.landing-bg-glow-1 {
  width: 520px;
  height: 520px;
  background: rgba(148, 163, 184, 0.07);
  top: -180px;
  left: -120px;
}
.landing-bg-glow-2 {
  width: 380px;
  height: 380px;
  background: rgba(203, 213, 225, 0.05);
  bottom: -120px;
  right: -100px;
  animation-delay: -8s;
}
.landing-bg-glow-3 {
  width: 280px;
  height: 280px;
  background: rgba(148, 163, 184, 0.04);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -15s;
}
@keyframes landing-glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -15px) scale(1.03); }
  66% { transform: translate(-15px, 18px) scale(0.97); }
}

.landing-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.landing-logo {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: #e2e8f0;
}
.landing-nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.landing-nav-link:hover {
  color: var(--link-hover);
  background: rgba(255, 255, 255, 0.04);
}

.landing-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 140px;
}
.landing-badge {
  display: inline-block;
  padding: 10px 20px;
  margin-bottom: 28px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  animation: landing-fade-in 0.7s ease-out;
}
.landing-title {
  margin: 0 0 28px 0;
  font-size: clamp(3rem, 11vw, 5.25rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: #f8fafc;
  animation: landing-fade-in 0.7s ease-out 0.08s both;
}
.landing-title-line { display: block; }
.landing-title-line--accent {
  color: #cbd5e1;
  background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 45%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-desc {
  max-width: 460px;
  margin: 0 0 44px 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-muted);
  animation: landing-fade-in 0.7s ease-out 0.16s both;
}
.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  animation: landing-fade-in 0.7s ease-out 0.24s both;
}
.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 34px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.landing-btn:hover { transform: translateY(-2px); }
.landing-btn--primary {
  color: #0a0b0e;
  background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%);
  box-shadow: 0 6px 28px rgba(148, 163, 184, 0.28);
}
.landing-btn--primary:hover {
  background: linear-gradient(135deg, #a8b4c4 0%, #e2e8f0 100%);
  box-shadow: 0 10px 36px rgba(148, 163, 184, 0.35);
}
.landing-btn--secondary {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
}
.landing-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}
@keyframes landing-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-footer {
  position: relative;
  z-index: 1;
  padding: 28px;
  text-align: center;
}
.landing-footer p { margin: 0; font-size: 0.85rem; color: var(--text-dim); }

@media (max-width: 640px) {
  .landing-header { padding: 22px 24px; }
  .landing-main { padding: 64px 20px 100px; }
  .landing-cta { flex-direction: column; width: 100%; max-width: 300px; }
  .landing-btn { width: 100%; }
}

/* ========== AUTH (connexion / inscription) ========== */
.auth-landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
}
.auth-landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 70% at 50% -15%, rgba(20, 22, 28, 0.9) 0%, transparent 50%),
    var(--bg-dark);
}
.auth-landing-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.auth-landing-wrap:hover { box-shadow: 0 28px 56px -24px rgba(0, 0, 0, 0.55); }
.auth-brand { text-align: center; margin-bottom: 32px; }
.auth-brand h1 { margin: 0 0 10px 0; font-size: 1.7rem; color: #f1f5f9; }
.auth-brand p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.auth-tabs {
  display: flex;
  margin-bottom: 28px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 5px;
  border: 1px solid var(--border);
}
.auth-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.auth-tab:hover { color: var(--link); }
.auth-tab.active {
  background: var(--accent);
  color: #e2e8f0;
  font-weight: 500;
}
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-form label {
  display: block;
  margin: 16px 0 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-form label:first-of-type { margin-top: 0; }
.auth-form label .opt { color: var(--text-dim); font-weight: normal; }
.auth-form input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-form input::placeholder { color: var(--text-dim); }
.auth-form input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(61, 69, 83, 0.2);
}
.auth-form button {
  margin-top: 24px;
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #e2e8f0;
  font-weight: 500;
  transition: background var(--transition);
}
.auth-form button:hover { background: var(--accent-hover); }
.form-error { color: var(--error-text); font-size: 0.9rem; margin-top: 8px; }
.auth-footer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.auth-footer a { font-size: 0.9rem; color: var(--text-dim); }
.auth-footer a:hover { color: var(--link); }
.auth-footer-sep { margin: 0 10px; color: var(--text-dim); }

/* ========== DASHBOARD ========== */
.dashboard-page { min-height: 100vh; background: var(--bg-dark); }
.dashboard-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.dashboard-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.dashboard-logo { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: #f1f5f9; }
.dashboard-user {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.dashboard-username {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
}
.dashboard-discord { font-size: 0.85rem; color: var(--text-dim); }
.dashboard-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px;
  width: 100%;
}
.dashboard-welcome {
  border-left: 4px solid var(--accent);
  padding: 28px 28px 28px 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  margin-bottom: 28px;
}
.dashboard-welcome-title { margin: 0 0 10px 0; font-size: 1.4rem; font-weight: 600; color: #f1f5f9; }
.dashboard-welcome-name { color: var(--link-hover); }
.dashboard-welcome-desc { margin: 0; color: var(--text-muted); line-height: 1.65; font-size: 1rem; max-width: 560px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.dashboard-key-info {
  padding: 28px 28px 28px 32px;
  height: 100%;
}
.dashboard-key-info-title { margin: 0 0 22px 0; font-size: 1.15rem; font-weight: 600; color: #e2e8f0; }
.dashboard-key-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.dashboard-key-info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.dashboard-key-info-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.dashboard-key-info-value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}
.dashboard-key-masked { font-family: ui-monospace, monospace; color: var(--text-muted); font-size: 0.95rem; }
.dashboard-key-remaining {
  color: var(--success-text);
  font-weight: 600;
  font-size: 1.1rem;
}

.dashboard-product-wrap { padding: 0; overflow: hidden; }
.dashboard-product-wrap .product-card { margin: 0; border-radius: var(--radius); }
.dashboard-alert-inline { margin-top: 0; margin-bottom: 28px; }

.dashboard-card-title { margin: 0 0 8px 0; font-size: 1.15rem; }
.dashboard-form .form label { margin-top: 16px; }
.dashboard-form .form label:first-of-type { margin-top: 0; }
.btn-verify { margin-top: 20px; padding: 12px 24px; }
.dashboard-card .form input { max-width: 100%; }
.dashboard-card .card-subtitle { margin-bottom: 20px; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-main { max-width: 100%; padding: 32px 24px; }
}

/* ========== CARDS & FORMS (global) ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border-light); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.35); }
.card h2 { margin: 0 0 20px 0; font-size: 1.15rem; }
.card-subtitle { margin: -8px 0 20px 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.form label {
  display: block;
  margin: 14px 0 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.form label:first-of-type { margin-top: 0; }
.form input[type="text"],
.form input[type="password"],
.form input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form input:focus,
.form input:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(61, 69, 83, 0.15);
}
.form-select {
  min-width: 120px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition);
}
.form-select:focus,
.form-select:focus-visible { outline: none; border-color: var(--border-focus); }
.form button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.form button {
  margin-top: 18px;
  padding: 11px 22px;
  background: var(--accent);
  color: #e2e8f0;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
}
.form button:hover { background: var(--accent-hover); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:active { transform: scale(0.98); }
.btn-block { display: block; width: 100%; }
.btn-outline {
  background: transparent;
  color: var(--link);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--accent);
  color: #e2e8f0;
  border-color: var(--border-focus);
}
.btn-primary {
  background: var(--accent);
  color: #e2e8f0;
  border: 1px solid var(--border-focus);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger {
  background: #374151;
  color: #e5e7eb;
}
.btn-danger:hover { background: #4b5563; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-copy {
  padding: 5px 12px;
  font-size: 0.8rem;
  margin-left: 8px;
  background: var(--border);
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
.btn-copy:hover { background: var(--accent); color: var(--text); }

/* ========== ALERTS ========== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  border: 1px solid;
}
.alert.error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}
.alert.success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}
.alert ul { margin: 10px 0 0 0; padding-left: 22px; }
.alert code { background: rgba(0,0,0,0.25); padding: 3px 8px; border-radius: 6px; font-size: 0.9em; }

/* ========== DOWNLOAD BOX ========== */
.download-box {
  margin-top: 28px;
  padding: 28px;
  background: var(--bg-input);
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
}
.download-box .btn { margin-bottom: 10px; }
.download-box .muted { margin-top: 10px; display: block; color: var(--text-dim); font-size: 0.9rem; }

/* ========== PRODUCT CARD (dashboard) ========== */
.product-card {
  margin-top: 24px;
  padding: 28px;
  background: var(--bg-input);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.product-card-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}
.product-card-status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.product-card-meta {
  margin-bottom: 22px;
  padding: 10px 0;
}
.product-card-update {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.product-card-download {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.product-download-btn {
  display: inline-block;
  margin-bottom: 12px;
  padding: 14px 32px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.product-download-btn:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.product-card-download-hint { margin: 0; font-size: 0.85rem; color: var(--text-dim); }

/* ========== ADMIN LOGIN ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
}
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(20, 22, 28, 0.95) 0%, transparent 60%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  z-index: 1;
  max-width: 400px;
  width: 100%;
}
.auth-card-desc { margin: 0 0 24px 0; color: var(--text-muted); font-size: 0.95rem; }
.auth-card .form label:first-of-type { margin-top: 0; }

/* ========== ADMIN PANEL ========== */
.admin-page {
  min-height: 100vh;
  box-sizing: border-box;
}
.admin-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}
.admin-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}
.admin-sidebar-link {
  display: block;
  padding: 12px 24px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.admin-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--link-hover);
}
.admin-sidebar-link.active {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-left: 3px solid var(--accent);
  padding-left: 21px;
}
.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.admin-sidebar-logout {
  color: var(--text-dim);
  font-size: 0.9rem;
}
.admin-sidebar-logout:hover { color: var(--error-text); }
.admin-content {
  flex: 1;
  padding: 32px 40px;
  max-width: 100%;
  overflow-x: auto;
}
.admin-page:not(.admin-layout) {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 40px;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.admin-header h1 { margin: 0; font-size: 1.4rem; font-weight: 600; }
.admin-section-create .form-inline {
  display: grid;
  grid-template-columns: auto 140px auto 100px auto 1fr auto 1fr auto 1fr auto;
  gap: 12px 20px;
  align-items: end;
  max-width: 100%;
}
.admin-section-create .form-inline label { margin-top: 0; }
.admin-section-create .form-inline input,
.admin-section-create .form-inline select { min-width: 0; }
.admin-section-create .form-inline button { margin-top: 0; }
.form-inline {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto;
  gap: 10px 14px;
  align-items: end;
}
@media (max-width: 1200px) {
  .admin-section-create .form-inline { grid-template-columns: auto 1fr auto 1fr auto 1fr; }
}
.admin-section-product .card-subtitle { margin-bottom: 20px; }
.admin-product-form { margin-bottom: 24px; }
.admin-product-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}
.admin-product-field { flex: 1; min-width: 160px; }
.admin-product-field label { display: block; margin-bottom: 6px; }
.admin-product-field input[type="text"] { width: 100%; max-width: 280px; }
.admin-product-field input[type="file"] {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 8px 0;
}
.admin-product-actions { flex: 0 0 auto; }
.admin-loader-upload { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (max-width: 960px) {
  .form-inline,
  .admin-section-create .form-inline { grid-template-columns: 1fr 1fr; }
  .admin-product-row { flex-direction: column; align-items: stretch; }
  .admin-product-field input[type="text"] { max-width: 100%; }
}

/* ========== TABLE ========== */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: 100%;
}
.keys-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
}
.keys-table th,
.keys-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.keys-table th:nth-child(1),
.keys-table td:nth-child(1) { width: 24%; min-width: 200px; }
.keys-table th:nth-child(2),
.keys-table td:nth-child(2) { width: 10%; min-width: 95px; }
.keys-table th:nth-child(3),
.keys-table td:nth-child(3) { width: 14%; min-width: 130px; }
.keys-table th:nth-child(4),
.keys-table td:nth-child(4) { width: 11%; min-width: 80px; }
.keys-table th:nth-child(5),
.keys-table td:nth-child(5) { width: 11%; min-width: 80px; }
.keys-table th:nth-child(6),
.keys-table td:nth-child(6) { width: 14%; min-width: 110px; }
.keys-table th:nth-child(7),
.keys-table td:nth-child(7) { width: 22%; min-width: 240px; }
.keys-table tbody tr { transition: background var(--transition); }
.keys-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.keys-table tbody tr:last-child td { border-bottom: none; }
.keys-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-input);
}
.keys-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.keys-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.keys-table code {
  font-size: 0.9rem;
  background: var(--bg-input);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
}
.key-cell { word-break: break-all; font-family: ui-monospace, monospace; }
.admin-global-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}
.admin-global-actions .form-inline { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.key-status { font-size: 0.78rem; font-weight: 600; padding: 5px 12px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.key-status-ok { color: var(--success-text); background: var(--success-bg); border: 1px solid var(--success-border); }
.key-status-unused { color: var(--text-muted); background: rgba(148, 163, 184, 0.12); border: 1px solid var(--border); }
.key-status-banned { color: var(--error-text); background: var(--error-bg); border: 1px solid var(--error-border); }
.key-status-frozen { color: #94a3b8; background: rgba(100, 116, 139, 0.2); border: 1px solid #475569; }
.key-actions-cell { white-space: nowrap; }
.key-actions-cell form { display: inline-block; margin-right: 10px; vertical-align: middle; }
.key-actions-cell .form-select-sm { min-width: 76px; padding: 6px 8px; font-size: 0.82rem; margin-right: 4px; }
.key-actions-cell .btn { margin-right: 2px; }
.key-banned { opacity: 0.65; }
.muted { color: var(--text-dim); font-size: 0.9rem; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    min-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-sidebar-link { padding: 10px 16px; }
  .admin-sidebar-link.active { border-left: none; border-bottom: 3px solid var(--accent); padding-left: 16px; }
  .admin-sidebar-footer { margin-top: 0; padding-top: 0; border-top: none; margin-left: auto; }
  .admin-content { padding: 24px 20px; }
}
@media (max-width: 600px) {
  .auth-landing-wrap { padding: 28px 24px; }
  .dashboard-header-inner { flex-direction: column; align-items: flex-start; }
  .dashboard-user { width: 100%; }
  .dashboard-main { padding: 32px 20px; }
  .dashboard-key-info-grid { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .admin-page:not(.admin-layout) { padding: 24px 20px; }
  .admin-content { padding: 20px 16px; }
  .keys-table th, .keys-table td { padding: 10px 12px; font-size: 0.9rem; }
}
