@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg: #020617;
  --bg2: #0f172a;
  --card: rgba(15, 23, 42, .88);
  --card2: rgba(30, 41, 59, .84);
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(59, 130, 246, .25);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted2: #64748b;
  --orange: #2563eb;
  --orange2: #38bdf8;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #60a5fa;
  --purple: #a855f7;
  --shadow: 0 26px 80px rgba(0, 0, 0, .52);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, .12), transparent 34%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.auth-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(#ffffff 1px, transparent 1px),
    radial-gradient(#38bdf8 1px, transparent 1px),
    radial-gradient(#a855f7 1px, transparent 1px);
  background-size: 72px 72px, 120px 120px, 160px 160px;
  background-position: 0 0, 40px 30px, 80px 90px;
  opacity: .16;
  animation: starMove 26s linear infinite;
  z-index: 0;
}

@keyframes starMove {
  from { transform: translateY(-90px); }
  to { transform: translateY(90px); }
}

.orange-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(80px);
  opacity: .18;
  background: var(--orange);
  z-index: 0;
}

.glow-one {
  top: -130px;
  left: -90px;
}

.glow-two {
  right: -140px;
  bottom: -140px;
}

.animate-in {
  animation: fadeUp .55s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.shake {
  animation: shake .35s ease both;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* AUTH */

.auth-card {
  width: min(450px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.auth-card::before,
.panel::before,
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), transparent 30%, rgba(168, 85, 247, .08));
  pointer-events: none;
}

.brand {
  text-align: center;
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}

.brand-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: white;
  box-shadow: 0 18px 38px rgba(37, 99, 235, .32);
}

.brand-icon.crown,
.primary {
  background: linear-gradient(135deg, var(--orange), var(--orange2));
}

.success-icon {
  background: linear-gradient(135deg, #16a34a, #4ade80);
}

.brand-icon.small {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 18px;
  margin: 0;
}

.brand h1 {
  font-size: 25px;
  letter-spacing: -1px;
  font-weight: 900;
}

.brand h1 span {
  color: var(--orange2);
}

.brand p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.form {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

label {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 800;
}

.input {
  position: relative;
}

.input i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--orange2);
}

.input input,
.inline-form input,
.search input {
  width: 100%;
  background: rgba(6, 4, 12, .86);
  border: 1px solid rgba(255, 255, 255, .09);
  color: white;
  border-radius: 15px;
  padding: 14px 14px 14px 44px;
  outline: none;
  font: inherit;
  transition: .2s ease;
}

.inline-form input,
.search input {
  padding-left: 14px;
}

.input input:focus,
.inline-form input:focus,
.search input:focus {
  border-color: rgba(56, 189, 248, .8);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .13);
}

.input input::placeholder,
.inline-form input::placeholder,
.search input::placeholder {
  color: #64748b;
}

.eye {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: white;
  cursor: pointer;
}

.eye i {
  position: static;
  transform: none;
}

.btn {
  border: 0;
  border-radius: 15px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  transition: .18s ease;
  white-space: nowrap;
}

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

.btn:disabled,
button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.primary {
  color: white;
  box-shadow: 0 12px 25px rgba(37, 99, 235, .18);
}

.secondary {
  background: rgba(20, 16, 29, .92);
  border: 1px solid rgba(255, 255, 255, .10);
  color: #f8fafc;
}

.danger-btn,
.ok-btn {
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: white;
  cursor: pointer;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.danger-btn {
  background: rgba(239, 68, 68, .15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, .24);
}

.ok-btn {
  background: rgba(34, 197, 94, .15);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, .24);
}

.icon-btn {
  width: 38px;
  height: 38px;
  justify-content: center;
  padding: 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--muted2);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .8px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .10);
}

