/* Kashivo design system */

:root {
  --kv-ink: #072826;
  --kv-teal: #0d5c63;
  --kv-teal-deep: #09484e;
  --kv-mint: #1faa8b;
  --kv-accent: #c4e635;
  --kv-accent-ink: #111111;
  --kv-fog: #eef5f3;
  --kv-paper: #f7fbfa;
  --kv-line: rgba(7, 40, 38, 0.1);
  --kv-muted: #5b736f;
  --kv-danger: #c43c2d;
  --kv-radius: 14px;
  --kv-radius-sm: 10px;
  --kv-shadow: 0 10px 30px rgba(7, 40, 38, 0.08);
  --kv-font: "Poppins", system-ui, sans-serif;
  --kv-display: "Poppins", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

.dark {
  --kv-ink: #e8f4f1;
  --kv-teal: #3dbeb8;
  --kv-teal-deep: #2a9a94;
  --kv-mint: #4fd1b3;
  --kv-accent: #c4e635;
  --kv-accent-ink: #111111;
  --kv-fog: #0c1c1b;
  --kv-paper: #102422;
  --kv-line: rgba(232, 244, 241, 0.12);
  --kv-muted: #9bb5b0;
  --kv-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--kv-font);
  color: var(--kv-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31, 170, 139, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 230, 53, 0.22), transparent 50%),
    linear-gradient(180deg, var(--kv-fog), var(--kv-paper));
  background-attachment: fixed;
  min-height: 100dvh;
  line-height: 1.5;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.dark body,
body.dark {
  background:
    radial-gradient(1000px 500px at 0% 0%, rgba(61, 190, 184, 0.12), transparent 50%),
    linear-gradient(180deg, #081716, #0f2422);
}

h1, h2, h3, .kv-brand, .font-display {
  font-family: var(--kv-display);
  letter-spacing: -0.03em;
}

a {
  color: var(--kv-teal);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(13, 92, 99, 0.35);
  border-radius: 999px;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--kv-mint);
  outline-offset: 2px;
}

/* Buttons & inputs — touch friendly */
button,
.btn,
[type="submit"],
[type="button"] {
  min-height: 44px;
  touch-action: manipulation;
}

input,
select,
textarea {
  min-height: 44px;
  font-size: 16px !important; /* prevents iOS zoom */
  border-radius: var(--kv-radius-sm) !important;
}

textarea {
  min-height: 88px;
}

/* Utility surfaces */
.kv-shell {
  min-height: 100dvh;
}

.kv-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid var(--kv-line);
  border-radius: var(--kv-radius);
  box-shadow: var(--kv-shadow);
}

.dark .kv-panel {
  background: rgba(16, 36, 34, 0.9);
}

.kv-btn-primary {
  background: var(--kv-teal) !important;
  color: #fff !important;
  border: none;
  border-radius: var(--kv-radius-sm);
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease;
}

.kv-btn-primary:hover {
  background: var(--kv-teal-deep) !important;
  transform: translateY(-1px);
}

.kv-btn-accent {
  background: var(--kv-accent) !important;
  color: var(--kv-accent-ink) !important;
  border: none;
  border-radius: var(--kv-radius-sm);
  font-weight: 700;
}

/* Auth screens */
.kv-auth {
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 1rem;
}

