:root {
  --bg-dark: #0b1120;
  --bg-panel: #111827;
  --bg-soft: #182235;
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --accent: #facc15;
  --text: #e5e7eb;
  --white: #ffffff;
  --danger: #ef4444;
  --success: #4ade80;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 12% 18%, rgba(34, 197, 94, 0.12), transparent 28rem),
    linear-gradient(135deg, #0b1120 0%, #101a2d 100%);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

button,
input {
  font: inherit;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}
.login-page.modules-active {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.login-page.modules-active .login-intro {
  justify-content: flex-start;
}

.login-page .logo-container {
  transform: translateX(20%);
}

.login-page.modules-active .logo-container {
  margin-bottom: auto;
}

.login-page.modules-active .logo-container h2 {
  margin: 0;
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: none;
  min-height: 100vh;
  padding: 2.2rem 3.2rem 2.4rem 3.2rem;
  background:
    linear-gradient(180deg, rgba(6, 38, 33, 0.2), rgba(6, 23, 30, 0.75)),
    linear-gradient(180deg, rgba(24, 196, 128, 0.15), rgba(10, 24, 28, 0.12)),
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="1600" height="900" viewBox="0 0 1600 900"%3E%3Cdefs%3E%3ClinearGradient id="g" x1="0" x2="1" y1="0" y2="1"%3E%3Cstop offset="0%" stop-color="%23042a29"/%3E%3Cstop offset="28%" stop-color="%230b5d4e"/%3E%3Cstop offset="58%" stop-color="%23122c2a"/%3E%3Cstop offset="100%" stop-color="%230a1522"/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="1600" height="900" fill="url(%23g)"/%3E%3Ccircle cx="1120" cy="200" r="220" fill="%23f2c66c" opacity="0.7"/%3E%3Cg opacity="0.8"%3E%3Cpath d="M0 710 L1600 610 L1600 900 L0 900 Z" fill="%230e5e4d"/%3E%3Cpath d="M0 760 L1600 700 L1600 900 L0 900 Z" fill="%230d473f"/%3E%3Cpath d="M0 820 L1600 760 L1600 900 L0 900 Z" fill="%23153732"/%3E%3C/g%3E%3Cg fill="none" stroke="%232a7d5d" stroke-width="5" opacity="0.8"%3E%3Cpath d="M0 860 C160 840 260 740 360 760 C470 785 560 705 650 710 C760 715 830 820 930 800 C1035 780 1100 710 1185 730 C1275 750 1365 810 1600 790"/%3E%3Cpath d="M0 820 C160 800 260 700 360 720 C470 745 560 665 650 670 C760 675 830 760 930 740 C1035 720 1100 650 1185 670 C1275 690 1365 750 1600 730"/%3E%3Cpath d="M0 780 C160 760 260 660 360 680 C470 705 560 625 650 630 C760 635 830 700 930 680 C1035 660 1100 600 1185 620 C1275 640 1365 700 1600 680"/%3E%3C/g%3E%3C/svg%3E');
  background-size: cover;
  background-position: center;
  color: white;
}

.login-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 15, 18, 0.18), rgba(4, 15, 18, 0.05));
}

