:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #111827;
  --primary-2: #374151;
  --accent: #c9823a;
  --success: #0f766e;
  --danger: #b91c1c;
  --warning: #b45309;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(201, 130, 58, 0.18), transparent 28%),
    radial-gradient(circle at 90% 14%, rgba(17, 24, 39, 0.10), transparent 22%),
    linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
}

.auth-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
  padding: 42px 0;
}

.brand-panel {
  min-height: 660px;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.92)),
    linear-gradient(45deg, rgba(201, 130, 58, 0.3), transparent);
  color: #fff;
  padding: 44px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(201, 130, 58, 0.22);
}

.brand-panel::before {
  width: 260px;
  height: 260px;
  right: -70px;
  top: -70px;
}

.brand-panel::after {
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: 110px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.logo-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #a56125);
  font-weight: 900;
  letter-spacing: -0.05em;
  box-shadow: 0 16px 40px rgba(201, 130, 58, 0.28);
}

.logo-text strong {
  display: block;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.logo-text span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.hero-content {
  position: relative;
  z-index: 1;
  margin-top: 88px;
  max-width: 560px;
}

.hero-content h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 0.98;
  margin: 0 0 22px;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.7;
}

.module-grid {
  position: relative;
  z-index: 1;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.module-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.auth-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px;
  backdrop-filter: blur(18px);
}

.auth-card .mobile-logo {
  display: none;
  margin-bottom: 22px;
}

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

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #7c4a1c;
  background: rgba(201, 130, 58, 0.12);
  border: 1px solid rgba(201, 130, 58, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.auth-header h2 {
  margin: 18px 0 10px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #1f2937;
}

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

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.input-wrap input:focus {
  border-color: rgba(201, 130, 58, 0.95);
  box-shadow: 0 0 0 4px rgba(201, 130, 58, 0.14);
}

.input-wrap input::placeholder {
  color: #9ca3af;
}

.btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
  background: var(--primary-2);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--surface-2);
}

.alert {
  display: none;
  margin: 0 0 18px;
  padding: 13px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.alert.show {
  display: block;
}

.alert.success {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.alert.error {
  color: #991b1b;
  background: rgba(185, 28, 28, 0.1);
  border: 1px solid rgba(185, 28, 28, 0.18);
}

.alert.warning {
  color: #92400e;
  background: rgba(180, 83, 9, 0.1);
  border: 1px solid rgba(180, 83, 9, 0.18);
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.small-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #f6f7fb;
}

.sidebar {
  background: #111827;
  color: #fff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar .logo-row {
  align-items: flex-start;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.74);
  border-radius: 14px;
  font-weight: 800;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.main {
  padding: 34px;
}

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

.topbar h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.topbar p {
  margin: 7px 0 0;
  color: var(--muted);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(201, 130, 58, 0.14);
  color: #7c4a1c;
  font-weight: 900;
}

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

.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.dash-card .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(17, 24, 39, 0.06);
  margin-bottom: 18px;
  font-size: 20px;
}

.dash-card h3 {
  margin: 0 0 8px;
}

.dash-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 940px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px 0;
  }

  .brand-panel {
    display: none;
  }

  .auth-card .mobile-logo {
    display: flex;
  }

  .auth-card {
    padding: 28px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    width: min(100% - 20px, 1120px);
  }

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

  .auth-header h2,
  .topbar h1 {
    font-size: 26px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

.action-stack {
  display: grid;
  gap: 12px;
}

.auth-footer.compact {
  margin-top: 10px;
}

[hidden] {
  display: none !important;
}
