/* ==========================================================================
   Gov.gr Wallet – στατικό πρωτότυπο (UI mockup)
   Διαστάσεις μετρημένες από screenshots συσκευής 1220×2712 (≈ 407 CSS px πλάτος).
   ========================================================================== */

:root {
  --navy-top: #03245c;
  --navy-bot: #042c74;
  --navy: #033474;
  --azure: #57acfc;
  --cyan: #00adef;
  --cyan-logo: #1ea1de;
  --red: #c1282d;
  --card-blue: #5f9ad2;
  --card-pink: #d39995;
  --card-alt: #1c3c77;
  --ink: #212429;
  --ink-gray: #909193;
  --muted: #a2b2cc;
  --line: rgba(255, 255, 255, 0.3);
  --tile-stroke: #466a9c;
  --font: Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Roboto Mono", "SF Mono", Menlo, Consolas, monospace;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--navy-top);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
svg { display: block; }
h1, h2, h3 { font-weight: 400; }
.icon-btn { display: grid; place-items: center; color: #fff; }
.icon-btn svg { width: 24px; height: 24px; }
button:active, a:active { opacity: 0.8; }
.tile--empty:active, .doc-card:active { opacity: 1; }

/* ---------- Κέλυφος εφαρμογής ---------- */
.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--navy-top);
}
/* Σε μεγάλη οθόνη (laptop) εμφανίζεται σε πλάτος κινητού, στο κέντρο */
@media (min-width: 620px) and (min-height: 500px) {
  body { background: #0b1226; }
  .app {
    inset: auto;
    left: 50%;
    top: 50%;
    width: 412px;
    height: min(904px, 100vh - 32px);
    transform: translate(-50%, -50%);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* ---------- Οθόνη φόρτωσης (splash) ----------
   Φόντο: το πραγματικό ντεγκραντέ ως μικρό raster (splash-bg.png) + οι κουκκίδες
   όπως εξήχθησαν μία προς μία από το screenshot της πραγματικής εφαρμογής. */
.splash {
  position: absolute;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: #002660 url("../assets/splash-bg.png") center / 100% 100% no-repeat;
  color: #fff;
  font-family: Poppins, var(--font);
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}
.splash.is-hiding { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-dots { position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block; }
.splash-logo {
  position: absolute;
  left: 50%;
  top: calc(28.4% + var(--sat) * 0.3);
  width: 154px;
  height: 97px;
  transform: translateX(-50%);
}
.bracket { position: absolute; width: 7px; height: 7px; border: 1.5px solid #19a3e2; }
.bracket.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.bracket.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.bracket.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.bracket.br { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.splash-word {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 25px;
  line-height: 27px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.splash-word span { display: block; }
.splash-word b, .splash-footer b { font-weight: inherit; color: #06a5e6; }
.splash-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(68px + var(--sab));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  font-size: 25px;
  line-height: 30px;
  letter-spacing: -0.2px;
}
.splash-footer img { width: 30px; height: 30px; }

/* ---------- Οθόνες & μεταβάσεις ---------- */
.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--navy);
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  transition: transform 0.32s var(--ease), visibility 0s linear 0.32s;
  will-change: transform;
}
.screen.is-active {
  transform: none;
  visibility: visible;
  transition: transform 0.32s var(--ease), visibility 0s;
}
.screen.is-under {
  transform: translate3d(-22%, 0, 0);
  visibility: hidden;
  transition: transform 0.32s var(--ease), visibility 0s linear 0.32s;
}
.screen[data-depth="0"] { z-index: 1; }
.screen[data-depth="1"] { z-index: 2; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35); }
.screen[data-depth="2"] { z-index: 3; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35); }
.app.no-anim .screen, .app.no-anim .drawer, .app.no-anim .drawer-backdrop { transition: none !important; }

.scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

/* ======================================================================
   ΟΘΟΝΗ 1/3/4 – Αρχική
   ====================================================================== */
.screen-home { background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-bot) 100%); }

.home-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  height: calc(72px + var(--sat));
  padding: var(--sat) 18px 0 22px;
  background: var(--navy-top) url("../assets/bg-header.svg") left bottom / 100% 72px no-repeat;
}
.menu-btn { width: 24px; height: 24px; margin-right: 21px; }
.logo {
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.6px;
  line-height: 1;
  padding-bottom: 2px;
}
.logo span { color: var(--cyan-logo); }
.maigov { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.maigov .robot { width: 34px; height: 36px; }
.maigov-text { font-weight: 700; font-size: 22px; letter-spacing: -0.3px; line-height: 1; padding-bottom: 2px; }
.maigov-text span { color: var(--cyan); }
.inbox-btn {
  position: relative;
  width: 30px;
  height: 30px;
  margin-left: 14px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy-top);
  display: grid;
  place-items: center;
}
.inbox-btn svg { width: 18px; height: 18px; }
.inbox-btn .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #80c479;
}

