html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1c1e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  padding: 0;
}

.phone {
  position: relative;
  width: 393px;
  height: min(852px, 100dvh);
  max-width: 100vw;
  background: linear-gradient(160deg, #a5d0e6 0%, #b6deec 52%, #c9edda 100%);
  border-radius: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Lock screen */

.lock-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 90px;
}

.lock-title {
  font-size: 22px;
  font-weight: 600;
  color: #1c1c1e;
  margin-bottom: 36px;
}

.dots {
  display: flex;
  gap: 16px;
  margin-bottom: 60px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #1c1c1e;
  background: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}

.dot.filled {
  background: #1c1c1e;
  transform: scale(1.1);
}

.dots.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 22px 28px;
  justify-content: center;
}

.key {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #1c1c1e;
  font-size: 26px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.1s ease, background 0.1s ease;
}

.key:active {
  background: #e4e4e6;
  transform: scale(0.95);
}

.key-spacer {
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.key-del {
  background: transparent;
  box-shadow: none;
  font-size: 22px;
}

.key-del:active {
  background: transparent;
  transform: scale(0.9);
}

.forgot-btn {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  margin: auto;
  background: none;
  border: none;
  color: #1c1c1e;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.75;
}

/* Home screen */

.home-screen {
  overflow-y: auto;
  padding: 76px 24px 108px;
  scrollbar-width: none;
}

.home-screen::-webkit-scrollbar { display: none; }

/* Documents screen */

.documents-screen { overflow: hidden; padding: 138px 0 108px; }
.documents-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 32px;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 32px;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
.documents-carousel::-webkit-scrollbar { display: none; }
.document-slide {
  position: relative;
  flex: 0 0 calc(100% - 64px);
  overflow: hidden;
  border-radius: 28px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: rgba(237, 244, 247, .7);
}
.document-slide img { display: block; width: 100%; height: auto; }
.document-ticker {
  position: absolute;
  top: 72.1%;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 24px;
  overflow: hidden;
  color: #111;
  background: #a9efa8;
}
.document-ticker span {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  animation: document-ticker 11s linear infinite;
}
@keyframes document-ticker { to { transform: translateX(-100%); } }
.document-dots { display: flex; justify-content: center; gap: 9px; margin-top: 26px; }
.document-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.65);
}
.document-dots button.active { background: #fff; }

.document-interactive { overflow: hidden; background: transparent; }
.document-flip {
  width: 100%;
  aspect-ratio: 493 / 742;
  cursor: pointer;
  perspective: 1200px;
  outline: none;
  touch-action: pan-x;
}
.document-flip:focus-visible { outline: 2px solid #000; outline-offset: 4px; border-radius: 28px; }
.document-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: center center;
  transition: transform .65s cubic-bezier(.2, .7, .25, 1);
  will-change: transform;
}
.document-flip.is-flipped .document-flip-inner { transform: rotateY(-180deg); }
.document-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 28px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: transparent;
}
.document-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.document-back { transform: rotateY(180deg); }
.document-code-back { position: absolute; }
.document-code-timer {
  position: absolute;
  top: 8.6%;
  left: 17%;
  right: 17%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 7%;
  color: #777;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.document-code-switch { position: absolute; top: 71%; right: 14%; left: 14%; height: 24%; display: flex; }
.document-code-switch button { flex: 1; border: 0; background: transparent; cursor: pointer; }
.document-code-switch button:focus-visible { outline: 2px solid #000; border-radius: 50%; }

.native-document {
  overflow: hidden;
  color: #050505;
  background: linear-gradient(145deg, rgba(236, 242, 238, .92), rgba(198, 225, 215, .88));
  padding: 32px 17px 20px;
}
.native-document h2,
.native-document h3,
.native-document p { margin: 0; white-space: pre-line; }
.native-document h2 { max-width: 285px; font-size: 18px; line-height: 1.12; font-weight: 600; }
.native-document h3 { margin-top: 23px; font-size: 16px; line-height: 1.15; font-weight: 500; }
.document-face .native-photo { position: absolute; top: 70px; left: 17px; width: 137px; height: 183px; border-radius: 15px; object-fit: cover; background: #fff; }
.native-fields { position: absolute; top: 106px; left: 174px; right: 15px; }
.native-field { margin-bottom: 20px; font-size: 14px; line-height: 1.15; }
.native-field span, .native-field strong { display: block; white-space: pre-line; }
.native-field strong { margin-top: 7px; font-weight: 500; }
.native-name { position: absolute; left: 17px; bottom: 47px; white-space: pre-line; font-size: 18px; line-height: 1.15; font-weight: 500; }
.native-number { position: absolute; left: 17px; bottom: 49px; font-size: 19px; font-weight: 500; }
.native-update { position: absolute; right: 0; bottom: 97px; left: 0; height: 22px; overflow: hidden; padding: 2px 0; color: #111; background: #a9efa8; font-size: 11px; line-height: 18px; white-space: nowrap; animation: native-ticker 13s linear infinite; }
@keyframes native-ticker { from { transform: translateX(0); } to { transform: translateX(-18%); } }
.native-more { position: absolute; right: 17px; bottom: 25px; width: 27px; height: 27px; padding: 0 0 5px; border: 0; border-radius: 50%; color: #fff; background: #000; font-size: 11px; letter-spacing: 1px; }
.native-tax .native-fields, .native-vpo .native-fields, .native-birth .native-fields { top: 94px; left: 17px; right: 17px; }
.native-tax .native-field, .native-vpo .native-field { margin-bottom: 21px; }
.native-tax .native-number, .native-vpo .native-number { bottom: 51px; }
.native-birth h3 { margin-top: 23px; }
.native-birth .native-fields { top: 196px; }
.native-birth .native-name { bottom: 47px; }

/* Services screen */

.services-screen {
  overflow-y: auto;
  padding: 76px 30px 108px;
  scrollbar-width: none;
}

.services-screen::-webkit-scrollbar { display: none; }
.services-header h1 { margin: 0 0 24px; color: #000; font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -1.2px; }
.services-search { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 18px; margin-bottom: 19px; border-radius: 25px; background: #fff; }
.services-search svg { width: 25px; height: 25px; flex: 0 0 25px; fill: none; stroke: #9a9a9a; stroke-width: 2; stroke-linecap: round; }
.services-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #000; font: inherit; font-size: 18px; }
.services-search input::placeholder { color: #a5a5a5; }
.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.services-grid button { aspect-ratio: 244 / 207; padding: 20px; border: 0; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; background: rgba(242, 248, 249, .76); color: #000; cursor: pointer; }
.services-grid img { display: none; }
.services-grid button::before { content: ""; width: 40px; height: 40px; flex: 0 0 40px; position: relative; left: -3px; top: 0; background: center / contain no-repeat; }
.services-grid button::after { white-space: pre-line; margin-top: auto; font: 500 17px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; text-align: left; }
.services-grid button:nth-child(1)::before { background-image: url("assets/reference-icons/service-icon-01.png"); }
.services-grid button:nth-child(1)::after { content: "Допомога\A армії"; }
.services-grid button:nth-child(2)::before { background-image: url("assets/reference-icons/service-icon-02.png"); }
.services-grid button:nth-child(2)::after { content: "Незламність"; }
.services-grid button:nth-child(3)::before { background-image: url("assets/reference-icons/service-icon-03.png"); }
.services-grid button:nth-child(3)::after { content: "Дія.Картка"; }
.services-grid button:nth-child(4)::before { background-image: url("assets/reference-icons/service-icon-04.png"); }
.services-grid button:nth-child(4)::after { content: "Військові\A облігації"; }
.services-grid button:nth-child(5)::before { background-image: url("assets/reference-icons/service-icon-05.png"); }
.services-grid button:nth-child(5)::after { content: "Лінія дронів"; }
.services-grid button:nth-child(6)::before { background-image: url("assets/reference-icons/service-icon-06.png"); }
.services-grid button:nth-child(6)::after { content: "Національний\A кешбек"; }
.services-grid button:nth-child(7)::before { background-image: url("assets/reference-icons/service-icon-07.png"); }
.services-grid button:nth-child(7)::after { content: "єВідновлення"; }
.services-grid button:nth-child(8)::before { background-image: url("assets/reference-icons/service-icon-08.png"); }
.services-grid button:nth-child(8)::after { content: "Міжнародний\A Реєстр збитків"; }
.services-grid button:nth-child(9)::before { background-image: url("assets/reference-icons/service-icon-09.png"); }
.services-grid button:nth-child(9)::after { content: "Ветеранський\A спорт"; }
.services-grid button:nth-child(10)::before { background-image: url("assets/reference-icons/service-icon-10.png"); }
.services-grid button:nth-child(10)::after { content: "Водієві"; }
.services-grid button:nth-child(11)::before { background-image: url("assets/reference-icons/service-icon-11.png"); }
.services-grid button:nth-child(11)::after { content: "Місце\A проживання"; }
.services-grid button:nth-child(12)::before { background-image: url("assets/reference-icons/service-icon-12.png"); }
.services-grid button:nth-child(12)::after { content: "Чатбот єВорог"; }
.services-grid button:nth-child(13)::before { background-image: url("assets/reference-icons/service-icon-13.png"); }
.services-grid button:nth-child(13)::after { content: "Податкові\A послуги"; }
.services-grid button:nth-child(14)::before { background-image: url("assets/reference-icons/service-icon-14.png"); }
.services-grid button:nth-child(14)::after { content: "Допомога від\A держави"; }
.services-grid button:nth-child(15)::before { background-image: url("assets/reference-icons/service-icon-15.png"); }
.services-grid button:nth-child(15)::after { content: "Шлюб онлайн"; }
.services-grid button:nth-child(16)::before { background-image: url("assets/reference-icons/service-icon-16.png"); }
.services-grid button:nth-child(16)::after { content: "Послуги для\A ВПО"; }
.services-grid button:nth-child(17)::before { background-image: url("assets/reference-icons/service-icon-17.png"); }
.services-grid button:nth-child(17)::after { content: "Підприємцю"; }
.services-grid button:nth-child(18)::before { background-image: url("assets/reference-icons/service-icon-18.png"); }
.services-grid button:nth-child(18)::after { content: "Допомога по\A безробіттю"; }
.services-grid button:nth-child(19)::before { background-image: url("assets/reference-icons/service-icon-19.png"); }
.services-grid button:nth-child(19)::after { content: "Судові\A послуги"; }
.services-grid button:nth-child(20)::before { background-image: url("assets/reference-icons/service-icon-20.png"); }
.services-grid button:nth-child(20)::after { content: "єОселя"; }
.services-grid button:nth-child(21)::before { background-image: url("assets/reference-icons/service-icon-21.png"); }
.services-grid button:nth-child(21)::after { content: "Виконавчі\A провадження"; }
.services-grid button:nth-child(22)::before { background-image: url("assets/reference-icons/service-icon-22.png"); }
.services-grid button:nth-child(22)::after { content: "Довідки та\A витяги"; }
.services-grid button:nth-child(23)::before { background-image: url("assets/reference-icons/service-icon-23.png"); }
.services-grid button:nth-child(23)::after { content: "Розваги"; }
.services-grid button:nth-child(24)::before { background-image: url("assets/reference-icons/service-icon-24.png"); }
.services-grid button:nth-child(24)::after { content: "Повернення\A вкладів"; }
.services-grid button:nth-child(25)::before { background-image: url("assets/reference-icons/service-icon-25.png"); }
.services-grid button:nth-child(25)::after { content: "Опитування"; }
.services-grid button:nth-child(26)::before { background-image: url("assets/reference-icons/service-icon-26.png"); }
.services-grid button:nth-child(26)::after { content: "Дані з реєстру\A ветеранів"; }
.services-grid button:nth-child(27)::before { background-image: url("assets/reference-icons/service-icon-27.png"); }
.services-grid button:nth-child(27)::after { content: "Заява на\A житловий ва..."; }
.services-grid button:nth-child(28)::before { background-image: url("assets/reference-icons/service-icon-28.png"); }
.services-grid button:nth-child(28)::after { content: "Компенсація\A автоцивілки"; }

/* Menu screen */

.menu-screen {
  overflow-y: auto;
  padding: 62px 24px 112px;
  scrollbar-width: none;
}

.menu-screen::-webkit-scrollbar { display: none; }
.menu-header { margin-bottom: 47px; }
.menu-header h1 { color: #000; font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -1.2px; margin-bottom: 12px; }
.menu-header p { color: #3f5059; font-size: 17px; }
.menu-groups { display: grid; gap: 24px; }
.menu-card { overflow: hidden; border-radius: 22px; background: rgba(255,255,255,.94); padding: 0 24px; }
.menu-row { width: 100%; min-height: 86px; display: flex; align-items: center; gap: 22px; border: 0; border-bottom: 1px solid #e0e8ea; background: transparent; color: #000; font: inherit; font-size: 21px; font-weight: 500; text-align: left; cursor: pointer; }
.menu-row:last-child { border-bottom: 0; }
.menu-row-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; }
.menu-row-icon svg { width: 30px; height: 30px; }
.menu-row-icon img { width: 27px; height: 27px; object-fit: contain; display: block; }
.menu-footer { display: flex; flex-direction: column; align-items: center; gap: 38px; margin: 48px 0 12px; }
.logout-button { width: 174px; height: 58px; border: 0; border-radius: 30px; background: #000; color: #fff; font: inherit; font-size: 21px; cursor: pointer; }
.menu-footer a { color: #000; font-size: 14px; text-align: center; text-decoration: underline; }

.home-header {
  margin-top: 0;
}

.home-header h1 {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -1.3px;
  color: #000;
  margin-bottom: 30px;
}

.resilience-card {
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  margin-bottom: 47px;
  color: #000;
}

.resilience-card img { display: block; width: 100%; height: auto; }

.resilience-card h2 { font-size: 28px; line-height: 1; font-weight: 500; margin-bottom: 11px; letter-spacing: -0.8px; }
.resilience-card p { font-size: 14px; line-height: 1.03; font-weight: 500; margin-bottom: 13px; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-badges { display: flex; }
.service-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-right: -3px;
  border: 2px solid rgba(255,255,255,.75);
}
.service-badge svg { width: 20px; height: 20px; fill: currentColor; }
.service-badge.yellow { background: #f4d800; color: #000; }
.service-badge.blue { background: #3270df; }
.service-badge.green { background: #288854; }

.round-arrow, .white-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
}

.round-arrow svg, .white-arrow svg, .popular-services b svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-actions {
  display: flex;
  justify-content: space-between;
  gap: 0;
  margin-bottom: 61px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.05;
  text-align: center;
  color: #000;
  font-weight: 500;
  width: 85px;
}

.quick-icon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-icon svg {
  width: 30px;
  height: 30px;
}

.quick-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.tryzub { width: 30px; height: 36px; color: #fff; }

.drone-banner {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 28px;
}

.drone-banner img, .cashback-card img, .news-card img, .popular-services img { display: block; width: 100%; height: auto; }
.cashback-card { overflow: hidden; border-radius: 18px; margin-bottom: 43px; }

.section-title {
  font-size: 21px;
  color: #000;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.news-carousel { display: flex; gap: 12px; overflow-x: auto; margin: 0 -24px; padding: 0 24px; scroll-snap-type: x mandatory; scroll-padding-left: 24px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.news-carousel::-webkit-scrollbar { display: none; }
.news-card { flex: 0 0 100%; scroll-snap-align: start; width: 100%; border-radius: 18px; overflow: hidden; background: #fff; }
.news-art { height: 117px; position: relative; overflow: hidden; background: linear-gradient(135deg, #ffd5a5, #f4aeb8); }
.news-art::before, .news-art::after { content: ""; position: absolute; border-radius: 48% 52% 40% 60%; background: rgba(255,255,255,.5); filter: blur(1px); transform: rotate(29deg); }
.news-art::before { width: 96px; height: 145px; left: 40px; top: 43px; }
.news-art::after { width: 93px; height: 160px; right: 93px; top: -4px; }
.news-art i { position: absolute; width: 57px; height: 57px; top: 18px; left: 145px; background: #c99198; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.news-art b { position: absolute; top: 41px; right: 122px; color: #e99aa8; font-size: 71px; transform: rotate(32deg); }
.news-copy { padding: 13px 16px 16px; }
.news-copy time { color: #666; font-size: 13px; }
.news-copy h4 { font-size: 18px; line-height: 1.06; margin-top: 11px; font-weight: 500; }
.slider-dots { display: flex; justify-content: center; gap: 8px; min-height: 8px; margin: 19px 0 34px; }
.slider-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.65); cursor: pointer; }
.slider-dots button.active { background: #000; }
.popular-title { margin-bottom: 18px; }
.popular-services { border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.93); margin-bottom: 24px; }
.popular-services button { width: 100%; min-height: 57px; border: 0; border-bottom: 1px solid #e0e6e7; display: flex; align-items: center; justify-content: space-between; background: transparent; color: #000; font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
.popular-services button:last-child { border-bottom: 0; }
.popular-services b { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; font-weight: 400; }

/* Bottom nav */

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 86px;
  background: #000;
  display: flex;
  align-items: flex-start;
  padding: 12px 10px 0;
  transition: opacity 0.5s ease;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  color: #ffffff;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  opacity: 1;
}

.nav-item.active {
  color: #ffffff;
  font-weight: 500;
}

.nav-icon {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 35px;
  height: 35px;
}

.nav-icon img {
  width: 35px;
  height: 35px;
  display: block;
  object-fit: cover;
}

.nav-icon .nav-icon-active { display: none; }
.nav-item.active .nav-icon .nav-icon-normal { display: none; }
.nav-item.active .nav-icon .nav-icon-active { display: block; }

@media (max-width: 600px) {
  body { align-items: stretch; justify-content: stretch; }
  .phone {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}
