/* madtaxi.lv/bizness - uzņēmumu portāls (2026 dizains, pašpietiekams) */

:root {
  --y: #FFC400;
  --y-soft: #FFF4CC;
  --ink: #0B0B0C;
  --ink-2: #141416;
  --paper: #F6F5F1;
  --card: #FFFFFF;
  --line: #E7E4DC;
  --text: #121212;
  --muted: #6B6B70;
  --danger: #C4271B;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(16,16,20,.04), 0 12px 32px -18px rgba(16,16,20,.22);
}

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

/* .wizard-step u.c. citādi pārrakstītu hidden. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
svg { flex: none; }

.bz-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Navigācija */
.bz-nav { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(255,255,255,.08); }
.bz-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.bz-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.bz-brand img { width: 36px; height: 36px; border-radius: 10px; }
.bz-brand em { font-style: normal; color: var(--y); font-weight: 700; margin-left: 2px; }
.bz-nav-links { display: flex; align-items: center; gap: 6px; }
.bz-nav-links a { text-decoration: none; color: rgba(255,255,255,.78); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.bz-nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.bz-logout { font: inherit; font-weight: 700; font-size: 14px; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 8px 16px; cursor: pointer; margin-left: 6px; }
.bz-logout:hover { background: rgba(255,255,255,.16); }

.portal-page { flex: 1; width: 100%; }
.portal-muted { color: var(--muted); font-size: 14px; margin: 0; }

/* Ielāde */
.bz-center { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.bz-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--y); animation: bz-spin .8s linear infinite; }
@keyframes bz-spin { to { transform: rotate(360deg); } }

/* ------------------------------ Pieslēgšanās ------------------------------ */
.bz-login { display: grid; grid-template-columns: 1.05fr 1fr; min-height: calc(100vh - 68px); }
.bz-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 72px clamp(24px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; }
.bz-hero-glow { position: absolute; width: 760px; height: 760px; right: -280px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,196,0,.32), rgba(255,196,0,0) 62%); pointer-events: none; }
.bz-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 20% 40%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 20% 40%, #000, transparent 70%); }
.bz-hero > *:not(.bz-hero-glow) { position: relative; z-index: 1; }
.bz-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--y); }
.bz-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--y); box-shadow: 0 0 0 4px rgba(255,196,0,.18); }
.bz-eyebrow.dark { color: #8a6a00; }
.bz-eyebrow.dark::before { background: #8a6a00; box-shadow: 0 0 0 4px rgba(138,106,0,.12); }
.bz-hero h1 { font-size: clamp(36px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; margin: 18px 0 18px; max-width: 620px; }
.bz-hero h1 em { font-style: normal; color: var(--y); }
.bz-lead { font-size: 18px; color: rgba(255,255,255,.72); max-width: 520px; margin: 0 0 34px; }
.bz-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 540px; }
.bz-features li { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); border-radius: 18px; padding: 16px 18px; }
.bz-features b { display: block; font-size: 16px; margin-bottom: 2px; }
.bz-features span { color: rgba(255,255,255,.66); font-size: 14px; }
.bz-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--y); color: var(--ink) !important; display: grid; place-items: center; flex: none; }
.bz-ico svg { width: 22px; height: 22px; }

.bz-auth { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.bz-auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 34px 30px 26px; box-shadow: var(--shadow); }
.bz-auth-card h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.bz-auth-card > .portal-muted { margin-bottom: 22px; }