.home-content {
  background: url("../assets/bg-home.svg") top center / 100% auto no-repeat;
  padding-bottom: calc(22px + var(--sab));
}

/* Carousel εγγράφων */
.carousel {
  display: flex;
  gap: 12px;
  padding: 0 6px 0 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 14px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .doc-card { flex: 0 0 calc(100% - 44px); scroll-snap-align: start; }

.doc-card {
  position: relative;
  display: block;
  height: 204px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.doc-card-top {
  height: 105px;
  padding: 15px 16px 0;
  background-color: var(--card-blue);
  background-image: url("../assets/pattern-id.png");
  background-size: 100% 100%;
}
.doc-card-top h2 { font-size: 20px; line-height: 24px; color: #fff; }
.doc-card--dl .doc-card-top { background-color: var(--card-pink); }
.doc-card--academic .doc-card-top { background-color: var(--azure); background-image: url("../assets/pattern-academic.png"); }
.doc-card-body { padding: 18px 16px 0; }
.doc-number {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 30px;
  line-height: 34px;
  letter-spacing: 0.3px;
}
.doc-sub { margin-top: 7px; font-size: 14px; line-height: 18px; color: var(--ink-gray); }
.doc-card--academic .doc-card-body { padding-top: 30px; }
.doc-card--academic .doc-number { font-family: var(--font); font-size: 24px; line-height: 30px; letter-spacing: 0; }
.doc-card--academic .doc-sub { margin-top: 3px; font-size: 11.5px; line-height: 17px; letter-spacing: -0.25px; white-space: nowrap; }
.doc-photo {
  position: absolute;
  top: 84px;
  right: 17px;
  width: 102px;
  height: 102px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.dots { display: flex; justify-content: center; gap: 7px; margin-top: 20px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #2d5171; }
.dots i.is-on { background: #fff; }

.pin-btn {
  display: flex;
  align-items: center;
  width: calc(100% - 48px);
  margin: 23px 24px 0;
  height: 58px;
  border: 1.5px solid #fff;
  border-radius: 16px;
  padding: 0 25px 0 18px;
  font-size: 20px;
}
.pin-btn svg { margin-left: auto; width: 24px; height: 24px; }

/* Ενότητες αρχικής */
.hsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  padding: 0 10px 0 16px;
}
.hsection-head h3 { font-size: 18px; line-height: 22px; }
.link-btn { display: flex; align-items: center; gap: 3px; font-size: 14px; line-height: 22px; }
.link-btn svg { width: 16px; height: 16px; color: var(--cyan); }

.hscroll {
  display: flex;
  gap: 17px;
  padding: 18px 16px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }

.hsection--wallet { margin-top: 27px; padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.tiles {
  display: flex;
  gap: 21px;
  padding: 11px 16px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 52px; width: 52px; display: flex; flex-direction: column; align-items: center; }
.tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #fff;
  color: #123a7a;
  display: grid;
  place-items: center;
}
.tile-icon .i-tickets { width: 34px; height: 34px; }
.tile-icon .i-id { width: 40px; height: 40px; }
.tile-label {
  width: 92px;
  margin: 8px -20px 0;
  text-align: center;
  font-size: 13px;
  line-height: 14.5px;
}
.tile--empty {
  height: 52px;
  border-radius: 10px;
  border: 1.5px solid var(--tile-stroke);
  background: rgba(255, 255, 255, 0.02);
}

.hsection--inbox { padding: 12px 0 20px; border-bottom: 1px solid var(--line); }
.inbox-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 163px;
  height: 136px;
  padding: 12px 12px 12px;
  border: 1.5px solid #fff;
  border-radius: 15px;
  background: var(--card-alt);
}
.inbox-card .badge { position: absolute; top: 9px; right: 12px; font-size: 13px; font-weight: 700; color: var(--cyan); }
.inbox-card p { margin-top: 19px; font-size: 14px; line-height: 18px; letter-spacing: -0.1px; }
.inbox-card time { margin-top: auto; font-size: 14px; line-height: 18px; color: var(--muted); }

.hsection--services { padding-top: 12px; }
.service-card {
  flex: 0 0 163px;
  height: 94px;
  padding: 11px 11px 0;
  border-radius: 10px;
  background: var(--card-alt);
}
.service-card p { font-size: 14px; line-height: 18px; letter-spacing: -0.2px; }

.home-footer { padding: 64px 16px 0; text-align: center; }
.footer-link { font-size: 15px; line-height: 20px; text-decoration: underline; text-underline-offset: 2px; }
.version { margin-top: 9px; font-size: 15px; line-height: 20px; color: #a9b8d1; }

.fab {
  position: absolute;
  right: 31px;
  bottom: calc(25px + var(--sab));
  z-index: 6;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--cyan);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 7px rgba(0, 173, 239, 0.28), 0 4px 12px rgba(0, 0, 0, 0.3);
}
.fab svg { width: 28px; height: 28px; }

/* ======================================================================
   ΟΘΟΝΗ 5 – Επιλογή Ακαδημαϊκής Ταυτότητας
   ====================================================================== */
.modal-header {
  display: flex;
  align-items: center;
  height: calc(100px + var(--sat));
  padding: var(--sat) 26px 0 18px;
}
.modal-header .icon-btn { width: 32px; height: 32px; }
.modal-header .icon-btn svg { width: 23px; height: 23px; }
.modal-header h1 { flex: 1; text-align: center; font-size: 20px; line-height: 24px; }
.round-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cyan);
  color: #fff;
  display: grid;
  place-items: center;
}
.round-btn svg { width: 18px; height: 18px; }
.screen-academic .doc-card { margin: 0 24px; }

/* ======================================================================
   ΟΘΟΝΗ 6/7 – Λεπτομέρειες Ακαδημαϊκής Ταυτότητας
   ====================================================================== */
.screen-detail { background: var(--navy) url("../assets/watermark.svg") center 0 / 100% auto no-repeat; }
.detail-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  height: calc(63px + var(--sat));
  padding: calc(17px + var(--sat)) 24px 0;
  background: var(--azure);
}
.detail-bar h1 { flex: 1; text-align: center; font-size: 20px; line-height: 24px; }
.detail-bar .icon-btn { width: 24px; height: 24px; }
.detail-hero {
  position: relative;
  height: 164px;
  padding: 21px 0 0 32px;
  background: var(--azure);
}
.detail-hero-text { max-width: calc(100% - 163px - 28px - 32px - 12px); } /* ποτέ κάτω από τη φωτογραφία */
.detail-hero .lbl { font-size: 14px; line-height: 18px; color: rgba(255, 255, 255, 0.88); white-space: nowrap; }
.detail-hero .val-big { margin-top: 4px; font-size: 20px; line-height: 26px; font-weight: 700; }
.detail-hero .lbl--small { margin-top: 5px; font-size: 10px; line-height: 14px; }
.detail-hero .val { margin-top: 2px; font-size: 15px; line-height: 20px; font-weight: 700; }
.detail-photo {
  position: absolute;
  top: 21px;
  right: 28px;
  width: 163px;
  height: 163px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.detail-actions { display: flex; gap: 18px; margin: 45px 31px 0; }
.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 8px 0 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  line-height: 17px;
}
.action-btn svg { flex: none; width: 28px; height: 28px; }
.action-btn b { font-size: 16px; }

.fields { margin: 33px 31px 0; }
.field { padding-bottom: 7px; margin-bottom: 21px; border-bottom: 1px solid rgba(255, 255, 255, 0.55); }
.field dt {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 18px;
  color: #b7c8e6;
  text-transform: uppercase;
}
.field dd { font-size: 29px; line-height: 38px; letter-spacing: -0.6px; text-transform: uppercase; overflow-wrap: anywhere; }
.field dd.dd--code { text-transform: none; }
.detail-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  padding: 0 16px calc(40px + var(--sab));
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
}
.detail-footer svg { flex: none; width: 22px; height: 22px; }

