:root {
  --bnp-green: #008854;
  --bnp-green-dark: #00643e;
  --bnp-text: #212121;
  --bnp-muted: #424242;
  --bnp-white: #fff;
  --bnp-grey-bg: #f2f2f2;
  --bnp-highlight: #f0f0f0;
  --bnp-link: #008854;
  --bnp-btn-disabled: #a8bdb5;
  --bnp-header-h: 70px;
  --bnp-body-max: 1280px;
  --bnp-page-pad-x: clamp(56px, 11vw, 200px);
  --bnp-ident-w: 56.4%;
  --bnp-form-w: 400px;
  --bnp-radius: 4px;
  --font: "Open Sans", Arial, Helvetica, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--bnp-text);
  background: var(--bnp-grey-bg);
}

.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;
}

/* Page shell — side margins only, full height */
.bnp-page {
  padding: 0 var(--bnp-page-pad-x);
  min-height: 100vh;
}

.bnp-shell {
  max-width: var(--bnp-body-max);
  margin: 0 auto;
  background: var(--bnp-white);
}

/* Header */
.bnp-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  height: var(--bnp-header-h);
  padding: 0 clamp(20px, 3vw, 40px);
  background: var(--bnp-white);
  border-bottom: 1px solid #f0f0f0;
}

.bnp-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.bnp-header__icon {
  display: block;
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

.bnp-header__brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.06em;
  line-height: 1;
}

.bnp-header__baseline {
  margin: 0;
  color: var(--bnp-muted);
  font-size: 1.267rem;
  font-weight: 400;
  line-height: 1.3;
}

/* Layout */
.bnp-main {
  display: flex;
  min-height: calc(100vh - var(--bnp-header-h));
}

.bnp-panel {
  flex: 0 0 var(--bnp-ident-w);
  background: var(--bnp-green);
  color: var(--bnp-white);
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bnp-aside {
  flex: 1;
  background: var(--bnp-white);
  padding: 100px 50px 100px 80px;
  color: var(--bnp-text);
}

.bnp-form-wrap {
  width: 100%;
  max-width: var(--bnp-form-w);
}

.bnp-form h1 {
  margin: 0 0 28px;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.bnp-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.bnp-fieldset.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.bnp-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.933rem;
  font-weight: 600;
}

/* Client number input */
.bnp-input-row {
  position: relative;
  margin-bottom: 16px;
}

.bnp-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 14px;
  border: 1px solid #dcdfe0;
  border-radius: var(--bnp-radius);
  font: inherit;
  font-size: 1rem;
  color: var(--bnp-text);
  background: var(--bnp-white);
}

.bnp-input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 1px;
}

.bnp-input-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #767676;
  cursor: pointer;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.bnp-input-clear.is-visible {
  display: flex;
}

.bnp-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.bnp-check-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.933rem;
  cursor: pointer;
}

.bnp-check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--bnp-green);
}

.bnp-info-btn {
  width: 25px;
  height: 25px;
  border: 0;
  background: transparent;
  color: var(--bnp-white);
  cursor: pointer;
  padding: 0;
}

/* PIN section */
.bnp-pin-title {
  margin: 0 0 20px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
}

.bnp-pin-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.bnp-pin-dots {
  display: flex;
  gap: 10px;
}

.bnp-pin-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.15s;
}

.bnp-pin-dots[data-count="1"] span:nth-child(-n+1),
.bnp-pin-dots[data-count="2"] span:nth-child(-n+2),
.bnp-pin-dots[data-count="3"] span:nth-child(-n+3),
.bnp-pin-dots[data-count="4"] span:nth-child(-n+4),
.bnp-pin-dots[data-count="5"] span:nth-child(-n+5),
.bnp-pin-dots[data-count="6"] span:nth-child(-n+6) {
  background: var(--bnp-white);
}

.bnp-backspace {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--bnp-white);
  cursor: pointer;
  padding: 0;
}

.bnp-keypad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 340px;
  margin: 0 auto 28px;
}

