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

:root {
  color-scheme: dark;
  --bg: #0b1215;
  --panel: #101a1e;
  --panel2: #142126;
  --line: #25383e;
  --teal: #36d7c3;
  --teal-dark: #133e3b;
  --text: #edf5f4;
  --muted: #91a5a8;
  --warn: #f2bd72;
  --danger: #ff8585;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
}

/* SIDEBAR */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  background: #0d171b;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 6px 42px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--teal);
  color: #06201e;
  font-size: 22px;
  font-weight: 800;
}

.brand-mark.large {
  width: 52px;
  height: 52px;
  font-size: 27px;
}

.brand-text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
}

.side-label,
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.side-label {
  margin: 0 10px 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: .18s ease;
}

.nav-item span {
  width: 22px;
  text-align: center;
  font-size: 16px;
}

.nav-item:hover {
  color: var(--text);
  background: #152227;
}

.nav-item.active {
  color: var(--teal);
  background: #15312f;
  border-color: #234944;
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 14px 8px 2px;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
}

/* MAIN */

.main {
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  margin: 0 auto;
  padding: 30px 42px 24px;
}

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

.page-heading h1 {
  margin: 7px 0 0;
  font-size: 29px;
  letter-spacing: -1px;
}

.account-area {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.mobile-menu {
  display: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel);
}

/* BUTTONS */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  transition: .18s ease;
}

.button-primary {
  color: #06201e;
  background: var(--teal);
}

.button-primary:hover {
  background: #58e4d2;
  transform: translateY(-1px);
}

.button-secondary {
  color: var(--text);
  background: #1a292e;
  border-color: var(--line);
}

.button-secondary:hover,
.button-quiet:hover {
  background: #23363c;
}

.button-quiet {
  min-height: 35px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  font-size: 11px;
}

.text-button {
  display: block;
  margin: 0 0 18px auto;
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
}

/* AUTH */

.auth-wrapper {
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.auth-visual {
  min-height: 580px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  background:
    radial-gradient(circle at 80% 15%, rgba(54,215,195,.18), transparent 35%),
    linear-gradient(145deg, #13252a, #0d171b 75%);
  border-right: 1px solid var(--line);
}

.visual-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.visual-content {
  max-width: 490px;
}

.visual-content h2 {
  margin: 15px 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -1.8px;
}

.visual-content p:not(.eyebrow) {
  max-width: 400px;
  color: var(--muted);
  line-height: 1.8;
}

.visual-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.auth-card {
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-header {
  margin-bottom: 28px;
}

.auth-header h2 {
  margin: 10px 0;
  font-size: 30px;
  letter-spacing: -1px;
}

.auth-header p,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.field {
  margin-bottom: 17px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #c4d2d3;
  font-size: 12px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: #0c1519;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: .18s ease;
}

input::placeholder {
  color: #53666a;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(54,215,195,.1);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-actions .button {
  width: 100%;
}

.form-message {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.recovery-panel h3 {
  margin-top: 0;
  font-size: 22px;
}

.recovery-panel .muted {
  margin-bottom: 22px;
}

/* NOTICE */

.notice {
  padding: 17px 20px;
  margin-bottom: 22px;
  border-radius: 13px;
  line-height: 1.7;
}

.notice-warn {
  color: #f0d1a2;
  background: #302719;
  border: 1px solid #66502f;
}

.notice p {
  margin-bottom: 0;
}

/* DASHBOARD */

.welcome-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 30px;
  border: 1px solid #28514d;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 20%, rgba(54,215,195,.16), transparent 32%),
    linear-gradient(120deg, #142a2c, #101a1e);
}

.welcome-copy h2 {
  margin: 10px 0;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}

.welcome-copy p {
  margin-bottom: 0;
}

.welcome-symbol {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(54,215,195,.35);
  border-radius: 24px;
  color: var(--teal);
  background: rgba(54,215,195,.07);
  font-size: 45px;
  font-weight: 800;
  transform: rotate(8deg);
}

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

.metric-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}

.metric-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 10px;
  color: var(--teal);
  background: #15312f;
  font-size: 16px;
}

.metric-card > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.metric-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 27px;
}

.metric-card small {
  color: var(--muted);
  font-size: 10px;
}

.module-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.module-panel h3 {
  margin: 9px 0;
  font-size: 20px;
}

.module-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.module-badge {
  padding: 7px 10px;
  border: 1px solid #28514d;
  border-radius: 8px;
  color: var(--teal);
  background: #15312f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 35px;
  padding: 18px 2px;
  color: #53666a;
  font-size: 10px;
  letter-spacing: 1px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .main {
    padding: 26px;
  }

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

  .auth-wrapper {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  }

  .auth-visual {
    padding: 28px;
  }

  .auth-card {
    padding: 30px 25px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    left: -270px;
    width: 250px;
    height: 100dvh;
    transition: left .25s ease;
    box-shadow: 15px 0 45px rgba(0,0,0,.3);
  }

  .sidebar.open {
    left: 0;
  }

  .main {
    padding: 20px 16px;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 22px;
  }

  .mobile-menu {
    display: block;
  }

  .page-heading {
    flex: 1;
  }

  .page-heading h1 {
    font-size: 23px;
  }

  .page-heading .eyebrow {
    font-size: 8px;
  }

  .account-area {
    gap: 8px;
    font-size: 10px;
  }

  .account-area #user-label {
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .button-quiet {
    padding: 7px 9px;
    font-size: 10px;
  }

  .auth-wrapper {
    display: block;
    min-height: 0;
  }

  .auth-visual {
    min-height: 260px;
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .visual-top {
    gap: 12px;
  }

  .brand-mark.large {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .visual-content h2 {
    margin: 10px 0;
    font-size: 30px;
  }

  .visual-content p:not(.eyebrow) {
    font-size: 12px;
  }

  .visual-bottom {
    margin-top: 20px;
    font-size: 8px;
  }

  .auth-card {
    padding: 26px 21px;
  }

  .auth-header h2 {
    font-size: 25px;
  }

  .welcome-panel {
    padding: 22px;
  }

  .welcome-symbol {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    font-size: 28px;
  }

  .welcome-copy h2 {
    font-size: 22px;
  }

  .metric-grid {
    gap: 10px;
    margin: 14px 0;
  }

  .metric-card {
    padding: 15px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .metric-icon {
    margin-bottom: 12px;
  }

  .module-panel {
    padding: 19px;
  }

  .footer {
    font-size: 8px;
  }
}

@media (max-width: 380px) {
  .main {
    padding: 16px 12px;
  }

  .metric-card {
    padding: 12px;
  }

  .metric-card > span {
    font-size: 8px;
  }

  .account-area #user-label {
    max-width: 85px;
  }
}
