.site-header {
  position: sticky;
  top: 0;
  z-index: 50;

  border-bottom: 1px solid var(--border);

  background:
    rgba(255, 255, 255, .94);

  backdrop-filter:
    blur(14px);
}


.desktop-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  min-height: 72px;

  gap: 28px;
}


.brand {
  display: inline-flex;

  align-items: center;

  gap: 10px;

  flex: 0 0 auto;
}


.brand-mark {
  display: inline-flex;

  align-items: center;

  color: var(--blue);

  font-size: 28px;

  font-weight: 850;

  letter-spacing: -.08em;

  line-height: 1;
}


.brand-caption {
  display: grid;

  gap: 1px;

  color: var(--text);

  font-size: 8px;

  font-weight: 800;

  line-height: 1.05;

  text-transform: uppercase;
}


.desktop-nav {
  display: flex;

  align-items: center;

  gap: 30px;

  margin-left: auto;
}


.desktop-nav a {
  position: relative;

  color: var(--text);

  font-size: 13px;

  font-weight: 650;
}


.desktop-nav a::after {
  content: "";

  position: absolute;

  right: 0;
  bottom: -8px;
  left: 0;

  height: 2px;

  transform: scaleX(0);

  background: var(--blue);

  transition:
    transform .18s ease;
}


.desktop-nav a:hover::after,
.desktop-nav a.is-active::after {
  transform: scaleX(1);
}


.header-actions {
  display: flex;

  align-items: center;

  gap: 8px;
}


.btn {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 40px;

  padding:
    0 15px;

  border:
    1px solid transparent;

  border-radius:
    var(--radius);

  font-size:
    12px;

  font-weight:
    750;

  cursor: pointer;

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}


.btn-secondary {
  border-color:
    var(--border);

  background:
    #fff;

  color:
    var(--text);
}


.btn-secondary:hover {
  border-color:
    var(--blue);

  color:
    var(--blue);
}


.btn-primary {
  border-color:
    var(--blue);

  background:
    var(--blue);

  color:
    #fff;
}


.btn-primary:hover {
  background:
    var(--blue-dark);
}


.mobile-header {
  display: none;
}


.mobile-bottom-nav {
  display: none;
}


.mobile-bottom-nav-inner {
  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  align-items: end;

  min-height: 68px;

  padding:
    6px 4px 7px;
}


.mobile-nav-item {
  display: flex;

  min-width: 0;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 4px;

  color:
    #687078;

  font-size:
    9px;

  font-weight:
    650;

  text-align: center;
}


.mobile-nav-icon {
  display: grid;

  place-items: center;

  width: 24px;
  height: 24px;

  color:
    currentColor;

  font-size:
    17px;

  line-height: 1;
}


.mobile-nav-item.is-active {
  color:
    var(--blue);
}


.mobile-nav-item.mobile-nav-primary {
  gap: 3px;
}


.mobile-nav-primary .mobile-nav-icon {
  width: 46px;
  height: 46px;

  border-radius:
    50%;

  background:
    var(--blue);

  color:
    #fff;

  font-size:
    25px;

  box-shadow:
    0 5px 14px
    rgba(49, 85, 245, .22);
}


.page-shell {
  padding:
    34px 0 60px;
}


.shell-preview {
  min-height:
    360px;

  display:
    grid;

  place-items:
    center;

  border:
    1px solid var(--border);

  border-radius:
    var(--radius);

  background:
    var(--surface);
}


.shell-preview-inner {
  max-width:
    620px;

  padding:
    40px 28px;

  text-align:
    center;
}


.shell-eyebrow {
  margin-bottom:
    10px;

  color:
    var(--blue);

  font-size:
    11px;

  font-weight:
    800;

  letter-spacing:
    .08em;

  text-transform:
    uppercase;
}


.shell-preview h1 {
  margin:
    0;

  font-size:
    clamp(
      32px,
      5vw,
      54px
    );

  line-height:
    1;

  letter-spacing:
    -.04em;
}


.shell-preview p {
  margin:
    18px auto 0;

  color:
    var(--muted);

  font-size:
    14px;

  line-height:
    1.6;
}


@media (max-width: 760px) {

  body {
    padding-bottom:
      calc(
        78px +
        env(safe-area-inset-bottom)
      );
  }


  .desktop-header {
    display: none;
  }


  .mobile-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    min-height: 62px;
  }


  .mobile-header .brand-caption {
    display: none;
  }


  .mobile-header .brand-mark {
    font-size: 25px;
  }


  .mobile-login {
    min-height: 34px;

    padding:
      0 10px;
  }


  .mobile-bottom-nav {
    position: fixed;

    right: 0;
    bottom: 0;
    left: 0;

    z-index: 60;

    display: block;

    padding-bottom:
      env(safe-area-inset-bottom);

    border-top:
      1px solid var(--border);

    background:
      rgba(255, 255, 255, .97);

    backdrop-filter:
      blur(16px);
  }


  .page-shell {
    padding:
      20px 0 34px;
  }


  .shell-preview {
    min-height:
      430px;
  }

}


