/* Font: Manrope (design proposal C), self-hosted in assets/fonts/manrope (SIL OFL 1.1): no internet needed. */
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/manrope/manrope-cyrillic-ext.woff2) format("woff2");unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F}
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/manrope/manrope-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/manrope/manrope-greek.woff2) format("woff2");unicode-range:U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF}
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/manrope/manrope-vietnamese.woff2) format("woff2");unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/manrope/manrope-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/manrope/manrope-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
:root,[data-bs-theme=light],[data-bs-theme=dark]{--bs-font-sans-serif:"Manrope",system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
.crud-form .form-label{font-weight:600}.crud-form .form-switch .form-check-input{width:2.5rem;height:1.35rem}.crud-section-title{padding-bottom:.65rem;border-bottom:1px solid var(--bs-border-color)}.crud-editor{min-height:220px}.crud-editor-source--hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.crud-editor-source:invalid+.crud-editor .ql-container{border-color:var(--bs-form-invalid-border-color)}.select2-container{width:100%!important}.was-validated .select2-hidden-accessible:invalid+.select2 .select2-selection{border-color:var(--bs-form-invalid-border-color)}.toolbar{display:flex;justify-content:flex-end;margin-bottom:1rem}.filters{margin-bottom:1rem;padding:1rem;border:1px solid var(--bs-border-color);border-radius:var(--bs-border-radius)}.filters summary{font-weight:600;cursor:pointer}.filters[open] summary{margin-bottom:1rem}.card-body table{width:100%;margin-bottom:1rem;color:var(--bs-body-color);vertical-align:top}.card-body table th,.card-body table td{padding:.75rem;border-bottom:1px solid var(--bs-border-color)}.row-actions{display:flex;align-items:center;gap:.35rem;white-space:nowrap}.row-actions form{margin:0}.crud-actions-column{width:1%;white-space:nowrap}.dt-buttons{display:flex;flex-wrap:wrap;gap:.35rem}.dt-container .dt-search input,.dt-container .dt-length select{border-color:var(--bs-border-color);border-radius:var(--bs-border-radius)}@media(max-width:767.98px){.page-container{padding-right:12px;padding-left:12px}.card-body{padding:1rem}.nav-tabs{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}.nav-tabs .nav-link{white-space:nowrap}.dt-layout-row{gap:.75rem;align-items:flex-start!important}.dt-layout-cell{width:100%;text-align:left!important}.dt-buttons{margin-bottom:.35rem}}


/* Compact inline editors keep list rows aligned with the page's form controls. */
.inline-update{display:flex;align-items:center;gap:.4rem;position:relative;min-height:34px;margin:0}
.inline-update .crud-inline-control{min-width:110px;max-width:260px;border-radius:8px;border-color:transparent;background-color:rgba(var(--bs-secondary-rgb),.06);transition:border-color .15s,box-shadow .15s,background-color .15s}
.inline-update:hover .crud-inline-control{border-color:var(--bs-border-color)}
.inline-update .crud-inline-control:focus,.inline-update.is-dirty .crud-inline-control{border-color:rgba(var(--bs-primary-rgb),.45);background-color:var(--bs-body-bg);box-shadow:0 0 0 3px rgba(var(--bs-primary-rgb),.08)}
.crud-inline-actions{display:flex;gap:.2rem;opacity:.45;transition:opacity .15s}
.inline-update:hover .crud-inline-actions,.inline-update:focus-within .crud-inline-actions,.inline-update.is-dirty .crud-inline-actions{opacity:1}
.crud-inline-actions .btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border-radius:7px}
.inline-update .switchery{flex-shrink:0;margin:0}
.inline-update .switchery:focus-visible{outline:3px solid rgba(var(--bs-primary-rgb),.4);outline-offset:3px}
.inline-update.is-saving{padding-right:22px}
.inline-update.is-saving::after{content:"";position:absolute;right:0;width:14px;height:14px;border:2px solid rgba(var(--bs-primary-rgb),.18);border-top-color:var(--bs-primary);border-radius:50%;animation:crud-inline-saving .65s linear infinite}
.card-body table td:has(.inline-update){vertical-align:middle}
@keyframes crud-inline-saving{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.inline-update.is-saving::after{animation:none}.inline-update .crud-inline-control,.crud-inline-actions{transition:none}}
.dt-container .dt-layout-start,.dt-container .dt-layout-end{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem}.dt-container .dt-layout-start>*{margin-right:0!important}.dt-container .dt-layout-end>*{margin-left:0!important}.dt-container .dt-layout-start .dt-buttons{margin:0}.dt-container .dt-length label,.dt-container .dt-search label{display:block;margin:0}.dt-container .dt-search input{margin-left:0!important}.card-filters{margin-bottom:1rem;border:0}