.kv-auth-frame {
  width: min(100%, 440px);
  margin: auto;
  animation: kvRise 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.kv-auth-frame.wide {
  width: min(100%, 720px);
}

.kv-auth-brand {
  font-family: var(--kv-display);
  font-size: clamp(2.4rem, 8vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--kv-ink);
  line-height: 1;
  margin: 0 0 0.35rem;
  animation: kvFade 0.7s ease both;
}

.kv-auth-tag {
  color: var(--kv-muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  animation: kvFade 0.7s ease 0.08s both;
}

.kv-auth-card {
  padding: 1.25rem;
  animation: kvRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@media (min-width: 640px) {
  .kv-auth-card {
    padding: 1.75rem;
  }
}

/* ── Split auth layout (login) ───────────────────────────── */
.kv-auth--split {
  align-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
}

.kv-split {
  width: min(100%, 1040px);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid var(--kv-line);
  border-radius: calc(var(--kv-radius) + 8px);
  box-shadow: 0 24px 60px rgba(7, 40, 38, 0.16);
  overflow: hidden;
  animation: kvRise 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.dark .kv-split {
  background: rgba(16, 36, 34, 0.9);
}

/* Showcase panel — hidden on small screens */
.kv-split-showcase {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.75rem;
  color: #eafffb;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(196, 230, 53, 0.28), transparent 45%),
    radial-gradient(120% 120% at 100% 100%, rgba(31, 170, 139, 0.55), transparent 55%),
    linear-gradient(155deg, var(--kv-teal-deep), var(--kv-ink));
  overflow: hidden;
}

.kv-split-showcase::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(196, 230, 53, 0.22), transparent 70%);
  filter: blur(10px);
}

.kv-showcase-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.kv-showcase-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #fff;
  padding: 5px;
  object-fit: contain;
}

.kv-showcase-brand span {
  font-family: var(--kv-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.kv-showcase-headline {
  font-family: var(--kv-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.7rem;
}

.kv-showcase-sub {
  margin: 0;
  color: rgba(234, 255, 251, 0.82);
  font-size: 1rem;
  max-width: 34ch;
}

.kv-showcase-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  position: relative;
  z-index: 1;
}

.kv-showcase-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.kv-feat-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--kv-accent);
}

.kv-feat-ico .kv-auth-svg {
  width: 20px;
  height: 20px;
}

.kv-showcase-features strong {
  display: block;
  font-weight: 650;
  font-size: 0.98rem;
}

.kv-showcase-features small {
  color: rgba(234, 255, 251, 0.72);
  font-size: 0.85rem;
}

.kv-showcase-foot {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(234, 255, 251, 0.7);
  position: relative;
  z-index: 1;
}

/* Form panel */
.kv-split-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.kv-formwrap {
  width: min(100%, 380px);
}

.kv-logo-hero--mobile {
  margin: 0 auto 1.25rem;
}

.kv-form-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.kv-form-head h2 {
  font-family: var(--kv-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: var(--kv-ink);
}

.kv-form-head p {
  margin: 0;
  color: var(--kv-muted);
  font-size: 0.92rem;
}

.kv-form {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.kv-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--kv-ink);
  margin-bottom: 0.4rem;
}

.kv-input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.kv-input-icon > .kv-auth-svg {
  position: absolute;
  left: 0.85rem;
  width: 18px;
  height: 18px;
  color: var(--kv-muted);
  pointer-events: none;
}

.kv-input-icon input {
  width: 100%;
  padding: 0.7rem 0.85rem 0.7rem 2.6rem;
  border: 1px solid var(--kv-line);
  border-radius: var(--kv-radius-sm);
  background: rgba(255, 255, 255, 0.7);
  color: var(--kv-ink);
  font-size: 0.95rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.dark .kv-input-icon input {
  background: rgba(0, 0, 0, 0.22);
}

.kv-input-icon input:focus {
  outline: none;
  border-color: var(--kv-mint);
  box-shadow: 0 0 0 3px rgba(31, 170, 139, 0.18);
  background: #fff;
}

.dark .kv-input-icon input:focus {
  background: rgba(0, 0, 0, 0.32);
}

.kv-pw-toggle {
  position: absolute;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--kv-muted);
  cursor: pointer;
  border-radius: 8px;
}

.kv-pw-toggle:hover { color: var(--kv-teal); }
.kv-pw-toggle .kv-auth-svg { width: 18px; height: 18px; }
.kv-pw-toggle.is-visible { color: var(--kv-teal); }

.kv-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.kv-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--kv-muted);
  cursor: pointer;
}

.kv-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--kv-teal);
}

.kv-link-sm {
  font-weight: 600;
  font-size: 0.85rem;
}

.kv-form-alt {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--kv-muted);
}

.kv-form-alt a { font-weight: 700; }

.kv-form-support {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--kv-muted);
}

.kv-form-support a { font-weight: 600; }

@media (min-width: 860px) {
  .kv-split {
    grid-template-columns: 1.05fr 1fr;
  }
  .kv-split-showcase {
    display: flex;
  }
  .kv-logo-hero--mobile {
    display: none;
  }
  .kv-form-head {
    text-align: left;
  }
}

/* App chrome */
.kv-app {
  display: flex;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}

