:root {
  --bg: #090a0d;
  --panel: #121419;
  --panel2: #191c23;
  --text: #f7f3e8;
  --muted: #a5a7b1;
  --gold: #e4b542;
  --gold2: #8f6b1f;
  --blue: #1692ff;
  --cyan: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --border: rgba(255,255,255,.10);
  --glass: rgba(255,255,255,.065);
  --shadow: 0 24px 80px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(228,181,66,.16), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(93,70,255,.15), transparent 24%),
    linear-gradient(135deg, #07080b, #101116 55%, #08090c);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 45%, rgba(0,0,0,.08), transparent 24%),
    linear-gradient(135deg, rgba(5,8,14,.96), rgba(12,15,20,.94) 48%, rgba(13,10,29,.96));
}

.login-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black, transparent 70%);
}

.login-aurora {
  position: absolute;
  width: 48vw;
  max-width: 680px;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(54px);
  opacity: .42;
  z-index: -2;
  animation: drift 10s ease-in-out infinite alternate;
}

.login-aurora-one {
  left: -12vw;
  top: 8vh;
  background: radial-gradient(circle, rgba(22,146,255,.9), transparent 62%);
}

.login-aurora-two {
  right: -14vw;
  bottom: -8vh;
  background: radial-gradient(circle, rgba(228,181,66,.72), transparent 64%);
  animation-delay: -4s;
}

@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(34px,-28px,0) scale(1.08); }
}

.login-card {
  width: min(410px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.052));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 30px;
  padding: 30px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  animation: cardIn .45s ease both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(228,181,66,.36), transparent 34%, rgba(22,146,255,.32));
  opacity: .34;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

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

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), #5e4716);
  display: grid;
  place-items: center;
  color: #111;
  font-weight: 900;
  flex: 0 0 auto;
}

.app-mark {
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(228,181,66,.22);
}

.app-mark span {
  position: relative;
  z-index: 2;
  letter-spacing: .04em;
}

.app-mark i,
.app-mark b {
  position: absolute;
  border: 2px solid rgba(12,15,20,.76);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 18px 0 0;
  transform: rotate(-10deg);
}

.app-mark i {
  right: 7px;
  top: 10px;
  width: 18px;
  height: 18px;
}

.app-mark b {
  right: 4px;
  top: 6px;
  width: 28px;
  height: 28px;
  opacity: .55;
}

.brand h1 {
  font-size: 23px;
  margin: 0;
  letter-spacing: 0;
}

label {
  display: block;
  margin: 14px 0 7px;
  color: #d8d3c5;
  font-weight: 800;
  font-size: 14px;
}

.input,
textarea,
select {
  width: 100%;
  background: rgba(255,255,255,.065);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 12px 15px;
  color: var(--text);
  outline: none;
  min-height: 44px;
  font-size: 14px;
}

.input:focus,
textarea:focus {
  border-color: rgba(228,181,66,.72);
  box-shadow: 0 0 0 4px rgba(228,181,66,.11);
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.password-field .input { min-width: 0; }

.icon-btn,
.link-btn {
  border: 0;
  background: transparent;
  color: #f2c955;
  cursor: pointer;
  font-weight: 900;
}

.icon-btn {
  min-width: 58px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(228,181,66,.10);
  border: 1px solid rgba(228,181,66,.20);
  font-size: 12px;
}

.login-options {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.btn {
  border: 0;
  border-radius: 15px;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), #c8912f);
  color: #15110a;
  box-shadow: 0 12px 26px rgba(228,181,66,.18);
}

.login-submit {
  width: 100%;
  margin-top: 18px;
  min-height: 46px;
}

.btn.secondary {
  background: rgba(255,255,255,.07);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 24px;
  border-right: 1px solid var(--border);
  background: rgba(11,12,16,.78);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.side-brand h2 {
  margin: 0;
  font-size: 19px;
}

.side-brand small { color: var(--gold); }

.nav-title {
  font-size: 12px;
  color: #8b8e99;
  font-weight: 900;
  letter-spacing: .09em;
  margin: 22px 0 10px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #c6c8d1;
  padding: 13px 14px;
  border-radius: 16px;
  margin: 5px 0;
  font-weight: 800;
}

.nav a.active,
.nav a:hover {
  background: linear-gradient(135deg, rgba(228,181,66,.23), rgba(255,255,255,.045));
  color: #fff;
  border: 1px solid rgba(228,181,66,.22);
}

.main {
  padding: 30px;
  overflow: hidden;
}

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

.title h1 {
  font-size: 32px;
  line-height: 1.1;
  margin: 0;
}

.title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.pill {
  border: 1px solid rgba(228,181,66,.28);
  background: rgba(228,181,66,.08);
  color: var(--gold);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.078), rgba(255,255,255,.038));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 14px 44px rgba(0,0,0,.22);
}

.stat b {
  font-size: 30px;
  display: block;
  margin-top: 8px;
}

