:root {
  --portal-bg: #efefef;
  --surface: #ffffff;
  --topbar: #343740;
  --menu-button: #484c54;
  --text: #343434;
  --muted: #797d83;
  --accent: #3576b3;
  --accent-soft: #e1f1ff;
  --yellow: #ffc61c;
  --green: #0b9d12;
  --badge: #db5756;
  --line: #e4e4e4;
  --shadow: 0 10px 26px rgba(17, 17, 17, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #d8d8d8;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.portal-shell {
  width: min(100%, 590px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--portal-bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 56px;
  background: var(--topbar);
  border-top: 3px solid #1f1f1f;
}

.topbar-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
}

.topbar-icon {
  width: 33px;
  height: 33px;
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 36px 22px 22px 24px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.brand-logo {
  width: min(318px, 68%);
  height: auto;
  display: block;
}

.menu-toggle {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--menu-button);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-icon {
  width: 28px;
  height: 28px;
}

.portal-app[data-screen="menu"] .menu-toggle,
.portal-app[data-screen="profile"] .menu-toggle {
  background: var(--yellow);
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 24px 34px;
  background: var(--portal-bg);
  border-bottom: 1px solid #dddddd;
}

.status-date {
  margin: 0;
  font-size: 1.07rem;
  font-weight: 700;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-icon {
  position: relative;
  display: inline-flex;
  color: #2f2f2f;
}

.status-icon svg {
  width: 32px;
  height: 32px;
}

.status-badge {
  position: absolute;
  top: -9px;
  right: -10px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border: 2px solid #f5f5f5;
  border-radius: 999px;
  background: var(--badge);
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1;
}

.screen {
  display: none;
}

.portal-app[data-screen="landing"] .screen-landing,
.portal-app[data-screen="menu"] .screen-menu,
.portal-app[data-screen="profile"] .screen-menu,
.portal-app[data-screen="info"] .screen-info {
  display: block;
}

.landing-block {
  padding: 12px 32px 0;
}

.message-card {
  overflow: hidden;
  border-radius: 0 0 10px 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.message-card-title {
  margin: 0;
  padding: 22px 24px;
  background: #242424;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.message-list {
  padding: 28px 20px 34px;
}

.message-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 100px;
}

.message-row + .message-row {
  margin-top: 10px;
}

.message-icon {
  width: 92px;
  height: 92px;
  color: #7d7d7d;
}

.message-count {
  min-width: 14px;
  color: #748ca7;
  font-size: 1.22rem;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.footer-block {
  padding: 24px 28px 28px;
  background: #ececec;
  text-align: center;
  color: #707070;
}

.footer-block--landing {
  margin-top: 128px;
  padding-top: 26px;
}

.footer-block--info {
  padding-top: 28px;
}

.footer-divider {
  width: 84%;
  height: 3px;
  margin: 0 auto 22px;
  background: #d9d9d9;
}

.footer-version {
  margin: 0 0 12px;
  font-size: 0.99rem;
}

.footer-links {
  max-width: 420px;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.15;
}

.footer-links a {
  text-decoration: none;
}

.menu-list {
  padding: 0 0 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 1.18rem;
}

.menu-item-icon {
  width: 22px;
  height: 22px;
  color: currentColor;
}

.profile-submenu {
  display: none;
  padding: 8px 0 10px;
  background: var(--accent-soft);
}

.portal-app[data-screen="profile"] .profile-submenu {
  display: block;
}

.portal-app[data-screen="profile"] .menu-item--profile {
  padding-bottom: 12px;
}

.profile-link {
  display: block;
  padding: 12px 52px;
  color: #6d6f74;
  font-size: 1.16rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.info-page {
  padding: 34px 22px 0;
}

.info-title {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 3.1rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.info-title::after {
  content: "";
  display: block;
  width: min(276px, 100%);
  height: 6px;
  margin-top: 8px;
  background: var(--accent);
}

.info-copy {
  max-width: 510px;
  margin: 22px 0 34px;
  font-size: 1.08rem;
  line-height: 1.45;
}

.info-card {
  padding: 22px 20px 26px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.info-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.info-tab {
  min-height: 68px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #f0f0f0;
  color: #113a67;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 700;
  text-align: left;
}

.info-tab--active {
  background: var(--accent);
  color: #ffffff;
}

.info-tab--wide {
  grid-column: 1 / -1;
}

.info-accent-bar {
  height: 14px;
  margin-top: 6px;
  background: var(--accent);
}

.form-panel {
  border: 1px solid #f5f5f5;
  border-radius: 0 0 10px 10px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.01);
}

.form-panel-inner {
  padding: 22px 22px 26px;
}

.required-field {
  margin: 0 0 18px;
  color: #b04b44;
  font-size: 1rem;
}

.form-divider {
  height: 1px;
  margin-bottom: 18px;
  background: var(--line);
}

.personal-fields {
  margin: 0;
}

.field {
  margin-bottom: 28px;
}

.field-label {
  margin: 0 0 4px;
  font-size: 1.04rem;
  font-weight: 700;
}

.field-label--section {
  font-weight: 500;
  margin-bottom: 12px;
}

.field-value {
  margin: 0;
  min-height: 1.2em;
  color: #2f2f2f;
  font-size: 1.03rem;
  line-height: 1.24;
}

.field-value--empty {
  min-height: 1.15em;
}

.edit-button-row {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.edit-button {
  min-width: 96px;
  height: 60px;
  border: 0;
  background: var(--yellow);
  color: #141414;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.print-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 36px 0 28px;
}

.print-icon {
  width: 34px;
  height: 34px;
  color: #3b3b3b;
}

.print-button {
  min-width: 178px;
  height: 74px;
  border: 0;
  background: var(--green);
  color: #ffffff;
  font-size: 1.14rem;
  font-weight: 700;
}

.contact-block {
  padding: 12px 2px 96px;
}

.contact-block h2 {
  margin: 0 0 28px;
  font-size: 1.18rem;
}

.contact-block p {
  margin: 0;
  font-size: 1.05rem;
}

.back-to-top {
  position: fixed;
  right: max(16px, calc((100vw - 590px) / 2 + 16px));
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #64676c;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.back-to-top svg {
  width: 28px;
  height: 28px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 420px) {
  .brandbar {
    padding: 30px 18px 18px 18px;
  }

  .statusbar {
    padding: 24px 18px 28px;
  }

  .landing-block {
    padding: 10px 18px 0;
  }

  .message-icon {
    width: 74px;
    height: 74px;
  }

  .menu-item {
    padding: 16px 18px;
    font-size: 1.06rem;
  }

  .profile-link {
    padding: 10px 44px;
    font-size: 1.05rem;
  }

  .info-page {
    padding: 28px 18px 0;
  }

  .info-card {
    padding: 16px 14px 20px;
  }

  .form-panel-inner {
    padding: 18px 16px 22px;
  }

  .print-row {
    gap: 14px;
  }

  .print-button {
    min-width: 154px;
    height: 64px;
    font-size: 1rem;
  }
}