#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: min(86vw, 280px);
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--kv-line);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.dark #sidebar {
  background: rgba(12, 28, 27, 0.97);
}

.sidebar-transition {
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-closed {
  transform: translateX(-105%);
}

.sidebar-open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  #sidebar {
    position: relative;
    width: 260px;
    flex-shrink: 0;
  }
  .sidebar-closed {
    transform: translateX(0);
    width: 0;
    overflow: hidden;
    border: none;
    opacity: 0;
    pointer-events: none;
  }
}

.kv-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 64px;
  padding: 0 1.1rem;
  border-bottom: 1px solid var(--kv-line);
}

.kv-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--kv-line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}

.kv-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.kv-logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kv-logo-hero {
  width: clamp(64px, 18vw, 88px);
  height: clamp(64px, 18vw, 88px);
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--kv-line);
  padding: 10px;
  margin: 0 auto 1rem;
  box-shadow: var(--kv-shadow);
}

.kv-logo-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.kv-sidebar-brand span {
  font-family: var(--kv-display);
  font-weight: 750;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.kv-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kv-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: var(--kv-radius-sm);
  color: var(--kv-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.kv-nav .nav-item:hover,
.kv-nav .nav-item.active {
  background: rgba(13, 92, 99, 0.1);
  color: var(--kv-teal-deep);
}

.dark .kv-nav .nav-item:hover,
.dark .kv-nav .nav-item.active {
  background: rgba(61, 190, 184, 0.14);
  color: var(--kv-accent);
}

.kv-nav .nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.kv-sidebar-foot {
  border-top: 1px solid var(--kv-line);
  padding: 0.9rem;
}

.kv-user-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.kv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--kv-accent);
  color: var(--kv-accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.kv-credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  background: rgba(214, 242, 107, 0.35);
  color: var(--kv-accent-ink);
  font-size: 0.72rem;
  font-weight: 650;
}

.kv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.kv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 60px;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--kv-line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.dark .kv-topbar {
  background: rgba(12, 28, 27, 0.85);
}

.kv-icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--kv-line);
  border-radius: 12px;
  background: transparent;
  color: var(--kv-ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

.kv-icon-btn:hover {
  background: rgba(13, 92, 99, 0.08);
}

.kv-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(5rem + var(--safe-bottom));
}

@media (min-width: 640px) {
  .kv-content {
    padding-bottom: 1.25rem;
  }
}

.kv-content > .p-6,
.kv-content > [class*="p-"] {
  padding: 1rem !important;
}

@media (min-width: 768px) {
  .kv-content > .p-6,
  .kv-content > [class*="p-"] {
    padding: 1.5rem !important;
  }
}

/* Soften generic Tailwind cards inside app */
.kv-content .bg-white,
.kv-content .dark\:bg-gray-800 {
  border-radius: var(--kv-radius) !important;
  border: 1px solid var(--kv-line);
  box-shadow: none !important;
}

.kv-content .shadow,
.kv-content .shadow-lg,
.kv-content .shadow-sm {
  box-shadow: none !important;
}

.kv-content .rounded-lg,
.kv-content .rounded-md {
  border-radius: var(--kv-radius-sm) !important;
}

.kv-content h1 {
  font-family: var(--kv-display);
  letter-spacing: -0.03em;
}

/* Primary action buttons inside app (blue → teal) */
.kv-content .bg-blue-600,
.kv-content a.bg-blue-600,
.kv-content button.bg-blue-600 {
  background: var(--kv-teal) !important;
}

.kv-content .hover\:bg-blue-700:hover,
.kv-content a.hover\:bg-blue-700:hover,
.kv-content button.hover\:bg-blue-700:hover {
  background: var(--kv-teal-deep) !important;
}

.kv-content .text-blue-600,
.kv-content .text-blue-500,
.kv-content a.text-blue-600 {
  color: var(--kv-teal) !important;
}

.kv-content .ring-blue-500 {
  --tw-ring-color: var(--kv-mint) !important;
}

/* Tables */
.kv-content .overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  margin-inline: -0.25rem;
  padding-inline: 0.25rem;
}

.kv-content table {
  min-width: 640px;
}

