
/* SafeMind222 — fixed clickable search/filter panel */

body .test-page-wide {
  width: 100% !important;
  max-width: 100% !important;
  padding: 24px clamp(14px, 3vw, 42px) 30px !important;
  box-sizing: border-box !important;
}

.catalog-tools-panel {
  position: relative;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto 24px;
  padding: 18px;
  border: 2px solid rgba(139, 92, 246, .48);
  border-radius: 18px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 20px 54px rgba(20, 50, 90, .08);
  backdrop-filter: blur(12px);
  z-index: 100;
  box-sizing: border-box;
}

.catalog-tools-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px) minmax(170px, 200px);
  gap: 14px;
  align-items: center;
}

.catalog-search-box,
.catalog-type-select,
.catalog-filter-toggle {
  min-height: 54px;
  border: 1px solid rgba(111, 135, 165, .22);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 22px rgba(14, 45, 75, .04);
  color: #0b3450;
  box-sizing: border-box;
}

.catalog-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.catalog-tool-icon {
  color: #6d819c;
  font-size: 23px;
}

.catalog-search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: #0b3450;
}

.catalog-type-select {
  position: relative;
  display: flex;
  align-items: center;
}

.catalog-type-select select,
.catalog-filter-grid select {
  width: 100%;
  min-height: 54px;
  padding: 0 42px 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: #0b3450;
  appearance: none;
  cursor: pointer;
}

.catalog-select-arrow {
  position: absolute;
  right: 16px;
  pointer-events: none;
}

.catalog-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(111, 135, 165, .22);
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.catalog-filter-toggle.active,
.catalog-filter-toggle:hover {
  border-color: rgba(139, 92, 246, .55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .10);
}

.catalog-filter-toggle b {
  margin-left: auto;
}

.catalog-filter-menu {
  display: none;
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(111, 135, 165, .18);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 44px rgba(15, 50, 80, .08);
  box-sizing: border-box;
}

.catalog-tools-panel.filters-open .catalog-filter-menu {
  display: block !important;
}

.catalog-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: #0b3450;
}

.catalog-filter-head button {
  border: 0;
  background: transparent;
  color: #45647e;
  font-weight: 800;
  cursor: pointer;
}

.catalog-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px 18px;
}

.catalog-filter-grid label {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(111, 135, 165, .20);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  overflow: hidden;
  box-sizing: border-box;
}

.catalog-filter-grid label > span:first-child {
  position: absolute;
  top: 6px;
  left: 16px;
  font-size: 10px;
  color: rgba(11, 52, 80, .52);
  pointer-events: none;
}

.catalog-filter-grid label select {
  padding-top: 14px;
}

.catalog-switch {
  gap: 12px;
  padding: 0 16px;
  overflow: visible !important;
}

.catalog-switch input {
  display: none;
}

.catalog-switch i {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d8e2ec;
  position: relative;
  flex: 0 0 auto;
}

.catalog-switch i::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: .2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.catalog-switch input:checked + i {
  background: linear-gradient(135deg,#29c6c0,#8b5cf6);
}

.catalog-switch input:checked + i::after {
  transform: translateX(18px);
}

.catalog-switch b {
  font-size: 14px;
  color: #0b3450;
}

.catalog-switch em {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(79, 214, 137, .18);
  color: #16834b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.catalog-apply-btn {
  min-height: 58px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg,#22c5c7,#7c3aed);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(89, 84, 230, .18);
}

/* lower layout stays visually the same */
body .compact-test-layout,
body .survey-layout-fixed {
  width: 100% !important;
  max-width: 1680px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 330px minmax(620px, 1fr) 350px !important;
  gap: 28px !important;
  align-items: start !important;
}

body .compact-test-card.visual-test-card,
body .survey-full-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 28px !important;
  box-sizing: border-box !important;
}

body .visual-test-head,
body .visual-test-head.survey-head {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 34px 40px !important;
  box-sizing: border-box !important;
  border-radius: 26px !important;
}

body .visual-test-card .question-box {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body .visual-test-card .question-box h2 {
  width: 100% !important;
  max-width: none !important;
  font-size: clamp(24px, 1.9vw, 32px) !important;
  line-height: 1.25 !important;
}

body .visual-test-card label.option.visual-option {
  width: 100% !important;
  max-width: none !important;
  min-height: 64px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 0 12px !important;
  padding: 0 22px !important;
  box-sizing: border-box !important;
}

body .visual-test-card .actions {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.7fr) !important;
  gap: 18px !important;
}

