:root {
--g: #087f68;
--gd: #075b4d;
--soft: #e7f5f1;
--ink: #172e2a;
--muted: #7c8d88;
--line: #e5ece9;
--bg: #f5f8f7;
}

*, *::before, *::after {
  box-sizing: border-box;
}
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font: 14px system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

a {
color: inherit;
text-decoration: none;
}

button,
input,
select,
textarea {
font: inherit;
}

button {
cursor: pointer;
}

/* ==========================================================================
Sidebar & Navigation
========================================================================== */

.sidebar {
position: fixed;
inset: 0 auto 0 0;
width: 245px;
background: #fff;
border-right: 1px solid var(--line);
padding: 25px 16px;
display: flex;
flex-direction: column;
z-index: 5;
}

.brand {
display: flex;
align-items: center;
gap: 10px;
padding: 0 7px;
}

.brand b,
.brand small,
.property b,
.property small,
.sidebottom b,
.sidebottom small {
display: block;
}

.brand b {
font-size: 15px;
}

.brand small {
font-size: 11px;
color: var(--muted);
}

.logo {
display: grid;
place-items: center;
width: 44px;
height: 44px;
border-radius: 14px;
background: linear-gradient(145deg, #0b987b, #075f4f);
color: #fff;
font-size: 22px;
font-weight: 800;
box-shadow: 0 6px 16px #087f6825;
}

.smalllogo {
width: 36px;
height: 36px;
font-size: 18px;
border-radius: 11px;
}

.property {
margin: 33px 0 22px;
padding: 12px;
background: #f6f9f8;
border-radius: 12px;
display: flex;
align-items: center;
gap: 10px;
color: var(--g);
font-size: 20px;
}

.property b {
font-size: 11px;
color: var(--ink);
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.property small {
font-size: 10px;
color: var(--muted);
}

nav {
display: grid;
gap: 5px;
}

nav a {
padding: 13px 12px;
border-radius: 10px;
color: #71827d;
font-size: 12px;
}

nav a.active,
nav a:hover {
background: var(--soft);
color: var(--g);
font-weight: 700;
}

.sidebottom {
margin-top: auto;
border-top: 1px solid var(--line);
padding: 17px 6px 0;
font-size: 11px;
}

.sidebottom small {
color: var(--muted);
margin-top: 3px;
}

.sidebottom a {
display: block;
color: #71827d;
margin-top: 18px;
}

/* Owner Menu & Links */

.owner-menu {
position: relative;
}

.owner-menu summary {
display: flex;
justify-content: space-between;
gap: 8px;
cursor: pointer;
list-style: none;
}

.owner-menu summary::-webkit-details-marker {
display: none;
}

.owner-menu summary b,
.owner-menu summary small {
display: block;
}

.owner-menu summary b {
font-size: 11px;
}

.owner-menu summary small {
font-size: 10px;
color: var(--muted);
margin-top: 3px;
}

.owner-links {
display: grid;
gap: 5px;
margin-top: 10px;
padding: 8px;
background: #f6f9f8;
border-radius: 9px;
}

.owner-links a {
margin: 0;
padding: 8px;
font-size: 12px;
border-radius: 6px;
}

.owner-links a:hover {
background-color: var(--soft);
color: var(--g);
}

.sidebottom .owner-links {
display: flex;
flex-direction: column;
gap: 10px;
padding: 12px 14px;
border-top: 1px solid var(--line);
}

.sidebottom .owner-name {
font-weight: 700;
color: var(--ink);
padding-bottom: 3px;
}

.sidebottom .owner-links a {
display: block;
color: #71827d;
text-decoration: none;
font-size: 12px;
}

.sidebottom .owner-links a:hover {
color: var(--g);
}

/* ==========================================================================
Main Layout & Header
========================================================================== */

.main {
margin-left: 245px;
min-height: 100vh;
display: flex;
flex-direction: column;
}

.topbar {
height: 70px;
background: #fff;
border-bottom: 1px solid var(--line);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 34px;
color: #91a09b;
font-size: 11px;
}

.topbar b {
color: #435852;
}

.topbar button {
display: none;
}

.content {
padding: 31px 34px 40px;
max-width: 1550px;
width: 100%;
margin: 0 auto;
flex: 1;
}

.heading {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
margin-bottom: 23px;
}

.eyebrow {
font-size: 9px;
letter-spacing: 1.5px;
color: var(--g);
font-weight: 800;
margin: 0 0 7px;
}

.heading h1,
.publicwrap h1 {
font: 800 29px system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
letter-spacing: -1px;
margin: 0 0 6px;
}

.muted {
color: var(--muted);
font-size: 12px;
margin: 0;
}

/* ==========================================================================
Buttons & Inputs
========================================================================== */

.button,
button.primary {
display: inline-flex;
justify-content: center;
align-items: center;
gap: 8px;
border: 1px solid #dfe8e4;
background: #fff;
color: #45615a;
padding: 11px 15px;
border-radius: 10px;
font-size: 11px;
font-weight: 700;
white-space: nowrap;
}

.primary,
button.primary {
background: var(--g);
border-color: var(--g);
color: #fff;
box-shadow: 0 5px 12px #087f681b;
}

.primary:hover,
button.primary:hover {
background: var(--gd);
}

.full {
width: 100%;
margin-top: 14px;
}

.filters {
display: flex;
gap: 9px;
margin-bottom: 19px;
}

.filters input {
flex: 1;
min-width: 120px;
}

.filters input,
.filters select,
input,
select,
textarea {
border: 1px solid #dfe8e4;
border-radius: 9px;
padding: 11px 12px;
font-size: 12px;
color: #2e4841;
background: #fff;
min-width: 0;
width: 100%;
outline: none;
}

.formpanel form {
display: block;
}

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

.formgrid label,
.authbox label,
.panel > label {
display: flex;
flex-direction: column;
gap: 7px;
font-size: 11px;
font-weight: 600;
color: #536a63;
overflow: hidden;
}

.formgrid .wide {
grid-column: 1 / -1;
}

.formgrid textarea {
resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap; /* Разрешает кнопкам переноситься на вторую строку */
  gap: 8px;
}

.honeypot {
position: absolute !important;
left: -10000px !important;
top: auto !important;
width: 1px !important;
height: 1px !important;
overflow: hidden !important;
}

/* ==========================================================================
Hero & Dashboard Widgets
========================================================================== */

.hero {
background: linear-gradient(110deg, #075e50, #0b8a70);
color: #fff;
border-radius: 17px;
padding: 28px 32px;
display: flex;
align-items: center;
justify-content: space-between;
min-height: 185px;
margin-bottom: 18px;
overflow: hidden;
}

.hero > div:first-child > span {
font-size: 9px;
letter-spacing: 1.5px;
opacity: 0.75;
font-weight: 800;
}

.hero h2 {
font: 700 24px system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
letter-spacing: -0.6px;
margin: 11px 0 8px;
}

.hero p {
font-size: 12px;
color: #d1e9e1;
margin: 0;
}

.hero a {
display: inline-block;
font-size: 11px;
font-weight: 700;
margin-top: 19px;
}

.hero-symbol {
display: grid;
place-items: center;
width: 105px;
height: 105px;
border: 1px solid #ffffff5c;
background: #ffffff1c;
border-radius: 30px;
font-size: 45px;
margin-right: 35px;
box-shadow: 0 0 0 20px #ffffff09;
}

.stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
margin-bottom: 18px;
}

.stats article,
.panel {
background: #fff;
border: 1px solid var(--line);
border-radius: 14px;
box-shadow: 0 8px 28px #15362f08;
}

.stats article {
padding: 18px 20px;
}

.stats small,
.stats span {
display: block;
color: var(--muted);
font-size: 10px;
}

.stats strong {
display: block;
font: 800 29px system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
margin: 10px 0 4px;
letter-spacing: -1px;
}

.columns {
display: grid;
grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.9fr);
gap: 17px;
align-items: start;
}

.panel {
padding: 21px;
margin-bottom: 17px;
}

.panel h2 {
font-size: 14px;
margin: 0 0 5px;
}

.panelhead {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 17px;
}

.panelhead > a {
color: var(--g);
font-size: 11px;
font-weight: 700;
}

.panelhead .muted {
font-size: 10px;
}

/* ==========================================================================
Lists & Items
========================================================================== */

.list {
display: grid;
}

.item {
display: flex;
align-items: center;
gap: 11px;
padding: 13px 0;
border-bottom: 1px solid #f0f3f2;
min-width: 0;
}

.item:last-child {
border: 0;
}

.item form {
margin: 0;
}

.item form button {
padding: 9px 10px;
}

.device {
flex-shrink: 0;
display: grid;
place-items: center;
width: 39px;
height: 39px;
border-radius: 12px;
background: #e5f5ef;
color: var(--g);
font-size: 20px;
}

.itemmain {
flex: 1;
min-width: 0;
}

.itemmain b,
.itemmain small {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.itemmain b {
font-size: 11px;
}

.itemmain small {
font-size: 9px;
color: var(--muted);
margin-top: 4px;
}

.good,
.late {
font-size: 9px;
font-style: normal;
font-weight: 700;
padding: 5px 8px;
border-radius: 18px;
white-space: nowrap;
}

.good {
background: #e5f7ef;
color: #168060;
}

.late {
background: #fff0ee;
color: #c64e48;
}

.upcoming {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 0;
border-bottom: 1px solid #f0f3f2;
}

.date {
width: 42px;
height: 44px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #e5f5ef;
color: var(--g);
border-radius: 10px;
font-weight: 800;
font-size: 15px;
}

.date small {
font-size: 9px;
text-transform: uppercase;
}

.upcoming > span:last-child {
min-width: 0;
}

.upcoming b,
.upcoming small {
display: block;
}

.upcoming b {
font-size: 10px;
}

.upcoming small {
font-size: 9px;
color: var(--muted);
margin-top: 4px;
}

.more {
display: block;
text-align: center;
padding-top: 16px;
font-size: 10px;
color: var(--g);
font-weight: 700;
}

.empty {
text-align: center;
padding: 34px 15px;
}

.empty h3 {
font-size: 14px;
}

.empty p {
font-size: 11px;
color: var(--muted);
margin: 0 auto 15px;
max-width: 330px;
}

.small {
font-size: 10px;
margin-top: 13px;
}

/* ==========================================================================
Passport Details & Logs
========================================================================== */

.passporthero {
display: flex;
align-items: center;
gap: 13px;
background: linear-gradient(100deg, #eef9f4, #fff);
margin: -21px -21px 0;
padding: 22px;
border-bottom: 1px solid var(--line);
}

.device.big {
width: 58px;
height: 58px;
font-size: 28px;
}

.passporthero h2 {
font: 800 19px system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
margin: 4px 0;
}

.passporthero .good,
.passporthero .late {
margin-left: auto;
}

.details {
padding: 5px 0;
}

.details > div {
display: flex;
justify-content: space-between;
gap: 15px;
padding: 12px 0;
border-bottom: 1px solid #f0f3f2;
font-size: 11px;
}

.details > div:last-child {
border: 0;
}

.details span {
color: var(--muted);
}

.details b {
text-align: right;
overflow-wrap: anywhere;
}

.note {
background: #f6f9f8;
padding: 12px;
border-radius: 9px;
font-size: 11px;
white-space: normal;
}

.urlbox {
  word-break: break-all;      /* Разрешает разрыв длинных URL на новую строку */
  overflow-wrap: anywhere;   /* Защита для всех браузеров */
}

.history {
margin-top: 0;
}

.logrow {
display: flex;
align-items: flex-start;
gap: 11px;
padding: 13px 0;
border-bottom: 1px solid #f0f3f2;
}

.logrow:last-child {
border: 0;
}

.check {
width: 27px;
height: 27px;
display: grid;
place-items: center;
border-radius: 50%;
background: #e5f5ef;
color: var(--g);
font-weight: 800;
flex-shrink: 0;
}

.logrow > div {
flex: 1;
}

.logrow b {
font-size: 11px;
}

.logrow p {
font-size: 10px;
color: #61756d;
margin: 4px 0;
}

.logrow small {
font-size: 9px;
color: var(--muted);
}

.settings-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
margin: 16px 0;
}

.setting-check {
display: flex;
align-items: center;
gap: 9px;
padding: 11px;
border: 1px solid var(--line);
border-radius: 9px;
font-size: 11px;
}

.setting-check input,
.qr-select-item input {
width: auto;
}

.public-files {
display: flex;
flex-wrap: wrap;
gap: 9px;
margin-top: 14px;
}

/* ==========================================================================
Condition Reports
========================================================================== */

.condition-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
margin: 18px 0;
}

.condition-option {
display: flex;
align-items: center;
gap: 9px;
padding: 12px;
border: 1px solid var(--line);
border-radius: 10px;
background: #fbfdfc;
cursor: pointer;
font-size: 12px;
}

.condition-option input {
accent-color: var(--g);
width: 16px;
height: 16px;
}

.condition-counts {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
margin-top: 15px;
}

.condition-counts > div {
display: flex;
justify-content: space-between;
gap: 10px;
padding: 10px 12px;
background: #f7faf9;
border-radius: 9px;
font-size: 11px;
}

.condition-counts b {
color: var(--g);
font-size: 14px;
}

/* ==========================================================================
Labels & QR Printing
========================================================================== */

.labelstage {
min-height: 250px;
display: grid;
place-items: center;
background: repeating-linear-gradient(45deg, #fbfcfc, #fbfcfc 8px, #f6f9f8 8px, #f6f9f8 16px);
border: 1px dashed #dce7e2;
border-radius: 12px;
margin-top: 15px;
padding: 20px;
}

.label {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
border: 1px solid #dce6e1;
border-radius: 8px;
background: #fff;
box-shadow: 0 5px 15px #173d3210;
}

.label > div:last-child {
display: flex;
flex-direction: column;
gap: 4px;
max-width: 150px;
}

.label b {
font-size: 12px;
overflow-wrap: anywhere;
}

.label small {
font-size: 9px;
color: #70817b;
}

.label em {
font-size: 8px;
color: #9aa8a3;
font-style: normal;
}

.qr-toolbar {
display: flex;
gap: 8px;
margin: 14px 0;
}

.qr-select-list {
max-height: 450px;
overflow: auto;
border-top: 1px solid var(--line);
}

.qr-select-item {
display: flex;
align-items: center;
gap: 10px;
padding: 11px 3px;
border-bottom: 1px solid #f0f3f2;
cursor: pointer;
}

.qr-select-item span {
display: grid;
gap: 4px;
}

.qr-select-item b {
font-size: 11px;
}

.qr-select-item small {
font-size: 9px;
color: var(--muted);
}

.qr-size-label {
display: grid;
gap: 7px;
margin-top: 15px;
font-size: 11px;
font-weight: 600;
}

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

.qr-print-card {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
padding: 9px;
border: 1px solid #dce6e1;
border-radius: 7px;
break-inside: avoid;
page-break-inside: avoid;
}

.qr-code {
flex-shrink: 0;
}

.qr-info {
display: grid;
gap: 5px;
min-width: 0;
overflow-wrap: anywhere;
}

.qr-info b {
font-size: 11px;
}

.qr-info small {
font-size: 9px;
color: #64766f;
}

.qr-empty {
grid-column: 1 / -1;
text-align: center;
color: var(--muted);
padding: 30px 10px;
}

/* ==========================================================================
Alerts & Badges
========================================================================== */

.alert {
padding: 12px 14px;
background: #fff0ee;
color: #b43d37;
border-radius: 9px;
font-size: 12px;
}

.okmsg {
padding: 12px 14px;
background: #e6f6ee;
color: #187a5b;
border-radius: 9px;
font-size: 12px;
}

.alertdot {
width: 30px;
height: 30px;
display: grid;
place-items: center;
border-radius: 50%;
font-weight: 900;
flex-shrink: 0;
background: #fff0ee;
color: #c64e48;
}

.alertdot.critical {
background: #c64e48;
color: #fff;
}

.warnbadge {
font-size: 9px;
font-style: normal;
font-weight: 700;
padding: 5px 8px;
border-radius: 18px;
white-space: nowrap;
background: #fff4df;
color: #946313;
}

/* ==========================================================================
Auth & Public Layouts
========================================================================== */

.auth {
min-height: 100vh;
display: grid;
place-items: center;
padding: 22px;
background: radial-gradient(circle at 10% 10%, #e0f5ec, transparent 30%), var(--bg);
}

.authbox {
width: min(100%, 410px);
padding: 33px;
background: #fff;
border: 1px solid var(--line);
border-radius: 19px;
box-shadow: 0 20px 70px #173d3210;
}

.authbox .logo {
margin-bottom: 23px;
}

.authbox h1 {
font: 800 26px system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
letter-spacing: -0.8px;
margin: 0 0 21px;
}

.authbox label {
margin-bottom: 15px;
}

.authbox button {
width: 100%;
margin-top: 5px;
}

.authbox .muted {
margin-top: 18px;
text-align: center;
}

.authbox a,
.authbox .muted a {
color: var(--g);
font-weight: 700;
}

.public {
min-height: 100vh;
}

.publichead {
background: #fff;
border-bottom: 1px solid var(--line);
padding: 15px max(20px, calc((100vw - 760px) / 2));
display: flex;
justify-content: space-between;
align-items: center;
}

.publicwrap {
width: min(100% - 32px, 760px);
margin: 34px auto;
}

.publicwrap > h1 {
margin-bottom: 7px;
}

.publicwrap > .muted {
margin-bottom: 18px;
}

.publicfoot {
text-align: center;
font-size: 10px;
color: #9aa7a3;
margin: 25px;
}

.public .panel {
margin-top: 15px;
}

footer {
background: #fff;
border-top: 1px solid var(--line);
padding: 16px 34px;
display: flex;
justify-content: space-between;
color: #9aa7a3;
font-size: 10px;
}

/* ==========================================================================
Admin Panel
========================================================================== */

.admin-page {
background: #f5f7f8;
color: #17232b;
}

.admin-content {
max-width: 1440px;
margin: 0 auto;
padding: 32px;
}

.admin-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}

.admin-table th,
.admin-table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e5eaed;
vertical-align: middle;
}

.admin-table th {
color: #64727a;
font-weight: 600;
}

.admin-table td small {
display: block;
color: #73818a;
margin-top: 4px;
}

.table-wrap {
overflow-x: auto;
}

.admin-actions {
display: flex;
gap: 6px;
flex-wrap: wrap;
}

.admin-actions button {
border: 1px solid #d5dfe3;
background: #fff;
border-radius: 8px;
padding: 7px 9px;
cursor: pointer;
}

.admin-actions .danger {
color: #b42318;
border-color: #efc5c2;
}

.admin-page .panel {
overflow: hidden;
}

/* ==========================================================================
Responsive & Media Queries
========================================================================== */

.navopen .sidebar {
transform: translateX(0);
}

@media (max-width: 1050px) {
.content {
padding: 25px 20px;
}
.topbar {
padding: 0 20px;
}
.columns {
grid-template-columns: 1fr;
}
.hero-symbol {
margin-right: 10px;
}
}

@media (max-width: 780px) {
.sidebar {
transform: translateX(-100%);
transition: 0.2s;
box-shadow: 12px 0 30px #142f2815;
}
.main {
margin-left: 0;
}
.topbar {
height: 60px;
padding: 0 16px;
gap: 12px;
}
.topbar button {
display: block;
border: 0;
background: none;
font-size: 19px;
}
.topbar > span {
flex: 1;
}
.topbar > small {
display: none;
}
.content {
padding: 22px 15px;
}
.heading {
align-items: flex-start;
flex-direction: column;
}
.stats {
gap: 8px;
}
.stats article {
padding: 13px;
}
.stats strong {
font-size: 24px;
}
.hero {
padding: 23px;
}
.hero h2 {
font-size: 20px;
}
.hero-symbol {
display: none;
}
footer {
padding: 15px;
gap: 8px;
flex-wrap: wrap;
}
}

@media (max-width: 650px) {
.settings-grid {
grid-template-columns: 1fr;
}
.qr-sheet {
grid-template-columns: 1fr;
}
.qr-layout {
grid-template-columns: 1fr;
}
}

@media (max-width: 600px) {
.condition-grid,
.condition-counts {
grid-template-columns: 1fr;
}
}

@media (max-width: 540px) {
.stats {
grid-template-columns: 1fr;
}
.stats article {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
}
.stats article small {
grid-column: 1;
grid-row: 1;
}
.stats strong {
grid-column: 1;
grid-row: 2;
margin: 3px 0 0;
}
.stats span {
grid-column: 2;
grid-row: 2;
text-align: right;
}
.item {
flex-wrap: wrap;
}
.itemmain {
width: calc(100% - 60px);
flex: auto;
}
.item .button {
margin-left: 50px;
}
.formgrid {
grid-template-columns: 1fr;
}
.formgrid .wide {
grid-column: auto;
}
.actions .button,
.actions button {
flex: 1;
}
.passporthero {
flex-wrap: wrap;
}
.passporthero .good,
.passporthero .late {
margin-left: 0;
}
.filters {
flex-wrap: wrap;
}
.filters input {
flex-basis: 100%;
}
.filters select {
flex: 1;
}
.publichead {
padding: 14px 16px;
}
.publichead > .muted {
display: none;
}
.authbox {
padding: 25px 21px;
}
}

@media print {
@page {
size: A4;
margin: 10mm;
}
body {
background: #fff !important;
}
.sidebar,
.topbar,
.heading,
.qr-settings,
footer,
.no-print,
.qr-layout > .panel:first-child {
display: none !important;
}
.main {
margin: 0 !important;
}
.content {
padding: 0 !important;
max-width: none !important;
}
.columns {
display: block;
}
.columns > .panel:first-child {
display: none;
}
.labelstage {
border: 0;
background: #fff;
min-height: 0;
padding: 0;
}
.panel {
border: 0;
box-shadow: none;
}
.label {
box-shadow: none;
border: 1px solid #ddd;
}
.qr-layout {
display: block !important;
}
.qr-preview-panel {
border: 0 !important;
box-shadow: none !important;
padding: 0 !important;
margin: 0 !important;
}
.qr-sheet {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 7mm 5mm;
}
.qr-print-card {
border: 1px solid #aaa;
border-radius: 2mm;
padding: 3mm;
min-height: 29mm;
}
.qr-info b {
font-size: 10pt;
}
.qr-info small {
font-size: 8pt;
}
}
/* Legal document links and registration consents */
.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: 100%;
}
.legal-footer a {
  word-break: break-word;
}