@media (max-width: 640px) {
  .kv-content .grid.md\:grid-cols-4,
  .kv-content .grid.md\:grid-cols-3,
  .kv-content .grid.md\:grid-cols-2 {
    gap: 0.75rem;
  }

  .kv-content .flex.items-center.justify-between {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .kv-content .space-x-2,
  .kv-content .space-x-4 {
    row-gap: 0.5rem;
  }
}

/* Mobile table cards (existing markup) */
.table-mobile-card {
  border: 1px solid var(--kv-line);
  border-radius: var(--kv-radius);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
}

.dark .table-mobile-card {
  background: rgba(16, 36, 34, 0.75);
}

/* Backdrop */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(7, 40, 38, 0.45);
  backdrop-filter: blur(3px);
  animation: kvFade 0.25s ease;
}

.mobile-backdrop.fade-out {
  animation: kvFadeOut 0.25s ease forwards;
}

/* Loading */
#loadingScreen {
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(196, 230, 53, 0.28), transparent 60%),
    var(--kv-paper) !important;
}

#loadingScreen .animate-spin {
  border-color: transparent;
  border-bottom-color: var(--kv-teal) !important;
}

/* Notifications */
.notification {
  border-radius: var(--kv-radius-sm) !important;
  font-family: var(--kv-font);
}

/* Motion */
@keyframes kvRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes kvFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes kvFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.kv-rise {
  animation: kvRise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Success modal */
.kv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(7, 40, 38, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.kv-modal-overlay.is-open {
  opacity: 1;
}

.kv-modal-overlay.is-leaving {
  opacity: 0;
}

.kv-modal {
  width: min(100%, 400px);
  background: var(--kv-paper);
  border: 1px solid var(--kv-line);
  border-radius: calc(var(--kv-radius) + 4px);
  box-shadow: 0 24px 60px rgba(7, 40, 38, 0.22);
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.kv-modal-overlay.is-open .kv-modal {
  transform: translateY(0) scale(1);
}

.kv-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(31, 170, 139, 0.15);
  color: var(--kv-mint);
}

.kv-modal-icon svg {
  width: 28px;
  height: 28px;
}

.kv-modal-title {
  font-family: var(--kv-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--kv-ink);
}

.kv-modal-message {
  margin: 0;
  font-size: 1rem;
  color: var(--kv-ink);
}

.kv-modal-detail {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--kv-muted);
}

.kv-modal-confirm {
  margin-top: 1.35rem;
}

.kv-modal-actions {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.kv-modal-actions--row {
  flex-direction: row;
  gap: 0.65rem;
}

.kv-modal-actions--row > * {
  flex: 1;
}

.kv-btn-ghost {
  background: transparent;
  color: var(--kv-ink);
  border: 1px solid var(--kv-line);
  border-radius: var(--kv-radius-sm);
  font-weight: 600;
  padding: 0.7rem 1rem;
}

.kv-btn-ghost:hover {
  background: rgba(7, 40, 38, 0.05);
}

.kv-modal--form {
  width: min(100%, 440px);
  text-align: left;
}

.kv-modal--form .kv-modal-icon,
.kv-modal--form .kv-modal-title,
.kv-modal--form .kv-modal-detail {
  text-align: center;
}

.kv-pay-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1.15rem 0 1.25rem;
}

.kv-pay-stats > div {
  background: var(--kv-fog, #f3f8f7);
  border: 1px solid var(--kv-line);
  border-radius: 12px;
  padding: 0.65rem 0.55rem;
  text-align: center;
}

.kv-pay-stats span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--kv-muted);
  margin-bottom: 0.2rem;
}

.kv-pay-stats strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--kv-ink);
  word-break: break-word;
}

.kv-pay-stats .is-due {
  background: rgba(196, 230, 53, 0.22);
  border-color: rgba(13, 92, 99, 0.18);
}

.kv-pay-form {
  display: grid;
  gap: 0.35rem;
}

.kv-pay-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--kv-ink);
  margin-top: 0.65rem;
}

.kv-pay-label span {
  font-weight: 500;
  color: var(--kv-muted);
}

.kv-pay-amount {
  display: flex;
  align-items: center;
  border: 1px solid var(--kv-line);
  border-radius: 12px;
  background: var(--kv-paper);
  overflow: hidden;
}