body .visual-test-card .actions .btn {
  width: 100% !important;
  min-height: 64px !important;
  justify-content: center !important;
}

@media (max-width: 1280px) {
  .catalog-filter-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  body .compact-test-layout,
  body .survey-layout-fixed {
    grid-template-columns: 300px minmax(0, 1fr) !important;
  }

  body .rightbar {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 18px !important;
  }
}

@media (max-width: 860px) {
  body .test-page-wide {
    padding: 16px 12px !important;
  }

  .catalog-tools-panel {
    padding: 12px;
    margin-bottom: 16px;
  }

  .catalog-tools-row,
  .catalog-filter-grid {
    grid-template-columns: 1fr;
  }

  body .compact-test-layout,
  body .survey-layout-fixed {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  body .sidebar {
    order: 2 !important;
  }

  body .survey-full-card,
  body .compact-test-card.visual-test-card {
    order: 1 !important;
    padding: 16px !important;
  }

  body .rightbar {
    order: 3 !important;
    grid-template-columns: 1fr !important;
  }

  body .visual-test-head {
    padding: 22px !important;
  }

  body .visual-test-card .actions {
    grid-template-columns: 1fr !important;
  }
}



/* === SafeMind final: App dropdown exactly in current header style === */
.top-actions {
  position: relative;
}

.nav-app {
  position: relative;
}

.nav-app summary {
  list-style: none;
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(139, 92, 246, .35);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  color: #7c3aed;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(30, 58, 138, .04);
}

.nav-app summary::-webkit-details-marker {
  display: none;
}

.nav-app summary::after {
  content: "⌄";
  margin-left: 4px;
  font-size: 15px;
  color: #7c3aed;
}

.nav-app[open] summary {
  border-color: rgba(139, 92, 246, .62);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .10);
}

.nav-app .app-ico {
  font-size: 18px;
}

.app-dropdown-card {
  position: absolute;
  top: calc(100% + 18px);
  right: -92px;
  width: min(640px, 86vw);
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(166, 190, 220, .28);
  box-shadow: 0 26px 70px rgba(12, 35, 65, .14);
  z-index: 9999;
  backdrop-filter: blur(14px);
}

.app-dropdown-card::before {
  content: "";
  position: absolute;
  top: -13px;
  right: 165px;
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,.97);
  border-left: 1px solid rgba(166, 190, 220, .24);
  border-top: 1px solid rgba(166, 190, 220, .24);
  transform: rotate(45deg);
}

.app-phone-preview {
  width: 122px;
  height: 218px;
  justify-self: center;
  align-self: center;
  position: relative;
  border-radius: 25px;
  background: #111827;
  box-shadow: 0 18px 38px rgba(79, 70, 229, .18);
  padding: 7px;
}

.app-phone-notch {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 42px;
  height: 11px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #111827;
  z-index: 2;
}

.app-phone-screen {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef7ff 100%);
  padding: 24px 10px 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.app-mini-head {
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,197,195,.28), rgba(139,92,246,.18));
  margin-bottom: 9px;
}

.app-mini-chart {
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.80), rgba(255,255,255,.35)),
    linear-gradient(135deg, rgba(20,184,166,.18), rgba(139,92,246,.18));
  margin-bottom: 9px;
}

.app-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.app-mini-grid span {
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 14px rgba(30, 58, 138, .06);
}

.app-dropdown-content {
  align-self: center;
}

.app-dropdown-content h3 {
  margin: 0 0 12px;
  font-size: 27px;
  line-height: 1.15;
  color: #0b3450;
  font-weight: 700;
}

.app-dropdown-content p {
  margin: 0;
  max-width: 360px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(11, 52, 80, .72);
}

.app-dropdown-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  width: 100%;
  border-top: 1px solid rgba(13, 52, 80, .10);
  color: #7c3aed;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.app-dropdown-link span {
  font-size: 24px;
  line-height: 1;
}

/* аккуратнее иконки опитувань/тестів в текущем списке */
.side-link .round-icon,
.round-icon {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.38), transparent 36%),
    linear-gradient(135deg, #22c5c7 0%, #7c3aed 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 10px 22px rgba(79,70,229,.16) !important;
}

.side-link .round-icon svg,
.round-icon svg {
  width: 24px !important;
  height: 24px !important;
  stroke-width: 2.1 !important;
}