.login-intro > * {
  position: relative;
  z-index: 1;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.brand-copy {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.welcome-copy {
  max-width: 620px;
  margin-bottom: 2.1rem;
}

.welcome-copy h2,
.welcome-copy h3,
.welcome-copy p {
  margin: 0;
}

.welcome-copy h2 {
  color: #f3fff8;
  font-size: clamp(2.2rem, 3.5vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.welcome-copy h3 {
  margin-top: 0.2rem;
  color: #f2fff7;
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.welcome-copy p {
  max-width: 560px;
  margin-top: 1rem;
  color: rgba(228, 244, 238, 0.9);
  font-size: 1.06rem;
  line-height: 1.55;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 0.9rem;
  max-width: 620px;
  margin-bottom: 1.8rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ebfff7;
  font-size: 0.9rem;
  line-height: 1.28;
  padding: 0.18rem 0;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(140, 255, 194, 0.38);
  color: #e7ffe9;
  font-size: 1.2rem;
}

.stat-icon svg,
.module-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.hero-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 640px;
  margin-top: auto;
}

.date-pill,
.quote-pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(239, 249, 242, 0.92);
}

.date-pill {
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(12, 29, 23, 0.22);
}

.date-pill strong,
.quote-pill {
  font-size: 0.9rem;
}

.date-pill small {
  display: block;
  color: rgba(203, 236, 220, 0.8);
  font-size: 0.72rem;
}

.date-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.quote-pill {
  max-width: 210px;
  font-style: italic;
  color: rgba(240, 247, 242, 0.9);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 2.6rem;
  color: var(--bg-dark);
  background: linear-gradient(135deg, #64f5a2, #22c55e 54%, #0b9d60);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: skew(-8deg);
  box-shadow: 0 18px 32px rgba(32, 197, 112, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 580px;
  margin-bottom: 1.35rem;
  color: var(--white);
  font-size: clamp(2.6rem, 5vw, 4.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.intro-copy {
  max-width: 430px;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.intro-line {
  width: 92px;
  height: 3px;
  background: var(--accent);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 5rem);
  background: rgba(7, 17, 26, 0.96);
  border-left: 1px solid rgba(148, 163, 184, 0.08);
}

.login-panel[hidden],
.modules-panel[hidden] {
  display: none;
}

.modules-panel {
  width: min(100%, 100%);
  justify-self: stretch;
  min-height: 100vh;
  padding: clamp(1.25rem, 2vw, 2.5rem) clamp(1.8rem, 3vw, 3.5rem) clamp(2rem, 4vw, 3rem);
  background: rgba(7, 17, 26, 0.96);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.modules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin: 0 0 1.7rem;
  padding: 0.15rem 0 0.95rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.modules-title-wrap {
  min-width: 0;
}

.modules-title-wrap h2 {
  margin-bottom: 0.35rem;
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}

.modules-title-wrap p {
  margin: 0;
  color: rgba(226, 233, 240, 0.8);
  font-size: 1.05rem;
}

.modules-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.toolbar-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(158, 167, 176, 0.08);
  color: #f1f8ff;
  cursor: pointer;
}

.toolbar-badge {
  position: absolute;
  top: -6px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #34d399;
  color: #061217;
  font-size: 0.68rem;
  font-weight: 800;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(18, 34, 45, 0.8);
  color: #f5faff;
  font-weight: 600;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(226, 255, 190, 0.75);
  border-radius: 50%;
  color: #173b2b;
  background: radial-gradient(circle at 32% 24%, #d9f59a, #9bc74e 68%, #6d9d35);
  font-size: 0.88rem;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(45, 83, 27, 0.2), 0 3px 8px rgba(0, 0, 0, 0.24);
}
.user-avatar i { filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.35)); }
.modules-header .logout-button {
  flex-shrink: 0;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.modules-header p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.modules-header strong {
  color: var(--text);
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.logout-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.modules-header .logout-button i { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #ffd2ca; background: linear-gradient(145deg, #9b5147, #69372f); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.14), 0 2px 5px rgba(0,0,0,.18); }

.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 0;
}

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
    min-width: 0;
  min-height: 200px;
  padding: 0.15rem 1.1rem 0.2rem;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(18, 40, 56, 0.9), rgba(16, 26, 46, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.module-card[hidden] {
  display: none;
}

.module-card:hover {
  background: #1f2d40;
  border-color: var(--card-accent, rgba(34, 197, 94, 0.8));
  transform: translateY(-3px);
  box-shadow: 0 16px 32px var(--card-shadow, rgba(34, 197, 94, 0.12));
}

.module-number {
  display: none;
  color: rgba(74, 222, 128, 0.8);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.module-card.tone-green .module-number,
.module-card.tone-green .module-action { color: rgba(120, 250, 169, 0.95); }
.module-card.tone-teal .module-number,
.module-card.tone-teal .module-action { color: rgba(110, 227, 255, 0.95); }
.module-card.tone-blue .module-number,
.module-card.tone-blue .module-action { color: rgba(151, 170, 255, 0.95); }
.module-card.tone-purple .module-number,
.module-card.tone-purple .module-action { color: rgba(203, 168, 255, 0.95); }
.module-card.tone-gold .module-number,
.module-card.tone-gold .module-action { color: rgba(255, 214, 102, 0.95); }

.module-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0.35rem 0 0.7rem;
  color: var(--white);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(10, 196, 173, 0.8));
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 26px rgba(34, 197, 94, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card.tone-green .module-icon { background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(12, 164, 109, 0.85)); }
.module-card.tone-teal .module-icon { background: linear-gradient(135deg, rgba(54, 142, 255, 0.9), rgba(80, 126, 255, 0.82)); }
.module-card.tone-blue .module-icon { background: linear-gradient(135deg, rgba(90, 88, 255, 0.88), rgba(119, 76, 255, 0.8)); }
.module-card.tone-purple .module-icon { background: linear-gradient(135deg, rgba(196, 120, 255, 0.9), rgba(148, 92, 255, 0.82)); }
.module-card.tone-gold .module-icon { background: linear-gradient(135deg, rgba(255, 172, 43, 0.92), rgba(237, 148, 0, 0.84)); }

.module-card.tone-green .module-action { border-color: rgba(82, 240, 139, 0.8); background: rgba(34, 197, 94, 0.08); }
.module-card.tone-teal .module-action { border-color: rgba(96, 210, 255, 0.8); background: rgba(77, 152, 255, 0.09); }
.module-card.tone-blue .module-action { border-color: rgba(151, 170, 255, 0.8); background: rgba(98, 102, 255, 0.1); }
.module-card.tone-purple .module-action { border-color: rgba(204, 149, 255, 0.8); background: rgba(157, 100, 255, 0.09); }
.module-card.tone-purple .module-action { border-color: rgba(255, 173, 0, 0.8); background: rgba(255, 157, 0, 0.08); }
.module-card.tone-gold .module-action { border-color: rgba(156, 200, 240, 0.65); background: rgba(122, 166, 204, 0.08); }



.module-logo {
	display: block;
	flex: 0 0 auto;
	width: auto;
	height: 260px;
	max-width: 260px;
	object-fit: contain;
}

.module-icon i {
  font-size: 1.65rem;
  line-height: 1;
}

.module-icon.color-emoji {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  font-size: 1.85rem;
  line-height: 1;
}

.module-card strong {
  color: var(--white);
  font-size: 1.07rem;
  line-height: 1.35;
  font-weight: 700;
}

.module-card > span:not(.module-number):not(.module-icon):not(.module-arrow):not(.module-action) {
  max-width: 260px;
  font-size: 0.60rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.8);
}

.module-action {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: fit-content;
  min-width: 116px;
  margin-top: auto;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(34, 197, 94, 0.7);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #e7fff1;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.module-arrow {
  display: none;
}

.panel-heading h2 {
  margin-bottom: 0.65rem;
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.panel-heading > p:last-child {
  margin-bottom: 2.25rem;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 1.25rem;
  width: min(100%, 460px);
  margin: 0 auto;
}

.panel-heading,
.support-note {
  width: min(100%, 460px);
  margin-left: auto;
  margin-right: auto;
}

.field-group {
  display: grid;
  gap: 0.55rem;
}

.field-group label,
.remember-option {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 0.9rem 1rem 0.9rem 2.85rem;
  color: var(--white);
  background: rgba(19, 32, 47, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.input-control {
  position: relative;
}

.input-control > i {
  position: absolute;
  top: 50%;
  left: 1rem;
  color: #8295a8;
  font-size: 0.9rem;
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 160ms ease;
}

.input-control:focus-within > i {
  color: #6ee7a4;
}

input::placeholder {
  color: #64748b;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(74, 222, 128, 0.8);
  background: #13283a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
}

input[type="text"]:focus-visible,
input[type="password"]:focus-visible { outline: 0; }

.forgot-link,
.support-note a {
  color: var(--primary);
  text-decoration: none;
}

.forgot-link:hover,
.support-note a:hover {
  color: var(--accent);
}

.remember-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 400;
}

.remember-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.login-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  margin-top: 0.5rem;
  min-height: 54px;
  padding: 0.95rem 1.1rem;
  color: #052e16;
  background: linear-gradient(135deg, #28d36d, #16a34a);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-button:hover {
  background: linear-gradient(135deg, #39df7b, #159447);
  box-shadow: 0 15px 28px rgba(22, 163, 74, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.login-button:focus-visible { outline: 3px solid rgba(110, 231, 164, 0.55); outline-offset: 3px; }
.login-button:disabled { cursor: wait; opacity: 0.7; transform: none; }

.form-message {
  min-height: 1.25rem;
  margin: 0;
  color: var(--success);
  font-size: 0.84rem;
}

.form-message.is-error {
  color: var(--danger);
}

.support-note {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 760px) {
  .login-page {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    padding: 0;
  }

  .login-page.modules-active {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }

  .login-page .logo-container {
    transform: translateX(32px);
  }

  .login-intro {
    max-width: none;
    min-height: 62vh;
    padding: 2rem 1.5rem;
  }

  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .hero-footer {
    flex-wrap: wrap;
  }

  .login-panel {
    min-height: auto;
    padding: 2.75rem 1.5rem;
  }

  .brand-mark {
    margin-bottom: 1.75rem;
  }

  h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  .intro-copy,
  .intro-line {
    margin-bottom: 0;
  }

  .modules-panel {
    padding: 2rem 1.35rem;
  }

  .modules-header,
  .modules-grid {
    grid-template-columns: 1fr;
  }

  .modules-header {
    display: grid;
    gap: 1.25rem;
  }

  .modules-grid {
    display: grid;
    margin-top: 2rem;
  }

  .module-card {
    aspect-ratio: auto;
    min-height: 205px;
  }
}

@media (max-width: 1200px) and (min-width: 761px) {
  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