/* ColumnControl already marks persisted and current filters with this native class. */
.dtcc-button.dtcc-button_active .dtcc-button-icon{
    animation:crud-filter-active-pulse 4s ease-in-out infinite;
    color:var(--bs-primary);
}
@keyframes crud-filter-active-pulse{
    0%,72%,100%{filter:none;transform:scale(1)}
    78%{filter:drop-shadow(0 0 0 rgba(var(--bs-primary-rgb),0));transform:scale(1)}
    84%{filter:drop-shadow(0 0 5px rgba(var(--bs-primary-rgb),.85));transform:scale(1.22)}
    90%{filter:drop-shadow(0 0 2px rgba(var(--bs-primary-rgb),.45));transform:scale(1.08)}
}
@media(prefers-reduced-motion:reduce){
    .dtcc-button.dtcc-button_active .dtcc-button-icon{animation:none}
}

/* Rebuilt rows must not replay the switchery on-animation (whole column blinks). */
.crud-no-anim .switchery,.crud-no-anim .switchery>small{transition:none!important}

/* Empty click-to-edit values stay blank but keep a dashed, clickable target
   (x-editable would otherwise print "Empty" in red italics). */
a.crud-editable.editable-empty,a.crud-editable.editable-empty:hover,a.crud-editable.editable-empty:focus{
    display:inline-block;min-width:4rem;min-height:1.2em;vertical-align:bottom;
    font-style:normal;color:inherit;text-decoration:none;
}
.crud-silent-reload .dt-processing{display:none!important}

/* Date range filter (ColumnControl dropdown content added by crud.js) */
.crud-daterange{min-width:220px;padding:.5rem}
.crud-daterange-field{display:block;font-size:.8rem;font-weight:600;margin-bottom:.5rem}
.crud-daterange-field .form-control{margin-top:.2rem;font-weight:400}

/* Dependent select waiting for its parent: looks inactive but stays enabled, so "required" still blocks the submit */
select[data-waiting]+.select2-container{opacity:.6;cursor:not-allowed}
select[data-waiting]+.select2-container .select2-selection{pointer-events:none}

/* Select2 clear "x" sits to the left of the dropdown arrow instead of on top of it */
.select2-container--default .select2-selection--single .select2-selection__clear{margin-right:1.35rem;padding:0 .25rem;font-size:1.1rem;line-height:inherit;color:var(--bs-secondary-color)}
.select2-container--default .select2-selection--single .select2-selection__clear:hover{color:var(--bs-danger)}

/* Password eye button keeps the input height and the square look of the theme */
.crud-password-group .crud-password-toggle{display:inline-flex;align-items:center;justify-content:center;padding-inline:.75rem;border-color:var(--bs-border-color);color:var(--bs-secondary-color)}
.crud-password-group .crud-password-toggle:hover,.crud-password-group .crud-password-toggle:focus-visible{background:var(--bs-tertiary-bg);color:var(--bs-body-color)}

/* Form title: highlighted heading that starts a new row of fields */
.crud-form .crud-section-title{color:var(--bs-primary);font-size:1rem;font-weight:600;margin-top:.5rem}
.crud-form .crud-field+.col-12>.crud-section-title{margin-top:1rem}

/* List toolbar/export buttons: the same slightly smaller radius on every corner (no half-round button groups) */
.dt-buttons .btn,.dt-buttons .dt-button,.dt-buttons.btn-group>.btn{border-radius:6px!important;margin-left:0!important}


/* ===== DataTables palette (design proposal C) =====
   Uses ONLY the template's --bs-* variables, so it follows Light/Dark and the customizer options; no theme is replaced. */
