/* Compact course rows with the group action at the right edge. */
.cabinet-shell .cabinet-course-table-wrap { width: 100%; overflow-x: auto; }
.cabinet-shell .cabinet-profile table.cabinet-course-table { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; }
.cabinet-shell .cabinet-course-table th { background: #f7f8fc; color: #727b90; font-weight: 500; text-align: left; }
.cabinet-shell .cabinet-course-table th, .cabinet-shell .cabinet-course-table td { padding: 12px 14px; border-bottom: 1px solid #e5e9f1; vertical-align: top; }
.cabinet-shell .cabinet-course-table tbody tr:last-child td { border-bottom: 0; }
.cabinet-shell .cabinet-course-table .cabinet-course-actions { width: 180px; text-align: right; }
.cabinet-shell .cabinet-course-name { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.cabinet-shell .cabinet-course-table .cabinet-course-actions .cabinet-button { min-height: 34px; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
.cabinet-shell .cabinet-course-table details.cabinet-edit-details { margin-top: 5px; padding: 0; border: 0; border-radius: 0; max-height: none; overflow: visible; }
.cabinet-shell .cabinet-course-table .cabinet-edit-details > summary { font-size: 12px; }
.cabinet-shell .cabinet-profile .cabinet-course-table form.cabinet-inline-form { grid-template-columns: minmax(120px, 380px) max-content; }
@media (max-width: 600px) {
    .cabinet-shell .cabinet-course-table .cabinet-course-actions { width: 145px; }
    .cabinet-shell .cabinet-profile .cabinet-course-table form.cabinet-inline-form { grid-template-columns: minmax(0, 1fr); }
}

/* Shared compact spacing for all cabinet and legacy administration screens. */
.cabinet-shell .cabinet-welcome {
    min-height: 0; padding: 4px 0 12px; margin: 0 0 14px;
    background: transparent; border: 0; border-bottom: 1px solid #e2e6ef; border-radius: 0;
}
.cabinet-shell .cabinet-dashboard h1 { font-size: 23px; line-height: 1.3; margin: 5px 0 7px; letter-spacing: -.4px; }
.cabinet-shell .cabinet-dashboard h2 { font-size: 17px; line-height: 1.35; margin: 0 0 12px; }
.cabinet-shell .cabinet-dashboard h3 { font-size: 15px; margin: 0 0 8px; }
.cabinet-shell .cabinet-dashboard p { margin: 6px 0 10px; font-size: 13px; line-height: 1.5; }
.cabinet-shell .cabinet-welcome > p:last-child { margin-bottom: 0; }
.cabinet-shell .cabinet-eyebrow { font-size: 11px; }
.cabinet-shell .cabinet-profile, .cabinet-shell .cabinet-notice { min-height: 0; padding: 16px 18px; margin-bottom: 14px; border-radius: 11px; }
.cabinet-shell .cabinet-profile > :last-child { margin-bottom: 0; }
.cabinet-shell .cabinet-profile .cabinet-profile { padding: 12px 14px; margin-bottom: 10px; border-radius: 9px; }
.cabinet-shell .cabinet-invitation-item { padding: 14px; border-radius: 9px; }
.cabinet-shell .cabinet-invitation-list { gap: 10px; }
.cabinet-shell .cabinet-member-card { padding: 14px; margin-top: 10px; }
.cabinet-shell .cabinet-profile form, .cabinet-shell .cabinet-edit-form form { margin-top: 10px; margin-bottom: 10px; }
.cabinet-shell .cabinet-profile form label, .cabinet-shell .cabinet-edit-form label { margin-top: 8px; margin-bottom: 5px; font-size: 12px; }
.cabinet-shell .cabinet-profile input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
.cabinet-shell .cabinet-profile select, .cabinet-shell .form-control { min-height: 36px; padding: 7px 10px; border-radius: 7px; font-size: 13px; }
.cabinet-shell .cabinet-profile textarea { min-height: 90px; padding: 10px; font-size: 13px; }
.cabinet-shell .cabinet-form-submit { margin-top: 10px; }
.cabinet-shell .cabinet-form-links, .cabinet-shell .cabinet-decision-actions { gap: 8px 12px; margin-top: 12px; font-size: 12px; }
.cabinet-shell .cabinet-form-message { margin-top: 10px; padding: 10px 12px; font-size: 12px; border-radius: 8px; }
.cabinet-shell .cabinet-filters { gap: 10px; margin-top: 8px; margin-bottom: 12px; }
.cabinet-shell .cabinet-filters label { flex-basis: 210px; margin: 0; }
.cabinet-shell .cabinet-edit-details { margin-top: 10px; }
.cabinet-shell .cabinet-edit-form details { padding: 9px 12px; border-radius: 8px; }
.cabinet-shell .cabinet-schedule-day { margin-top: 16px; }
.cabinet-shell .cabinet-profile th, .cabinet-shell .cabinet-profile td,
.cabinet-shell .table th, .cabinet-shell .table td { padding: 8px 10px; font-size: 13px; }
.cabinet-shell .panel, .cabinet-shell .page-header { padding: 14px 16px; margin-bottom: 14px; border-radius: 11px; }
.cabinet-shell .panel-heading, .cabinet-shell .panel-body { padding: 6px 0; }
.cabinet-shell .page-title h4 { font-size: 21px; margin-bottom: 8px; }
.cabinet-shell .form-group { margin-bottom: 12px; }
.cabinet-shell hr { margin: 12px 0; }
.cabinet-shell .alert { padding: 10px 12px; margin-bottom: 12px; }
.cabinet-shell .modal-content { padding: 18px; }
.cabinet-shell .cabinet-grid { gap: 12px; margin-bottom: 16px; }
.cabinet-shell .cabinet-card { min-height: 115px; padding: 16px; border-radius: 10px; }
.cabinet-shell .cabinet-card h3 { margin-top: 12px; }
.cabinet-shell .cabinet-card > i { font-size: 22px; }
.cabinet-shell .cabinet-badge { padding: 5px 8px; }
.cabinet-shell .cabinet-profile-heading { gap: 12px; margin-bottom: 16px; }
.cabinet-shell .cabinet-details { gap: 14px 20px; }
.cabinet-shell .cabinet-home .cabinet-home-welcome { padding: 16px 20px; background: #fff; border: 1px solid #e5e9f1; border-radius: 12px; }
.cabinet-shell .cabinet-home .cabinet-shortcut-grid .cabinet-card { min-height: 90px; padding: 14px; }

/* Short forms use a field and its action on the same row. */
.cabinet-shell .cabinet-profile form.cabinet-inline-form {
    display: grid; grid-template-columns: minmax(160px, 380px) max-content;
    grid-template-areas: 'label .' 'field action'; align-items: end;
    gap: 5px 10px; width: 100%; max-width: none; margin: 8px 0 0;
}
.cabinet-shell .cabinet-inline-form > label { grid-area: label; margin: 0; }
.cabinet-shell .cabinet-inline-form > input:not([type=hidden]), .cabinet-shell .cabinet-inline-form > select { grid-area: field; width: 100%; min-width: 0; }
.cabinet-shell .cabinet-inline-form > button { grid-area: action; margin: 0; align-self: end; }
.cabinet-shell .cabinet-inline-form > p { grid-column: 1 / -1; margin: 5px 0 0; font-size: 12px; }
.cabinet-shell .cabinet-inline-form > .validation-summary-valid { display: none; }
.cabinet-shell .cabinet-inline-form > .validation-summary-errors { grid-column: 1 / -1; grid-row: 3; }
/* Unlabelled action-only forms must not acquire empty grid rows. */
.cabinet-shell .cabinet-profile form.cabinet-inline-form:not(:has(> label)) { display: inline-flex; width: auto; margin: 6px 8px 0 0; }
.cabinet-shell .cabinet-profile form.cabinet-inline-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; max-width: none; }
.cabinet-shell .cabinet-inline-fields > label { display: flex; flex-direction: column; gap: 5px; flex: 0 1 240px; margin: 0; }
.cabinet-shell .cabinet-inline-fields > button { flex: 0 0 auto; margin: 0; }
@media (max-width: 600px) {
    .cabinet-shell .cabinet-profile, .cabinet-shell .cabinet-notice { padding: 14px; }
    .cabinet-shell .cabinet-dashboard h1 { font-size: 21px; }
    .cabinet-shell .cabinet-dashboard h2 { font-size: 16px; }
    .cabinet-shell .cabinet-profile form.cabinet-inline-form { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'label' 'field' 'action'; gap: 7px; }
    .cabinet-shell .cabinet-inline-form > button { justify-self: start; }
    .cabinet-shell .cabinet-inline-form > .validation-summary-errors { grid-row: 4; }
    .cabinet-shell .cabinet-inline-fields > label { flex: 1 1 180px; }
    .cabinet-shell .cabinet-profile th, .cabinet-shell .cabinet-profile td { padding: 8px; }
}

/* Keep labels, fields and search actions aligned despite legacy form rules. */
.cabinet-shell .cabinet-profile form.cabinet-filters,
.cabinet-shell .cabinet-edit-form form.cabinet-filters {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px;
    width: 100%; max-width: none; margin: 0 0 12px; padding: 0;
}
.cabinet-shell .cabinet-profile form.cabinet-filters > label,
.cabinet-shell .cabinet-edit-form form.cabinet-filters > label {
    display: flex; flex-direction: column; justify-content: flex-end; gap: 5px;
    flex: 0 1 210px; min-width: 140px; margin: 0; padding: 0;
    font-size: 12px; line-height: 1.4;
}
.cabinet-shell .cabinet-profile form.cabinet-member-filters > label:first-of-type { flex: 0 1 300px; }
.cabinet-shell .cabinet-profile form.cabinet-member-filters > label:last-of-type { flex: 0 1 170px; }
.cabinet-shell .cabinet-profile form.cabinet-member-filters { padding-bottom: 12px; }
.cabinet-shell .cabinet-profile form.cabinet-filters > label > input:not([type=checkbox]):not([type=radio]),
.cabinet-shell .cabinet-profile form.cabinet-filters > label > select,
.cabinet-shell .cabinet-profile form.cabinet-inline-form > input:not([type=hidden]),
.cabinet-shell .cabinet-profile form.cabinet-inline-form > select {
    height: 36px; min-height: 36px; margin: 0; padding: 7px 10px; line-height: 20px;
}
.cabinet-shell .cabinet-profile form.cabinet-filters > button,
.cabinet-shell .cabinet-edit-form form.cabinet-filters > button,
.cabinet-shell .cabinet-profile form.cabinet-inline-form > button {
    flex: 0 0 auto; align-self: flex-end; height: 36px; min-height: 36px;
    margin: 0; padding: 7px 13px; line-height: 20px; white-space: nowrap;
}
.cabinet-shell .cabinet-profile form.cabinet-filters > label:has(> input[type=checkbox]),
.cabinet-shell .cabinet-profile form.cabinet-filters > label:has(> input[type=radio]) {
    flex: 0 1 auto; flex-direction: row; align-items: center; justify-content: flex-start;
    min-height: 36px; min-width: 0; gap: 7px;
}
.cabinet-shell .cabinet-profile form.cabinet-filters > a { display: inline-flex; align-items: center; min-height: 36px; margin: 0; font-size: 12px; }
.cabinet-shell .cabinet-profile form.cabinet-filters > details { flex: 0 1 190px; min-width: 140px; max-height: none; margin: 0; padding: 0; border: 0; overflow: visible; }
.cabinet-shell .cabinet-profile form.cabinet-filters > details > summary { min-height: 36px; padding: 7px 10px; border: 1px solid #dfe3ec; border-radius: 7px; background: #f9faff; font-size: 12px; line-height: 20px; }
.cabinet-shell .cabinet-profile form.cabinet-filters > details[open] { flex: 1 0 100%; padding: 10px; border: 1px solid #dfe3ec; border-radius: 8px; }
.cabinet-shell .cabinet-profile form.cabinet-filters > details[open] > summary { border: 0; background: transparent; padding: 0; min-height: 24px; }
.cabinet-shell .cabinet-profile form.cabinet-filters > .validation-summary-valid { display: none; }
.cabinet-shell .cabinet-profile form.cabinet-filters > .validation-summary-errors { flex: 1 0 100%; }
@media (max-width: 600px) {
    .cabinet-shell .cabinet-profile form.cabinet-filters > label,
    .cabinet-shell .cabinet-profile form.cabinet-member-filters > label:first-of-type,
    .cabinet-shell .cabinet-profile form.cabinet-member-filters > label:last-of-type { flex: 1 1 160px; min-width: 0; }
    .cabinet-shell .cabinet-profile form.cabinet-filters > label > input:not([type=checkbox]):not([type=radio]),
    .cabinet-shell .cabinet-profile form.cabinet-filters > label > select,
    .cabinet-shell .cabinet-profile form.cabinet-filters > button,
    .cabinet-shell .cabinet-edit-form form.cabinet-filters > button,
    .cabinet-shell .cabinet-profile form.cabinet-inline-form > input:not([type=hidden]),
    .cabinet-shell .cabinet-profile form.cabinet-inline-form > select,
    .cabinet-shell .cabinet-profile form.cabinet-inline-form > button { height: 40px; min-height: 40px; }
}

/* Nested course navigation keeps the current course and group in focus. */
.cabinet-shell.cabinet-structure-focus .page-container { padding: calc(var(--cabinet-header-height) + 24px) 24px 24px; }
.cabinet-structure-focus .cabinet-menu-toggle { display: none; }
.cabinet-structure-focus .content-wrapper { width: 100%; min-width: 0; }
.cabinet-structure { width: 100%; max-width: 1120px; margin: 0 auto; color: #202c40; }
.cabinet-structure-path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 13px; line-height: 1.5; }
.cabinet-structure-path a { color: #4548c8; font-weight: 500; }
.cabinet-structure-path [aria-current] { color: #202c40; font-weight: 600; }
.cabinet-shell .cabinet-structure .cabinet-welcome { padding-bottom: 16px; }
.cabinet-shell .cabinet-structure p, .cabinet-structure .cabinet-muted { color: #556278; }
.cabinet-shell .cabinet-structure .cabinet-profile { border-color: #d8deea; box-shadow: none; }
.cabinet-shell .cabinet-structure form.cabinet-inline-form > button { width: auto; justify-self: start; }
.cabinet-shell .cabinet-structure form.cabinet-inline-form > label { margin: 0; }
.cabinet-shell .cabinet-structure details.cabinet-member-add { margin-top: 14px; padding: 12px 0 0; border: 0; border-top: 1px solid #e2e6ef; border-radius: 0; max-height: none; overflow: visible; }
.cabinet-member-add > summary { cursor: pointer; color: #4548c8; font-size: 13px; font-weight: 600; }
.cabinet-member-add[open] > summary { margin-bottom: 12px; }
.cabinet-shell .cabinet-members-table { min-width: 600px; }
.cabinet-shell .cabinet-members-table th:first-child { width: 38%; }
.cabinet-shell .cabinet-members-table th:nth-child(2) { width: 20%; }
.cabinet-shell .cabinet-members-table .cabinet-edit-details { margin-top: 0; }
.cabinet-member-phone { display: block; margin-top: 4px; color: #556278; font-size: 12px; }
.cabinet-shell .cabinet-members-table .cabinet-link-button { color: #a83232; font-size: 12px; }
@media (max-width: 600px) {
    .cabinet-shell.cabinet-structure-focus .page-container { padding: calc(var(--cabinet-header-height) + 14px) 14px 14px; }
    .cabinet-structure-path { gap: 7px; margin-bottom: 14px; }
}

/* Shared rows and editing dialogs across the cabinet. */
.cabinet-page .cabinet-subject-error { grid-column: 1 / -1; grid-row: 3; margin: 8px 0 0; }
.cabinet-page .cabinet-subject-error[hidden] { display: none; }
.cabinet-page #subject-teachers-modal .modal-dialog { max-width: 760px; }
.cabinet-page #subject-teachers-modal .modal-body { max-height: 70dvh; overflow-y: auto; padding: 2px; }
.cabinet-page #subject-teachers-modal .cabinet-welcome { padding: 0 0 12px; margin: 0 0 12px; }
.cabinet-page #subject-teachers-modal .cabinet-welcome h1 { font-size: 19px; }
.cabinet-page #subject-teachers-modal .cabinet-welcome > a { display: none; }
.cabinet-page #subject-teachers-modal .cabinet-invitation-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; }
.cabinet-page #subject-teachers-modal .cabinet-invitation-item h3 { flex: 1; margin: 0; }
.cabinet-page #subject-teachers-modal .cabinet-invitation-item form { margin: 0 0 0 auto; }
.cabinet-page [data-subject-teachers-body][aria-busy=true] { opacity: .6; pointer-events: none; }
.cabinet-shell .cabinet-data-list { display: flex; flex-direction: column; gap: 0; border: 1px solid #dfe4ed; border-radius: 9px; background: #fff; overflow: hidden; }
.cabinet-shell .cabinet-data-list .cabinet-data-row { display: flex; flex-direction: row; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 12px 14px; margin: 0; border: 0; border-bottom: 1px solid #e3e7ef; border-radius: 0; box-shadow: none; }
.cabinet-shell .cabinet-data-list .cabinet-data-row:last-child { border-bottom: 0; }
.cabinet-shell .cabinet-data-row:hover { background: #fafbfe; }
.cabinet-shell .cabinet-row-info { display: flex; flex: 1; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.cabinet-shell .cabinet-row-info > div:first-child { min-width: 180px; flex: 1; }
.cabinet-shell .cabinet-row-info > h2, .cabinet-shell .cabinet-row-info > h3 { flex: 1 1 180px; margin: 0; font-size: 14px; }
.cabinet-shell .cabinet-row-info p { margin: 0; font-size: 12px; color: #556278; }
.cabinet-shell .cabinet-row-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.cabinet-shell .cabinet-row-actions form, .cabinet-shell .cabinet-row-actions .cabinet-form-links, .cabinet-shell .cabinet-row-actions .cabinet-decision-actions { margin: 0; }
.cabinet-shell .cabinet-row-actions form { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.cabinet-shell .cabinet-simple-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 12px 14px; border: 0; border-bottom: 1px solid #e3e7ef; border-radius: 0; margin: 0; }
.cabinet-shell .cabinet-simple-row > h2, .cabinet-shell .cabinet-simple-row > h3, .cabinet-shell .cabinet-simple-row > .cabinet-member-heading { flex: 1; margin: 0; }
.cabinet-shell .cabinet-simple-row form, .cabinet-shell .cabinet-simple-row p, .cabinet-shell .cabinet-member-footer { margin: 0; }
.cabinet-shell .cabinet-member-heading { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-width: 0; text-align: left; }
.cabinet-shell .cabinet-member-heading > div { min-width: 0; }
.cabinet-shell .cabinet-member-heading > .cabinet-badge { margin-left: auto; }
.cabinet-shell .cabinet-simple-row > .cabinet-member-footer { flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
.cabinet-shell .cabinet-member-heading h2 { font-size: 14px; margin: 0; }
.cabinet-shell .cabinet-member-heading p { font-size: 12px; margin: 3px 0 0; }
.cabinet-person-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cabinet-shell img.cabinet-row-photo, .cabinet-shell img.headingImgPol { display: block; flex: 0 0 40px; width: 40px; height: 40px; max-height: 40px; object-fit: cover; border-radius: 50%; margin: 0; }
.cabinet-shell img.cabinet-row-photo[hidden] { display: none; }
.cabinet-shell .cabinet-data-row img.cabinet-book-cover, .cabinet-shell .cabinet-data-row img.cabinet-program-cover { border-radius: 5px; object-fit: cover; }
.cabinet-shell .cabinet-request-table { min-width: 940px; table-layout: auto; }
.cabinet-shell .cabinet-request-table td { vertical-align: middle; }
.cabinet-shell .cabinet-request-table td.cabinet-row-actions { display: table-cell; }
.cabinet-shell .cabinet-request-table td:first-child { min-width: 245px; }
.cabinet-shell .cabinet-request-table td:last-child { min-width: 245px; }
.cabinet-shell .cabinet-request-table p { font-size: 12px; margin: 4px 0 0; }
.cabinet-shell .cabinet-request-table .cabinet-check { font-size: 11px; margin: 0; }
.cabinet-shell .cabinet-record-edit { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.cabinet-page a.cabinet-button-secondary { color: #4548c8; }
.cabinet-page a.cabinet-button-danger { color: #b42318; }
.cabinet-page .cabinet-record-modal .modal-header { padding: 0 0 14px; margin-bottom: 16px; border-bottom: 1px solid #e3e7ef; }
.cabinet-page .cabinet-record-modal .modal-body { border: 0; padding: 0; margin: 0; box-shadow: none; }
.cabinet-page .cabinet-record-modal .modal-title { font-size: 18px; }
.cabinet-page .cabinet-record-modal .modal-dialog:has(.cabinet-member-rights) { max-width: 520px; }
.cabinet-page .cabinet-record-modal .cabinet-member-rights { display: flex; flex-direction: column; gap: 8px; margin-top: 0; }
.cabinet-page .cabinet-record-modal .cabinet-member-rights form { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; width: 100%; height: auto; min-height: 52px; max-width: none; padding: 8px 12px; margin: 0; border-radius: 8px; }
.cabinet-page .cabinet-record-modal .cabinet-member-rights button { min-height: 32px; margin: 0; padding: 6px 10px; font-size: 12px; }
.cabinet-edit-frame { display: block; width: 100%; height: min(72vh, 800px); border: 0; background: #fff; }
.cabinet-editor-frame .cabinet-header, .cabinet-editor-frame .cabinet-sidebar { display: none !important; }
.cabinet-editor-frame .cabinet-shell .page-container { min-height: 0; padding: 12px; }
.cabinet-editor-frame .content-wrapper { width: 100%; }
.cabinet-editor-frame .cabinet-page { background: #fff; }
@media (max-width: 700px) {
    .cabinet-shell .cabinet-data-list { overflow-x: auto; }
    .cabinet-shell .cabinet-data-list .cabinet-data-row { min-width: 600px; }
    .cabinet-shell .cabinet-simple-row { min-width: 0; }
    .cabinet-record-modal .modal-dialog { margin: 0; }
}

/* Group sections are explicit navigation controls, separate from the breadcrumb. */
.cabinet-shell .cabinet-group-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.cabinet-shell .cabinet-group-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border: 1px solid #d4daea; border-radius: 8px; background: #fff; color: #353e55; font-size: 13px; font-weight: 600; text-decoration: none; }
.cabinet-shell .cabinet-group-tabs a:hover { background: #eeefff; border-color: #9d9fe4; color: #3538a5; }
.cabinet-shell .cabinet-group-tabs a.is-active { border-color: #5659fe; background: #eeefff; color: #3538a5; }
.cabinet-shell .cabinet-group-tabs a:focus-visible { outline: 2px solid #5659fe; outline-offset: 3px; }
.cabinet-shell .cabinet-group-tabs i { width: 17px; height: 17px; font-size: 17px; }

.cabinet-shell .cabinet-qr-scanner { max-width: 640px; padding: 16px; background: #f8f9fe; }
.cabinet-qr-camera-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cabinet-qr-camera { position: relative; width: 100%; max-width: 480px; margin-top: 12px; overflow: hidden; border-radius: 12px; background: #192235; }
.cabinet-qr-scanner .cabinet-qr-camera video { display: block; width: 100%; max-width: none; max-height: 360px; margin: 0; border-radius: 0; object-fit: cover; }
.cabinet-qr-camera-guide { position: absolute; width: 58%; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 14px; box-shadow: 0 0 0 100vmax #0004; pointer-events: none; }
.cabinet-qr-camera-caption { position: absolute; bottom: 12px; left: 0; right: 0; color: #fff; text-align: center; font-size: 12px; }
.cabinet-shell .cabinet-qr-scanner details.cabinet-qr-manual { max-height: none; overflow: visible; margin-top: 12px; padding: 12px 0 0; border: 0; border-top: 1px solid #dfe3ec; border-radius: 0; }
.cabinet-qr-manual summary { color: #4548c8; font-size: 12px; cursor: pointer; }
.cabinet-qr-scanner [hidden] { display: none !important; }
@media (max-width: 600px) {
    .cabinet-qr-camera-actions .cabinet-button { width: 100%; min-height: 44px; }
    .cabinet-shell .cabinet-qr-manual input { font-size: 16px; min-height: 44px; }
    .cabinet-shell .cabinet-qr-scanner { padding: 12px; }
}