/* меньше жирности в меню, поиске и фильтрах */
.nav-more-menu a,
.nav-more-menu a span,
.catalog-filter-grid label,
.catalog-filter-grid select,
.catalog-filter-toggle,
.catalog-type-select select,
.catalog-search-box input,
.catalog-filter-head,
.catalog-filter-head button {
  font-weight: 500 !important;
}

.catalog-filter-grid label > span:first-child {
  font-weight: 400 !important;
}

/* центрирование страницы входа: "або" и замок */
.login-card,
.auth-card,
.login-box {
  text-align: center !important;
}

.login-card form,
.auth-card form,
.login-box form {
  text-align: left !important;
}

.login-card .divider,
.auth-card .divider,
.login-box .divider,
.login-card .secure-note,
.auth-card .secure-note,
.login-box .secure-note {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  .nav-app summary {
    padding: 0 14px;
  }

  .app-dropdown-card {
    right: -120px;
    width: min(520px, 92vw);
    grid-template-columns: 125px 1fr;
    gap: 18px;
    padding: 22px;
  }

  .app-phone-preview {
    width: 98px;
    height: 176px;
  }

  .app-dropdown-content h3 {
    font-size: 23px;
  }

  .app-dropdown-content p {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .top-actions {
    gap: 8px;
  }

  .nav-app {
    position: static;
  }

  .app-dropdown-card {
    left: 12px;
    right: 12px;
    top: calc(100% + 12px);
    width: auto;
    grid-template-columns: 92px 1fr;
    border-radius: 22px;
  }

  .app-dropdown-card::before {
    display: none;
  }

  .app-phone-preview {
    width: 76px;
    height: 136px;
    border-radius: 20px;
    padding: 5px;
  }

  .app-phone-screen {
    border-radius: 16px;
    padding: 18px 7px 7px;
  }

  .app-mini-chart {
    height: 28px;
  }

  .app-mini-grid span {
    height: 24px;
  }
}


/* ===== SafeMind architecture/jury refinements ===== */

.jury-architecture,
.architecture-block,
.arch-card,
.architecture-card {
border-radius:26px!important;
border:1px solid rgba(148,163,184,.16)!important;
background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,255,.92))!important;
box-shadow:0 18px 44px rgba(15,23,42,.06)!important;
}

.jury-architecture h2,
.architecture-block h2,
.arch-card h3{
letter-spacing:-0.02em!important;
font-weight:700!important;
color:#0b3450!important;
}

.arch-grid,
.architecture-grid{
gap:22px!important;
}

.arch-mini-card,
.arch-step,
.arch-service{
border-radius:20px!important;
border:1px solid rgba(125,125,255,.10)!important;
background:rgba(255,255,255,.88)!important;
box-shadow:0 8px 22px rgba(79,70,229,.05)!important;
}

.arch-mini-card p,
.arch-step p,
.arch-service p{
font-weight:400!important;
line-height:1.55!important;
color:rgba(11,52,80,.72)!important;
}

.arch-icon,
.arch-service-icon{
background:linear-gradient(135deg,#22c5c7,#7c3aed)!important;
border-radius:18px!important;
box-shadow:0 10px 24px rgba(79,70,229,.12)!important;
}

.jury-section,
.jury-about,
.jury-roadmap{
padding:28px!important;
border-radius:30px!important;
background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
box-shadow:0 16px 42px rgba(15,23,42,.05)!important;
}


/* ===== Jury architecture preview ===== */

.jury-architecture-preview{
    margin:36px auto;
    padding:32px;
    border-radius:32px;
    background:linear-gradient(180deg,#ffffff,#f7faff);
    box-shadow:0 20px 48px rgba(15,23,42,.06);
    border:1px solid rgba(148,163,184,.14);
}

.jury-arch-head{
    margin-bottom:24px;
}

.jury-arch-head h2{
    margin:10px 0 12px;
    font-size:clamp(32px,3vw,48px);
    line-height:1.1;
    color:#0b3450;
}

.jury-arch-head p{
    max-width:760px;
    color:rgba(11,52,80,.72);
    line-height:1.7;
    font-size:17px;
}

.jury-arch-image-wrap{
    border-radius:28px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 18px 42px rgba(15,23,42,.08);
}

.jury-arch-image{
    width:100%;
    display:block;
}

@media(max-width:768px){
    .jury-architecture-preview{
        padding:18px;
        border-radius:24px;
    }
}
