:root{
  --bg: #07191a;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --muted2: rgba(255,255,255,.55);
  --stroke: rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0,0,0,.40);
  --primary: #2fb0b0;
  --primary2:#57d6d6;
  --good:#2ee59d;
  --warn:#ffca5c;
  --bad:#ff5c8a;
  --radius: 18px;
  --radius2: 14px;
}

@media (prefers-color-scheme: light){
  :root{
    --bg: #f2fafa;
    --panel: rgba(0,0,0,.04);
    --panel2: rgba(0,0,0,.06);
    --text: rgba(0,0,0,.88);
    --muted: rgba(0,0,0,.66);
    --muted2: rgba(0,0,0,.52);
    --stroke: rgba(0,0,0,.10);
    --shadow: 0 16px 50px rgba(18,24,40,.12);
    --primary: #1f9a9a;
    --primary2:#35c4c4;
  }
}

*{ box-sizing:border-box; }
html,body{ min-height:100%; }
body.no-scroll{ overflow: hidden; }
html{
  background:
    linear-gradient(
      160deg,
      #07191a 0%,
      #0d2b2b 42%,
      #114040 70%,
      #081f1f 100%
    );
}
@media (prefers-color-scheme: light){
  html{
    background:
      linear-gradient(
        160deg,
        #f2fafa 0%,
        #e3f6f6 45%,
        #ddf4f4 72%,
        #f6fcfc 100%
      );
  }
}
body{
  margin:0;
  font-family: Manrope, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: transparent;
}

.container{
  width:min(1200px, calc(100% - 32px));
  margin:0 auto;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(0,0,0,.30), rgba(0,0,0,.05));
  border-bottom: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.20);
}
@media (prefers-color-scheme: light){
  .topbar{
    background: linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,255,255,.35));
    box-shadow: 0 10px 30px rgba(18,24,40,.10);
  }
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:16px;
}
.topbar__search{
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(560px, 100%);
}
.topbar-search__input{
  width: 100%;
}
.visually-hidden{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.brand{ display:flex; align-items:center; gap:12px; min-width: 0; flex-shrink: 0; text-decoration:none; }
.brand__img{
  height:46px;
  width:auto;
  max-width: 260px;
  display:block;
  object-fit: contain;
}
@media (max-width: 720px){
  .brand__img{ height:38px; max-width: 200px; }
}
.brand__logo{
  width:42px; height:42px;
  border-radius: 14px;
  display:grid; place-items:center;
  font-weight:800;
  letter-spacing:.5px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:white;
  box-shadow: 0 8px 22px rgba(47,176,176,.45);
}
.brand__title{ font-weight:800; line-height:1.1; }
.brand__sub{ color:var(--muted2); font-size:13px; margin-top:2px; }
.topbar__actions{ display:flex; align-items:center; gap:10px; }

.btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(47,176,176,.28);
  background: rgba(47,176,176,.08);
  color: var(--text);
  padding:10px 12px;
  border-radius: 14px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover{ background: rgba(47,176,176,.16); border-color: rgba(47,176,176,.42); }
.btn:active{ transform: translateY(1px); }
.btn--primary{
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:white;
  box-shadow: 0 8px 22px rgba(47,176,176,.35);
}
.btn--primary:hover{
  opacity:1;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(47,176,176,.45);
  background: linear-gradient(135deg, var(--primary), var(--primary2));
}
.btn--primary:active{ transform: translateY(0); }
.btn--teal{
  border: 1px solid rgba(47,176,176,.55);
  background: linear-gradient(135deg, rgba(47,176,176,.18), rgba(87,214,214,.14));
  color: var(--text);
}
.btn--teal:hover{
  background: linear-gradient(135deg, rgba(47,176,176,.28), rgba(87,214,214,.22));
  border-color: rgba(47,176,176,.78);
}
.btn--ghost{
  background: transparent;
}
.btn--ghost:hover{
  background: rgba(47,176,176,.10);
}

.layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  padding: 18px 0 26px;
}