.kv-pay-currency {
  padding: 0.8rem 0.75rem;
  font-weight: 700;
  color: var(--kv-teal);
  background: rgba(13, 92, 99, 0.08);
  border-right: 1px solid var(--kv-line);
  white-space: nowrap;
}

.kv-pay-amount input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.8rem 0.9rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--kv-ink);
  min-width: 0;
}

.kv-pay-amount input:focus {
  outline: none;
}

.kv-pay-amount:focus-within {
  border-color: var(--kv-teal);
  box-shadow: 0 0 0 3px rgba(13, 92, 99, 0.12);
}

.kv-pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.15rem;
}

.kv-pay-chips button {
  border: 1px solid var(--kv-line);
  background: transparent;
  color: var(--kv-ink);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.kv-pay-chips button:hover {
  border-color: var(--kv-teal);
  color: var(--kv-teal);
  background: rgba(13, 92, 99, 0.06);
}

.kv-pay-input {
  width: 100%;
  border: 1px solid var(--kv-line);
  border-radius: 12px;
  background: var(--kv-paper);
  padding: 0.7rem 0.85rem;
  color: var(--kv-ink);
}

.kv-pay-input:focus {
  outline: none;
  border-color: var(--kv-teal);
  box-shadow: 0 0 0 3px rgba(13, 92, 99, 0.12);
}

.kv-pay-error {
  margin: 0.45rem 0 0;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 420px) {
  .kv-pay-stats {
    grid-template-columns: 1fr;
  }
  .kv-modal-actions--row {
    flex-direction: column-reverse;
  }
}

/* Invoice document (always light / print-ready) — designed for A4 */
.inv-doc {
  --inv-ink: #0c1f1e;
  --inv-muted: #5c716e;
  --inv-line: rgba(12, 31, 30, 0.12);
  --inv-teal: #0d5c63;
  --inv-lime: #c4e635;
  --inv-fog: #f3f8f7;
  position: relative;
  width: 100%;
  max-width: 210mm; /* A4 width */
  margin-left: auto;
  margin-right: auto;
  min-height: 297mm; /* A4 height */
  background: #fff;
  color: var(--inv-ink);
  border-radius: 16px;
  border: 1px solid var(--inv-line);
  box-shadow: 0 18px 40px rgba(7, 40, 38, 0.1);
  overflow: hidden;
  padding: 0;
  font-family: "Poppins", system-ui, sans-serif;
  box-sizing: border-box;
}

.inv-accent-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--inv-teal) 0%, var(--inv-teal) 55%, var(--inv-lime) 100%);
}

.inv-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--inv-line);
}

.inv-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.inv-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--inv-line);
  padding: 6px;
  flex-shrink: 0;
}

.inv-logo-fallback {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--inv-teal), #1faa8b);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.inv-company-name {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 750;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.inv-company-line {
  margin: 0.2rem 0 0;
  color: var(--inv-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.inv-meta {
  text-align: right;
  min-width: 180px;
}

.inv-title {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--inv-teal);
  line-height: 1;
}

.inv-number {
  margin: 0.35rem 0 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--inv-ink);
}

.inv-dates {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.inv-dates div {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.inv-dates span {
  color: var(--inv-muted);
}

.inv-dates strong {
  font-weight: 600;
  min-width: 6.5rem;
  text-align: right;
}

.inv-status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--inv-fog);
  color: var(--inv-teal);
}