/* ---------- Popup QR κωδικού (από τις λεπτομέρειες Ακαδημαϊκής Ταυτότητας) ---------- */
.qr-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.qr-modal.is-open { opacity: 1; visibility: visible; transition: opacity 0.2s ease, visibility 0s; }
.qr-close { position: absolute; left: 23px; top: calc(25px + var(--sat)); width: 36px; height: 36px; }
.qr-close svg { width: 36px; height: 36px; }
.qr-card { width: 100%; max-width: 360px; padding: 40px; border-radius: 18px; background: #fff; }
.qr-card svg { display: block; width: 100%; height: auto; }

/* ======================================================================
   ΟΘΟΝΗ 2 – Πλαϊνό μενού (drawer)
   ====================================================================== */
.drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity 0.28s ease, visibility 0s; }
.drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 21;
  width: 86%;
  max-width: 372px;
  display: flex;
  flex-direction: column;
  padding: calc(30px + var(--sat)) 16px calc(21px + var(--sab));
  background: var(--navy);
  overflow-y: auto;
  scrollbar-width: none;
  transform: translate3d(-100%, 0, 0);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.drawer::-webkit-scrollbar { display: none; }
.drawer.is-open { transform: none; visibility: visible; transition: transform 0.3s var(--ease), visibility 0s; }

