@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply antialiased;
  }
}

@layer components {
  .tw-panel {
    @apply rounded-[32px] shadow-soft;
  }

  .tw-action {
    @apply inline-flex items-center justify-center gap-2 rounded-2xl px-5 py-3.5 font-semibold transition;
  }
}

* {
  box-sizing: border-box;
}

:root {
  --wine-900: #4a1020;
  --wine-700: #6a1b2f;
  --wine-500: #8c2840;
  --wine-300: #b03a4b;
  --surface: #fffdfb;
  --surface-alt: #fff7f8;
  --line: #ead8dc;
  --text: #2a1b21;
  --muted: #6f5a62;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f6eef0 0%, #f7f2ef 100%);
  color: var(--text);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(320px, 1.06fr) minmax(320px, 0.94fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  background: rgba(255, 253, 251, 0.72);
  box-shadow: 0 20px 80px rgba(58, 18, 30, 0.12);
  backdrop-filter: blur(12px);
}

.auth-top-grid {
  grid-template-columns: minmax(320px, 560px);
  justify-content: start;
}

.section-shell {
  margin-bottom: 26px;
}

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

.section-kicker {
  margin: 0 0 4px;
  color: var(--wine-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

h1,
h2,
h3,
h4 {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
}

h1 {
  margin: 4px 0 0;
  color: var(--wine-900);
}

h2 {
  margin-top: 0;
}

h3,
h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--wine-700), var(--wine-500));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Merriweather", Georgia, serif;
  font-weight: 700;
}

.brand-top {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(58, 18, 30, 0.06);
}

.login-hero {
  position: relative;
  padding: 42px 38px;
  color: #fff;
  background: linear-gradient(160deg, var(--wine-700) 0%, var(--wine-500) 58%, var(--wine-900) 100%);
}

.login-hero-rings::before,
.login-hero-rings::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-hero-rings::before {
  top: 20px;
  right: 36px;
  width: 168px;
  height: 168px;
}

.login-hero-rings::after {
  bottom: -28px;
  left: -30px;
  width: 220px;
  height: 220px;
}

.login-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
}

.hero-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.hero-brand-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-family: "Merriweather", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}

.hero-brand-top {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.hero-brand-chip h2 {
  margin: 6px 0 0;
  color: #fff;
}

.hero-copy h3 {
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.06;
}

.hero-copy p:last-child {
  max-width: 32rem;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.75;
}

.hero-pill {
  display: inline-flex;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 600;
}

.hero-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hero-feature-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-feature-card strong {
  font-size: 16px;
}

.hero-feature-card span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.55;
}

#loginCard {
  position: relative;
  margin: 0;
  padding: 42px 38px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: none;
}

#loginCard::before {
  display: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--wine-500);
  font-size: 14px;
  font-weight: 700;
}

.plain-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  box-shadow: none;
}

.plain-link-button:hover {
  background: transparent;
  color: var(--wine-900);
  border-color: transparent;
}

.login-intro {
  max-width: 30ch;
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.login-note {
  margin: 28px 0 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(140, 40, 64, 0.07);
  border: 1px solid rgba(140, 40, 64, 0.14);
  color: var(--wine-900);
  font-size: 14px;
  line-height: 1.65;
}

.details-card summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--wine-900);
}

.details-content {
  margin-top: 14px;
}

.grid {
  display: grid;
  gap: 12px;
}

.two-cols {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #504560;
  font-weight: 600;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: #504560;
  font-size: 14px;
  font-weight: 600;
}

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wine-500);
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}

.text-action:hover {
  background: transparent;
  border-color: transparent;
  color: var(--wine-900);
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--muted);
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 4px;
  padding: 0;
}

.ssl-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(106, 27, 47, 0.08);
  color: #7a6772;
  font-size: 13px;
  font-weight: 600;
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 18px;
  background: #1a1833;
  border-color: #1a1833;
  box-shadow: 0 14px 30px rgba(26, 24, 51, 0.18);
}

.login-submit:hover {
  background: #2b244d;
  border-color: #2b244d;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 26px 0 18px;
  color: #8b7f99;
  font-size: 14px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(74, 16, 32, 0.14);
}

.login-alt-actions {
  display: grid;
  gap: 14px;
}

.secondary-action {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.85);
  color: #4d435f;
  border: 1px solid rgba(74, 16, 32, 0.14);
  box-shadow: none;
}

.secondary-action:hover {
  background: rgba(140, 40, 64, 0.05);
  border-color: rgba(74, 16, 32, 0.24);
  color: var(--wine-900);
}

.strong-auth-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.strong-auth-option {
  width: 100%;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fffafa 0%, var(--surface-alt) 100%);
  color: var(--text);
  border: 1px solid rgba(176, 58, 75, 0.16);
  box-shadow: none;
}

.strong-auth-option:hover {
  background: rgba(176, 58, 75, 0.06);
  border-color: rgba(176, 58, 75, 0.3);
  color: var(--wine-900);
}

.strong-auth-option span:first-child {
  display: grid;
  gap: 4px;
  text-align: left;
}

.strong-auth-option strong {
  font-size: 15px;
}

.strong-auth-option small {
  color: var(--muted);
  font-size: 12px;
}

#strongAuthCard {
  max-width: 560px;
}

input,
select,
textarea,
button {
  font: inherit;
  padding: 13px 15px;
  border-radius: 18px;
  border: 1px solid var(--line);
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 3px rgba(58, 18, 30, 0.06);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(140, 40, 64, 0.12);
  border-color: rgba(140, 40, 64, 0.48);
}

button {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--wine-700);
  color: #fff;
  border-color: var(--wine-700);
  font-weight: 700;
}

button:hover {
  background: var(--wine-900);
  border-color: var(--wine-900);
}

.user-info {
  margin: 0 0 12px;
}

.user-info div {
  display: grid;
  grid-template-columns: 110px 1fr;
  margin-bottom: 4px;
}

.user-info dt {
  font-weight: 600;
}

.user-info dd {
  margin: 0;
}

.list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: var(--surface-alt);
}

.status {
  margin: 8px 0 0;
}

.status.error {
  color: #8c1d34;
}

.hidden {
  display: none;
}

.muted {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 13px;
}

.output {
  background: #2a1b21;
  color: #f9fafb;
  padding: 12px;
  border-radius: 6px;
  overflow: auto;
}

@media (max-width: 640px) {
  .container {
    padding: 18px 12px 28px;
  }

  .login-stage {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .login-hero,
  #loginCard {
    padding: 24px 20px 22px;
  }

  .login-hero {
    border-radius: 24px 24px 0 0;
  }

  .hero-feature-grid {
    grid-template-columns: 1fr;
  }

  .field-head,
  .login-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    align-items: flex-start;
  }

  .list li {
    flex-direction: column;
    align-items: flex-start;
  }
}