/* =========================================
   GSP APP NAVBAR
   same visual language as LK / ADMIN
   ========================================= */

@media (max-width: 760px) {

  .mobile-bottom-nav {
    position: fixed;

    right: 0;
    bottom: 0;
    left: 0;

    z-index: 100;

    display: block;

    padding-bottom:
      env(safe-area-inset-bottom);

    border-top:
      1px solid #D8DDDF;

    background:
      rgba(255, 255, 255, .98);

    backdrop-filter:
      blur(16px);

    -webkit-backdrop-filter:
      blur(16px);
  }


  .mobile-bottom-nav-inner {
    display: grid;

    grid-template-columns:
      repeat(5, minmax(0, 1fr));

    align-items: center;

    width: 100%;

    min-height: 66px;

    padding:
      6px 6px 5px;
  }


  .mobile-nav-item {
    position: relative;

    display: flex;

    min-width: 0;

    height: 55px;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 3px;

    color:
      #687078;

    text-decoration: none;

    user-select: none;
  }


  .mobile-nav-icon {
    display: flex;

    width: 23px;
    height: 23px;

    align-items: center;
    justify-content: center;
  }


  .mobile-nav-icon svg {
    width: 21px;
    height: 21px;

    fill: none;

    stroke:
      currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;
    stroke-linejoin: round;
  }


  .mobile-nav-label {
    overflow: hidden;

    max-width: 100%;

    color:
      currentColor;

    font-size: 9px;

    font-weight: 650;

    line-height: 1.15;

    text-overflow: ellipsis;

    white-space: nowrap;
  }


  .mobile-nav-item.is-active {
    color:
      #3155F5;
  }


  /*
   * Центральное действие.
   * Не floating-circle, а тот же
   * технический 4px UI что в LK/Admin.
   */

  .mobile-nav-item.mobile-nav-primary {
    transform: none;

    color:
      #3155F5;
  }


  .mobile-nav-primary-icon {
    display: flex;

    width: 38px;
    height: 38px;

    margin-top: -13px;
    margin-bottom: 1px;

    align-items: center;
    justify-content: center;

    border:
      1px solid #3155F5;

    border-radius:
      4px;

    background:
      #3155F5;

    color:
      #fff;
  }


  .mobile-nav-primary-icon svg {
    width: 22px;
    height: 22px;

    fill: none;

    stroke:
      currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;
  }


  .mobile-nav-primary .mobile-nav-label {
    color:
      #3155F5;

    font-weight:
      750;
  }


  /*
   * Лёгкий feedback без теней.
   */

  .mobile-nav-item:active {
    opacity: .62;
  }


  .mobile-nav-primary:active
  .mobile-nav-primary-icon {
    background:
      #2748DB;

    border-color:
      #2748DB;
  }


  body {
    padding-bottom:
      calc(
        76px +
        env(safe-area-inset-bottom)
      );
  }

}


/* =========================================
   PUBLIC SITE FOOTER
   ========================================= */

.site-footer {
  border-top:
    1px solid var(--border);

  background:
    #fff;
}


.site-footer-main {
  display: grid;

  grid-template-columns:
    1.15fr .75fr 1fr;

  gap: 44px;

  padding:
    42px 0 34px;
}


.footer-brand {
  max-width:
    320px;
}


.footer-mark {
  display: inline-block;

  color:
    var(--blue);

  font-size: 30px;

  font-weight: 850;

  letter-spacing:
    -.08em;

  line-height: 1;
}


.footer-description {
  margin-top:
    15px;

  color:
    var(--muted);

  font-size:
    11px;

  line-height:
    1.55;
}


.footer-label {
  margin-bottom:
    12px;

  color:
    var(--muted);

  font-size:
    9px;

  font-weight:
    800;

  letter-spacing:
    .07em;

  text-transform:
    uppercase;
}


.footer-links {
  display: grid;

  gap: 9px;
}


.footer-links a {
  width:
    fit-content;

  color:
    var(--text);

  font-size:
    11px;

  font-weight:
    670;
}


.footer-links a:hover {
  color:
    var(--blue);
}


.footer-contact {
  display: grid;

  gap: 7px;
}


.footer-contact a {
  width:
    fit-content;

  color:
    var(--text);

  font-size:
    12px;

  font-weight:
    720;
}