.sidebar{
  position: sticky;
  top: 76px;
  align-self:start;
  display:flex;
  flex-direction:column;
  gap: 12px;
  max-height: calc(100dvh - 92px);
  overflow: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
/* На десктопе обёртка не меняет вёрстку (панели остаются прямыми детьми .sidebar для sticky). */
.sidebar__scroll{
  display: contents;
}
.sidebar__mobileTop{ display:none; }
.sidebar-overlay{
  display:none;
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0,0,0,.35);
  z-index: 40;
}
.extra-filters{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.sidebar::-webkit-scrollbar{ width: 10px; }
.sidebar::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
@media (prefers-color-scheme: light){
  .sidebar::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.12); }
}

.panel{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: light){
  .panel{ background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.72)); }
}
/* Фильтры: красивая бирюзовая подложка */
.sidebar .panel{
  background: linear-gradient(180deg, rgba(47,176,176,.10), rgba(47,176,176,.035));
  border: 1px solid rgba(47,176,176,.18);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(8,28,28,.22);
  padding: 14px;
}
@media (prefers-color-scheme: light){
  .sidebar .panel{
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(224,244,244,.85));
    border: 1px solid rgba(47,176,176,.20);
    box-shadow: 0 8px 24px rgba(47,176,176,.10);
  }
}
.panel--muted{
  box-shadow:none;
  background: rgba(0,0,0,.0);
}
.panel--reset{
  padding: 12px 14px;
}
.sidebar-reset-btn{
  width: 100%;
  justify-content: center;
  text-align: center;
}

.panel__title{
  position: relative;
  font-weight:800;
  letter-spacing:.2px;
  margin-bottom: 12px;
  padding-left: 12px;
}
.panel__title::before{
  content:"";
  position:absolute;
  left:0; top:50%;
  transform: translateY(-50%);
  width:4px; height:15px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
}
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom: 10px; }
.field:last-child{ margin-bottom:0; }
.field__label{ color: var(--muted2); font-size: 12px; font-weight:700; }
.input,.select{
  width:100%;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.14);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
}
@media (prefers-color-scheme: light){
  .input,.select{ background: rgba(255,255,255,.70); }
}
.input:focus,.select:focus{ border-color: rgba(47,176,176,.55); box-shadow: 0 0 0 4px rgba(47,176,176,.18); }
.select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.55) 50%),
    linear-gradient(135deg, rgba(255,255,255,.55) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) calc(1em + 1px),
    calc(100% - 13px) calc(1em + 1px),
    100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
  background-repeat: no-repeat;
  padding-right: 40px;
}
@media (prefers-color-scheme: light){
  .select{
    background-image:
      linear-gradient(45deg, transparent 50%, rgba(0,0,0,.55) 50%),
      linear-gradient(135deg, rgba(0,0,0,.55) 50%, transparent 50%),
      linear-gradient(to right, transparent, transparent);
  }
}
select option{
  background: var(--bg);
  color: var(--text);
}
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }

.range{ display:flex; flex-direction:column; gap:10px; }
.range__row{ display:flex; align-items:center; gap:10px; }
.range__spacer{ flex:1; }
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(47,176,176,.32);
  background: rgba(47,176,176,.16);
  color: var(--text);
  font-weight:800;
  font-size: 12px;
}
@media (prefers-color-scheme: light){
  .pill{
    background: rgba(47,176,176,.12);
    border-color: rgba(47,176,176,.30);
    color: #0c4a4a;
  }
}
.slider{
  width:100%;
  accent-color: var(--primary);
  cursor: pointer;
}
.hint{ color: var(--muted2); font-size: 12px; }
.checklist{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height: 220px;
  overflow:auto;
  padding-right: 4px;
}
.check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding: 8px 10px;
  border-radius: 14px;
  border:1px solid var(--stroke);
  background: var(--panel);
  transition: background .15s ease, border-color .15s ease;
}
@media (prefers-color-scheme: light){
  .check{ background: rgba(255,255,255,.60); }
}
.check input{ margin-top: 2px; }
.check input{
  accent-color: var(--primary);
}
.check:hover{
  background: var(--panel2);
  border-color: rgba(47,176,176,.28);
}
.check__txt{
  font-weight: 800;
  font-size: 12px;
  color: var(--text);
  line-height: 1.25;
}
.check__sub{
  margin-top: 2px;
  font-weight: 700;
  font-size: 11px;
  color: var(--muted2);
}