.inv-status-paid { background: #dff7ea; color: #0f6b3e; }
.inv-status-partial { background: #d9f3ef; color: #0d5c63; }
.inv-status-pending { background: #fff3d6; color: #8a5b00; }
.inv-status-overdue { background: #fde2de; color: #a1281c; }
.inv-status-draft { background: #eef1f1; color: #4b5a58; }

.inv-parties {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  max-width: 420px;
}

.inv-party {
  background: var(--inv-fog);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: 0.88rem;
  color: var(--inv-muted);
  line-height: 1.45;
}

.inv-party-to {
  background: linear-gradient(160deg, rgba(196, 230, 53, 0.18), var(--inv-fog));
}

.inv-party-label {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--inv-teal);
}

.inv-party-name {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--inv-ink);
}

.inv-party p { margin: 0.1rem 0; }

.inv-table-wrap {
  padding: 0 1.75rem 0.5rem;
  overflow-x: auto;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.inv-table thead th {
  background: var(--inv-teal);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 0.9rem;
}

.inv-table thead th:first-child { border-radius: 10px 0 0 10px; }
.inv-table thead th:last-child { border-radius: 0 10px 10px 0; }

.inv-table tbody td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--inv-line);
  font-size: 0.9rem;
  vertical-align: top;
}

.inv-table tbody tr:last-child td { border-bottom: none; }

.inv-col-desc { text-align: left; }
.inv-col-qty { text-align: center; width: 4.5rem; }
.inv-col-price,
.inv-col-total { text-align: right; white-space: nowrap; }
.inv-col-total { font-weight: 600; }

.inv-empty {
  text-align: center;
  color: var(--inv-muted);
  padding: 1.5rem !important;
}

.inv-totals-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.25rem;
  padding: 0.75rem 1.75rem 1.5rem;
  align-items: start;
}

.inv-notes-block {
  padding: 1rem 0;
  font-size: 0.88rem;
}

.inv-notes-text {
  margin: 0;
  color: var(--inv-muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.inv-payment-details {
  margin-top: 0.35rem;
  color: var(--inv-muted);
  line-height: 1.45;
  font-size: 0.86rem;
}

.inv-payment-details p {
  margin: 0.15rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.inv-payment-details p span {
  min-width: 7.5rem;
  color: var(--inv-ink);
  font-weight: 600;
}

.inv-pay-group-title {
  margin: 0.65rem 0 0.2rem !important;
  font-weight: 700 !important;
  color: var(--inv-ink) !important;
  display: block !important;
}

.inv-pay-group-title:first-child {
  margin-top: 0 !important;
}

.inv-pay-other {
  white-space: pre-wrap;
  display: block !important;
}

.inv-totals {
  background: var(--inv-fog);
  border-radius: 14px;
  padding: 1rem 1.15rem;
}

.inv-total-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--inv-muted);
}

.inv-total-due {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--inv-teal), #147a72);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.inv-footer {
  margin-top: 0.5rem;
  border-top: 1px solid var(--inv-line);
  background:
    linear-gradient(180deg, rgba(243, 248, 247, 0.65), #fff);
}

.inv-footer-main {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  padding: 1.35rem 1.75rem 1rem;
}

.inv-thanks-title {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--inv-teal);
}

.inv-thanks-sub {
  margin: 0.35rem 0 0;
  color: var(--inv-muted);
  font-size: 0.85rem;
  max-width: 28rem;
  line-height: 1.45;
}

.inv-footer-qr {
  text-align: center;
  flex-shrink: 0;
}

.inv-qr {
  display: inline-block;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--inv-line);
  border-radius: 10px;
}

.inv-footer-qr p {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  color: var(--inv-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inv-footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.85rem 1.75rem;
  border-top: 1px dashed var(--inv-line);
  font-size: 0.75rem;
  color: var(--inv-muted);
  background: rgba(13, 92, 99, 0.04);
}

.inv-powered {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--inv-ink);
}

.inv-powered-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

@media (max-width: 640px) {
  .inv-header,
  .inv-parties,
  .inv-table-wrap,
  .inv-totals-row,
  .inv-footer-main,
  .inv-footer-bar {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .inv-meta { text-align: left; width: 100%; }
  .inv-dates div { justify-content: space-between; }
  .inv-dates strong { text-align: right; }

  .inv-parties,
  .inv-totals-row {
    grid-template-columns: 1fr;
  }

  .inv-footer-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .inv-logo,
  .inv-logo-fallback {
    width: 56px;
    height: 56px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  .inv-doc {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: none !important;
    width: 100% !important;
    min-height: auto !important;
  }
}

/* Print */
@media print {
  #sidebar, .kv-topbar, [data-sidebar-toggle], [data-theme-toggle], .kv-fab,
  .kv-modal-overlay, button, .no-print {
    display: none !important;
  }
  .kv-main, .kv-content {
    overflow: visible !important;
    height: auto !important;
  }
  body {
    background: #fff !important;
  }
}

/* Offscreen A4 clone used only for PDF capture */
.kv-pdf-capture-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 794px; /* ~210mm at 96dpi */
  background: #fff;
  z-index: -1;
  pointer-events: none;
}

.kv-pdf-capture-host .inv-doc {
  width: 794px !important;
  max-width: 794px !important;
  min-height: 1123px; /* ~297mm */
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

/* Credits hero */
.kv-credits-hero {
  background:
    linear-gradient(135deg, rgba(13, 92, 99, 0.1), rgba(196, 230, 53, 0.28));
  border: 1px solid var(--kv-line);
}

.dark .kv-credits-hero {
  background:
    linear-gradient(135deg, rgba(61, 190, 184, 0.12), rgba(196, 230, 53, 0.1));
}

/* Mobile new-invoice FAB */
.kv-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + var(--safe-bottom));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--kv-accent);
  color: var(--kv-accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(7, 40, 38, 0.2);
}