.footer-address {
  margin-top:
    9px;

  max-width:
    360px;

  color:
    var(--muted);

  font-size:
    10px;

  line-height:
    1.55;
}


.site-footer-bottom {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  padding:
    15px 0 20px;

  border-top:
    1px solid var(--border);

  color:
    var(--muted);

  font-size:
    9px;
}


.footer-legal-links {
  display: flex;

  flex-wrap: wrap;

  gap: 14px;
}


.footer-legal-links a {
  color:
    var(--muted);
}


.footer-legal-links a:hover {
  color:
    var(--blue);
}


@media (max-width: 760px) {

  .site-footer-main {
    grid-template-columns:
      1fr;

    gap: 28px;

    padding:
      32px 0 26px;
  }


  .site-footer-bottom {
    display: grid;

    gap: 11px;

    padding-bottom:
      16px;
  }


  .footer-legal-links {
    display: grid;

    gap: 8px;
  }

}


/* =========================================
   GSP PUBLIC MOBILE NAV
   Visual parity with Client LK
   ========================================= */

.gsp-mobile-nav {
  display: none;
}


@media (max-width: 760px) {

  .gsp-mobile-nav {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 2147483000;

    width: 100vw;
    max-width: 100vw;

    display: grid;

    grid-template-columns:
      repeat(
        5,
        minmax(0, 1fr)
      );

    align-items: end;

    box-sizing: border-box;

    padding-top: 7px;

    padding-left:
      max(
        5px,
        env(safe-area-inset-left)
      );

    padding-right:
      max(
        5px,
        env(safe-area-inset-right)
      );

    padding-bottom:
      max(
        7px,
        env(safe-area-inset-bottom)
      );

    border-top:
      1px solid #D8DDDF;

    background:
      rgba(255,255,255,.98);

    box-shadow:
      0 -6px 22px
      rgba(23,26,28,.055);

    overflow: visible;
  }


  .gsp-mobile-nav-item {
    width: 100%;

    min-width: 0;

    height: 57px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    padding-inline: 1px;

    border: 0;

    background: transparent;

    color:
      #687078;

    font-size:
      10px;

    font-weight:
      650;

    line-height:
      1;

    text-align:
      center;

    text-decoration:
      none;

    cursor:
      pointer;

    overflow:
      visible;

    -webkit-tap-highlight-color:
      transparent;
  }


  .gsp-mobile-nav-item
  > span:last-child {
    max-width: 100%;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
  }


  .gsp-mobile-nav-item.active {
    color:
      #3155F5;
  }


  .gsp-mobile-nav-icon {
    width: 21px;
    height: 21px;

    display: flex;

    align-items: center;
    justify-content: center;
  }


  .gsp-mobile-nav-icon svg {
    width: 20px;
    height: 20px;

    stroke-linecap:
      round;

    stroke-linejoin:
      round;
  }


  /* CENTRAL ACTION */

  .gsp-mobile-create-wrap {
    position: relative;
  }


  .gsp-mobile-create {
    position: absolute;

    left: 50%;
    top: -23px;

    width:
      clamp(
        52px,
        15vw,
        58px
      );

    height:
      clamp(
        52px,
        15vw,
        58px
      );

    transform:
      translateX(-50%);

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius:
      50%;

    background:
      #3155F5;

    color:
      #fff;

    box-shadow:
      0 7px 22px
      rgba(49,85,245,.26);
  }


  .gsp-mobile-create svg {
    width: 24px;
    height: 24px;

    stroke-linecap:
      round;
  }


  .gsp-mobile-create-label {
    margin-top:
      35px;
  }


  .gsp-mobile-create-wrap.active
  .gsp-mobile-create-label {
    color:
      #3155F5;
  }


  .gsp-mobile-nav-item:active {
    opacity:
      .68;
  }


  body {
    padding-bottom:
      calc(
        92px +
        env(safe-area-inset-bottom)
      ) !important;
  }

}


@media (max-width: 350px) {

  .gsp-mobile-nav {
    padding-left:
      2px;

    padding-right:
      2px;
  }


  .gsp-mobile-nav-item {
    font-size:
      8.5px;
  }


  .gsp-mobile-nav-icon svg {
    width: 19px;
    height: 19px;
  }

}


/* =========================================
   GSP PUBLIC FOOTER — FINAL
   Product / LK visual language
   ========================================= */

.site-footer {
  position: relative;

  border-top:
    1px solid #D8DDDF;

  background:
    #F4F5F3;
}


.site-footer-main {
  display: grid;

  grid-template-columns:
    1.15fr
    .8fr
    1fr;

  gap: 0;

  padding:
    28px 0 24px;
}