.content{ min-width:0; }
.summary{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin: 6px 0 12px;
}
.summary__right{
  display:flex;
  align-items:flex-end;
  gap:10px;
}
.summary__perpage{ margin: 0; min-width: 160px; }
.summary__title{
  font-size: 22px;
  font-weight: 900;
  letter-spacing:.2px;
  background: linear-gradient(95deg, var(--primary), var(--primary2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.summary__meta{ color: var(--muted2); font-weight:700; display:flex; align-items:center; gap:8px; margin-top:3px; }
.dot{ opacity:.6; }
.summary__filtersBtn{ display:none; }

.state{
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--muted);
  box-shadow: var(--shadow);
  display:none;
}
.state--show{ display:block; }

.cards{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.pager{
  margin-top: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap: wrap;
}
.pager__info{
  color: var(--muted2);
  font-weight: 800;
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--panel);
}

.card{
  position: relative;
  display:flex;
  flex-direction:column;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  min-width:0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height:3px;
  z-index:3;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
}
.card:hover{
  transform: translateY(-4px);
  border-color: rgba(47,176,176,.40);
  box-shadow: 0 26px 60px rgba(12,8,40,.50), 0 0 0 1px rgba(47,176,176,.22);
}
@media (prefers-color-scheme: light){
  .card{ background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.78)); }
  .card:hover{ box-shadow: 0 24px 50px rgba(47,176,176,.18), 0 0 0 1px rgba(47,176,176,.20); }
}
.card__top{
  padding: 14px 14px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.card__preview{
  display:block;
  aspect-ratio: 16/9;
  overflow:hidden;
  border-bottom: 1px solid var(--stroke);
}
.card__preview img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.card__name{
  font-weight:900;
  font-size: 16px;
  line-height:1.25;
  margin:0 0 4px;
}
.card__name a{
  color: inherit;
  text-decoration: none;
}
.card__name a:hover{
  text-decoration: underline;
}
.card__sub{
  color: var(--muted2);
  font-weight:700;
  font-size: 12px;
}
.card__meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding: 0 14px 14px;
}
.tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius: 999px;
  background: rgba(47,176,176,.16);
  border:1px solid rgba(47,176,176,.32);
  color: var(--text);
  font-weight:800;
  font-size: 12px;
}
@media (prefers-color-scheme: light){
  .tag{
    background: rgba(47,176,176,.12);
    border-color: rgba(47,176,176,.30);
    color: #0c4a4a;
  }
}
.tag--rating{
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .15px;
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(47,176,176,.15), 0 8px 20px rgba(47,176,176,.25);
}
.tag--good{
  border-color: rgba(46,229,157,.35);
  background: rgba(46,229,157,.35);
  color: #062a1d;
}
.tag--warn{
  border-color: rgba(255,202,92,.35);
  background: rgba(255,202,92,.35);
  color: #3a2a00;
}
.tag--bad{
  border-color: rgba(255,92,138,.35);
  background: rgba(255,92,138,.35);
  color: #3d0b1e;
}
@media (prefers-color-scheme: light){
  .tag--rating{
    box-shadow: 0 0 0 1px rgba(47,176,176,.18), 0 8px 18px rgba(47,176,176,.12);
  }
  .tag--good{ color: #073122; }
  .tag--warn{ color: #4a3300; }
  .tag--bad{ color: #4f1026; }
}
.card__body{
  padding: 0 14px 14px;
  display:grid;
  gap:10px;
  flex: 1 1 auto;
}
.card__desc{
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  background: rgba(0,0,0,.10);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
}
@media (prefers-color-scheme: light){
  .card__desc{
    background: rgba(255,255,255,.65);
    color: rgba(0,0,0,.72);
  }
}
.kv{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--radius2);
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.10);
}
@media (prefers-color-scheme: light){
  .kv{ background: rgba(255,255,255,.60); }
}
.k{ color: var(--muted2); font-size: 12px; font-weight: 800; }
.v{ font-size: 13px; font-weight: 700; color: var(--text); min-width:0; word-break: break-word; }
.v a{ color: inherit; }
.card__actions{
  padding: 0 14px 14px;
  display:flex;
  gap:10px;
  margin-top: auto;
}

.footer{
  border-top: 0;
  padding: 16px 0 30px;
  color: var(--muted2);
}
.details{
  max-width: 980px;
  margin: 22px auto 30px;
}
.details__hero{
  position: relative;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(47,176,176,.24);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(47,176,176,.22), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(87,214,214,.18), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (prefers-color-scheme: light){
  .details__hero{
    border-color: rgba(47,176,176,.20);
    background:
      radial-gradient(120% 140% at 0% 0%, rgba(47,176,176,.14), transparent 55%),
      radial-gradient(120% 140% at 100% 0%, rgba(16,182,255,.12), transparent 55%),
      linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.82));
  }
}
.details__title{
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.12;
  font-weight: 900;
}
.details__photo{
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--stroke);
}
.details__subtitle{
  margin-top: 8px;
  color: var(--muted2);
  font-weight: 700;
}
.details__lead{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.10);
  color: var(--muted);
  line-height: 1.5;
  font-weight: 600;
}
@media (prefers-color-scheme: light){
  .details__lead{
    background: rgba(255,255,255,.65);
    color: rgba(0,0,0,.72);
  }
}
.details__chips{
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.details__content{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
}
.details__card{
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  box-shadow: var(--shadow);
  padding: 16px;
}
@media (prefers-color-scheme: light){
  .details__card{ background: linear-gradient(180deg, rgba(255,255,255,.93), rgba(255,255,255,.75)); }
}
.details__card h2{
  position: relative;
  margin: 0 0 14px;
  padding-left: 14px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .2px;
}
.details__card h2::before{
  content:"";
  position:absolute;
  left:0; top:3px; bottom:3px;
  width:5px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
}
.details__grid{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 10px;
}
.details__k{
  color: var(--muted2);
  font-weight: 700;
  font-size: 12px;
}
.details__v{
  font-weight: 700;
}
/* Текст блока «Описание» — обычная насыщенность (не как у .details__v) */
.details__card .details__description{
  font-weight: 400 !important;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  white-space: pre-wrap;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: light){
  .details__card .details__description{
    color: rgba(0,0,0,.72);
  }
}
.details__infra{
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.details__actions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
}
@media (max-width: 980px){
  .details{
    margin-top: 14px;
  }
  .details__content{
    grid-template-columns: 1fr;
  }
  .details__grid{
    grid-template-columns: 1fr;
  }
}
.footer__inner{ display:flex; justify-content:space-between; align-items:center; }
.small{ font-size: 12px; line-height:1.4; color: var(--muted2); font-weight:700; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

.auth-user{
  color: var(--muted2);
  font-size: 12px;
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-page{
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow: hidden;
}
/* Декоративные световые пятна на фоне */
.login-page::before,
.login-page::after{
  content:"";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
}
.login-page::before{
  width: 460px; height: 460px;
  top: -140px; left: -120px;
  background: radial-gradient(circle at 30% 30%, var(--primary), transparent 70%);
  animation: floatA 14s ease-in-out infinite;
}
.login-page::after{
  width: 420px; height: 420px;
  bottom: -160px; right: -120px;
  background: radial-gradient(circle at 70% 70%, var(--primary2), transparent 70%);
  animation: floatB 18s ease-in-out infinite;
}
@keyframes floatA{
  0%,100%{ transform: translate(0,0); }
  50%{ transform: translate(40px, 30px); }
}
@keyframes floatB{
  0%,100%{ transform: translate(0,0); }
  50%{ transform: translate(-36px, -28px); }
}
@media (prefers-reduced-motion: reduce){
  .login-page::before,.login-page::after{ animation: none; }
}
.login{
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
}
.login__card{
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 26px;
  padding: 34px 30px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  animation: cardIn .5s cubic-bezier(.2,.7,.2,1) both;
}
@media (prefers-color-scheme: light){
  .login__card{
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 30px 70px rgba(18,24,40,.18), inset 0 1px 0 rgba(255,255,255,.9);
  }
}
@keyframes cardIn{
  from{ opacity:0; transform: translateY(14px) scale(.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce){
  .login__card{ animation: none; }
}
.login__brand{
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 24px;
}
.login__brand .brand__logo{
  width: 60px; height: 60px;
  border-radius: 18px;
  font-size: 20px;
}
.brand__img--login{
  height: 56px;
  max-width: 240px;
}
.login__brand .brand__title{ font-size: 20px; }
.login__form .field{ margin-bottom: 14px; }
.login__form .field:last-of-type{ margin-bottom: 16px; }
.login__submit{
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  margin-top: 4px;
}
.login__error{
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,92,138,.35);
  background: rgba(255,92,138,.18);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
/* Поле с кнопкой показать/скрыть пароль */
.field__control{ position: relative; display:flex; }
.field__control .input{ padding-right: 46px; }
.pw-toggle{
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 9px;
  font-size: 16px;
  line-height: 1;
  transition: background .15s ease, color .15s ease;
}
.pw-toggle:hover{ background: var(--panel2); color: var(--text); }

@media (max-width: 980px){
  .layout{ grid-template-columns:1fr; }
  .container{ width:min(1200px, calc(100% - 20px)); }
  .topbar__inner{
    padding: 10px 0;
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .topbar__search{
    flex: 1 1 100%;
    max-width: none;
    order: 3;
  }
  .brand{ min-width: 0; flex-shrink: 1; }
  .brand__img{ flex-shrink: 0; }
  .brand__text{ min-width: 0; }
  .brand__sub{ white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .brand__title{ font-size: 15px; }
  .topbar__actions .btn{ padding: 8px 10px; font-size: 12px; }
  .summary{ align-items:flex-start; flex-direction:column; }
  .summary__right{ width:100%; align-items:stretch; }
  .summary__perpage{ min-width: 0; flex: 1; }
  .summary__filtersBtn{ white-space: nowrap; }
  .sidebar{
    position: fixed;
    inset: 0;
    padding: 14px 16px 22px;
    padding-top: max(14px, env(safe-area-inset-top, 0px));
    padding-bottom: max(22px, env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.25));
    backdrop-filter: blur(16px);
    /* без transform: на iOS он у предка часто ломает скролл внутри панели */
    transform: none;
    opacity: 0;
    pointer-events:none;
    transition: opacity .2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100dvh;
    min-height: -webkit-fill-available;
    box-sizing: border-box;
    z-index: 50;
    padding-right: 16px;
  }
  /* Пока открыты фильтры, каталог под ними не должен перехватывать касания (иначе «скролл не работает»).
     Шапку не блокируем — в ней поле поиска. */
  body.no-scroll main.layout > .content,
  body.no-scroll .footer{
    pointer-events: none;
  }
  body.no-scroll .sidebar.sidebar--open{
    pointer-events: auto;
  }
  .sidebar__scroll{
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-right: 2px;
    touch-action: pan-y;
  }
  @media (prefers-color-scheme: light){
    .sidebar{
      background: linear-gradient(to bottom, rgba(255,255,255,.85), rgba(255,255,255,.55));
    }
  }
  .sidebar.sidebar--open{
    opacity:1;
    pointer-events: auto;
    z-index: 60;
  }
  body.no-scroll .sidebar-overlay{
    display:block;
    z-index: 55;
    pointer-events: auto;
  }
  .sidebar__mobileTop{
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 10px 12px;
    margin: 0 0 10px;
    border-radius: var(--radius);
    /* Бирюзовая подложка как у панелей фильтров */
    border: 1px solid rgba(47,176,176,.30);
    background: linear-gradient(180deg, rgba(47,176,176,.18), rgba(47,176,176,.07));
    box-shadow: 0 10px 30px rgba(8,28,28,.22);
  }
  @media (prefers-color-scheme: light){
    .sidebar__mobileTop{
      background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(224,244,244,.85));
      border-color: rgba(47,176,176,.22);
      box-shadow: 0 8px 24px rgba(47,176,176,.10);
    }
  }
  .sidebar__mobileTop .panel__title{
    margin-bottom: 0;
    color: var(--text);
  }
  /* Кнопка «Закрыть» — бирюзовая, в тон фильтрам */
  .sidebar__mobileTop #closeFilters{
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(47,176,176,.20), rgba(87,214,214,.16)) !important;
    color: var(--text) !important;
    border: 1px solid rgba(47,176,176,.55) !important;
    box-shadow: none;
  }
  .sidebar__mobileTop #closeFilters:hover{
    background: linear-gradient(135deg, rgba(47,176,176,.30), rgba(87,214,214,.24)) !important;
    border-color: rgba(47,176,176,.78) !important;
  }
  .summary__filtersBtn{ display:inline-flex; }
  .panel{ padding: 12px; }
  .grid2{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: 1fr; }
  .card__actions{ flex-wrap: wrap; }
  .card__actions .btn{ flex: 1 1 100%; text-align: center; }
  .kv{ grid-template-columns: 1fr; }
  .details__hero{ padding: 14px; }
  .details__card{ padding: 12px; }
  .details__actions{ flex-wrap: wrap; }
  .details__actions .btn{ flex: 1 1 100%; text-align: center; }
}

/* ============================================================
   v16 — Админка, избранное, баннер, экспорт
   ============================================================ */

/* --- Кнопка «в избранное» на карточке --- */
.card { position: relative; }
.fav-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #e5555f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.fav-btn:hover { transform: scale(1.08); }
.fav-btn:active { transform: scale(0.96); }
.fav-btn--on {
  background: #e5555f;
  color: #fff;
  border-color: #e5555f;
}

/* --- Баннер-объявление --- */
.announce {
  margin-top: 14px;
  margin-bottom: 2px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.45;
  border: 1px solid transparent;
}
.announce--info { background: #e5f2fc; color: #0b4a7a; border-color: #bcdef7; }
.announce--success { background: #e8f1ec; color: #1f6b45; border-color: #c3e0ce; }
.announce--warning { background: #fbebde; color: #8a4b16; border-color: #f0cfac; }

/* --- Переключатель (checkbox) --- */
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
}
.switch input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  cursor: pointer;
  accent-color: #2783de;
}
.switch__label { font-weight: 600; }

/* --- Ссылки на странице входа --- */
.login__foot { margin-top: 16px; text-align: center; }
.login__link { color: var(--muted); font-size: 14px; text-decoration: none; }
.login__link:hover { text-decoration: underline; }

/* --- Ссылка на админку в подвале --- */
.footer__admin { color: var(--muted2); font-size: 13px; text-decoration: none; }
.footer__admin:hover { text-decoration: underline; }

/* --- Заголовок в шапке админки --- */
.topbar__title { flex: 1; font-weight: 700; font-size: 16px; }

/* --- Панель управления --- */
.admin {
  display: grid;
  gap: 16px;
  max-width: 760px;
  padding-top: 20px;
  padding-bottom: 56px;
}
.admin .field { margin-top: 12px; display: block; }
.admin .switch { margin-top: 8px; }
.admin textarea.input { resize: vertical; min-height: 52px; font: inherit; }
.admin__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.admin__saved {
  background: #e8f1ec;
  color: #1f6b45;
  border: 1px solid #c3e0ce;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  margin: 0;
}
.admin__note .hint { font-size: 13px; line-height: 1.55; }
.admin-page { min-height: 100vh; }

/* --- Журнал входов в админке --- */
.admin__historyHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.history-wrap { overflow-x: auto; margin-top: 10px; }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th,
.history-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}
.history-table th { color: var(--muted); font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .history-table th,
  .history-table td { border-bottom-color: rgba(255, 255, 255, 0.12); }
}

[hidden]{display:none !important;}

/* Звёзды рейтингов */
.stars {
  color: #f0a500;
  letter-spacing: 2px;
  white-space: nowrap;
  font-size: 15px;
}

.stars { font-size: 13px; letter-spacing: 1px; }
.stars__num { margin-left: 6px; font-size: 12px; color: #5b6472; white-space: nowrap; }

/* ============================================================
   Фотогалерея из папок Google Диска (drive-gallery.js)
   ============================================================ */
.gallery{ margin: 0 0 16px; }
.gallery__stage{
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.16);
}
@media (prefers-color-scheme: light){
  .gallery__stage{ background: rgba(0,0,0,.06); }
}
.gallery__stage--loading{
  background: linear-gradient(110deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.05) 70%);
  background-size: 200% 100%;
  animation: gallery-shimmer 1.4s linear infinite;
}
@media (prefers-color-scheme: light){
  .gallery__stage--loading{
    background: linear-gradient(110deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.10) 50%, rgba(0,0,0,.05) 70%);
    background-size: 200% 100%;
  }
}
@keyframes gallery-shimmer{
  from{ background-position: 200% 0; }
  to{ background-position: -200% 0; }
}
.gallery__main{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.gallery__nav,
.gallery__expand,
.lightbox__nav,
.lightbox__close{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.30);
  background: rgba(7,25,26,.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-family: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .15s ease, border-color .15s ease;
}
.gallery__nav:hover,
.gallery__expand:hover,
.lightbox__nav:hover,
.lightbox__close:hover{
  background: rgba(31,154,154,.80);
  border-color: rgba(255,255,255,.50);
}
.gallery__nav:focus-visible,
.gallery__expand:focus-visible,
.gallery__thumb:focus-visible,
.lightbox__nav:focus-visible,
.lightbox__close:focus-visible{
  outline: 2px solid var(--primary2);
  outline-offset: 2px;
}
.gallery__nav{ position: absolute; top: 50%; transform: translateY(-50%); }
.gallery__nav--prev{ left: 12px; }
.gallery__nav--next{ right: 12px; }
.gallery__expand{ position: absolute; top: 12px; right: 12px; font-size: 19px; }
.gallery__count{
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(7,25,26,.62);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  backdrop-filter: blur(6px);
}

.gallery__thumbs{
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: thin;
}
.gallery__thumb{
  flex: 0 0 auto;
  width: 96px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,.15);
  cursor: pointer;
  opacity: .6;
  transition: opacity .15s ease, border-color .15s ease;
}
.gallery__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery__thumb:hover{ opacity: .9; }
.gallery__thumb--active{
  opacity: 1;
  border-color: var(--primary2);
  box-shadow: 0 0 0 2px rgba(87,214,214,.45);
}