.dt-container table.dataTable{--bs-table-bg:transparent;--dt-row-stripe:var(--bs-primary-rgb);--dt-row-hover:var(--bs-primary-rgb);font-size:.875rem}
.dt-container table.dataTable>thead>tr>th{background:var(--bs-tertiary-bg);color:var(--bs-secondary-color,var(--bs-emphasis-color));font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:.6rem .75rem;border-bottom:1px solid var(--bs-border-color)}
.dt-container table.dataTable>tbody>tr>*{padding:.55rem .75rem;border-bottom-color:var(--bs-border-color)}
.dt-container .dt-search input,.dt-container .dt-length select{background-color:var(--bs-secondary-bg);color:var(--bs-body-color);border:1px solid color-mix(in srgb,var(--bs-border-color),var(--bs-body-color) 14%);border-radius:6px;min-height:2rem;padding:.3rem .6rem}
.dt-container .dt-length select{padding-right:1.75rem}
.dt-container .dt-search input:focus,.dt-container .dt-length select:focus{border-color:var(--bs-primary);box-shadow:0 0 0 .2rem rgba(var(--bs-primary-rgb),.15);outline:0}
.dt-container .dt-info{color:var(--bs-secondary-color,var(--bs-emphasis-color));font-size:.8125rem}
.dt-container .page-link{border-radius:6px;margin:0 .1rem;color:var(--bs-body-color);background:var(--bs-secondary-bg);border-color:var(--bs-border-color)}
.dt-container .page-item.active .page-link{background:var(--bs-primary);border-color:var(--bs-primary);color:#fff}
.dt-container .page-item.disabled .page-link{opacity:.55}

/* Buttons of the list: one radius on every corner, visible border in both themes */
.dt-buttons .btn,.dt-buttons .dt-button{background-color:var(--bs-tertiary-bg);color:var(--bs-body-color);border:1px solid color-mix(in srgb,var(--bs-border-color),var(--bs-body-color) 14%)}
.dt-buttons .btn:hover,.dt-buttons .btn:focus-visible,.dt-buttons .btn.show{background-color:var(--bs-border-color);color:var(--bs-emphasis-color,var(--bs-body-color));border-color:color-mix(in srgb,var(--bs-border-color),var(--bs-body-color) 25%)}
.crud-list-add,.crud-list-clear-filters{border-radius:6px}
.crud-list-clear-filters:disabled{opacity:.45}

/* ===== Design proposal C: light background, page title, spacing =====
   Only variables/rules that do not replace the template's schemes: Light/Dark, menu and topbar options keep working. */
[data-bs-theme=light]{--bs-body-bg:#edf1f7;--bs-body-bg-rgb:237,241,247}

/* Page title: no full-width white strip; compact and bold */
.page-title-box{background:transparent;box-shadow:none;padding:1rem 0 .35rem;margin:0 0 .8rem}
.page-title-box h4{font-size:1.3rem!important;font-weight:800;letter-spacing:-.02em;margin:0}
.page-title-box p{font-size:.9rem}

/* Spacing */
.card>.card-body{padding:1.15rem}
.crud-form .row{--bs-gutter-y:.85rem;--bs-gutter-x:1rem}
.crud-form .form-label{font-size:.78rem;margin-bottom:.3rem}
.btn:not(.btn-sm):not(.btn-lg){--bs-btn-padding-y:.4rem;--bs-btn-padding-x:.85rem}
.nav-tabs .nav-link{padding:.55rem .9rem}
:root{--bs-menu-item-padding-y:.5rem}

/* Rich text: a fixed height. Quill's container is height:100%, which followed the (stretched) grid cell and spilled over the next row. */
.crud-form .crud-editor.ql-container{height:220px;min-height:220px}
.crud-form .crud-editor .ql-editor{height:100%;overflow-y:auto}

/* Upload fields: plain file input; stored files are shown as discreet icons beside the label */
.crud-field-head{display:flex;align-items:center;gap:.4rem;margin-bottom:.3rem}
.crud-field-head .form-label{margin-bottom:0}.crud-tip{cursor:pointer}
.crud-file-actions{display:inline-flex;align-items:center;gap:.1rem}
.crud-file-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:0;border-radius:6px;background:transparent;color:var(--bs-secondary-color,var(--bs-emphasis-color));font-size:1rem;line-height:1;text-decoration:none;cursor:pointer}
.crud-file-icon:hover,.crud-file-icon:focus-visible{background:var(--bs-tertiary-bg);color:var(--bs-primary)}
.crud-file-remove:hover,.crud-file-remove:focus-visible{color:var(--bs-danger)}
.crud-file-icon.is-active{color:var(--bs-danger);background:rgba(var(--bs-danger-rgb),.1)}
.crud-file-count{position:absolute;top:-.2rem;right:-.2rem;min-width:.95rem;padding:0 .2rem;border-radius:999px;background:var(--bs-primary);color:#fff;font-size:.6rem;font-weight:700;line-height:.95rem;text-align:center}
.crud-file-menu{min-width:18rem;max-width:min(26rem,90vw);max-height:16rem;overflow-y:auto;padding:.35rem}
.crud-file-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.2rem .35rem;border-radius:6px}
.crud-file-row:hover{background:var(--bs-tertiary-bg)}
.crud-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.85rem}
.crud-file-row.is-removed .crud-file-name{text-decoration:line-through;opacity:.5}
.crud-field.has-removed-file .form-label{text-decoration:line-through;opacity:.6}