.forgot-row {
  margin-top: 14px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.forgot-row a {
  color: var(--orange2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.auth-footer {
  position: relative;
  z-index: 1;
}

.mini-link {
  margin-top: 18px;
  color: #bfdbfe;
  text-decoration: none;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.alert {
  position: relative;
  z-index: 2;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
}

.alert i {
  margin-top: 2px;
}

.alert div {
  display: grid;
  gap: 4px;
}

.alert span {
  color: inherit;
  opacity: .92;
}

.alert a {
  color: white;
  font-weight: 900;
}

.alert.danger {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .25);
  color: #fecaca;
}

.alert.success {
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .25);
  color: #bbf7d0;
}

.success-box {
  background: rgba(34, 197, 94, .10);
  border: 1px solid rgba(34, 197, 94, .22);
  color: #bbf7d0;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.success-box span {
  display: block;
  color: #dcfce7;
  margin-top: 5px;
  font-size: 14px;
}

/* LAYOUT */

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  position: relative;
  z-index: 2;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: rgba(13, 9, 20, .86);
  border-right: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.side-brand {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.side-brand b {
  display: block;
  font-size: 17px;
  letter-spacing: .3px;
}

.side-brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.side-nav,
.logout-form {
  position: relative;
  z-index: 1;
}

.nav {
  width: 100%;
  color: #cbd5e1;
  text-decoration: none;
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 15px;
  margin-bottom: 8px;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  font-weight: 800;
  transition: .18s ease;
}

.nav:hover,
.nav.active {
  color: white;
  background: rgba(37, 99, 235, .12);
  box-shadow: inset 3px 0 0 var(--orange);
}

.nav.logout {
  color: #fca5a5;
}

.content {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange2);
  background: rgba(37, 99, 235, .10);
  border: 1px solid rgba(37, 99, 235, .22);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -1.2px;
}

.topbar h1 span {
  color: var(--orange2);
}

.topbar p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.6;
}

.small-btn {
  margin: 0;
}

.welcome-toast {
  display: flex;
  gap: 13px;
  align-items: center;
  background: rgba(37, 99, 235, .12);
  border: 1px solid rgba(37, 99, 235, .22);
  color: #bfdbfe;
  padding: 15px;
  border-radius: 18px;
  margin-bottom: 20px;
  animation: fadeUp .45s ease both;
}

.welcome-toast i {
  color: var(--orange2);
  font-size: 22px;
}

.welcome-toast span {
  display: block;
  color: #93c5fd;
  margin-top: 3px;
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.big-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
  min-width: 0;
}

.stat i {
  color: var(--orange2);
  font-size: 25px;
}

.stat b {
  display: block;
  font-size: 26px;
  color: #38bdf8;
  line-height: 1.1;
  word-break: break-word;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 15px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  text-decoration: none;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 900;
  transition: .2s ease;
}

.tab:hover,
.tab.active {
  color: var(--orange2);
  background: rgba(37, 99, 235, .10);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
  position: relative;
  overflow: hidden;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.panel-head h2,
.panel h2 {
  font-size: 19px;
  font-weight: 900;
}

.panel-head p,
.panel p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
}

.inline-form {
  display: flex;
  gap: 10px;
}

.search {
  display: flex;
  gap: 8px;
  min-width: 260px;
}

.search button {
  width: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange2));
  color: white;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(8, 5, 13, .38);
}

th {
  color: #93c5fd;
  text-align: left;
  font-size: 12px;
  padding: 14px;
  background: rgba(37, 99, 235, .08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-transform: uppercase;
  letter-spacing: .8px;
}

td {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #e5e7eb;
  font-size: 14px;
  vertical-align: middle;
}

td b {
  color: #f8fafc;
}

.pill {
  display: inline-flex;
  align-items: center;
  background: rgba(37, 99, 235, .12);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, .20);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.pill.ok {
  background: rgba(34, 197, 94, .12);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .20);
}

.pill.warn {
  background: rgba(245, 158, 11, .12);
  color: #fde68a;
  border-color: rgba(245, 158, 11, .20);
}

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

.empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.empty i {
  color: var(--orange2);
  margin-right: 8px;
}

.grid-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.setting-list {
  display: grid;
  gap: 12px;
}

.setting-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, .45);
  border: 1px solid rgba(255,255,255,.08);
}

.setting-list span {
  color: var(--orange2);
  font-weight: 800;
  text-align: right;
}

.secret-text {
  display: inline-flex;
  align-items: center;
  background: rgba(37, 99, 235, .10);
  color: #bfdbfe;
  border: 1px solid rgba(37, 99, 235, .18);
  padding: 6px 9px;
  border-radius: 10px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tiny-copy {
  margin-left: 7px;
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .12);
  border: 1px solid rgba(37, 99, 235, .18);
}

.copy-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.copy-mini {
  border: 0;
  background: rgba(37, 99, 235, .15);
  color: #38bdf8;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .big-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: relative;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .nav {
    margin-bottom: 0;
  }

  .topbar,
  .panel-head,
  .inline-form,
  .grid-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    min-width: 0;
  }

  .stats,
  .big-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .auth-body {
    padding: 14px;
  }

  .auth-card {
    padding: 22px;
    border-radius: 24px;
  }

  .brand h1 {
    font-size: 22px;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .stats,
  .big-stats {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab {
    justify-content: center;
    padding: 11px 8px;
  }

  .topbar {
    align-items: stretch;
  }

  .small-btn {
    width: 100%;
  }

  .inline-form {
    gap: 9px;
  }

  .panel {
    padding: 16px;
    border-radius: 20px;
  }

  .stat {
    padding: 17px;
  }

  .actions {
    min-width: 180px;
  }

  .setting-list div {
    flex-direction: column;
  }

  .setting-list span {
    text-align: left;
  }
}
