:root {
  --bg-1: #061d12;
  --bg-2: #0d3927;
  --bg-3: #114d35;
  --primary: #2dd36f;
  --primary-2: #9ae6b4;
  --primary-3: #d9f99d;
  --card: rgba(8, 23, 18, 0.7);
  --card-soft: rgba(14, 38, 29, 0.72);
  --text: #edfef0;
  --muted: #cfeee0;
  --border: rgba(154, 230, 180, 0.26);
  --shadow: 0 25px 55px rgba(4, 18, 13, 0.42);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(154, 230, 180, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(217, 249, 157, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(6, 29, 18, 0.9), rgba(17, 77, 53, 0.82)),
    url("assets/background.png") center/cover no-repeat fixed;
  color: var(--text);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: rgba(154, 230, 180, 0.12);
  border: 1px solid rgba(154, 230, 180, 0.25);
  color: var(--primary-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-badge ion-icon {
  font-size: 1rem;
}

.brand-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.brand-logo img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(154, 230, 180, 0.5));
}

.login-box {
  width: min(92vw, 430px);
  background: linear-gradient(180deg, rgba(8, 23, 18, 0.76), rgba(9, 31, 25, 0.72));
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 2.2rem 2rem 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-form h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #f3fff6;
}

.login-form > h2:nth-of-type(2) {
  margin-top: 0.2rem;
  font-size: 2.1rem;
  letter-spacing: -0.04em;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  font-style: italic;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 0.3rem;
  color: #e7f9ee;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-shadow: 0 8px 25px rgba(154, 230, 180, 0.12);
}

.input-box {
  position: relative;
  width: 100%;
  height: 52px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.25s ease;
}

.input-box:focus-within {
  border-color: rgba(154, 230, 180, 0.75);
}

.input-box input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  padding: 0 2.8rem 0 2.8rem;
}

.input-box[hidden],
[hidden] {
  display: none !important;
}

.auth-message {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(154, 230, 180, 0.28);
  border-radius: 12px;
  color: var(--text);
  background: rgba(154, 230, 180, 0.1);
  line-height: 1.5;
}

.auth-message[data-state="error"] {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.24);
}

.auth-message[data-state="success"] {
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.remembered-accounts {
  display: grid;
  min-width: 0;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.remembered-account-row {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 0.6rem;
}

.remembered-account-row select {
  width: 0;
  min-width: 0;
  flex: 1;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: #0d3927;
}

.remembered-account-row option {
  color: var(--text);
  background: #0d3927;
}

.text-button {
  width: auto;
  min-width: 76px;
  height: auto;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(154, 230, 180, 0.22);
  border-radius: 10px;
  color: var(--primary-2);
  background: transparent;
  box-shadow: none;
  font-size: 0.85rem;
}

.theme-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  width: auto;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(154, 230, 180, 0.48);
  border-radius: 999px;
  color: #effff3;
  background: rgba(22, 115, 68, 0.9);
  box-shadow: 0 10px 30px rgba(5, 32, 17, 0.24);
  backdrop-filter: blur(12px);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-3px);
  background: rgba(45, 211, 111, 0.96);
  box-shadow: 0 0 0 4px rgba(45, 211, 111, 0.18), 0 14px 32px rgba(5, 32, 17, 0.3);
}

.theme-toggle:active {
  transform: translateY(0) scale(0.96);
  background: rgba(45, 211, 111, 0.76);
}

html[data-theme="light"] body {
  color: #153728;
  background:
    radial-gradient(circle at top left, rgba(45, 211, 111, 0.14), transparent 28%),
    linear-gradient(135deg, #f7fff8, #e8f7ec);
}

html[data-theme="light"] .login-box {
  color: #153728;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 250, 240, 0.96));
  border-color: rgba(29, 127, 82, 0.2);
}

html[data-theme="light"] .login-form h2,
html[data-theme="light"] .brand-title,
html[data-theme="light"] .input-box input {
  color: #153728;
}

html[data-theme="light"] .input-box label,
html[data-theme="light"] .remember-forgot,
html[data-theme="light"] .register-text {
  color: #456657;
}

html[data-theme="light"] .input-box {
  border-bottom-color: rgba(17, 77, 53, 0.25);
}

html[data-theme="light"] .divider span {
  color: #456657;
  background: #eef9f1;
}

html[data-theme="light"] .google-btn {
  color: #153728;
  background: rgba(17, 77, 53, 0.04);
  border-color: rgba(17, 77, 53, 0.18);
}

.text-button:hover {
  box-shadow: none;
}

.back-button {
  align-self: center;
}

.input-box input::placeholder {
  color: transparent;
}

.input-box label {
  position: absolute;
  top: 50%;
  left: 2.8rem;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: 0.3s ease;
}

.input-box input:focus ~ label,
.input-box input:valid ~ label {
  top: -0.2rem;
  left: 0;
  font-size: 0.8rem;
  color: var(--primary-2);
}

.icon {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.remember-forgot label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remember-forgot input {
  accent-color: var(--primary);
}

.remember-forgot a {
  color: var(--primary-2);
  text-decoration: none;
}

.remember-forgot a:hover {
  text-decoration: underline;
}

.register-text {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.register-text a {
  color: var(--primary-2);
  text-decoration: none;
  font-weight: 600;
}

.register-text a:hover {
  text-decoration: underline;
}

.divider {
  position: relative;
  text-align: center;
  margin: 0.25rem 0 0.5rem;
}

.divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.divider span {
  position: relative;
  background: rgba(15, 23, 42, 0.82);
  padding: 0 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: lowercase;
}

button {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2), var(--primary-3));
  color: #052e16;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 26px rgba(45, 211, 111, 0.35);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(154, 230, 180, 0.2);
  box-shadow: none;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(154, 230, 180, 0.06));
}

.google-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.google-icon svg {
  width: 100%;
  height: 100%;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(154, 230, 180, 0.28);
}

.dashboard-shell {
  background: linear-gradient(180deg, rgba(7, 29, 18, 0.72), rgba(7, 30, 20, 0.66));
  border: 1px solid rgba(154, 230, 180, 0.2);
  border-radius: 25px;
  box-shadow: var(--shadow);
}

.page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  background: rgba(154, 230, 180, 0.12);
  color: var(--primary-2);
  border: 1px solid rgba(154, 230, 180, 0.22);
}

.feature-card,
.stat-card,
.panel-card {
  background: linear-gradient(180deg, rgba(12, 34, 26, 0.72), rgba(7, 22, 17, 0.8));
  border: 1px solid rgba(154, 230, 180, 0.18);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(2, 12, 8, 0.18);
}

@media (max-width: 480px) {
  .login-box {
    padding: 2rem 1.25rem;
  }

  .remember-forgot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
    