.portal-auth-buttons { display: flex; flex-direction: column; gap: 10px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font: inherit; font-size: 15.5px; font-weight: 700; border-radius: 14px; padding: 14px 18px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--text); transition: transform .12s, box-shadow .12s, background .12s; }
.auth-btn svg { width: 20px; height: 20px; }
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(0,0,0,.35); }
.auth-btn:disabled { opacity: .6; cursor: default; transform: none; }
.auth-email { background: var(--y); border-color: var(--y); color: var(--ink); }
.auth-apple { background: var(--ink); border-color: var(--ink); color: #fff; }
.bz-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 6px 0; }
.bz-divider::before, .bz-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.portal-auth-panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.bz-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.bz-fine { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.bz-fine a { color: var(--text); }

/* ------------------------------ Formas ------------------------------ */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 700; color: #3a3a3e; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=month], select {
  font: inherit; font-size: 16px; font-weight: 500; color: var(--text); width: 100%;
  background: #fff; border: 1px solid #D9D5CB; border-radius: 12px; padding: 12px 14px;
  transition: border-color .12s, box-shadow .12s; -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
input::placeholder { color: #A9A59B; }
input:focus, select:focus { outline: none; border-color: var(--y); box-shadow: 0 0 0 4px rgba(255,196,0,.25); }
input[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: 0 0 0 4px rgba(196,39,27,.14) !important; }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15.5px; font-weight: 800; color: #fff; background: var(--ink); border: 0; border-radius: 14px; padding: 14px 20px; cursor: pointer; transition: transform .12s, background .12s; }
.btn-primary:hover { background: #26262a; transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: default; transform: none; }
.btn-link { font: inherit; font-size: 14px; font-weight: 700; background: none; border: 0; padding: 4px 0; color: #6b5200; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.wizard-error { color: var(--danger); font-size: 14px; font-weight: 600; margin: 8px 0 0; min-height: 0; }
.wizard-error:empty { display: none; }
#login-info:empty { display: none; }
#login-info { margin-top: 10px; }
.wizard-checkbox { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14px; color: var(--text); margin: 18px 0 4px; }
.wizard-checkbox input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }

/* Pieteikums un statuss */
.bz-narrow { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
.bz-title { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.08; margin: 12px 0 8px; }
.bz-sub { margin-bottom: 24px; font-size: 15px; }
.bz-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.bz-steps span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.bz-steps span.done { background: var(--ink); border-color: var(--ink); color: var(--y); }
.bz-steps span.active { background: var(--y); border-color: var(--y); color: var(--ink); }
.bz-steps i { width: 36px; height: 2px; background: var(--line); border-radius: 2px; }
.bz-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.bz-form-h { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 14px; }
.bz-form-h:not(:first-child) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.bz-form-h svg { width: 22px; height: 22px; padding: 4px; background: var(--y-soft); color: #6b5200; border-radius: 8px; box-sizing: content-box; }
.bz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.bz-grid .span-2 { grid-column: span 2; }
.bz-wide { width: 100%; margin-top: 16px; }
.bz-status { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 28px; }
.bz-status h1 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.02em; }
.bz-status .portal-muted { max-width: 460px; font-size: 15.5px; }
.bz-status .btn-primary { margin-top: 12px; }
.wizard-success-icon { width: 72px; height: 72px; border-radius: 22px; background: var(--y-soft); display: grid; place-items: center; font-size: 34px; }

/* ------------------------------ Panelis ------------------------------ */
.bz-dash { max-width: 1040px; margin: 0 auto; padding: 36px 24px 64px; }
.portal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--ink); color: #fff; border-radius: 26px; padding: 26px 28px; margin-bottom: 18px; position: relative; overflow: hidden; }
.portal-header::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,196,0,.3), rgba(255,196,0,0) 62%); pointer-events: none; }
.bz-dash-id { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; min-width: 0; }
.bz-dash-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--y); color: var(--ink); display: grid; place-items: center; flex: none; }
.bz-dash-logo svg { width: 28px; height: 28px; }
.portal-header h1 { margin: 6px 0 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.025em; line-height: 1.15; overflow-wrap: anywhere; }
.portal-chip { position: relative; z-index: 1; background: var(--y); color: var(--ink); font-weight: 800; font-size: 13px; border-radius: 999px; padding: 8px 14px; white-space: nowrap; }
.portal-banner { border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; font-size: 14.5px; font-weight: 600; }
.portal-banner-danger { background: #FDECEA; color: #8c1d18; border: 1px solid #F5C6C1; }

.portal-tabs { display: flex; gap: 6px; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 6px; margin-bottom: 22px; scrollbar-width: none; }
.portal-tabs::-webkit-scrollbar { display: none; }
.portal-tab { display: inline-flex; align-items: center; gap: 8px; flex: 1; justify-content: center; font: inherit; font-size: 14.5px; font-weight: 700; background: none; border: 0; border-radius: 13px; padding: 11px 14px; cursor: pointer; color: var(--muted); white-space: nowrap; transition: background .12s, color .12s; }
.portal-tab svg { width: 18px; height: 18px; }
.portal-tab:hover { color: var(--text); background: var(--paper); }
.portal-tab.active { color: var(--ink); background: var(--y); }

.portal-tab-panel h2 { font-size: 18px; letter-spacing: -.01em; margin: 28px 0 12px; }
.portal-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(16,16,20,.03); }
.portal-card h2 { margin-top: 0; }
.bz-invite { padding: 24px; }
.bz-invite h2 { margin: 0 0 4px; }
.bz-invite .portal-muted { margin-bottom: 16px; }
.portal-inline-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.portal-inline-form .btn-primary { height: 49px; }