@media (min-width: 640px) {
  .kv-fab { display: none; }
}

/* Page title rhythm */
.kv-content h1 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

/* Stat icon soft fill */
.kv-content .bg-blue-100 { background: rgba(13, 92, 99, 0.12) !important; }
.kv-content .text-blue-600 { color: var(--kv-teal) !important; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* —— Super Admin portal —— */
.kv-form-admin-link a {
  color: var(--kv-muted);
  font-weight: 500;
  text-decoration: none;
}
.kv-form-admin-link a:hover {
  color: var(--kv-ink);
  text-decoration: underline;
}

.kv-admin-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(13, 92, 99, 0.08), transparent 60%),
    var(--kv-bg, #f6f7f5);
  color: var(--kv-ink);
}

.kv-admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--kv-line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.dark .kv-admin-bar {
  background: rgba(10, 18, 17, 0.9);
}

.kv-admin-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

@media (min-width: 768px) {
  .kv-admin-main {
    padding: 1.75rem 1.5rem 3rem;
  }
}

/* —— Landing page —— */
.kv-land {
  min-height: 100dvh;
  color: var(--kv-ink);
}

.kv-land-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: rgba(247, 251, 250, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--kv-line);
}

.dark .kv-land-nav {
  background: rgba(16, 36, 34, 0.88);
}

.kv-land-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--kv-ink);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.kv-land-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.kv-land-links {
  display: none;
  align-items: center;
  gap: 1.15rem;
  margin-left: auto;
}

.kv-land-links a {
  text-decoration: none;
  color: var(--kv-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.kv-land-links a:hover {
  color: var(--kv-ink);
}

.kv-land-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.kv-land-menu {
  width: 40px;
  height: 40px;
  border: 1px solid var(--kv-line);
  border-radius: 10px;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.kv-land-menu span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--kv-ink);
  border-radius: 2px;
}

.kv-land-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--kv-line);
  text-decoration: none;
  color: var(--kv-ink);
  font-weight: 600;
  font-size: 0.9rem;
  background: transparent;
}

.kv-land-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
}

.kv-land-cta--lg,
.kv-land-ghost--lg {
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
}

.kv-land-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  text-align: center;
}

.kv-land-kicker {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kv-teal);
}

.kv-land-hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 6vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.kv-land-lead {
  margin: 1rem auto 0;
  max-width: 38rem;
  color: var(--kv-muted);
  font-size: 1.05rem;
}

.kv-land-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.kv-land-pills {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.kv-land-pills li {
  border: 1px solid var(--kv-line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.kv-land-preview {
  padding: 0 1.25rem 2rem;
  display: flex;
  justify-content: center;
}

.kv-land-preview-card {
  width: min(100%, 420px);
  background: #fff;
  color: #0c1f1e;
  border-radius: 18px;
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: 0 24px 60px rgba(7, 40, 38, 0.16);
  position: relative;
  overflow: hidden;
}

.kv-land-preview-bar {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, #0d5c63, #c4e635);
}

.kv-land-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 0.4rem;
}

.kv-land-preview-label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5c716e;
}

.kv-land-preview-strong {
  margin: 0;
  font-weight: 800;
  font-size: 1.2rem;
}

.kv-land-badge {
  background: #c4e635;
  color: #111;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}

.kv-land-preview-muted {
  margin: 0.35rem 0 1.1rem;
  color: #5c716e;
  font-size: 0.9rem;
}

.kv-land-preview-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(12, 31, 30, 0.1);
}

.kv-land-preview-total strong {
  font-size: 1.35rem;
}

.kv-land-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.kv-land-section--alt {
  background: rgba(255, 255, 255, 0.4);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.kv-land-section--alt .kv-land-section-head,
.kv-land-section--alt .kv-land-steps {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.kv-land-section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.kv-land-section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
}

.kv-land-section-head p:last-child {
  color: var(--kv-muted);
  margin: 0.5rem 0 0;
}

.kv-land-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.kv-land-grid article {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--kv-line);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
}

.kv-land-grid h3,
.kv-land-steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.kv-land-grid p,
.kv-land-steps p {
  margin: 0;
  color: var(--kv-muted);
  font-size: 0.95rem;
}

.kv-land-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.kv-land-steps li {
  display: flex;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--kv-line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
}

.kv-land-steps span {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--kv-teal);
  color: #fff;
  font-weight: 700;
}