.legal-footer {
  overflow: hidden;
}

/* ==========================================================================
Footer Responsive Layout
========================================================================== */

footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 16px 34px;
}

.legal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  font-size: 11px;
  color: #9aa7a3;
}

.footer-col {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-col.links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

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

/* При уменьшении экрана (< 900px) выстраиваем в 3 вертикальных блока */
@media (max-width: 900px) {
  .legal-footer {
    flex-direction: column;
    align-items: flex-start; /* Или center, если нужно по центру */
    gap: 12px;
  }

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

/* ==========================================================================
   Идеальное выравнивание блока согласий и чекбоксов
   ========================================================================== */

.doc-consents {
    border: 1px solid #dfe8e4;
    background: #fbfdfc;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 18px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-consents legend {
    font-size: 11px;
    font-weight: 700;
    color: #45615a;
    padding: 0 6px;
}

.doc-consents label {
    display: grid !important;
    grid-template-columns: 16px 1fr; /* 1 колонка — чекбокс, 2 колонка — весь текст */
    align-items: center;             /* Выравнивание чекбокса строго по центру текста */
    gap: 10px;
    margin-bottom: 0 !important;
    font-size: 11.5px;
    font-weight: 400;
    color: #334e47;
    line-height: 1.35;
    cursor: pointer;
}

.doc-consents input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;            /* Убираем лишние отступы */
    accent-color: var(--g, #087f68);
    cursor: pointer;
}

/* Запрещаем разрыв предлогов и названий документов */
.doc-consents a {
    color: var(--g, #087f68);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    white-space: nowrap;            /* Ссылка не разрывается на полуслове */
}

.doc-consents a:hover {
    color: var(--gd, #075b4d);
}