.drawer-profile { display: flex; align-items: center; gap: 16px; }
.avatar { width: 65px; height: 65px; border-radius: 10px; object-fit: cover; }
.drawer-name { font-size: 17px; line-height: 24px; text-transform: uppercase; }
.drawer-actions { display: flex; gap: 18px; margin-top: 18px; }
.cyan-btn {
  flex: 1;
  height: 42px;
  border-radius: 6px;
  background: var(--cyan);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}
.drawer-menu { list-style: none; margin-top: 15px; border-top: 1px solid var(--line); }
.drawer-menu li { border-bottom: 1px solid var(--line); }
.drawer-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 43px;
  padding: 0 19px 0 16px;
  font-weight: 700;
  font-size: 18px;
}
.drawer-menu svg { margin-left: auto; width: 20px; height: 20px; }
.drawer-menu svg.ext { width: 17px; height: 17px; margin-right: 1px; }
.drawer-bottom { margin-top: auto; padding-top: 24px; }
.outline-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  height: 50px;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1.5px solid #fff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 18px;
  --icon-bg: var(--navy);
}
.outline-btn svg { flex: none; width: 25px; height: 25px; }
.drawer-divider { height: 1px; margin: 2px 0 16px; background: var(--line); }
.drawer-112 { display: flex; align-items: center; gap: 37px; }
.red-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 45px;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}
.red-btn svg { width: 26px; height: 26px; }
.drawer-112 .logout { width: 24px; height: 24px; }
.drawer-112 .logout svg { width: 24px; height: 24px; }