.stat span,
.muted { color: var(--muted); }

.section { margin-top: 22px; }

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.table-wrap { overflow: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table th,
.table td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: #c8cad4;
  font-size: 13px;
}

.badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(34,197,94,.12);
  color: #53e083;
}

.msg {
  margin: 16px 0 0;
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(34,197,94,.10);
  border: 1px solid rgba(34,197,94,.25);
  color: #4ade80;
}

.danger {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.25);
  color: #ff9d9d;
}

.hidden { display: none !important; }

.mobilebar { display: none; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -300px;
    z-index: 10;
    transition: .25s;
  }
  .sidebar.open { left: 0; }
  .main { padding: 18px; }
  .mobilebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,11,14,.88);
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .grid { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .login-wrap { padding: 16px; }
  .login-card {
    padding: 24px;
    border-radius: 24px;
  }
  .brand h1 { font-size: 23px; }
  .grid { grid-template-columns: 1fr; }
  .title h1 { font-size: 25px; }
  .password-field {
    grid-template-columns: 1fr;
  }
  .icon-btn {
    width: 100%;
  }
}

/* Premium login refresh */
.login-wrap {
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(9,10,13,.94), rgba(9,10,13,.76)),
    linear-gradient(135deg, #090a0d 0%, #101522 44%, #131009 100%);
}

.login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, transparent 0 49px, rgba(255,255,255,.035) 50px),
    linear-gradient(transparent 0 49px, rgba(255,255,255,.035) 50px);
  background-size: 50px 50px;
  mask-image: linear-gradient(90deg, transparent, black 22%, black 78%, transparent);
}

.auth-shell {
  width: min(780px, 100%);
  min-height: 430px;
  display: grid;
  grid-template-columns: .92fr 1fr;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(14,15,19,.82);
  box-shadow: 0 28px 90px rgba(0,0,0,.46);
  backdrop-filter: blur(16px);
  animation: cardIn .45s ease both;
}

.auth-brand-panel {
  position: relative;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(228,181,66,.20), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border-right: 1px solid rgba(255,255,255,.10);
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  border: 1px solid rgba(228,181,66,.12);
  pointer-events: none;
}

.product-mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  position: relative;
  background: linear-gradient(135deg, #f2c955, #9b6f16);
  box-shadow: 0 18px 40px rgba(228,181,66,.26);
  overflow: hidden;
}

.product-mark span {
  width: 28px;
  height: 20px;
  border: 3px solid #17120a;
  border-radius: 8px;
  position: relative;
}

.product-mark span::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -8px;
  width: 10px;
  height: 10px;
  border-left: 3px solid #17120a;
  border-bottom: 3px solid #17120a;
  transform: skew(-20deg);
}

.product-mark i,
.product-mark b {
  position: absolute;
  right: 10px;
  top: 13px;
  width: 18px;
  height: 18px;
  border-top: 3px solid rgba(23,18,10,.7);
  border-radius: 50%;
}

.product-mark b {
  right: 6px;
  top: 8px;
  width: 28px;
  height: 28px;
  opacity: .45;
}

.brand-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.auth-brand-copy h1 {
  margin: 0;
  max-width: 260px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-brand-copy small {
  display: block;
  max-width: 260px;
  margin-top: 12px;
  color: #c8cad4;
  line-height: 1.5;
}

.auth-mini-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: relative;
  z-index: 1;
}

.auth-mini-board div {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0,0,0,.18);
}

.auth-mini-board strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.auth-mini-board span {
  color: var(--muted);
  font-size: 11px;
}

.login-card {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(16,17,22,.72);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: none;
}

.login-card::before,
.login-grid,
.login-aurora {
  display: none;
}

.login-heading {
  margin-bottom: 12px;
}

.login-heading span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-heading h2 {
  margin: 7px 0 0;
  font-size: 24px;
  letter-spacing: 0;
}

.login-card label {
  font-size: 13px;
  margin: 13px 0 7px;
}

.login-card .input {
  min-height: 42px;
  border-radius: 13px;
  background: rgba(255,255,255,.055);
  font-size: 14px;
}

.password-field {
  grid-template-columns: 1fr 54px;
}

.icon-btn {
  min-width: 54px;
  height: 38px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 12px;
}

.login-options {
  margin-top: 14px;
  font-size: 13px;
}

.check-row {
  font-size: 13px;
}

.link-btn {
  font-size: 13px;
}

.login-submit {
  min-height: 44px;
  border-radius: 14px;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(430px, 100%);
  }

  .auth-brand-panel {
    padding: 22px 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.10);
    gap: 14px;
  }

  .auth-brand-panel::after,
  .auth-mini-board {
    display: none;
  }

  .auth-brand-copy h1 {
    font-size: 24px;
  }

  .auth-brand-copy small {
    margin-top: 8px;
  }

  .product-mark {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }

  .login-card {
    padding: 24px;
  }
}
