:root {
  --bg: #f3f8f7;
  --surface: rgba(255, 255, 255, 0.78);
  --ink: #10241f;
  --muted: #4c6660;
  --accent: #007b72;
  --accent-strong: #00564f;
  --accent-soft: #b8f2e3;
  --border: rgba(16, 36, 31, 0.12);
  --shadow: 0 20px 60px rgba(21, 56, 48, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: linear-gradient(170deg, #ebf8f6 0%, #f8fbfa 40%, #eef5ff 100%);
  color: var(--ink);
  min-height: 100vh;
}

.dashboard-body,
.login-body {
  position: relative;
  overflow-x: hidden;
}

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

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(10px);
  z-index: -1;
  opacity: 0.5;
}

.bg-orb-1 {
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, #9fe6d6 0%, rgba(159, 230, 214, 0) 72%);
}

.bg-orb-2 {
  bottom: -220px;
  left: -120px;
  background: radial-gradient(circle, #c4d9ff 0%, rgba(196, 217, 255, 0) 70%);
}

.dashboard-page {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  gap: 18px;
}

.hero-card {
  background: linear-gradient(128deg, rgba(255, 255, 255, 0.94), rgba(233, 255, 249, 0.86));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 28px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: start;
}

.kicker {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero-card h1 {
  margin: 0;
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.03;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.hero-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 700px;
  font-size: 15px;
}

.hero-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 123, 114, 0.14);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 14px;
}

.card-header h2 {
  margin: 0;
  font-size: 21px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.card-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-header.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

button {
  border: 1px solid rgba(0, 123, 114, 0.35);
  background: linear-gradient(180deg, #fff, #f3fffb);
  color: var(--ink);
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 86, 79, 0.14);
}

.ghost-button {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-strong);
}

.action-btn.primary {
  background: linear-gradient(132deg, var(--accent), #00825e 60%, #00a078);
  color: white;
  border-color: transparent;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

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

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

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.01em;
}

input,
select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 11px;
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 123, 114, 0.14);
}

.status {
  margin: 14px 0 0;
  font-weight: 600;
  color: var(--accent-strong);
}

#logs {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.65;
  background: #0f1f1c;
  color: #b8f6e7;
  padding: 12px;
  border-radius: 14px;
}

#files {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

#files a {
  color: var(--accent-strong);
  font-weight: 600;
}

.reveal {
  animation: fadeUp 0.5s ease both;
}

.reveal-delay-1 {
  animation-delay: 0.07s;
}

.reveal-delay-2 {
  animation-delay: 0.14s;
}

.reveal-delay-3 {
  animation-delay: 0.2s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-shell {
  width: min(1200px, 100%);
  min-height: 82vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(22, 28, 45, 0.12);
}

.auth-brand-pane {
  position: relative;
  display: none;
  background: #103872;
}

.brand-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(7, 37, 90, 0.86), rgba(8, 121, 126, 0.66));
}

.brand-content {
  position: relative;
  z-index: 1;
  color: #e7f1ff;
  height: 100%;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #0a4a8b;
  font-weight: 800;
  width: fit-content;
  text-decoration: none;
}

.brand-copy h2 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 34px;
  line-height: 1.12;
  color: #ffffff;
}

.brand-copy p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.66;
  max-width: 440px;
}

.brand-footnote {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  margin: 0;
}

.auth-form-pane {
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 26px;
}

.auth-pane-inner {
  width: min(430px, 100%);
  position: relative;
}

.lang-switcher {
  position: absolute;
  top: -6px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f6b80;
}

.lang-switcher .material-symbols-outlined {
  font-size: 18px;
}

.lang-switcher select {
  border: 1px solid #d4dae8;
  background: #ffffff;
  font: inherit;
  color: #1e283c;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.lang-switcher select:focus {
  outline: none;
}

.auth-header h1 {
  margin: 0;
  font-size: 34px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  color: #11202d;
}

.auth-header p {
  margin: 8px 0 0;
  color: #5b6677;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
  border-bottom: 1px solid #d8dde8;
}

.auth-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 8px;
  color: #697487;
  font-weight: 700;
}

.auth-tab:hover {
  transform: none;
  box-shadow: none;
  color: #2b3f66;
}

.auth-tab.active {
  color: #1f469e;
  border-bottom-color: #1f469e;
}

.google-login {
  width: 100%;
  margin-top: 22px;
  border: 1px solid #d8dde8;
  background: #ffffff;
  color: #17243f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.google-icon {
  width: 18px;
  height: 18px;
}

.separator {
  margin: 18px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.separator span {
  height: 1px;
  background: #d8dde8;
  flex: 1;
}

.separator small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #758095;
  font-size: 11px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.login-form label {
  color: #29384f;
  font-size: 14px;
}

.login-form input {
  border-radius: 9px;
  border: 1px solid #d4dae8;
  background: #f6f8fc;
}

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

.toggle-password {
  width: 44px;
  min-width: 44px;
  padding: 8px;
  border: 1px solid #d4dae8;
  background: #ffffff;
}

.toggle-password .material-symbols-outlined {
  font-size: 19px;
}

.remember-forgot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #596680;
}

.remember-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.link-button {
  border: none;
  background: transparent;
  padding: 0;
  color: #1f469e;
  font-weight: 600;
  box-shadow: none;
}

.link-button:hover {
  transform: none;
  box-shadow: none;
  color: #163a86;
}

.subtle-note {
  margin: 0;
  color: #758095;
  font-size: 12px;
}

.login-submit {
  margin-top: 4px;
  background: linear-gradient(120deg, #07367f, #0f7e8a);
  color: #fff;
  border-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.password-strength {
  height: 8px;
  width: 100%;
  border-radius: 999px;
  background: #e4e9f2;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  transition: width 0.18s ease, background-color 0.18s ease;
  background: #ef4444;
}

.password-hint {
  margin: -4px 0 0;
  font-size: 12px;
  color: #697487;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: grid;
}

.login-error {
  color: #ba1a1a;
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 13px;
}

.auth-product-footnote {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  font-weight: 600;
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-submit {
  margin-top: 6px;
  background: linear-gradient(132deg, var(--accent), #00825e 60%, #00a078);
  color: #fff;
  border-color: transparent;
}

.login-error {
  color: #a52727;
  min-height: 20px;
  margin: 6px 0 0;
  font-size: 13px;
}

@media (max-width: 700px) {
  .dashboard-page {
    padding: 14px;
  }

  .hero-card {
    flex-direction: column;
    border-radius: 20px;
    padding: 20px;
  }

  .hero-card h1 {
    font-size: 28px;
  }

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

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

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-form-pane {
    padding: 20px;
  }

  .auth-header h1 {
    font-size: 28px;
  }

  .auth-tabs {
    margin-top: 18px;
  }

  .remember-forgot-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (min-width: 900px) {
  .auth-brand-pane {
    display: block;
  }
}