.portal-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; transition: border-color .12s; }
.portal-row:hover { border-color: #D3CEC2; }
.portal-row-main { min-width: 0; flex: 1; }
.portal-row-title { font-weight: 800; font-size: 15.5px; }
.portal-row-sub { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; margin-top: 2px; }
.portal-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.portal-small-btn { font: inherit; font-size: 13.5px; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; color: var(--text); }
.portal-small-btn:hover { background: var(--paper); }
.portal-small-btn.danger { color: var(--danger); border-color: #F2C9C4; }
.portal-small-btn.danger:hover { background: #FDF1EF; }
.portal-amount { font-weight: 800; font-size: 16px; white-space: nowrap; }

.portal-month-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 20px; }
.portal-month-row label { max-width: 220px; }
.portal-total { text-align: right; }
.portal-total strong { display: block; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }

.bz-note { display: flex; gap: 14px; align-items: flex-start; background: var(--y-soft); border-color: #F1E2A6; }
.bz-note svg { width: 24px; height: 24px; color: #6b5200; margin-top: 2px; }
.bz-note p { margin: 0; font-size: 14.5px; }

.portal-details-row { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid #F0EEE8; font-size: 15px; }
.portal-details-row:last-child { border-bottom: none; }
.portal-details-row span:first-child { width: 190px; flex-shrink: 0; color: var(--muted); font-weight: 600; }
#tab-details > .portal-muted { margin-top: 10px; }

/* Kājene */
.bz-foot { color: var(--muted); font-size: 13px; padding: 22px 0; border-top: 1px solid var(--line); background: var(--paper); }

/* ------------------------------ Adaptīvi ------------------------------ */
@media (max-width: 960px) {
  .bz-login { grid-template-columns: 1fr; min-height: 0; }
  .bz-hero { padding: 48px 24px 40px; }
  .bz-auth { padding: 0 16px 48px; margin-top: -24px; position: relative; z-index: 2; }
  .portal-inline-form { grid-template-columns: 1fr 1fr; }
  .portal-inline-form .btn-primary { grid-column: span 2; }
}
@media (max-width: 600px) {
  .bz-wrap { padding: 0 16px; }
  .bz-nav-links a { display: none; }
  .bz-hero { padding: 32px 20px 48px; }
  .bz-features { display: none; }
  .bz-lead { margin-bottom: 0; }
  .bz-hero h1 { font-size: 34px; }
  .bz-lead { font-size: 16px; }
  .bz-auth-card { padding: 26px 20px 22px; border-radius: 22px; }
  .bz-narrow, .bz-dash { padding: 28px 16px 48px; }
  .bz-card { padding: 22px 18px; }
  .bz-grid { grid-template-columns: 1fr; }
  .bz-grid .span-2 { grid-column: auto; }
  .portal-header { padding: 20px; border-radius: 22px; flex-wrap: wrap; }
  .portal-tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .portal-tab { flex: auto; }
  .portal-inline-form { grid-template-columns: 1fr; }
  .portal-inline-form .btn-primary { grid-column: auto; }
  .portal-month-row { flex-direction: column; align-items: stretch; }
  .portal-total { text-align: left; }
  .portal-details-row { flex-direction: column; gap: 2px; }
  .portal-details-row span:first-child { width: auto; }
}

/* Veiksmīgs paziņojums (piem., paroles saite nosūtīta) */
#login-info { background: #E8F6EC; color: #1E6B35; border: 1px solid #BFE3CB; border-radius: 12px; padding: 12px 14px; font-weight: 600; }

/* Pieslēgšanās un pārvaldnieki */
.bz-access h2 { margin: 0 0 4px; }
.bz-access > .portal-muted { margin-bottom: 14px; }
.bz-admin-row { padding: 12px 0; border-bottom: 1px solid #F0EEE8; }
.bz-admin-row:last-child { border-bottom: 0; }
.bz-admin-form { grid-template-columns: 1fr auto; margin-top: 14px; }
.bz-howto { margin-top: 14px; font-size: 14px; color: var(--muted); }
.bz-howto summary { cursor: pointer; font-weight: 700; color: var(--text); }
.bz-howto ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 600px) { .bz-admin-form { grid-template-columns: 1fr; } }

.bz-banner-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--y-soft); color: #5a4500; border: 1px solid #F1E2A6; }
.bz-banner-info button { font: inherit; font-weight: 800; font-size: 14px; background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer; }