/* 'intl_phone' fields (intl-tel-input): full-width control, Bootstrap feedback outside the plugin wrapper, and the
   country list following the template's light/dark scheme through --bs-* variables only */
.crud-intl-phone .iti{display:block;width:100%}
.was-validated .crud-intl-phone:has(:invalid) + .invalid-feedback,.crud-intl-phone:has(.is-invalid) + .invalid-feedback{display:block}
.crud-intl-phone .iti__country-list{background-color:var(--bs-secondary-bg);color:var(--bs-body-color);border-color:var(--bs-border-color)}
.crud-intl-phone .iti__country.iti__highlight{background-color:var(--bs-tertiary-bg)}
.crud-intl-phone .iti__divider{border-bottom-color:var(--bs-border-color)}
/* Textarea height by number of lines: 'class' => 'rows-10' on a textarea field (the form builder fixes rows="5"). The user can still resize it. */
textarea.form-control[class*="rows-"]{height:calc(var(--crud-rows) * 1.5em + .9rem + 2 * var(--bs-border-width))}
textarea.form-control.rows-2{--crud-rows:2}textarea.form-control.rows-3{--crud-rows:3}textarea.form-control.rows-4{--crud-rows:4}textarea.form-control.rows-6{--crud-rows:6}textarea.form-control.rows-8{--crud-rows:8}textarea.form-control.rows-10{--crud-rows:10}textarea.form-control.rows-12{--crud-rows:12}textarea.form-control.rows-15{--crud-rows:15}textarea.form-control.rows-20{--crud-rows:20}textarea.form-control.rows-25{--crud-rows:25}textarea.form-control.rows-30{--crud-rows:30}

/* Condensed side menu: the theme forces .page-content to min-height 1500px, which left a large empty space below short
   pages (e.g. the calendar). The content now fills the screen height only, like the other menu layouts. */
html[data-sidenav-size=condensed]:not([data-layout=topnav]) .page-content { min-height: calc(100vh - var(--bs-topbar-height)); }

/* Repeaters (repeater_json / repeater_table): compact cells, clickable sortable headers, a narrow actions column. */
.crud-repeater th,.crud-repeater td{padding:.35rem .5rem}
.crud-repeater td{min-width:8rem}
.crud-repeater .crud-repeater-sort{cursor:pointer;white-space:nowrap;user-select:none}
.crud-repeater .crud-repeater-actions{width:1%;min-width:0;white-space:nowrap}

/* Repeaters: a refused row keeps only the red outline (the server message is at the top of the form). */
.crud-repeater tr[data-repeater-error] .invalid-feedback{display:none}
/* Repeaters on small screens: every row becomes a card, each cell with its label above (td[data-label]). */
@media (max-width:767.98px){
  .crud-repeater table,.crud-repeater tbody,.crud-repeater tr,.crud-repeater td{display:block;width:100%}
  .crud-repeater thead{display:none}
  .crud-repeater .table-bordered{border:0}
  .crud-repeater tr[data-repeater-row]{border:1px solid var(--bs-border-color);border-radius:.375rem;margin-bottom:.5rem;padding:.25rem .25rem .5rem}
  .crud-repeater tr[data-repeater-empty] td,.crud-repeater td{border:0!important;min-width:0}
  .crud-repeater td[data-label]::before{content:attr(data-label);display:block;font-size:.75rem;font-weight:600;color:var(--bs-secondary-color);margin-bottom:.15rem}
  .crud-repeater .crud-repeater-actions{width:100%;text-align:end}
}

/* Repeater file cells: the stored files under the input (thumbnail for images, linked name, remove mark). */
.crud-repeater-files .crud-file-row{display:flex;align-items:center;gap:.35rem;font-size:.8rem;min-width:0}
.crud-repeater-files .crud-file-name{flex:1 1 auto;min-width:0}
.crud-repeater-thumb{width:32px;height:32px;object-fit:cover;border-radius:.25rem;border:1px solid var(--bs-border-color)}
