:root {
  --mui-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mui-bg: #f4f5f7;
  --mui-card-bg: #ffffff;
  --mui-elev: 0 8px 24px rgba(27, 29, 34, 0.08);
  --mui-primary: #5e6ad2;
  --mui-primary-hover: #7170ff;
  --mui-primary-pressed: #4f5bc4;
  --mui-text: #1b1d22;
  --mui-muted: #8a8f98;
  --mui-input-bg: #ffffff;
  --mui-input-bd: #d0d4dc;
  --mui-input-focus: #5e6ad2;
  --mui-cover-bg: #1b1d22;
  --mui-cover-accent: #5e6ad2;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body.auth-body {
  margin: 0;
  font-family: var(--mui-font);
  background: var(--mui-bg);
  color: var(--mui-text);
  -webkit-font-smoothing: antialiased;
}

.auth-flashes {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-flash {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--mui-card-bg);
  color: var(--mui-text);
  box-shadow: var(--mui-elev);
  font-size: 0.875rem;
  border: 1px solid #e2e4e9;
}

.auth-flash-success { border-color: rgba(39, 166, 68, 0.3); background: #e8f6ec; color: #166534; }
.auth-flash-info { border-color: rgba(37, 99, 235, 0.3); background: #eff6ff; color: #1e40af; }
.auth-flash-warning { border-color: rgba(217, 119, 6, 0.3); background: #fef3c7; color: #92400e; }
.auth-flash-danger, .auth-flash-error { border-color: rgba(220, 38, 38, 0.3); background: #fee2e2; color: #991b1b; }

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .auth-wrapper { grid-template-columns: 1fr 1fr; }
}

.auth-cover {
  background: var(--mui-cover-bg);
  position: relative;
  overflow: hidden;
}

.auth-cover::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  left: -80px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 106, 210, 0.35) 0%, transparent 70%);
  filter: blur(40px);
}

.auth-cover::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -60px;
  bottom: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(113, 112, 255, 0.2) 0%, transparent 70%);
  filter: blur(40px);
}

.auth-cover-content {
  padding: 48px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mui-primary);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
}

.brand-title { font-weight: 600; letter-spacing: -0.02em; color: #f7f8f8; }
.brand-subtitle { color: #8a8f98; font-size: 0.8125rem; }

.cover-heading h1 {
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: #f7f8f8;
  max-width: 20ch;
}

.cover-heading p {
  color: #8a8f98;
  margin: 0;
  max-width: 42ch;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cover-footer { color: #62666d; font-size: 0.75rem; }

.auth-content {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--mui-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--mui-card-bg);
  border: 1px solid #e2e4e9;
  border-radius: 12px;
  box-shadow: var(--mui-elev);
  padding: 32px;
}

.auth-card-header h2 {
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--mui-text);
}

.auth-card-header .muted {
  margin: 0 0 24px;
  color: var(--mui-muted);
  font-size: 0.875rem;
}

.mui-field { margin-bottom: 16px; }

.mui-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mui-text);
  letter-spacing: 0.01em;
}

.mui-input {
  width: 100%;
  background: var(--mui-input-bg);
  color: var(--mui-text);
  border: 1px solid var(--mui-input-bd);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.mui-input::placeholder { color: var(--mui-muted); }

.mui-input:focus {
  border-color: var(--mui-input-focus);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.15);
}

.mui-input-adorned { position: relative; }
.mui-input-adorned .mui-input { padding-right: 44px; }

.mui-adornment {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--mui-muted);
  cursor: pointer;
}

.mui-adornment:hover { color: var(--mui-text); }

.mui-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--mui-primary);
  color: #fff;
  cursor: pointer;
  transition: background 150ms ease, transform 80ms ease;
}

.mui-button:hover { background: var(--mui-primary-hover); }
.mui-button:active { transform: translateY(1px); background: var(--mui-primary-pressed); }

.auth-card-footer { margin-top: 16px; display: flex; justify-content: flex-end; }
.tiny-link { color: var(--mui-muted); font-size: 0.8125rem; text-decoration: none; }
.tiny-link:hover { color: var(--mui-primary); }

/* Custom select */
.zs-select { position: relative; }

.zs-control {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--mui-input-bd);
  background: var(--mui-input-bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.zs-control:focus { outline: none; }

.zs-control[aria-expanded="true"],
.zs-control:focus-visible {
  border-color: var(--mui-input-focus);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.15);
}

.zs-caret {
  font-size: 20px;
  color: var(--mui-muted);
  transition: transform 150ms ease;
}

.zs-control[aria-expanded="true"] .zs-caret { transform: rotate(180deg); }

.zs-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--mui-card-bg);
  color: var(--mui-text);
  border-radius: 8px;
  border: 1px solid #e2e4e9;
  box-shadow: var(--mui-elev);
  display: none;
  z-index: 50;
}

.zs-select.open .zs-list { display: block; }

.zs-option {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 0.875rem;
  transition: background 120ms ease;
}

.zs-option + .zs-option { margin-top: 2px; }
.zs-option:hover { background: #f4f5f7; }
.zs-option[aria-selected="true"] { background: #eef0fb; color: var(--mui-primary); font-weight: 500; }
.zs-option.active { background: #eef0fb; }

@media (max-width: 991.98px) {
  .auth-content { padding: 24px 18px; }
  .auth-card { padding: 24px; }
}
