/* ==========================================================================
   Halden Auth Kit — layout.css
   Split layout (sign in / sign up), centered card layout (recovery),
   product showcase panel and the kit index page.
   Designed & built by EdinStack
   ========================================================================== */

/* Split layout ------------------------------------------------------------ */
.split {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
}
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(480px, 1fr) 1fr; }
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
}
@media (min-width: 640px) { .main { padding: 28px 40px 24px; } }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__aside { font-size: 14px; color: var(--muted); text-align: right; }

.content {
  width: 100%;
  max-width: 380px;
  margin: auto;
  padding: 48px 0;
}
.content__head { margin-bottom: 24px; }
.content__after { margin-top: 24px; }

.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--muted);
}
.bottom nav { display: flex; gap: 16px; }
.bottom a { color: var(--muted); text-decoration: none; }
.bottom a:hover { color: var(--text); }

/* Product showcase -------------------------------------------------------- */
.showcase { display: none; }
@media (min-width: 1024px) {
  .showcase {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    padding: 48px;
    background: var(--panel);
    border-left: 1px solid var(--border);
    overflow: hidden;
  }
}

.stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.showcase__caption {
  max-width: 340px;
  margin: 64px auto 0;
  text-align: center;
  font-size: 15px;
  color: var(--text-2);
  text-wrap: balance;
}
.stage--tasks + .showcase__caption { margin-top: 136px; }

/* invoice mock */
.invoice {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  transform: rotate(-1.5deg);
}
.invoice__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.invoice__from { font-size: 15px; font-weight: 600; }
.invoice__from small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }

.badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge--paid { background: var(--success-soft); color: var(--success); }

.invoice__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.invoice__meta small { display: block; font-size: 12px; color: var(--muted); }
.invoice__meta strong { font-weight: 500; }

.invoice__lines { width: 100%; border-collapse: collapse; }
.invoice__lines th { padding-bottom: 6px; text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); }
.invoice__lines td { padding: 7px 0; border-top: 1px dashed var(--border); color: var(--text-2); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

.invoice__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1.5px solid var(--text);
}
.invoice__total strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* payment notification mock */
.ping {
  position: absolute;
  right: -20px;
  bottom: -40px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 290px;
  padding: 12px 16px 12px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  line-height: 1.35;
  transform: rotate(1.2deg);
}
.ping__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #4cc08f;
  color: #06261b;
}
.ping strong { font-weight: 600; }
.ping small { display: block; opacity: 0.65; font-size: 12px; }

/* onboarding checklist mock */
.tasks {
  padding: 22px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transform: rotate(1deg);
}
.tasks__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.tasks__head strong { font-weight: 600; }
.tasks__head span { font-size: 13px; color: var(--muted); }
.tasks__bar { height: 6px; margin: 12px 0 8px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; }
.tasks__bar span { display: block; width: 33%; height: 100%; border-radius: 3px; background: var(--brand); }
.tasks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.tasks li:last-child { border-bottom: 0; padding-bottom: 0; }
.tasks li small { display: block; font-size: 12.5px; color: var(--muted); }
.tasks__tick {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
}
.tasks li.is-done { color: var(--muted); }
.tasks li.is-done span:last-child { text-decoration: line-through; }
.tasks li.is-done .tasks__tick {
  border-color: var(--brand);
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6L13 6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.mini-invoice {
  position: absolute;
  left: -28px;
  bottom: -104px;
  width: 210px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  font-size: 12.5px;
  transform: rotate(-2deg);
}
.mini-invoice small { color: var(--muted); }
.mini-invoice strong { display: block; margin-top: 2px; font-size: 17px; font-variant-numeric: tabular-nums; }
.mini-invoice .badge { display: inline-block; margin-top: 8px; background: var(--brand-soft); color: var(--brand); }

/* Centered card layout (recovery screens) --------------------------------- */
.solo {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
  background: var(--bg-soft);
}
@media (min-width: 640px) { .solo { padding: 28px 40px 24px; } }

.card {
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 28px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
@media (min-width: 640px) { .card { padding: 36px 36px 32px; } }

.solo .bottom { justify-content: center; margin-top: 32px; }

/* Kit index --------------------------------------------------------------- */
.kit {
  max-width: 880px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) { .kit { padding: 32px 40px; } }

.kit__intro { padding: 64px 0 36px; max-width: 600px; }
.kit__intro h1 { font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; }
.kit__intro p { margin-top: 12px; color: var(--muted); font-size: 16px; }

.kit__list { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.kit__list li + li { border-top: 1px solid var(--border); }
.kit__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  text-decoration: none;
  transition: background 0.12s;
}
.kit__list a:hover { background: var(--bg-soft); }
.kit__list strong { display: block; font-weight: 600; }
.kit__list span { display: block; font-size: 14px; color: var(--muted); }
.kit__list code { flex: none; display: none; font-size: 12.5px; color: var(--muted); }
@media (min-width: 640px) { .kit__list code { display: block; } }

.kit__flows { display: grid; gap: 20px; padding: 36px 0 56px; }
@media (min-width: 640px) { .kit__flows { grid-template-columns: 1fr 1fr; } }
.kit__flows h2 { margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.kit__flows p { font-size: 14px; color: var(--muted); }
.kit__flows a { color: var(--brand); text-decoration: none; }
.kit__flows a:hover { text-decoration: underline; }

.kit .bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
