/* minicms/static/main.css
   =========================================================
   Main UI layer (header + common utilities)
   Keep base.html clean: only layout, styles live here.
   ========================================================= */

:root{
  --hdr-shadow: 0 18px 45px rgba(2, 6, 23, .10);
  --block-shadow: 0 18px 45px rgba(2, 6, 23, .08);
  --line-soft: rgba(11,63,116,.10);

  --title: #0b3f74;
  --muted: rgba(15,23,42,.65);
}

/* =========================
   HEADER (Top bar)
   ========================= */
.hdr-wrap{
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
  box-shadow: var(--hdr-shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hdr-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 0;
}

/* LEFT: logo */
.hdr-logo{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 210px;
  text-decoration:none;
}

.hdr-logo-img{
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 16px;

  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.hdr-logo-fallback{
  width: 150px;
  height: 150px;
  border-radius: 16px;
  display:none; /* включается через onerror */
  align-items:center;
  justify-content:center;

  background: rgba(234,244,255,.9);
  color: var(--title);
  font-weight: 900;
  box-shadow: none;
}

/* CENTER: title */
.hdr-titlebox{
  flex: 1 1 auto;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;

  padding: 4px 8px;
  background: transparent;
  border: 0;
  border-radius: 0;

  min-height: 150px; /* под лого 150px */
  text-align: center;
}

.hdr-title{
  margin:0;
  font-weight: 900;
  color: var(--title);
  line-height: 1.1;
  font-size: 26px;
  letter-spacing: .02em;
}

.hdr-subtitle{
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

/* RIGHT: auth links */
.hdr-actions{
  min-width: 210px;
  display:flex;
  flex-direction: column;
  align-items:flex-end;
  justify-content:center;
  gap: 6px;
}

.hdr-auth-link{
  display:inline-flex;
  align-items:center;
  gap: 8px;

  font-weight: 800;
  color: var(--title);
  text-decoration: none;

  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.hdr-auth-link:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hdr-auth-sub{
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

/* =========================
   Common utility blocks
   ========================= */
.ui-shadow-block{
  box-shadow: var(--block-shadow);
  border: 0 !important;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 992px){
  .hdr-top{
    flex-wrap: wrap;
    gap: 10px;
  }

  .hdr-logo,
  .hdr-actions{
    min-width: auto;
  }

  /* заголовок вниз */
  .hdr-titlebox{
    order: 3;
    width: 100%;
    min-height: auto;
    padding: 10px 0 6px;
  }

  .hdr-title{
    font-size: 20px;
  }

  .hdr-subtitle{
    display:none;
  }

  .hdr-actions{
    flex-direction: row;
    gap: 14px;
    align-items:center;
  }

  .hdr-auth-sub{
    display:none;
  }

  /* логотип уменьшаем на мобиле */
  .hdr-logo-img,
  .hdr-logo-fallback{
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }
}
