/* Core theme derived from the original Tailwind setup */
:root {
  --background: #f8ffff;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --card-foreground: #1a1a1a;
  --primary: #a63005;
  --primary-foreground: #f8ffff;
  --secondary: #f2b33d;
  --secondary-foreground: #1a1a1a;
  --muted: #f0f0f0;
  --muted-foreground: #666666;
  --accent: #f2ce1b;
  --accent-foreground: #1a1a1a;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #8d2904;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border-color: transparent;
}

.btn-ghost:hover {
  background: #F2CE1b;
  border-color: #F2CE1b;
  color: var(--foreground);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover {
  background: #F2CE1b;
  border-color: #F2CE1b;
  color: var(--foreground);
}

.btn-block {
  width: 100%;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Hero */
.hero {
  padding: 80px 0 40px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(242, 206, 27, 0.15);
  color: var(--accent-foreground);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 54px);
  margin: 18px 0 12px;
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 24px;
  font-size: 18px;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 50px;
}

/* Cards */
.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 100px auto 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

/* Book-open card-icon background */
.card-icon:has(img[src="icon/book-open.png"]) {
  background: #fdf1d8 !important;
}

.card-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Book-open icon - #f2b23c */
.card-icon img[src="icon/book-open.png"] {
  filter: brightness(0) saturate(100%) invert(61%) sepia(96%) saturate(354%) hue-rotate(353deg) brightness(105%) contrast(90%);
}

/* Users icon - #1a1a1a */
.card-icon img[src="icon/users.png"] {
  filter: brightness(0) saturate(100%);
}

/* Arrow-trending-up icon - #a63005 */
.card-icon img[src="icon/arrow-trending-up.png"] {
  filter: brightness(0) saturate(100%) invert(27%) sepia(95%) saturate(1352%) hue-rotate(347deg) brightness(92%) contrast(89%);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted-foreground);
  line-height: 1.5;
  font-size: 14px;
}

/* Two-column auth layout */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.auth-panel {
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel.branding {
  background: var(--primary);
  color: var(--primary-foreground);
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.auth-panel.branding.secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.auth-panel .brand h1 {
  color: inherit;
}

.auth-panel p {
  color: inherit;
}

.auth-copy {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.avatar-stack {
  display: flex;
  margin-left: -8px;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary);
  border: 2px solid rgba(166, 48, 5, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #000000;
  margin-left: -8px;
  flex-shrink: 0;
}

.avatar-stack .avatar:nth-child(1) {
  background: #f2b33d;
}

.avatar-stack .avatar:nth-child(2) {
  background: #f2ce1b;
}

.avatar-stack .avatar:nth-child(3) {
  background: #e6a832;
}

.avatar-stack .avatar:nth-child(4) {
  background: #ffc947;
}

.avatar-stack .avatar:not(:first-child) {
  margin-left: -8px;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.step h4 {
  margin: 0 0 4px;
}

.step p {
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
}

.card-auth {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.card-auth h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.card-auth .muted {
  margin: 0 0 16px;
  color: var(--muted-foreground);
}

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

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--card-foreground);
  font-size: 14px;
}

.input-wrap {
  position: relative;
}

.input {
  width: 100%;
  padding: 12px 12px 12px 38px;
  border-radius: 10px;
  border: 1px solid var(--input);
  background: var(--background);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(166, 48, 5, 0.15);
}

.input-icon {
  position: absolute;
  inset: 0 auto 0 12px;
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  font-size: 16px;
  pointer-events: none;
}

.input-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.6;
}

.toggle-visibility {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 24px;
  height: 24px;
}

.toggle-visibility img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.toggle-visibility:hover img {
  opacity: 1;
}

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

.form-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(166, 48, 5, 0.08);
  color: #7a1f03;
  border: 1px solid rgba(166, 48, 5, 0.25);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 6px;
  color: var(--muted-foreground);
  font-size: 14px;
}

.checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 2px;
  display: grid;
  place-items: center;
}

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

.small-text {
  color: var(--muted-foreground);
  font-size: 13px;
}

@media (min-width: 900px) {
  .auth {
    grid-template-columns: 1fr 1fr;
  }

  .auth-panel {
    padding: 64px 48px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 0 20px;
  }

  .header-actions {
    display: none;
  }

  .card-auth h2 {
    font-size: 24px;
  }
}

