/* SukhNexus UI — plain CSS so the app runs on shared hosting with no build step. */
:root {
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-50: #eef2ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --green: #059669; --green-50: #ecfdf5;
  --red: #dc2626; --red-50: #fef2f2;
  --amber: #d97706; --amber-50: #fffbeb;
  --blue: #2563eb; --blue-50: #eff6ff;
  --gray-50: #f8fafc;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, .25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
code { background: var(--gray-50); border: 1px solid var(--line); padding: .05rem .35rem; border-radius: 6px; }
pre { background: #0f172a; color: #e2e8f0; padding: 1rem 1.1rem; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
pre code { background: none; border: 0; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { text-align: right; } .center { text-align: center; }
.nowrap { white-space: nowrap; } .break { word-break: break-all; }
.green { color: var(--green); } .red { color: var(--red); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; gap: .75rem; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .grow { flex: 1; }
.grid { display: grid; gap: 1rem; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 900px) { .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 9px; cursor: pointer; text-decoration: none !important; transition: background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--brand-600); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--gray-50); }
.btn-danger { background: var(--red); } .btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--green); } .btn-success:hover { background: #047857; }
.btn-sm { padding: .32rem .7rem; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: .8rem 1.4rem; font-size: 15px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }

/* Forms */
label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
/* Every text-like input, including ones written without a type attribute. */
.input,
input:not([type]),
input:where([type=text], [type=email], [type=password], [type=number], [type=url], [type=tel], [type=date], [type=datetime-local], [type=search]),
select, textarea {
  display: block; width: 100%; min-height: 42px; font: inherit; font-size: 14px; line-height: 1.4; color: var(--ink);
  background-color: #fff; border: 1px solid #cbd5e1; border-radius: 10px; padding: .6rem .8rem;
  outline: none; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: #94a3b8; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
input.is-invalid, select.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
input:disabled, select:disabled, textarea:disabled { background-color: var(--gray-50); color: var(--muted); cursor: not-allowed; }
select {
  padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
}
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=file] { display: block; width: 100%; font: inherit; font-size: 13px; color: var(--muted); border: 1px dashed #cbd5e1; border-radius: 10px; padding: .45rem; background: var(--gray-50); cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 12.5px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: .35rem .8rem; border-radius: 7px; margin-right: .7rem; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--brand-50); border-color: #c7d2fe; }
dialog { border: 0; padding: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
input[type=color] { width: 48px; height: 38px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 2px; background: #fff; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.help { font-size: 12px; color: var(--muted); margin-top: .25rem; }
.error-text { font-size: 12px; color: var(--red); margin-top: .25rem; }
.help.green { color: var(--green); } .help.red { color: var(--red); }
.input-group { display: flex; align-items: stretch; } .input-group > span { display: flex; align-items: center; padding: 0 .8rem; border: 1px solid #cbd5e1; border-right: 0; border-radius: 10px 0 0 10px; background: var(--gray-50); color: var(--muted); font-weight: 600; white-space: nowrap; }
.input-group > input { border-radius: 0 10px 10px 0; min-width: 0; }
.field > label + .input-group, .field > label + input, .field > label + select { margin-top: 0; }
.grid > .field { margin-bottom: 0; } .grid + .field, .grid + .grid, .grid + button, .grid + .btn { margin-top: 1rem; }

/* Cards & tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1.25rem; }
.card-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.55rem; font-weight: 700; margin-top: .25rem; letter-spacing: -.02em; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: .65rem 1.25rem; background: var(--gray-50); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .75rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
dl.kv { display: grid; grid-template-columns: 180px 1fr; margin: 0; }
dl.kv dt { color: var(--muted); padding: .55rem 0; border-bottom: 1px solid var(--line); }
dl.kv dd { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); word-break: break-word; }
@media (max-width: 600px) { dl.kv { grid-template-columns: 1fr; } dl.kv dt { border: 0; padding-bottom: 0; } }

/* Badges & alerts */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: 11.5px; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--gray-50); color: var(--ink-2); border: 1px solid var(--line); text-transform: capitalize; white-space: nowrap; }
.badge.green { background: var(--green-50); color: var(--green); border-color: #a7f3d0; }
.badge.red { background: var(--red-50); color: var(--red); border-color: #fecaca; }
.badge.amber { background: var(--amber-50); color: var(--amber); border-color: #fde68a; }
.badge.blue { background: var(--blue-50); color: var(--blue); border-color: #bfdbfe; }
.badge.brand { background: var(--brand-50); color: var(--brand); border-color: #c7d2fe; }
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; }
.alert-success { background: var(--green-50); border-color: #a7f3d0; color: #065f46; }
.alert-error { background: var(--red-50); border-color: #fecaca; color: #991b1b; }
.alert-warn { background: var(--amber-50); border-color: #fde68a; color: #92400e; }
.alert-info { background: var(--blue-50); border-color: #bfdbfe; color: #1e40af; }
.alert ul { margin: 0; padding-left: 1.1rem; }

/* App shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem; color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #6366f1, #22d3ee); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.nav { padding: .5rem .75rem; overflow-y: auto; flex: 1; }
.nav .section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 1rem .6rem .35rem; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: .65rem; color: #cbd5e1; padding: .5rem .65rem; border-radius: 8px; font-weight: 500; text-decoration: none; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(99, 102, 241, .22); color: #fff; }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.sidebar .foot { padding: 1rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.content { padding: 1.5rem; max-width: 1280px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.mode-switch { display: inline-flex; background: var(--gray-50); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.mode-switch a { text-decoration: none !important; }
.mode-switch button, .mode-switch a { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; padding: .3rem .85rem; border-radius: 999px; cursor: pointer; color: var(--muted); }
.mode-switch .on.test { background: var(--amber); color: #fff; }
.mode-switch .on.live { background: var(--green); color: #fff; }
.test-banner { background: repeating-linear-gradient(45deg, #fef3c7, #fef3c7 10px, #fde68a 10px, #fde68a 20px); color: #78350f; text-align: center; font-size: 12.5px; font-weight: 600; padding: .3rem; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .25rem; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; z-index: 50; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: block; }
  .content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; min-width: 140px; min-height: 36px; padding: .42rem .7rem; font-size: 13px; }
.filters select { padding-right: 2rem; }
.filters input[type=search] { min-width: 230px; }
@media (max-width: 600px) { .filters input, .filters select, .filters input[type=search] { width: 100%; min-width: 0; } }
.copy { cursor: pointer; }
.secret-box { background: #0f172a; color: #a5f3fc; padding: .8rem 1rem; border-radius: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }

/* Pagination */
.pagination { display: flex; gap: .3rem; justify-content: flex-end; padding: 1rem 1.25rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.pagination .active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled { color: #cbd5e1; }

/* Auth & marketing */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: radial-gradient(circle at 20% 20%, #6366f1 0, transparent 50%), radial-gradient(circle at 80% 80%, #06b6d4 0, transparent 45%), #0f172a; color: #e2e8f0; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-form .box { width: 100%; max-width: 420px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.site-nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; max-width: 1180px; margin: 0 auto; gap: 1rem; }
.site-nav .links { display: flex; gap: 1.25rem; align-items: center; }
.site-nav .links a:not(.btn) { color: var(--ink-2); font-weight: 500; }
@media (max-width: 700px) { .site-nav .links a.hide-sm { display: none; } }
.hero { max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem 3rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: 3rem; line-height: 1.08; letter-spacing: -.035em; }
.hero h1 span { background: linear-gradient(90deg, #4f46e5, #06b6d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 540px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 2rem; } .hero h1 { font-size: 2.2rem; } }
.section { max-width: 1180px; margin: 0 auto; padding: 3rem 1.5rem; }
.feature { padding: 1.25rem; }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: .75rem; font-size: 20px; }
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer .inner { max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); }
.prose h2 { margin-top: 2rem; padding-top: .5rem; } .prose h3 { margin-top: 1.5rem; }
.prose table { border-collapse: collapse; width: 100%; margin: .75rem 0 1rem; font-size: 13px; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45rem .65rem; text-align: left; vertical-align: top; }
.prose th { background: var(--gray-50); }
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem; }
.docs-layout aside { position: sticky; top: 1rem; align-self: start; }
.docs-layout aside a { display: block; padding: .3rem 0; color: var(--ink-2); }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } .docs-layout aside { position: static; } }

/* Checkout */
.co-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(180deg, var(--co-brand, #4f46e5) 0 240px, #f1f5f9 240px); }
.co-page.embed { background: rgba(15, 23, 42, .55); }
.co { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.co-head { background: var(--co-brand, #4f46e5); color: #fff; padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: .8rem; position: relative; }
.co-head .avatar { width: 44px; height: 44px; border-radius: 10px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-weight: 800; font-size: 18px; overflow: hidden; flex-shrink: 0; }
.co-head .avatar img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.co-head .amount { margin-left: auto; text-align: right; }
.co-head .amount b { font-size: 1.3rem; display: block; }
.co-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: #fff; opacity: .8; font-size: 20px; cursor: pointer; }
.co-body { padding: 1.25rem; }
.co-method { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; text-align: left; margin-bottom: .6rem; transition: border-color .15s, background .15s; }
.co-method:hover { border-color: var(--co-brand, #4f46e5); background: #fafaff; }
.co-method .mi { width: 38px; height: 38px; border-radius: 10px; background: var(--gray-50); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.co-method .mt { font-weight: 600; } .co-method .ms { font-size: 12px; color: var(--muted); }
.co-foot { border-top: 1px solid var(--line); padding: .7rem 1.25rem; font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.co .btn:not(.btn-light):not(.btn-success):not(.btn-danger) { background: var(--co-brand, #4f46e5); }
.qr-box { display: flex; justify-content: center; padding: .75rem; border: 1px dashed var(--line); border-radius: 12px; margin: .75rem 0; }
.qr-box img, .qr-box canvas { width: 200px !important; height: 200px !important; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: .5rem auto 1rem; font-size: 30px; color: #fff; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(15, 23, 42, .15); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
[x-cloak] { display: none !important; }
