:root {
  --navy: #0b1637;
  --navy-2: #14234b;
  --blue: #2764ff;
  --blue-dark: #174ee0;
  --cyan: #52d3ff;
  --orange: #ff9a3d;
  --green: #16a66a;
  --red: #d84456;
  --violet: #8256e8;
  --ink: #15203b;
  --muted: #6f7891;
  --line: #e4e8f1;
  --surface: #ffffff;
  --background: #f5f7fb;
  --shadow: 0 16px 42px rgba(24, 41, 78, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--background);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; transform: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.025em; }
code { direction: ltr; unicode-bidi: embed; font-family: Consolas, monospace; }

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 19px 8px 19px 8px;
  background: linear-gradient(145deg, var(--blue), #1bbcf2);
  box-shadow: 0 14px 30px rgba(39, 100, 255, .28);
  font-size: 31px;
  font-weight: 900;
}

.brand-mark-small {
  width: 42px;
  height: 42px;
  border-radius: 13px 6px 13px 6px;
  font-size: 21px;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ltr-field, .ltr-inline { direction: ltr; unicode-bidi: embed; text-align: left; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover { transform: translateY(-1px); }
.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), #2356e5);
  box-shadow: 0 9px 20px rgba(39, 100, 255, .22);
}
.button-primary:hover { background: linear-gradient(135deg, #3470ff, var(--blue-dark)); }
.button-secondary { color: var(--ink); background: white; border-color: var(--line); }
.button-secondary:hover { background: #f8faff; border-color: #cdd5e6; }
.button-wide { width: 100%; }
.button-compact { min-height: 40px; padding: 8px 15px; font-size: 14px; }
.button-small { min-height: 36px; padding: 7px 12px; font-size: 13px; }

.field { min-width: 0; }
.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #2e3851;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.coupon-input input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid #dce1ec;
  border-radius: 10px;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}

.field textarea { resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus, .coupon-input input:focus {
  border-color: #7ea2ff;
  box-shadow: 0 0 0 4px rgba(39, 100, 255, .1);
}
.field input[readonly] { background: #f3f5fa; color: #59637a; }
.field small, .check-row small, td small, .coupon-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}

.form-stack { display: grid; gap: 18px; }
.compact-stack { gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.divider { height: 1px; background: var(--line); margin: 5px 0; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.check-row span { min-width: 0; }
.check-row strong { display: block; font-size: 13px; }

.notice {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.55;
}
.notice-error { color: #8e2434; background: #fff0f2; border-color: #f4c7ce; }
.notice-success { color: #087148; background: #eafaf3; border-color: #bae9d4; }
.notice-warning { color: #85520f; background: #fff8e8; border-color: #f3dca8; }
.notice-info { color: #24529e; background: #edf4ff; border-color: #cbdcff; }
.notice-action { display: flex; justify-content: space-between; align-items: center; gap: 14px; }

/* Installer */
.install-body {
  padding: 36px 22px;
  background:
    radial-gradient(circle at 15% 18%, rgba(70, 146, 255, .18), transparent 30%),
    linear-gradient(135deg, #08132f 0 44%, #f4f7fc 44% 100%);
}

.install-shell {
  width: min(1120px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  overflow: hidden;
  background: white;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(2, 12, 40, .25);
}

.install-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px;
  color: white;
  background:
    radial-gradient(circle at 80% 10%, rgba(82, 211, 255, .27), transparent 32%),
    linear-gradient(150deg, #0b1738, #12275d);
}
.install-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  left: -170px;
  bottom: -160px;
  border: 50px solid rgba(255, 255, 255, .04);
  border-radius: 50%;
}
.install-hero .brand-mark { margin-bottom: 35px; }
.install-hero .eyebrow { color: var(--cyan); }
.install-hero h1 { margin-bottom: 17px; font-size: clamp(34px, 5vw, 52px); line-height: 1.02; }
.install-hero > p:not(.eyebrow) { max-width: 390px; color: #becaeb; font-size: 17px; line-height: 1.7; }
.security-note {
  width: fit-content;
  margin-top: 26px;
  padding: 11px 14px;
  color: #d6f9e9;
  background: rgba(31, 181, 112, .14);
  border: 1px solid rgba(69, 220, 148, .24);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.security-note span { margin-left: 7px; }

.install-card { padding: 48px clamp(28px, 5vw, 68px); overflow: auto; }
.install-card > h2 { margin-bottom: 8px; font-size: 27px; }
.install-card > p { color: var(--muted); line-height: 1.65; }
.step-label { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--navy); font-weight: 900; }
.step-label span, .section-title span {
  width: 27px; height: 27px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 50%; font-size: 12px;
}
.success-illustration, .lock-illustration {
  width: 78px; height: 78px; display: grid; place-items: center; margin: 35px auto 24px; border-radius: 50%; font-size: 34px;
}
.success-illustration { color: white; background: var(--green); box-shadow: 0 13px 30px rgba(22, 166, 106, .25); }
.lock-illustration { background: #eef2fb; }

/* Login */
.login-body { background: #eef2f8; }
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vw;
  color: white;
  background:
    radial-gradient(circle at 18% 28%, rgba(53, 125, 255, .35), transparent 34%),
    linear-gradient(145deg, #08142f, #112658);
}
.login-visual .brand-mark { margin-bottom: 38px; }
.login-visual .eyebrow { color: var(--cyan); }
.login-visual h1 { margin-bottom: 20px; font-size: clamp(42px, 5vw, 68px); line-height: 1.03; }
.login-visual > p:not(.eyebrow) { max-width: 440px; color: #bdc9e7; font-size: 18px; line-height: 1.7; }
.visual-orbit { position: absolute; width: 430px; height: 430px; left: -170px; bottom: -210px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.visual-orbit span { position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; inset: 50px; }
.visual-orbit span:nth-child(2) { inset: 110px; }
.visual-orbit span:nth-child(3) { inset: 170px; background: rgba(67, 149, 255, .2); }
.login-card {
  width: min(460px, calc(100% - 44px));
  margin: auto;
  padding: 44px;
  background: white;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.login-card h2 { margin-bottom: 8px; font-size: 30px; }
.login-card > .muted { margin-bottom: 28px; }
.totp-input { direction: ltr; text-align: center; letter-spacing: .28em; font-family: Consolas, monospace; font-size: 18px; font-weight: 800; }
.remember-row { background: #f8faff; }
.auth-divider { position: relative; margin: 24px 0; color: #9aa3b6; text-align: center; font-size: 11px; }
.auth-divider::before { content: ""; position: absolute; top: 50%; right: 0; left: 0; height: 1px; background: var(--line); }
.auth-divider span { position: relative; padding: 0 12px; background: white; }
.pwa-install-link { width: 100%; margin-top: 15px; padding: 5px; color: var(--blue); background: none; border: 0; font-size: 12px; font-weight: 800; }
.auth-single-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; background: radial-gradient(circle at 20% 15%, rgba(39,100,255,.16), transparent 30%), #eef2f8; }
.auth-single-shell .login-card { margin: auto; }
.auth-setup-card { width: min(520px, 100%); }
.auth-icon, .fingerprint-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 22px; color: var(--blue); background: #edf3ff; border-radius: 22px; font-size: 34px; font-weight: 900; }
.fingerprint-icon { width: 84px; height: 84px; border-radius: 50%; font-size: 49px; }
.totp-secret { display: grid; gap: 9px; margin: 20px 0; padding: 16px; text-align: center; background: #f5f7fb; border: 1px solid var(--line); border-radius: 13px; }
.totp-secret span { color: var(--muted); font-size: 11px; }
.totp-secret strong { display: block; color: var(--navy); letter-spacing: .16em; font-size: 17px; }
.totp-secret .icon-button { justify-self: center; }
.inline-center-form { text-align: center; }
.dark-link { color: var(--blue); }
.dark-link:hover { color: var(--blue-dark); }
.auth-warning { margin: 20px 0 0; padding: 11px; color: #85520f; background: #fff8e8; border-radius: 9px; font-size: 11px; line-height: 1.6; }

/* Admin shell */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 255px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 25px 18px 18px;
  color: white;
  background:
    radial-gradient(circle at 15% 85%, rgba(39,100,255,.23), transparent 28%),
    linear-gradient(180deg, #0b1637, #0d1b40);
}
.admin-brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 32px; }
.admin-brand strong { display: block; font-size: 19px; }
.admin-brand small { display: block; margin-top: 2px; color: #8e9ab9; font-size: 11px; }
.side-nav { display: grid; gap: 7px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  color: #aeb9d3;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}
.side-nav a:hover { color: white; background: rgba(255,255,255,.06); }
.side-nav a.active { color: white; background: linear-gradient(100deg, rgba(39,100,255,.82), rgba(39,100,255,.34)); box-shadow: inset -3px 0 var(--cyan); }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; padding: 16px 8px 4px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-person > span:last-child { min-width: 0; }
.admin-person strong, .admin-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-person strong { font-size: 13px; }
.admin-person small { margin-top: 3px; color: #8996b8; font-size: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(82,211,255,.17); color: var(--cyan); font-weight: 900; }
.link-button { margin-top: 13px; padding: 0; color: #91a1c4; background: none; border: 0; font-size: 12px; }
.link-button:hover { color: white; }

.admin-main { min-width: 0; }
.topbar {
  min-height: 89px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 17px 32px;
  background: rgba(255,255,255,.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.topbar > div { flex: 1; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar .eyebrow { font-size: 10px; }
.menu-button { display: none; width: 40px; height: 40px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.content { width: min(1440px, 100%); margin: 0 auto; padding: 28px 32px 55px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(33, 48, 79, .045);
}
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--card-accent); }
.metric-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; font-size: 27px; letter-spacing: -.04em; }
.metric-card small { display: block; margin-top: 7px; color: #99a1b2; font-size: 10.5px; }
.metric-icon { width: 36px; height: 36px; display: grid; place-items: center; float: left; color: var(--card-accent); background: color-mix(in srgb, var(--card-accent) 10%, white); border-radius: 10px; font-weight: 900; }
.accent-blue { --card-accent: var(--blue); }
.accent-green { --card-accent: var(--green); }
.accent-orange { --card-accent: var(--orange); }
.accent-violet { --card-accent: var(--violet); }

.panel {
  margin-bottom: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(27, 42, 75, .045);
}
.panel-heading { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 18px; }
.panel-heading .eyebrow { font-size: 9px; }
.form-panel { padding-bottom: 22px; }
.form-panel > .form-stack { padding: 22px; }
.text-link { color: var(--blue); font-size: 12px; font-weight: 800; }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.page-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.list-search { display: flex; align-items: center; gap: 8px; min-width: min(100%, 320px); }
.list-search input {
  width: min(310px, 42vw);
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.list-search input:focus { border-color: #86a7ff; box-shadow: 0 0 0 3px rgba(39,100,255,.12); }
.list-search-clear { color: var(--muted); font-size: 11px; font-weight: 800; }
.list-panel-toolbar { display: flex; justify-content: flex-end; padding: 14px 20px; border-bottom: 1px solid var(--line); }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 17px; text-align: right; white-space: nowrap; border-bottom: 1px solid #eef0f5; }
th { color: #7e879c; background: #fbfcfe; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
td { color: #45506a; font-size: 12.5px; }
td strong { color: var(--ink); font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
.money-cell { color: var(--ink); font-weight: 900; direction: ltr; text-align: right; }
.token-text { direction: ltr; text-align: right; }
.list-pagination { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.pagination-links { display: flex; align-items: center; gap: 5px; direction: rtl; }
.pagination-links a,
.pagination-links span { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 8px; border-radius: 8px; }
.pagination-links a { color: var(--ink); background: white; border: 1px solid var(--line); font-weight: 800; }
.pagination-links a:hover { color: var(--blue); border-color: #8eacf8; }
.pagination-links a.active { color: white; background: var(--blue); border-color: var(--blue); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 30px; font-size: 10.5px; font-weight: 800; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { color: #0c8656; background: #e9f8f1; }
.badge-paid { color: #1b57d9; background: #edf3ff; }
.badge-warning { color: #a56812; background: #fff6df; }
.badge-danger { color: #c53648; background: #fff0f2; }
.badge-neutral { color: #687289; background: #eff1f5; }

.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions form { display: inline; margin: 0; }
.icon-button { min-height: 31px; padding: 6px 8px; color: #44506a; background: white; border: 1px solid #dde2ec; border-radius: 7px; font-size: 10.5px; font-weight: 700; }
.icon-button:hover { color: var(--blue); border-color: #9bb5f7; background: #f4f7ff; }
.danger-text { color: var(--red); }

.empty-state { padding: 58px 24px; text-align: center; }
.empty-icon { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 16px; color: var(--blue); background: #edf3ff; border-radius: 17px; font-size: 25px; }
.empty-state h3 { margin-bottom: 7px; font-size: 20px; }
.empty-state p { max-width: 430px; margin: 0 auto 20px; color: var(--muted); line-height: 1.55; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 21px; align-items: start; }
.editor-side { display: grid; gap: 20px; }
.customer-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.customer-field-row:last-child { padding-bottom: 0; border-bottom: 0; }
.prefill-emphasis input { border-color: #95adf2; background: #f6f8ff; }
.sticky-actions { position: sticky; bottom: 14px; display: flex; justify-content: flex-end; gap: 10px; padding: 14px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }

.two-column-layout { display: grid; grid-template-columns: minmax(330px, .75fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.coupon-list { display: grid; }
.coupon-row { display: grid; grid-template-columns: 1.3fr .8fr auto auto; align-items: center; gap: 15px; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.coupon-row:last-child { border-bottom: 0; }
.coupon-code { direction: ltr; unicode-bidi: embed; display: block; width: fit-content; color: var(--blue); font-family: Consolas, monospace; letter-spacing: .05em; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px; align-items: start; }
.settings-wide { grid-column: 1 / -1; }
.panel-body { padding: 22px; }
.setting-copy { margin: 0; line-height: 1.65; }
.secure-help { color: var(--muted); font-size: 11px; line-height: 1.5; }
.app-install-card { background: linear-gradient(145deg, white, #f4f8ff); }
.app-icon-mini { width: 48px; height: 48px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--blue), #1bbcf2); border-radius: 15px 7px 15px 7px; box-shadow: 0 9px 20px rgba(39,100,255,.2); font-size: 22px; font-weight: 900; }
.security-status { padding: 6px 9px; color: #1d5bd9; background: #edf3ff; border-radius: 20px; font-size: 10.5px; font-weight: 900; }
.security-settings-layout { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr); gap: 22px; padding: 22px; }
.passkey-register-box { display: grid; gap: 14px; align-content: start; padding: 19px; background: linear-gradient(145deg, #f1f5ff, #f8fbff); border: 1px solid #dce6ff; border-radius: 15px; }
.passkey-register-box p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.fingerprint-small { width: 51px; height: 51px; display: grid; place-items: center; color: var(--blue); background: white; border-radius: 50%; box-shadow: 0 8px 20px rgba(39,100,255,.13); font-size: 30px; }
.security-list-wrap { min-width: 0; }
.security-list { display: grid; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.security-device-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px; border-bottom: 1px solid var(--line); }
.security-device-row:last-child { border-bottom: 0; }
.security-device-row strong, .security-device-row small { display: block; }
.security-device-row strong { overflow: hidden; color: var(--ink); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.security-device-row small { margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.device-dot { width: 29px; height: 29px; display: grid; place-items: center; color: var(--green); background: #eaf8f2; border-radius: 50%; font-size: 11px; font-weight: 900; }
.compact-empty { padding: 24px; text-align: center; background: #fafbfe; border: 1px dashed #d9deea; border-radius: 13px; }
.compact-empty strong, .compact-empty small { display: block; }
.compact-empty strong { margin-bottom: 6px; font-size: 13px; }
.compact-empty small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.panel-footnote { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.connection-ok, .connection-wait { font-size: 11px; font-weight: 900; }
.connection-ok { color: var(--green); }
.connection-wait { color: var(--orange); }
.saved-label { color: var(--green); font-size: 10px; font-weight: 700; }
.callback-box { padding: 13px 15px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 11px; }
.callback-box span, .callback-box small { display: block; color: var(--muted); font-size: 10px; }
.callback-box code { display: block; overflow: hidden; margin: 6px 0; color: #34405d; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.document-toggle { padding: 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: 13px; }
.document-toggle.enabled { background: #fff8e9; border-color: #f0d28b; }
.document-toggle > .check-row { padding: 0; border: 0; }
.document-toggle .form-grid { margin-top: 16px; }
.confirm-row { align-self: end; }

/* Public checkout */
.checkout-body {
  padding: 25px 18px 45px;
  background:
    radial-gradient(circle at 15% 5%, rgba(39,100,255,.16), transparent 26%),
    linear-gradient(180deg, #eef3ff, #f7f8fb 42%);
}
.checkout-shell { width: min(660px, 100%); margin: 0 auto; }
.checkout-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 19px; color: var(--navy); font-weight: 900; }
.checkout-card, .result-card {
  overflow: hidden;
  padding: 32px;
  background: white;
  border: 1px solid rgba(220, 226, 239, .9);
  border-radius: 23px;
  box-shadow: 0 24px 65px rgba(33, 52, 91, .12);
}
.checkout-heading { position: relative; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.checkout-heading h1 { margin-bottom: 9px; font-size: clamp(27px, 6vw, 38px); line-height: 1.15; }
.checkout-heading > p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.secure-pill { position: absolute; left: 0; top: 0; padding: 7px 10px; color: #28704f; background: #edf9f3; border-radius: 30px; font-size: 10px; font-weight: 800; }
.amount-block { margin: 24px 0; padding: 20px; text-align: center; background: linear-gradient(135deg, #f0f4ff, #f7fbff); border: 1px solid #dce6ff; border-radius: 16px; }
.amount-block span, .amount-block small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.amount-block strong { display: block; margin: 5px 0; color: var(--navy); font-size: 37px; direction: ltr; letter-spacing: -.04em; }
.amount-block del { display: block; margin-top: 5px; color: #9aa3b7; direction: ltr; font-size: 14px; }
.checkout-form { gap: 20px; }
.section-title { display: flex; align-items: center; gap: 9px; margin-top: 2px; }
.section-title strong { font-size: 14px; }
.section-title small { margin-right: auto; color: var(--muted); font-size: 10px; }
.coupon-input { position: relative; }
.coupon-input input { padding-left: 44px; }
.coupon-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--blue); font-weight: 900; }
.button-pay { min-height: 55px; justify-content: space-between; padding-inline: 21px; font-size: 15px; }
.button-pay span { padding-right: 15px; border-right: 1px solid rgba(255,255,255,.3); direction: ltr; }
.form-security { margin: -7px 0 0; color: #8992a6; text-align: center; font-size: 10px; line-height: 1.5; }
.checkout-footnote { margin: 17px 0 0; color: #8892a7; text-align: center; font-size: 10.5px; }
.unavailable-box { padding: 50px 15px 25px; text-align: center; }
.unavailable-box h2 { margin-bottom: 7px; }
.unavailable-box p { color: var(--muted); }

.result-card { margin-top: 55px; text-align: center; }
.result-card h1 { margin-bottom: 10px; font-size: 31px; }
.result-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.result-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 50%; font-size: 32px; font-weight: 900; }
.result-success .result-icon { color: white; background: var(--green); box-shadow: 0 13px 29px rgba(22,166,106,.22); }
.result-waiting .result-icon { color: #8e601c; background: #fff3d8; }
.result-error .result-icon { color: var(--red); background: #fff0f2; font-size: 22px; }
.result-summary { display: grid; gap: 0; margin: 25px 0; text-align: right; border: 1px solid var(--line); border-radius: 13px; }
.result-summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.result-summary > div:last-child { border-bottom: 0; }
.result-summary span { color: var(--muted); font-size: 12px; }
.result-summary strong { font-size: 13px; }
.branded-result { margin-top: 0; padding: 0; }
.branded-result .result-card-inner { padding: 8px 32px 32px; }
.branded-result .result-card-inner > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.branded-result .result-summary strong { color: var(--green); }
.branded-result .result-retry-button { color: var(--payment-button-text); background: var(--payment-button); }
.checkout-errors { scroll-margin-top: 18px; outline: none; }
.status-loader { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.status-loader i { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; animation: bounce 1.2s infinite; }
.status-loader i:nth-child(2) { animation-delay: .15s; }
.status-loader i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .3; } 40% { transform: translateY(-7px); opacity: 1; } }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-layout { grid-template-columns: 1fr; }
  .two-column-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .install-body { padding: 0; background: var(--background); }
  .install-shell { min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; }
  .install-hero { padding: 38px 28px; }
  .install-hero .brand-mark { margin-bottom: 22px; }
  .install-hero h1 { font-size: 35px; }
  .install-card { padding: 32px 24px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 340px; padding: 45px 28px; }
  .login-visual h1 { font-size: 43px; }
  .login-card { margin: -35px auto 35px; position: relative; z-index: 2; padding: 30px; }
  .admin-shell { display: block; }
  .sidebar { position: fixed; right: -275px; transition: right .2s ease; box-shadow: -20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { right: 0; }
  .menu-button { display: block; }
  .topbar { padding: 14px 18px; }
  .topbar h1 { font-size: 19px; }
  .topbar .button { font-size: 0; width: 40px; padding: 0; }
  .topbar .button::after { content: "+"; font-size: 22px; }
  .content { padding: 20px 15px 45px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-wide { grid-column: auto; }
  .security-settings-layout { grid-template-columns: 1fr; }
  .page-actions { align-items: stretch; flex-direction: column; }
  .page-actions-tools { align-items: stretch; justify-content: flex-start; flex-wrap: wrap; }
  .list-search { flex: 1 1 100%; }
  .list-search input { width: 100%; }
}

@media (max-width: 580px) {
  .form-grid, .form-grid-3, .customer-field-row { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 15px; }
  .metric-card strong { font-size: 21px; }
  .metric-icon { width: 31px; height: 31px; }
  .notice-action, .page-actions { align-items: stretch; flex-direction: column; }
  .page-actions-tools, .list-search, .list-pagination { align-items: stretch; flex-direction: column; }
  .list-panel-toolbar { justify-content: stretch; padding: 12px; }
  .pagination-links { flex-wrap: wrap; justify-content: center; }
  .coupon-row { grid-template-columns: 1fr auto; }
  .coupon-row > *:nth-child(2) { text-align: left; }
  .checkout-body { padding: 16px 10px 30px; }
  .checkout-card, .result-card { padding: 23px 18px; border-radius: 18px; }
  .checkout-heading { padding-top: 39px; }
  .secure-pill { right: 0; left: auto; }
  .amount-block strong { font-size: 31px; }
  .result-card { margin-top: 25px; }
}

/* Shared business logo */
.system-logo { display: grid; place-items: center; overflow: hidden; background: white; }
.system-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-system-logo { width: 112px; height: 112px; margin-bottom: 38px; padding: 8px; border-radius: 24px; }
.admin-brand .system-logo { width: 42px; height: 42px; flex: 0 0 auto; padding: 3px; border-radius: 12px; }
.app-icon-mini.system-logo { padding: 3px; }

/* Black admin and authentication experience */
.admin-body {
  --ink: #f5f7fb;
  --muted: #9ca3b2;
  --line: #2b2d33;
  --surface: #121317;
  --background: #050505;
  color: var(--ink);
  background: #050505;
}
.admin-body .admin-main { min-height: 100vh; background: #050505; }
.admin-body .sidebar { background: radial-gradient(circle at 15% 85%, rgba(39,100,255,.18), transparent 28%), #090a0d; border-left: 1px solid #24262c; }
.admin-body .topbar { color: #f7f8fb; background: rgba(8,9,12,.94); border-color: #24262c; }
.admin-body .panel,
.admin-body .metric-card { color: #f2f3f7; background: #121317; border-color: #292b31; box-shadow: 0 14px 36px rgba(0,0,0,.24); }
.admin-body .panel-heading,
.admin-body .customer-field-row,
.admin-body .coupon-row,
.admin-body th,
.admin-body td,
.admin-body .security-device-row { border-color: #292b31; }
.admin-body th { color: #9299a8; background: #0c0d10; }
.admin-body td { color: #c2c7d1; }
.admin-body td strong,
.admin-body .metric-card strong,
.admin-body .security-device-row strong,
.admin-body .field label { color: #f2f3f7; }
.admin-body tbody tr:hover,
.admin-body .clickable-row:hover { background: #191b20; }
.admin-body .field input,
.admin-body .field select,
.admin-body .field textarea,
.admin-body .list-search input { color: #f6f7fa; background: #0b0c0f; border-color: #343740; color-scheme: dark; }
.admin-body .field input[readonly] { color: #aeb5c2; background: #17191e; }
.admin-body .button-secondary,
.admin-body .icon-button { color: #e8eaf0; background: #191b20; border-color: #383b44; }
.admin-body .button-secondary:hover,
.admin-body .icon-button:hover { color: white; background: #242731; border-color: #5579da; }
.admin-body .check-row,
.admin-body .security-list { background: #0c0d10; border-color: #30323a; }
.admin-body .compact-empty,
.admin-body .callback-box,
.admin-body .document-toggle { background: #0c0d10; border-color: #30323a; }
.admin-body .callback-box code { color: #dce3f6; }
.admin-body .app-install-card,
.admin-body .passkey-register-box { background: linear-gradient(145deg, #121317, #111723); border-color: #2d3850; }
.admin-body .sticky-actions { background: rgba(15,16,20,.94); border-color: #30323a; }
.admin-body .totp-secret { background: #0c0d10; border-color: #30323a; }
.admin-body .text-link { color: #78a0ff; }
.admin-body .list-panel-toolbar,
.admin-body .list-pagination { border-color: #292b31; }
.admin-body .pagination-links a { color: #e8eaf0; background: #191b20; border-color: #383b44; }
.admin-body .pagination-links a.active { color: white; background: var(--blue); border-color: var(--blue); }
.clickable-row { cursor: pointer; outline: none; transition: background .15s ease; }
.clickable-row:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }

.login-body { color: #f5f6fa; background: #050505; }
.login-body .login-visual { background: radial-gradient(circle at 18% 28%, rgba(53,125,255,.23), transparent 34%), #050505; border-left: 1px solid #23252b; }
.login-body .login-card { color: #f5f6fa; background: #111216; border: 1px solid #292b31; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.login-body .field label { color: #eef0f5; }
.login-body .field input,
.login-body .field select { color: #f7f8fa; background: #090a0d; border-color: #343740; color-scheme: dark; }
.login-body .button-secondary { color: #f2f4f8; background: #1a1c21; border-color: #3a3d46; }
.login-body .check-row { background: #0c0d10; border-color: #30323a; }
.login-body .auth-divider::before { background: #30323a; }
.login-body .auth-divider span { background: #111216; }
.login-body .auth-single-shell { background: radial-gradient(circle at 20% 15%, rgba(39,100,255,.17), transparent 30%), #050505; }
.login-body .totp-secret { background: #090a0d; border-color: #30323a; }
.login-body .totp-secret strong { color: #f5f6fa; }

/* Link item editor and conditional controls */
.item-editor { padding: 22px; }
.item-editor-row { display: grid; grid-template-columns: 34px minmax(180px, 1fr) 110px 150px 36px; align-items: end; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.item-index { width: 28px; height: 28px; display: grid; place-items: center; align-self: center; color: #8ca9f7; background: rgba(39,100,255,.13); border-radius: 50%; font-size: 11px; font-weight: 900; }
.remove-item { width: 34px; height: 34px; margin-bottom: 6px; color: var(--red); background: transparent; border: 1px solid currentColor; border-radius: 9px; font-size: 20px; }
.items-total { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; }
.items-total span { color: var(--muted); font-size: 13px; font-weight: 800; }
.items-total strong { color: var(--green); font-size: 23px; direction: ltr; }
.control-hidden { display: none !important; }
.coupon-link-picker { display: grid; gap: 8px; max-height: 250px; overflow: auto; padding: 13px; background: rgba(39,100,255,.045); border: 1px solid var(--line); border-radius: 11px; }
.field-label { font-size: 13px; font-weight: 800; }
.compact-check { padding: 9px 11px; }

/* Payment details */
.payment-detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.payment-detail-grid .settings-wide { grid-column: 1 / -1; }
.order-reference { color: var(--muted); font-family: Consolas, monospace; direction: ltr; }
.transaction-totals { display: grid; gap: 0; margin: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.transaction-totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.transaction-totals > div:last-child { border-bottom: 0; }
.transaction-totals span { color: var(--muted); }
.transaction-totals strong { color: var(--green); direction: ltr; }
.transaction-totals .transaction-discount strong { color: var(--orange); }
.detail-list { display: grid; padding: 0 22px 22px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list span { color: var(--muted); font-size: 12px; }
.detail-list strong { text-align: left; font-size: 13px; }
.detail-items { display: grid; padding: 5px 22px 22px; }
.detail-items > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-items > div:last-child { border-bottom: 0; }
.detail-items span strong,
.detail-items span small { display: block; }
.detail-items span small { margin-top: 5px; color: var(--muted); }

/* Branded public checkout */
.checkout-body { padding: 0; background: #eef3ff; }
.checkout-page {
  min-height: 100vh;
  padding: 30px 16px 50px;
  background-color: var(--checkout-bg);
  background-image: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.68)), var(--checkout-bg-image);
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
.branded-checkout { padding: 0; }
.checkout-cover-wrap { height: 225px; overflow: hidden; background: #e8edf6; }
.checkout-cover { width: 100%; height: 100%; display: block; object-fit: cover; }
.checkout-identity { position: relative; z-index: 2; display: grid; justify-items: center; gap: 10px; margin-top: -76px; padding: 0 24px 18px; text-align: center; }
.checkout-identity.identity-no-logo { margin-top: 0; padding-top: 25px; }
.checkout-identity.identity-no-cover { margin-top: 0; padding-top: 25px; }
.checkout-logo-large { width: 152px; height: 152px; display: grid; place-items: center; overflow: hidden; padding: 8px; background: white; border: 5px solid white; border-radius: 50%; box-shadow: 0 14px 34px rgba(18,32,62,.18); }
.checkout-logo-large img { width: 100%; height: 100%; object-fit: contain; }
.checkout-identity > strong { color: var(--ink); font-size: 18px; }
.checkout-card-inner { padding: 8px 32px 32px; }
.checkout-description { margin-bottom: 17px; padding: 15px 17px; color: #4c5871; background: #f7f9fc; border-radius: 12px; line-height: 1.65; }
.checkout-description p { margin: 0; }
.checkout-security-only { margin-bottom: 22px; color: #17764d; text-align: center; font-size: 11px; font-weight: 800; }
.checkout-customer-section { display: grid; gap: 14px; }
.checkout-section-title h2 { margin: 0; font-size: 20px; }
.locked-field-pill { color: #55709f; font-size: 10px; font-weight: 700; }
.checkout-items { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.checkout-items-title { display: flex; justify-content: space-between; gap: 12px; padding: 13px 15px; background: #f6f8fc; }
.checkout-items-title span { color: var(--muted); font-size: 11px; }
.checkout-item-row { display: flex; justify-content: space-between; gap: 18px; padding: 13px 15px; border-top: 1px solid var(--line); font-size: 13px; }
.checkout-item-row strong { direction: ltr; }
.price-summary { display: grid; gap: 0; padding: 0; text-align: right; }
.price-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid #dce6ff; }
.price-summary-row:last-child { border-bottom: 0; }
.price-summary .price-summary-row span { display: inline; color: #4f5b73; font-size: 13px; }
.price-summary .price-summary-row strong { display: inline; margin: 0; color: var(--green); font-size: 19px; direction: ltr; }
.price-summary .discount-row strong { color: var(--orange); }
.price-summary .total-row strong { font-size: 25px; }
.coupon-entry { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.applied-coupon-box { display: grid; gap: 7px; }
.coupon-box-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.applied-coupon { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; color: #174f38; background: #eaf9f2; border: 1px solid #bde6d3; border-radius: 11px; }
.applied-coupon span strong,
.applied-coupon span small { display: block; }
.applied-coupon span strong { direction: ltr; font-family: Consolas, monospace; }
.applied-coupon span small { margin-top: 4px; color: #557268; }
.applied-coupon button { width: 30px; height: 30px; color: #9a2536; background: white; border: 1px solid #e8bac2; border-radius: 50%; font-size: 20px; line-height: 1; }
.button-pay { color: var(--payment-button-text); background: var(--payment-button); box-shadow: 0 9px 22px color-mix(in srgb, var(--payment-button) 30%, transparent); }
.button-pay:hover { background: var(--payment-button); filter: brightness(1.06); }

.checkout-intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; pointer-events: none; background: var(--checkout-bg); animation: introBackdrop 1.75s ease forwards; }
.checkout-intro img { width: 220px; height: 220px; object-fit: contain; }
.intro-single { display: grid; place-items: center; }
.effect-fade .intro-single { animation: introFade 1.75s ease forwards; }
.effect-rise .intro-single { animation: introRise 1.75s cubic-bezier(.2,.7,.2,1) forwards; }
.intro-piece { position: absolute; inset: 0; display: grid; place-items: center; }
.intro-left { clip-path: inset(0 50% 0 0); animation: splitLeft 1.75s ease forwards; }
.intro-right { clip-path: inset(0 0 0 50%); animation: splitRight 1.75s ease forwards; }
@keyframes introBackdrop { 0%, 62% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes introFade { 0%, 35% { transform: scale(.92); opacity: 0; } 52% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.08); opacity: 0; } }
@keyframes introRise { 0%, 25% { transform: translateY(40px); opacity: 0; } 52% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-120px); opacity: 0; } }
@keyframes splitLeft { 0%, 48% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-150px); opacity: 0; } }
@keyframes splitRight { 0%, 48% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(150px); opacity: 0; } }

.result-transaction { margin-bottom: 16px; }
.result-transaction span,
.result-transaction strong { display: block; }
.result-transaction span { color: var(--muted); font-size: 11px; }
.result-transaction strong { margin-top: 4px; color: var(--ink); font-size: 25px; direction: ltr; }
.result-summary .discount-amount { color: var(--orange); }
.payment-error-reason { color: #9f2c3e !important; }

@media (prefers-reduced-motion: reduce) {
  .checkout-intro { display: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .item-editor-row { grid-template-columns: 30px minmax(150px, 1fr) 90px 125px 34px; }
  .payment-detail-grid { grid-template-columns: 1fr; }
  .payment-detail-grid .settings-wide { grid-column: auto; }
}

@media (max-width: 580px) {
  .login-body .login-visual { min-height: 285px; }
  .login-system-logo { width: 82px; height: 82px; margin-bottom: 24px; }
  .item-editor-row { grid-template-columns: 30px 1fr 34px; align-items: end; }
  .item-editor-row .item-name { grid-column: 2; }
  .item-editor-row .item-quantity { grid-column: 2; }
  .item-editor-row .item-price { grid-column: 2; }
  .item-editor-row .remove-item { grid-column: 3; grid-row: 1; }
  .checkout-page { padding: 12px 8px 30px; }
  .checkout-cover-wrap { height: 175px; }
  .checkout-logo-large { width: 132px; height: 132px; }
  .checkout-identity { margin-top: -66px; }
  .checkout-card-inner { padding: 6px 18px 24px; }
  .branded-result .result-card-inner { padding: 6px 18px 24px; }
  .coupon-entry { grid-template-columns: 1fr; }
  .detail-list > div { align-items: flex-start; flex-direction: column; gap: 5px; }
}