/* --- полноэкранный просмотр --- */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(3,10,11,.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img{
  max-width: min(1400px, calc(100vw - 128px));
  max-height: calc(100vh - 96px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0,0,0,.60);
}
.lightbox__nav{ position: fixed; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev{ left: 14px; }
.lightbox__nav--next{ right: 14px; }
.lightbox__close{ position: fixed; top: 14px; right: 14px; font-size: 18px; }
.lightbox__count{
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3px;
}
@media (max-width: 720px){
  .lightbox__img{ max-width: calc(100vw - 12px); max-height: calc(100vh - 130px); }
  .lightbox__nav--prev{ left: 8px; top: auto; bottom: 12px; transform: none; }
  .lightbox__nav--next{ right: 8px; top: auto; bottom: 12px; transform: none; }
  .lightbox__count{ bottom: 24px; }
}

/* --- заглушка обложки в карточках каталога, пока грузится фото из Диска --- */
.card__preview--pending{
  background: linear-gradient(110deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.13) 50%, rgba(255,255,255,.05) 70%);
  background-size: 200% 100%;
  animation: gallery-shimmer 1.4s linear infinite;
}
@media (prefers-color-scheme: light){
  .card__preview--pending{
    background: linear-gradient(110deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.10) 50%, rgba(0,0,0,.05) 70%);
    background-size: 200% 100%;
  }
}
.card__preview img:not([src]){ visibility: hidden; }

@media (prefers-reduced-motion: reduce){
  .gallery__stage--loading,
  .card__preview--pending{ animation: none; }
  .gallery__nav, .gallery__expand, .gallery__thumb,
  .lightbox__nav, .lightbox__close{ transition: none; }
}
