/* ===== Lokalne fonty Roboto (zamiast Google Fonts) ===== */
@font-face { font-family: 'Roboto'; src: url('../fonts/roboto_regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../fonts/roboto_medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../fonts/roboto_medium_italic.ttf') format('truetype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../fonts/roboto_bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../fonts/roboto_black.ttf') format('truetype'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('../fonts/roboto_light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }

:root {
  --text: #4aa2fc;
  --secondary: #1f2227;
  --gray: #67707b;
  --shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
  --width: 90%;
  --background: #111218;
  --border: 0.1px solid rgb(189, 189, 189);
  --gray-border: rgb(51, 51, 51);
  --background2: #1f2326;
  --font: #ffffff;
  --font2: black;
  --nav-inactive: #8a8f97;
  --nav-active: #4aa2fc;
}

html {
  height: 100%;
  width: 100%;
  background: #111218;
  -webkit-background-clip: border-box;
  scroll-behavior: smooth;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

body {
  background-color: #111218;
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
  margin: 0;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: none;
}

p, input, span, label, strong, button, li, h1, h2, h3 {
  font-family: "Roboto", sans-serif;
  color: white;
}

* {
  font-family: "Roboto", sans-serif;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

img { pointer-events: none; }

::-webkit-scrollbar { display: none; }
::-webkit-scrollbar-track { display: none; }
::-webkit-scrollbar-thumb { display: none; }

.container { width: var(--width); margin-left: auto; margin-right: auto; }

/* ===== Gorny pasek (fixed) ===== */
.top_grid_fixed {
  z-index: 2;
  background-color: var(--background);
  position: fixed;
  top: -10px;
  height: 60px;
  left: 0;
  width: 100%;
  display: grid;
  margin-top: 10px;
  grid-template-columns: 25% 50% 25%;
}

.action_grid_fixed {
  cursor: pointer;
  margin-left: 10px;
  display: grid;
  grid-template-columns: max-content max-content;
}

.back_img { width: 15px; margin-top: auto; margin-bottom: auto; }
.back_img_fixed { width: 15px; margin-top: auto; margin-bottom: auto; }

.back_text, .back_text_fixed {
  color: var(--text);
  font-weight: 400;
  font-size: 22px;
  height: max-content;
  margin-top: auto;
  margin-bottom: auto;
  margin-left: 10px;
  cursor: pointer;
}

.title_text, .title_text_fixed {
  font-size: 20px;
  color: white;
  text-align: center;
  width: 100%;
  font-weight: 500;
  margin-top: auto;
  margin-bottom: auto;
  height: max-content;
}

.help_img, .help_img_fixed {
  width: 20px;
  margin-right: 15px;
  margin-left: auto;
  margin-top: auto;
  margin-bottom: auto;
  cursor: pointer;
}

/* ===== Bottom bar (nawigacja) - inline SVG ===== */
.bottom_bar {
  position: fixed;
  background-color: var(--secondary);
  border-top: none;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 110px;
  z-index: 999;
}

.bottom_bar_grid {
  display: grid;
  grid-template-columns: repeat(4, calc(100% / 4));
  height: 100%;
  margin-top: 20px;
  width: 100%;
}

.bottom_element_grid {
  margin-top: 3px;
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: 100%;
  grid-template-rows: max-content max-content;
  height: max-content;
  width: 100%;
  display: grid;
  cursor: pointer;
}

.bottom_element_image {
  pointer-events: none;
  width: 32px;
  height: 32px;
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-inactive);
}

.bottom_element_image svg { width: 28px; height: 28px; display: block; }

.bottom_element_grid.active .bottom_element_image { color: var(--nav-active); }
.bottom_element_grid.active .bottom_element_text { color: var(--nav-active); }

.bottom_element_text {
  margin-top: 3px;
  font-size: 13px;
  color: var(--nav-inactive);
  font-weight: 500;
  text-align: center;
}

/* ===== Tytuly / przyciski ===== */
.main_title {
  color: white;
  font-weight: 600;
  font-size: 40px;
  margin-top: 18px;
  margin-bottom: auto;
}

.main_page_logo { width: 40px; }

.main_button {
  color: #4ba4fe;
  background-color: #0a294c;
  width: max-content;
  padding-left: 18px;
  padding-right: 18px;
  font-size: 16px;
  font-weight: 600;
  height: 32px;
  margin-top: auto;
  margin-bottom: auto;
  margin-left: auto;
  margin-right: 20px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
}

.main_button_filled {
  border: none;
  color: var(--text);
  background-color: #0a284d;
  width: max-content;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 16px;
  font-weight: 500;
  height: 35px;
  margin-top: auto;
  margin-bottom: auto;
  border-radius: 20px;
  cursor: pointer;
}

.open { color: var(--text); }

/* ===== Lista uslug ===== */
.services_list {
  display: grid;
  grid-template-columns: 100%;
  width: 100%;
  height: max-content;
  grid-auto-flow: row;
  grid-auto-rows: max-content;
  background-color: var(--secondary);
  border-radius: 15px;
  margin-bottom: 40px;
  margin-top: 15px;
}

.service {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 8% 77% 15%;
  border-bottom: 0.5px solid var(--gray-border);
  height: max-content;
  cursor: pointer;
}

.service_icon {
  width: 30px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.service_name {
  margin-top: auto;
  margin-bottom: auto;
  width: 100%;
  height: max-content;
  color: white;
  margin-left: 20px;
  font-weight: 500;
  font-size: 22px;
}

.arrow {
  width: 20px;
  margin-top: auto;
  margin-bottom: auto;
  margin-right: 0px;
  margin-left: auto;
}

.action_arrow {
  width: 20px;
  margin-right: 20px;
  margin-left: auto;
  margin-top: auto;
  margin-bottom: auto;
  transition: 200ms;
}

/* ===== Top slide bar (flow) ===== */
.top_slide_bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--background);
  display: grid;
  grid-template-columns: max-content max-content max-content;
  align-items: center;
  z-index: 5;
  transform: translateY(-100%);
  transition: transform 0.25s ease;
  padding: 0 16px;
  gap: 12px;
}

.top_slide_bar_open { transform: translateY(0); }
.top_slide_bar .main_title { font-size: 22px; margin: 0; }
.top_slide_bar .main_button { margin-right: 0; }

/* ===== Pola / karty (id) ===== */
.field {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #323332;
  color: white;
}

.field:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.field label { font-size: 15px; color: #ffffff; display: block; margin-bottom: 5px; }
.field strong { font-size: 20px; display: block; color: #ffffff; font-weight: 500; }

.value-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}

.value-copy button {
  color: #4ba4fe;
  background-color: #0a294c;
  width: max-content;
  padding-left: 18px;
  padding-right: 18px;
  font-size: 16px;
  font-weight: 600;
  height: 32px;
  margin-left: auto;
  margin-right: -3px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
}

/* ===== Modal confirm (bottom sheet) ===== */
.confirm, .error {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  z-index: 1000;
}

.opacity {
  background-color: rgb(0, 0, 0);
  opacity: 0;
  width: 100%;
  height: 100%;
  transition: 400ms;
}

.page {
  transition: 400ms;
  height: 90%;
  position: fixed;
  bottom: -2000px;
  left: 0;
  width: 100%;
  background-color: #111218;
  border-radius: 30px 30px 0 0;
  overflow-y: auto;
}

.page_open { width: 100%; }
.page_open .opacity { opacity: 0.5; }
.page_1_open .page_1 { bottom: 0; }

.confirm_title {
  width: max-content;
  margin: 30px auto 10px;
  font-size: 17px;
  font-weight: bold;
  color: white;
}

.confirm_info {
  width: 90%;
  margin: 0 auto;
  height: max-content;
  border: 0.5px solid var(--gray-border);
  border-radius: 19px;
  display: grid;
  grid-template-columns: 100%;
  grid-auto-flow: row;
  grid-auto-rows: max-content;
}

.confirm_box {
  position: relative;
  width: 90%;
  margin: 0 auto;
  border-bottom: 1px solid var(--gray-border);
  padding-bottom: 8px;
}

.box_top { color: white; font-size: 15px; margin-top: 20px; }
.box_value { color: white; font-size: 23px; font-weight: 500; margin-bottom: 10px; }
.box_highlight { font-size: 31px; font-weight: 600; }

.confirm_close {
  width: 90%;
  margin: 20px auto;
  border: 1px solid var(--text);
  border-radius: 25px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
}

/* ===== Modal bledu (QR / serwer) ===== */
.error_box {
  width: 85%;
  padding: 25px 20px;
  border-radius: 15px;
  background-color: #1f2326;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.error_open { width: 100%; }
.error_open .opacity { opacity: 0.7; }
.error_open .error_box { opacity: 1; visibility: visible; }

.error_icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: block;
}

.error_title {
  font-size: 22px;
  margin: 0 0 10px 0;
  font-weight: 600;
  color: white;
}

.error_description {
  margin: 0 0 25px 0;
  font-size: 15px;
  line-height: 1.4;
  color: #b9bdc4;
}

.error_button {
  width: 100%;
  padding: 15px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 10px;
  border: none;
  cursor: pointer;
}

.error_button.retry { background-color: #014A93; color: white; }
.error_button.back { background-color: transparent; color: #4aa2fc; border: 1.5px solid #4aa2fc; }

.loading {
  width: 40px;
  height: 40px;
  border: 3px solid #333;
  border-top: 3px solid #4aa2fc;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ===== Bottom holder / dodatkowe dane ===== */
.bottom_holder {
  position: relative;
  width: 95%;
  margin: 10px auto;
  height: 90px;
  background-color: var(--background2);
  box-shadow: var(--shadow);
  border-radius: 19px;
  overflow: hidden;
  transition: 200ms;
}

.info_holder { height: unset; max-height: 90px; }
.info_holder .bottom_grid { height: 90px; }
.unfolded { max-height: 1200px; }
.unfolded .action_arrow { rotate: 270deg; }

.bottom_grid {
  position: relative;
  display: grid;
  grid-template-columns: max-content max-content max-content;
  height: 100%;
  width: max-content;
  margin: auto 20px;
}

.bottom_image { pointer-events: none; width: 32px; margin: auto 0; }
.bottom_text { font-size: 18px; font-weight: 500; margin: auto 0 auto 17px; }

.bottom_update {
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 100%;
  height: 100%;
}

.bottom_update_grid {
  margin-left: 20px;
  margin: auto 0 auto 20px;
  display: grid;
  grid-template-rows: max-content max-content;
  height: max-content;
}

.bottom_update_text { color: #ffffff; font-size: 16px; font-weight: 500; }
.bottom_update_value { color: var(--font); font-weight: 600; font-size: 18px; }

.additional_holder {
  display: grid;
  grid-template-columns: 100%;
  grid-auto-rows: max-content;
}

.additional_grid {
  display: grid;
  width: 90%;
  margin: 5px auto;
  border-bottom: 0.1px solid #323332;
}

.additional_title { font-size: 15px; margin: auto 0; }
.additional_subtitle { font-size: 20px; font-weight: 500; margin: 3px 0 17px; }

.info_holder .action_arrow { rotate: 90deg; position: absolute; top: 35px; right: 20px; }

/* ===== Pomocnicze ===== */
.page_top { display: grid; grid-template-columns: repeat(2, 50%); margin-top: 20px; }
.action_box_text { color: white; margin: auto 0 auto 10%; font-weight: 500; font-size: 22px; }