.bnp-key {
  aspect-ratio: 1;
  min-height: 52px;
  border: 0;
  border-radius: var(--bnp-radius);
  background: var(--bnp-white);
  color: var(--bnp-text);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s;
}

.bnp-key:hover { background: #d9d9d9; }
.bnp-key:active { background: #bfbfbf; }

/* Buttons */
.bnp-btn {
  display: block;
  width: 100%;
  max-width: var(--bnp-form-w);
  margin: 0 auto;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.bnp-btn--primary {
  background: var(--bnp-btn-disabled);
  color: var(--bnp-white);
}

.bnp-btn--primary:not(:disabled) {
  background: #40a38c;
  color: var(--bnp-white);
}

.bnp-btn--primary:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.bnp-btn--white {
  background: var(--bnp-white);
  color: var(--bnp-green);
}

.bnp-btn--white:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bnp-footer-link {
  display: block;
  margin-top: 28px;
  text-align: center;
}

.bnp-footer-link button {
  background: none;
  border: 0;
  color: var(--bnp-white);
  font: inherit;
  font-size: 0.933rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

/* Validation page */
.bnp-intro {
  margin: 0 0 16px;
  line-height: 1.5;
  font-size: 0.95rem;
  text-align: left;
}

.bnp-timer {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: var(--bnp-radius);
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.95rem;
}

.bnp-timer strong {
  font-size: 1.15rem;
}

.bnp-timer.is-expired {
  background: rgba(198, 40, 40, 0.2);
  color: #ffcdd2;
}

.bnp-status-block {
  margin-top: 8px;
  padding: 18px 14px;
  border-radius: var(--bnp-radius);
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.bnp-status-msg {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.bnp-status-msg--error {
  color: #ffcdd2;
  font-weight: 600;
}

.bnp-status-msg--wait {
  color: var(--bnp-white);
}

.bnp-status-msg--expired {
  color: #ffcdd2;
  font-weight: 600;
}

.bnp-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid #dcdfe0;
  border-radius: var(--bnp-radius);
  font: inherit;
  font-size: 0.95rem;
  color: var(--bnp-text);
  background: var(--bnp-white);
  resize: vertical;
}

.bnp-textarea:focus {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 1px;
}

.bnp-hint {
  margin: 10px 0 24px;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Aside */
.bnp-aside h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 1.133rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bnp-text);
}

.bnp-aside h2.help-title {
  margin-top: 80px;
}

.bnp-aside p {
  margin: 10px 0;
  line-height: 1.33;
  font-size: 0.933rem;
}

.bnp-aside strong {
  display: inline-block;
  padding: 6px 10px;
  background: var(--bnp-highlight);
  border-radius: var(--bnp-radius);
  font-weight: 600;
  color: var(--bnp-green);
}

.bnp-aside a {
  color: var(--bnp-link);
  font-weight: 700;
  text-decoration: underline;
}

/* Dialog */
.bnp-dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.bnp-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.bnp-dialog__inner {
  padding: 24px;
}

.bnp-dialog h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.bnp-dialog p {
  margin: 0 0 12px;
  line-height: 1.45;
}

.bnp-dialog__close {
  margin-top: 20px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: #28c3a9;
  color: var(--bnp-white);
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .bnp-page { padding: 0 24px; }
  .bnp-aside { padding: 80px 40px; }
}

@media (max-width: 900px) {
  .bnp-page { padding: 0 16px; }
  .bnp-main { flex-direction: column; min-height: auto; }
  .bnp-panel { flex: none; width: 100%; min-height: auto; }
  .bnp-aside { padding: 40px 24px; }
  .bnp-header__baseline { display: none; }
  .bnp-header__brand { font-size: 1.1rem; letter-spacing: 0.04em; }
  .bnp-header { padding: 0 20px; }
}

@media (max-width: 480px) {
  .bnp-page { padding: 0 8px; }
  .bnp-keypad { gap: 8px; }
  .bnp-key { min-height: 46px; font-size: 1.1rem; }
}