.kv-land-plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.kv-land-plans article {
  border: 1px solid var(--kv-line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 1.2rem;
  text-align: center;
}

.kv-land-plans article.is-featured {
  border-color: var(--kv-teal);
  background: #fff;
  box-shadow: var(--kv-shadow);
}

.kv-land-plan-name {
  margin: 0;
  font-weight: 700;
}

.kv-land-plan-price {
  margin: 0.35rem 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.kv-land-plan-credits {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.kv-land-plan-note {
  margin: 0.15rem 0 0.9rem;
  color: var(--kv-muted);
  font-size: 0.85rem;
}

.kv-land-plan-btn {
  width: 100%;
}

.kv-land-final {
  margin: 0.5rem 1.25rem 2rem;
  padding: 2rem 1.25rem;
  text-align: center;
  background: var(--kv-ink);
  color: #e8f4f1;
  border-radius: 22px;
}

.kv-land-final h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.kv-land-final p {
  margin: 0.6rem auto 0;
  max-width: 28rem;
  color: rgba(232, 244, 241, 0.78);
}

.kv-land-final .kv-land-ghost {
  color: #e8f4f1;
  border-color: rgba(232, 244, 241, 0.25);
}

.kv-land-foot {
  padding: 1.5rem 1.25rem 2.5rem;
  display: grid;
  gap: 1rem;
}

.kv-land-foot-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.kv-land-foot-brand img {
  width: 36px;
  height: 36px;
}

.kv-land-foot-brand p {
  margin: 0;
  color: var(--kv-muted);
  font-size: 0.85rem;
}

.kv-land-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.kv-land-foot-links a {
  text-decoration: none;
  color: var(--kv-muted);
  font-size: 0.88rem;
}

.kv-land-foot-links a.is-quiet {
  opacity: 0.55;
}

.kv-land-copy {
  margin: 0;
  color: var(--kv-muted);
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .kv-land-nav {
    padding: 0.95rem 1.75rem;
  }
  .kv-land-menu {
    display: none;
  }
  .kv-land-links {
    display: flex;
  }
  .kv-land-actions {
    margin-left: 0;
  }
  .kv-land-hero {
    padding-top: 3.5rem;
  }
  .kv-land-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .kv-land-steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .kv-land-steps li {
    flex-direction: column;
  }
  .kv-land-plans {
    grid-template-columns: repeat(5, 1fr);
  }
  .kv-land-final {
    margin: 1rem auto 2.5rem;
    max-width: 1080px;
    padding: 3rem 2rem;
  }
  .kv-land-foot {
    grid-template-columns: 1fr auto;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
  }
  .kv-land-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .kv-land-links {
    display: none;
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    top: 68px;
    background: var(--kv-paper);
    border: 1px solid var(--kv-line);
    border-radius: 14px;
    padding: 0.7rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--kv-shadow);
  }
  .kv-land-links.is-open {
    display: flex;
  }
  .kv-land-links a {
    padding: 0.65rem 0.7rem;
  }
  .kv-land-nav {
    position: sticky;
  }
}

.kv-land-faq {
  display: grid;
  gap: 0.85rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.kv-land-faq article {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--kv-line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}

.kv-land-faq h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.kv-land-faq p {
  margin: 0;
  color: var(--kv-muted);
}

#loadingScreen[hidden] {
  display: none !important;
}