.site-footer-main > div {
  min-width: 0;

  padding:
    2px 28px;
}


.site-footer-main > div:first-child {
  padding-left: 0;
}


.site-footer-main > div:last-child {
  padding-right: 0;
}


.site-footer-main
> div:not(:last-child) {
  border-right:
    1px solid #D8DDDF;
}


.footer-brand {
  max-width:
    300px;
}


.footer-mark {
  color:
    #3155F5;

  font-size:
    22px;

  font-weight:
    850;

  letter-spacing:
    -.065em;

  line-height:
    1;
}


.footer-description {
  max-width:
    270px;

  margin-top:
    10px;

  color:
    #687078;

  font-size:
    10px;

  line-height:
    1.55;
}


.footer-label {
  margin-bottom:
    11px;

  color:
    #8A9197;

  font-family:
    "IBM Plex Mono",
    monospace;

  font-size:
    8px;

  font-weight:
    700;

  letter-spacing:
    .08em;

  text-transform:
    uppercase;
}


.footer-links {
  display: flex;

  flex-wrap: wrap;

  gap:
    7px 14px;
}


.footer-links a {
  color:
    #171A1C;

  font-size:
    10px;

  font-weight:
    650;

  line-height:
    1.4;
}


.footer-contact {
  display: grid;

  gap:
    5px;
}


.footer-contact a {
  color:
    #171A1C;

  font-size:
    11px;

  font-weight:
    700;
}


.footer-address {
  max-width:
    330px;

  margin-top:
    8px;

  color:
    #687078;

  font-size:
    9px;

  line-height:
    1.55;
}


.site-footer-bottom {
  min-height:
    46px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap:
    18px;

  padding:
    11px 0;

  border-top:
    1px solid #D8DDDF;

  color:
    #7C848A;

  font-family:
    "IBM Plex Mono",
    monospace;

  font-size:
    8px;
}


.footer-legal-links {
  display: flex;

  align-items: center;

  gap:
    14px;
}


.footer-legal-links a {
  color:
    #687078;

  font-family:
    inherit;

  font-size:
    8px;
}


.footer-links a:hover,
.footer-contact a:hover,
.footer-legal-links a:hover {
  color:
    #3155F5;
}


@media (max-width: 760px) {

  .site-footer {
    margin-top:
      0;
  }


  .site-footer-main {
    grid-template-columns:
      1fr;

    padding:
      25px 0 18px;
  }


  .site-footer-main > div {
    padding:
      17px 0;

    border-right:
      0 !important;

    border-bottom:
      1px solid #D8DDDF;
  }


  .site-footer-main > div:first-child {
    padding-top:
      0;
  }


  .site-footer-main > div:last-child {
    border-bottom:
      0;

    padding-bottom:
      0;
  }


  .footer-mark {
    font-size:
      21px;
  }


  .footer-description {
    max-width:
      240px;
  }


  .footer-links {
    gap:
      8px 16px;
  }


  .site-footer-bottom {
    display: grid;

    grid-template-columns:
      1fr;

    gap:
      8px;

    min-height:
      0;

    padding:
      13px 0 17px;
  }


  .footer-legal-links {
    flex-wrap: wrap;

    gap:
      6px 13px;
  }

}


/* =========================================
   PUBLIC AUTH-AWARE UI
   ========================================= */

.auth-guest-only {
  display: none !important;
}


html.auth-guest
.auth-guest-only {
  display: inline-flex !important;
}


/*
 * Авторизованный пользователь:
 * login-кнопку не показываем вообще.
 */
html.auth-user
.auth-guest-only {
  display: none !important;
}



/* =========================================
   AUTH SESSION CONTROL — FINAL
   Login <-> Profile
   ========================================= */

html.auth-guest
.auth-guest-only,
html.auth-user
.auth-guest-only {
  display:
    inline-flex !important;
}


.auth-profile-link {
  align-items:
    center;

  gap:
    7px;
}


.auth-profile-link svg {
  width:
    16px;

  height:
    16px;

  flex:
    0 0 auto;

  stroke-linecap:
    round;

  stroke-linejoin:
    round;
}


@media (max-width: 760px) {

  .auth-profile-link {
    gap:
      5px;
  }


  .auth-profile-link svg {
    width:
      15px;

    height:
      15px;
  }

}


/* =========================================
   MOBILE AUTH BUTTON
   ========================================= */

@media (max-width: 760px) {

  .mobile-login.auth-profile-link {
    gap: 5px;

    white-space: nowrap;
  }


  .mobile-login.auth-profile-link svg {
    width: 15px;
    height: 15px;
  }

}
