/*
 * Only what the design's admin.css does not have: list view, filters, form controls, plugins (Select2, Flatpickr,
 * SweetAlert), modal, dropdown, search, skeleton and settings. Control heights come from --control in admin.css.
 * admin.css is the design's stylesheet (docs/design_files/assets/css/admin.css) with compact sizes. Keep new styles to the same sizes.
 * Bootstrap's CSS is not loaded, so the few classes its JavaScript needs are here.
 */
[x-cloak], [hidden] { display: none !important; }
.a-side { overflow-y: auto; scrollbar-width: thin; }
.a-nav-label { margin: .5rem .65rem .05rem; font-size: .75rem; color: var(--gold); }
.a-top__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.a-top__actions kbd { padding: 0 .35rem; border-radius: 6px; background: var(--mist); color: var(--muted); font: inherit; font-size: .78rem; }
.a-error { color: var(--red) !important; font-weight: 500 !important; }
.a-error:empty { display: none; }
.a-form .is-invalid, .a-login .is-invalid { border-color: var(--red) !important; }
.a-row > label { align-content: start; } /* an error under one field does not stretch the next one */
.a-burger { place-items: center; }
.a-btn:disabled { opacity: .7; cursor: default; }
.a-login .a-alert { text-align: left; }
.a-login .a-check input { width: 1.1rem; min-height: 0; padding: 0; }

/* ---------- Page with a list: buttons, filters, list view ---------- */
.list-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; min-width: 0; }
.list-bar { display: flex; align-items: flex-start; gap: .6rem; min-width: 0; }
.list-bar > .a-btn { flex-shrink: 0; min-height: calc(var(--control) + 14px); border-radius: 12px; } /* as tall as the filter bar */
.filter-bar { display: flex; flex: 1; flex-wrap: wrap; gap: .5rem; min-width: 0; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgb(7 42 51 / .04); }
.filter-bar__top, .filter-bar__tools { display: flex; align-items: center; gap: .5rem; }
.filter-bar__top input { flex: 1; min-width: 0; }
.filter-bar__grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-bar > .filter-bar__top { flex: 1 1 260px; }
.filter-bar > div:has(> .filter-bar__more) { flex-basis: 100%; }
.filter-select { flex: 0 1 150px; width: 150px; min-width: 0; }
.field-label { display: block; margin-bottom: .2rem; font-weight: 600; font-size: .82rem; color: var(--teal-ink); }

/* Rows are columns on wide lists and cards on narrow ones. Set the columns with --cols. */
.list-wrap { container-type: inline-size; min-width: 0; }
.list-view { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgb(7 42 51 / .04); }
.list-head, .list-row { display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: .6rem; min-height: 44px; padding: .25rem .8rem; }
.list-head { min-height: 34px; background: var(--mist); color: var(--muted); font-size: .78rem; font-weight: 600; }
.list-row { border-top: 1px solid var(--line); }
.list-row:hover { background: #FAFCF9; }
.list-cell { min-width: 0; overflow-wrap: anywhere; }
.list-cell small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.list-serial { color: var(--muted); }
.list-main { display: flex; align-items: center; gap: .55rem; }
.list-main > div { min-width: 0; }
.list-name { font-weight: 600; line-height: 1.3; text-decoration: none; }
.list-name:hover { text-decoration: underline; }
.list-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.list-badges, .list-actions { display: flex; flex-wrap: wrap; gap: .25rem; }
.list-actions { flex-wrap: nowrap; justify-content: flex-end; }
.list-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; padding: .35rem .8rem; border-top: 1px solid var(--line); background: var(--mist); color: var(--muted); font-size: .82rem; }
.list-foot select { width: auto; height: var(--control-sm); min-height: 0; margin-left: .3rem; padding-left: .5rem; font-size: .8125rem; }
.list-foot .a-pager { align-items: center; margin: 0; }
.list-foot .a-pager a { min-width: 30px; background: #fff; text-align: center; }
.list-foot .a-pager a.is-active { background: var(--teal); color: #fff; }
.list-foot .a-pager span { padding: .15rem .4rem; }

@container (max-width: 880px) {
    .list-view { overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .list-head { display: none; }
    .list-row { display: flex; flex-wrap: wrap; gap: .35rem .5rem; margin-bottom: .5rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgb(7 42 51 / .04); }
    .list-row::after { content: ''; order: 2; flex-basis: 100%; height: 0; } /* line break before the details */
    .list-main { order: 1; flex: 1 1 0; }
    .list-status { order: 1; }
    .list-handle { order: 0; }
    .list-cell[data-label] { display: inline-flex; order: 3; align-items: baseline; gap: .35rem; padding: .05rem .5rem; border-radius: 6px; background: var(--mist); font-size: .82rem; }
    .list-cell[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); }
    .list-cell.list-plain { padding: 0; background: none; }
    .list-cell.list-plain::before { display: none; }
    .list-cell.list-status { order: 1; }
    .list-actions { order: 3; margin-left: auto; }
    .list-actions .a-btn { min-height: 40px; padding-inline: .9rem; }
    .list-view > .a-empty { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .list-foot { justify-content: center; padding: .4rem 0; border: 0; background: none; }
    .list-foot .a-pager { flex-wrap: wrap; justify-content: center; width: 100%; }
    .list-foot .a-pager a { min-width: 40px; padding-block: .45rem; }
}

/* ---------- Role buttons in forms ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; min-height: var(--control-sm); padding: .1rem .7rem; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); font: inherit; font-size: .8125rem; cursor: pointer; }
.chip:hover { border-color: var(--teal); }
.chip.is-active { border-color: var(--teal); background: var(--teal); color: #fff; }
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---------- Form controls: every input, dropdown, checkbox and switch ----------
   :where() adds no weight, so any class can still change a single field. */
:where(.a-main, .modal, .a-login) :where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color]), select, textarea):where(:not([class*=select2])) {
    width: 100%; min-height: var(--control); padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 8px; background-color: #fff; color: var(--ink); font: inherit; font-size: .875rem;
}
:is(.a-main, .modal, .a-login) :is(input, select, textarea):where(:not([class*=select2])):hover:not(:focus, :disabled, .is-invalid) { border-color: #B9CAC1; }
:is(.a-main, .modal, .a-login) :is(input, select, textarea):where(:not([class*=select2])):focus { outline: 2px solid var(--gold); outline-offset: 0; }
:is(.a-main, .modal, .a-login) :is(input, select, textarea):where(:not([class*=select2])):disabled { background-color: var(--mist); color: var(--muted); cursor: not-allowed; }
:is(.a-main, .modal) ::placeholder { color: #81928F; opacity: 1; }
:is(.a-main, .modal) textarea:not([class*=select2]) { min-height: calc(var(--control) * 2); line-height: 1.5; resize: vertical; }
:is(.a-main, .modal) select:not([multiple], [class*=select2]) {
    height: var(--control); padding-block: 0; padding-right: 1.8rem; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235B6F73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right .55rem center; background-repeat: no-repeat; background-size: 14px;
}
:is(.a-main, .modal, .a-login) :is(input[type=checkbox], input[type=radio]) { flex-shrink: 0; width: 1rem; height: 1rem; min-height: 0; margin: 0; padding: 0; accent-color: var(--teal); }
:is(.a-main, .modal) input[type=file] { width: 100%; min-height: var(--control); padding: 3px; border: 1px dashed var(--line); border-radius: 8px; background: var(--mist); font: inherit; font-size: .8125rem; }
:is(.a-main, .modal) input[type=file]::file-selector-button { padding: .2rem .7rem; border-radius: 6px; font-size: .8125rem; }
:is(.a-main, .modal) input[type=color] { width: calc(var(--control) * 1.4); height: var(--control); padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.a-actions { align-items: center; }
.a-form .a-check, .a-login .a-check { gap: .5rem; }

/* On/off switch: <label class="a-check"><input type="checkbox" class="switch"> Active</label> */
:is(.a-main, .modal) input[type=checkbox].switch { position: relative; width: 2rem; height: 1.15rem; border-radius: 99px; background: #B9CAC1; appearance: none; cursor: pointer; transition: background .15s; }
input.switch::before { content: ''; position: absolute; top: 2px; left: 2px; width: calc(1.15rem - 4px); height: calc(1.15rem - 4px); border-radius: 50%; background: #fff; transition: transform .15s; }
:is(.a-main, .modal) input[type=checkbox].switch:checked { background: var(--teal); }
input.switch:checked::before { transform: translateX(.85rem); }

/* Field with text or a unit beside it: <div class="input-group"><span>৳</span><input></div> */
.input-group { display: flex; }
.input-group > span { display: flex; align-items: center; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--mist); color: var(--muted); font-size: .8125rem; font-weight: 400; white-space: nowrap; }
.input-group > :is(input, select) { flex: 1; min-width: 0; }
.input-group > :not(:last-child) { border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > input:not(:last-child) { border-right: 1px solid var(--line); }
.input-group > input + span { border-left: 0; }

/* ---------- Select2 dropdowns (single and multiple) ---------- */
.select2-container { color: var(--ink); font-size: .875rem; font-weight: 400; }
.select2-container .select2-selection--single { height: var(--control); border: 1px solid var(--line); border-radius: 8px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0 1.6rem 0 .6rem; color: var(--ink); line-height: calc(var(--control) - 2px); }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #81928F; }
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 0; right: .55rem; width: 14px; height: calc(var(--control) - 2px); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235B6F73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") center / 14px no-repeat; }
.select2-selection__arrow b { display: none; } /* same arrow as normal dropdowns */
.select2-container--default .select2-selection--single .select2-selection__clear { height: calc(var(--control) - 2px); color: var(--muted); font-weight: 400; }
.select2-container--default .select2-selection--multiple { display: flex; flex-wrap: wrap; min-height: var(--control); padding: 0 .3rem 4px; border: 1px solid var(--line); border-radius: 8px; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered { display: contents; margin: 0; padding: 0; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { display: inline-flex; align-items: center; margin: 4px 4px 0 0; padding: 1px 8px 1px 2px; border: 0; border-radius: 99px; background: var(--sky); color: var(--teal); font-size: .8125rem; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { position: static; padding: 0 5px; border: 0; background: none; color: inherit; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { background: none; color: var(--red); }
.select2-container--default .select2-selection--multiple .select2-selection__choice__display { padding: 0; }
.select2-container .select2-search--inline { display: flex; }
.select2-container .select2-search--inline .select2-search__field { height: 22px; min-height: 0; margin: 6px 0 0 4px; font: inherit; }
.select2-container--default:is(.select2-container--open, .select2-container--focus) .select2-selection { border-color: var(--line); outline: 2px solid var(--gold); }
.is-invalid + .select2-container .select2-selection { border-color: var(--red) !important; }
.select2-dropdown { z-index: 1060; overflow: hidden; border: 1px solid var(--line); border-radius: 8px !important; box-shadow: 0 18px 50px -18px rgb(7 42 51 / .35); }
.select2-container--open .select2-dropdown--below { margin-top: 4px; }
.select2-container--open .select2-dropdown--above { margin-top: -4px; }
.select2-search--dropdown { padding: 6px; }
.select2-container--default .select2-search--dropdown .select2-search__field { height: var(--control-sm); padding: 0 .5rem; border: 1px solid var(--line); border-radius: 6px; outline: 0; font: inherit; font-size: .8125rem; }
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--teal); }
.select2-results__options { padding: 4px; }
.select2-results__option { padding: .3rem .55rem; border-radius: 6px; font-size: .8125rem; }
.select2-container--default .select2-results__option--selected { background: var(--sky); color: var(--teal); }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--teal); color: #fff; }

/* ---------- Flatpickr date picker ---------- */
.flatpickr-calendar { width: 264px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px -18px rgb(7 42 51 / .35); font-family: inherit; }
.flatpickr-calendar::before, .flatpickr-calendar::after { display: none !important; }
.flatpickr-calendar.open { z-index: 1070; margin-top: 2px; }
.flatpickr-months .flatpickr-month { height: 32px; color: var(--teal-ink); fill: var(--teal-ink); }
.flatpickr-current-month { height: 32px; padding-top: 4px; font-size: .9rem; font-weight: 600; }
.flatpickr-current-month .flatpickr-monthDropdown-months, .flatpickr-current-month input.cur-year { font-weight: 600; }
.flatpickr-months :is(.flatpickr-prev-month, .flatpickr-next-month) { top: 6px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 8px; }
.flatpickr-months :is(.flatpickr-prev-month, .flatpickr-next-month):hover { background: var(--mist); }
.flatpickr-months :is(.flatpickr-prev-month, .flatpickr-next-month):hover svg { fill: var(--teal); }
.flatpickr-innerContainer, .flatpickr-rContainer, .flatpickr-days, .dayContainer { width: 100%; min-width: 0; max-width: none; }
span.flatpickr-weekday { color: var(--muted); font-size: .72rem; font-weight: 600; }
.flatpickr-day { max-width: none; height: 32px; border-radius: 8px; color: var(--ink); font-size: .8125rem; line-height: 30px; }
.flatpickr-day:is(:hover, :focus) { border-color: transparent; background: var(--mist); }
.flatpickr-day.today { border-color: var(--gold); }
.flatpickr-day.today:is(:hover, :focus) { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); }
.flatpickr-day:is(.selected, .startRange, .endRange), .flatpickr-day:is(.selected, .startRange, .endRange):is(:hover, :focus) { border-color: var(--teal); background: var(--teal); color: #fff; }
.flatpickr-day.inRange { border-color: var(--sky); background: var(--sky); box-shadow: -5px 0 0 var(--sky), 5px 0 0 var(--sky); }
.flatpickr-day:is(.flatpickr-disabled, .prevMonthDay, .nextMonthDay) { color: #9DAEA9; }
.flatpickr-calendar.hasTime .flatpickr-time { height: 36px; border-top: 1px solid var(--line); }
.flatpickr-time :is(input, .flatpickr-am-pm):is(:hover, :focus) { background: var(--mist); }

/* ---------- SweetAlert: confirm boxes and toasts ---------- */
.swal2-container { z-index: 2000 !important; }
body:not(.swal2-toast-shown) .swal2-container.swal2-backdrop-show { background: rgb(7 42 51 / .5) !important; }
.swal2-popup {
    --swal: var(--teal); --swal-soft: var(--sky);
    width: 23em !important; padding: 1.25rem !important; border-radius: 14px !important; color: var(--ink) !important; font-family: inherit !important; font-size: .9375rem !important;
}
.swal2-popup:not(.swal2-toast) { box-shadow: 0 40px 80px -30px rgb(0 0 0 / .5); }
.swal2-title { padding: .75rem 0 0 !important; color: var(--teal-ink) !important; font-size: 1.05rem !important; font-weight: 600 !important; line-height: 1.4 !important; }
.swal2-html-container { margin: .3rem 0 0 !important; padding: 0 !important; color: var(--muted) !important; font-size: .875rem !important; line-height: 1.5 !important; }

/* Icons: a soft round badge with one centred icon, instead of SweetAlert's drawn ones */
.swal2-icon-success { --swal: var(--paddy-deep); --swal-soft: var(--paddy-soft); --swal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 12.5 4.2 4.2 8.8-9.4'/%3E%3C/svg%3E"); }
.swal2-icon-error { --swal: var(--red); --swal-soft: var(--red-soft); --swal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 7 10 10M17 7 7 17'/%3E%3C/svg%3E"); }
.swal2-icon-warning { --swal: #A56A00; --swal-soft: var(--gold-soft); --swal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5.5v8M12 18.2v.1'/%3E%3C/svg%3E"); }
.swal2-icon-info { --swal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 10.5v8M12 5.7v.1'/%3E%3C/svg%3E"); }
.swal2-icon-question { --swal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.8 8.8a3.2 3.2 0 1 1 4.9 2.7c-1.1.7-1.7 1.3-1.7 2.6M12 18.4v.1'/%3E%3C/svg%3E"); }
.swal2-popup .swal2-icon { width: 3rem !important; min-width: 0 !important; height: 3rem !important; margin: 0 auto !important; border: 0 !important; background: var(--swal-soft); animation: none !important; }
.swal2-popup .swal2-icon > * { display: none !important; }
.swal2-popup .swal2-icon::before { content: ''; width: 56%; height: 56%; margin: auto; background: var(--swal); -webkit-mask: var(--swal-icon) center / contain no-repeat; mask: var(--swal-icon) center / contain no-repeat; }

.swal2-actions { gap: .5rem; margin-top: 1.1rem !important; }
.swal2-styled { min-width: 92px; min-height: var(--control); margin: 0 !important; padding: .25rem 1rem !important; border-radius: 8px !important; box-shadow: none !important; font-family: inherit !important; font-size: .8125rem !important; font-weight: 600 !important; }
.swal2-confirm { background-color: var(--teal) !important; }
.swal2-confirm.is-danger { background-color: var(--red) !important; }
.swal2-cancel { border: 1px solid var(--line) !important; background-color: #fff !important; color: var(--teal) !important; }
.swal2-styled:focus-visible { box-shadow: 0 0 0 2px var(--gold) !important; }
.swal2-loader { border-color: var(--teal) transparent !important; }
.swal2-timer-progress-bar { height: 3px !important; background: var(--swal) !important; }

/* Toasts: icon and text centred on one line */
.swal2-popup.swal2-toast { grid-template-columns: auto minmax(0, 1fr) !important; align-items: center; column-gap: .6rem; width: auto !important; max-width: 360px; padding: .6rem .9rem .7rem .7rem !important; border: 1px solid var(--line); border-radius: 12px !important; box-shadow: 0 18px 50px -18px rgb(7 42 51 / .35) !important; }
.swal2-popup.swal2-toast .swal2-icon { width: 1.75rem !important; height: 1.75rem !important; margin: 0 !important; }
.swal2-popup.swal2-toast .swal2-title { grid-row: 1 / 99; align-self: center; margin: 0 !important; padding: 0 !important; font-family: inherit !important; font-size: .875rem !important; }

/* ---------- Settings page ---------- */
.form-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; min-width: 0; }
.a-form > .a-card__head { margin-bottom: 0; }
.uploads { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .6rem; }
.upload { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; }
.upload > img { flex-shrink: 0; width: 64px; height: 64px; padding: 6px; border-radius: 8px; background: var(--mist); object-fit: contain; }
.upload.is-dark > img { background: var(--teal-ink); }
.upload > div { min-width: 0; }
.upload small { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.a-form .upload label.a-btn { display: inline-flex; color: var(--teal); font-weight: 600; }
.upload label.a-btn:focus-within { outline: 2px solid var(--gold); }
.upload .a-error { margin: .3rem 0 0; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; overflow: hidden; clip-path: inset(50%); }
.a-brand img, .a-login > img { object-fit: contain; }
/* Shop: products, options, photos and delivery rates */
.a-toolbar--start { justify-content: flex-start; }
.list-note { display: block; color: var(--muted); font-size: .78rem; }
.product-thumb { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.product-thumb--logo { object-fit: contain; }
.a-link { justify-self: start; padding: .2rem 0; border: 0; background: none; color: var(--teal); font: inherit; font-size: .82rem; font-weight: 600; text-align: left; cursor: pointer; }
.a-link:hover { text-decoration: underline; }
.kind-buttons, .switches { display: flex; flex-wrap: wrap; gap: .4rem; }
.switches { gap: .4rem 1.25rem; }
.quick-add { display: grid; grid-template-columns: 1fr auto auto; gap: .4rem; }
.option-card { display: grid; gap: .6rem; margin-bottom: .6rem; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--mist); }
.option-card header { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; }
.photo-grid__item, .a-form .photo-grid__add { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid__item .badge { position: absolute; top: 5px; left: 5px; }
.photo-grid__item div { position: absolute; right: 5px; bottom: 5px; display: flex; gap: .25rem; }
.a-form .photo-grid__add { display: grid; place-content: center; justify-items: center; gap: .2rem; border-style: dashed; color: var(--teal); cursor: pointer; }
.photo-grid__add:focus-within { outline: 2px solid var(--gold); }
.badges { display: flex; flex-wrap: wrap; gap: .25rem; }
.is-red, .list-cell small.is-red, .dropdown-item.is-red { color: var(--red); }
.is-green { color: var(--paddy-deep); }
.form-intro { margin: 0; }
.list-intro, .a-alert.list-intro { margin: 0 0 .6rem; }
.price-row { align-items: center; }
.stock-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.stock-panel h3 { margin: 0 0 .4rem; font-size: .95rem; }
.stock-panel h3 .list-note { display: inline; font-weight: 400; }
.stock-totals { display: flex; flex-wrap: wrap; gap: .6rem; }
.stock-totals > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--mist); }
.stock-totals small { display: block; color: var(--muted); }
.stock-totals strong { font-size: 1.1rem; color: var(--teal-ink); }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.tabs { display: flex; gap: .3rem; margin-bottom: .6rem; overflow-x: auto; }
.tabs button { flex-shrink: 0; display: inline-flex; align-items: center; gap: .35rem; min-height: var(--control); padding: 0 .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.tabs .is-active { border-color: var(--teal); background: var(--teal); color: #fff; }
.tabs span { min-width: 1.3rem; padding: 0 .35rem; border-radius: 99px; background: var(--gold); color: #fff; font-size: .75rem; line-height: 1.3rem; text-align: center; }
.select-bar { margin-bottom: .6rem; }
.list-check { cursor: default; }
.badge--returning, .badge--returned { background: var(--gold-soft); color: #6B4A0B; }
.order-details { gap: .6rem 1.2rem; }
.order-totals { max-width: 420px; margin-left: auto; width: 100%; }
.order-line { display: grid; grid-template-columns: minmax(0, 1fr) 170px 90px auto; align-items: start; gap: .5rem; margin-bottom: .5rem; }
.order-line > b { align-self: center; text-align: right; }
.quantity { display: grid; grid-template-columns: auto 1fr auto; gap: .25rem; }
.quantity .a-btn { padding-inline: .6rem; }
.quantity input { text-align: center; }
@media (max-width: 640px) {
    .order-line { grid-template-columns: 1fr auto auto; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
    .order-line > .field:first-child { grid-column: 1 / -1; }
}
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: start; gap: .9rem; }
.pos-products { min-width: 0; }
.pos-search { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: .5rem; margin-bottom: .6rem; }
.pos-search input, .pos-search select { width: 100%; min-height: calc(var(--control) + 6px); padding: 0 .75rem; border: 1px solid var(--line); border-radius: 10px; background-color: #fff; font: inherit; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.pos-card { display: grid; align-content: start; gap: .2rem; min-width: 0; padding: .45rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: .82rem; line-height: 1.3; text-align: left; cursor: pointer; }
button.pos-card:hover, button.pos-card:focus-visible { border-color: var(--teal); }
.pos-card.is-out { opacity: .5; }
.pos-card__image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 8px; object-fit: cover; }
.pos-card > span:not(.skeleton-line) { display: flex; justify-content: space-between; gap: .4rem; }
.pos-card small { color: var(--muted); font-size: .75rem; }
.pos-cart { position: sticky; top: 70px; max-height: calc(100vh - 85px); margin: 0; overflow-y: auto; }
.pos-modes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.pos-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .35rem .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.pos-line .quantity { max-width: 190px; }
.pos-totals { width: 100%; }
.pos-totals > div { grid-template-columns: 1fr auto; }
.pos-totals dd { text-align: right; }
.pos-payment { padding: .7rem; border-radius: 10px; background: var(--mist); }
.pos-cash { display: grid; grid-template-columns: 1fr auto; gap: .4rem; }
.pos-other { display: grid; gap: .4rem; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pos-other header, .pos-due { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pos-due { color: var(--red); font-size: 1.05rem; }
.pos-due.is-paid { color: var(--paddy-deep); }
.pos-code { text-transform: uppercase; }
.pos-code::placeholder { text-transform: none; }
.pos-submit { min-height: 46px; font-size: 1rem; }
.pos-done { display: grid; justify-items: center; gap: .4rem; padding: 1rem 0; text-align: center; }
.pos-done > .icon { width: 3rem; height: 3rem; padding: .6rem; border-radius: 50%; background: var(--paddy-soft); color: var(--paddy-deep); }
.pos-done :is(h2, p) { margin: 0; }
.pos-done .a-toolbar { justify-content: center; }
.pos-change { font-size: 1.5rem; }
.pos-jump { display: none; }
@media (max-width: 1100px) {
    .pos { grid-template-columns: 1fr; }
    .pos-cart { position: static; max-height: none; scroll-margin-top: 70px; }
    .pos-jump { position: sticky; bottom: 16px; z-index: 1; display: flex; width: max-content; margin-left: auto; box-shadow: 0 10px 30px -10px rgb(7 42 51 / .6); }
}
@media (max-width: 640px) {
    .pos-search { grid-template-columns: 1fr; }
    .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.courier-row { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); align-items: start; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
    .courier-row { grid-template-columns: 1fr 1fr; }
}
.rate-remove { margin-top: 1.35rem; }
.quick-link { display: grid; grid-template-columns: 1fr 1fr auto; align-items: start; gap: .5rem; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 -6px 20px -12px rgb(7 42 51 / .3); }
.save-bar small { color: var(--muted); }

/* ---------- Pages and their sections ---------- */
.icon--back { transform: rotate(180deg); }
.section-bar { display: flex; flex: 1; gap: .5rem; min-width: 0; }
.section-bar select { width: auto; max-width: 340px; min-width: 0; }
.list-handle { display: grid; place-items: center; height: 32px; color: var(--muted); cursor: grab; touch-action: none; }
.list-handle:active { cursor: grabbing; }
.list-row.is-dragging { background: var(--gold-soft); }
.list-row.is-hidden :is(.section-thumb, .list-name, .list-main small) { opacity: .5; }
.section-thumb { flex-shrink: 0; width: 96px; height: 54px; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; object-position: top; }
.gallery-thumb { object-position: center; }
.section-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.section-card { display: grid; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.section-card img { width: 100%; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line); background: var(--mist); object-fit: contain; }
.section-card span { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .4rem .6rem; }
.section-card:hover, .section-card:focus-visible { border-color: var(--teal); outline: 2px solid var(--gold); }
.section-card:disabled { opacity: .6; cursor: wait; }
.section-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 1rem; }
.section-form__preview { position: sticky; top: 64px; display: grid; gap: .5rem; }
.section-form__preview img { width: 100%; max-height: 55vh; border: 1px solid var(--line); border-radius: 10px; object-fit: contain; object-position: top; }
.section-form__preview small { color: var(--muted); }
.field { display: grid; align-content: start; gap: .2rem; min-width: 0; }
.field-head { display: flex; align-items: end; justify-content: space-between; gap: .5rem; }
.a-form .field label[for] { display: inline; }
.a-form .field label[for] small { display: inline; }
.field .field-label { margin: 0; }
.field-tool { padding: 0 .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--gold-soft); color: #6B4A0B; font: inherit; font-size: .75rem; cursor: pointer; }
.field-group { display: grid; gap: .6rem; min-width: 0; margin: 0; padding: .5rem .8rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.field-group legend { padding: 0 .35rem; color: var(--teal); font-weight: 600; }
.upload__fields { flex: 1; }
.upload.upload--photo > video { flex-shrink: 0; border-radius: 8px; background: var(--teal-ink); }
.upload.upload--photo > :is(img, video) { width: 108px; height: 72px; padding: 0; object-fit: cover; }
.section-item { display: grid; gap: .5rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.section-item__actions { display: flex; justify-content: flex-end; gap: .35rem; }
.icon-picker { position: relative; }
.icon-picker__button { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: var(--control); padding: 0 .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.icon-picker__button span:first-child { display: grid; color: var(--teal); }
.icon-picker__list { scroll-margin-block: 72px; position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; width: max(100%, 280px); max-width: 80vw; max-height: 230px; padding: .4rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 18px 50px -18px rgb(7 42 51 / .35); }
.icon-picker__list button { display: grid; place-items: center; height: 36px; border: 0; border-radius: 6px; background: none; color: var(--teal); cursor: pointer; }
.icon-picker__list button:hover, .icon-picker__list .is-active { background: var(--paddy-soft); }

/* ---------- Modal (opened by Bootstrap's JavaScript) ---------- */
.fade { transition: opacity .15s linear; }
.fade:not(.show) { opacity: 0; }
.modal { position: fixed; inset: 0; z-index: 1055; display: none; overflow: hidden auto; outline: 0; }
.modal-dialog { max-width: 520px; margin: 1.2rem auto; padding: 0 1rem; pointer-events: none; }
.modal-dialog.modal-lg { max-width: 760px; }
.modal-dialog.modal-xl { max-width: 1160px; }
.modal-header--sticky, .modal-footer--sticky { position: sticky; z-index: 25; background: #fff; }
.modal-header--sticky { top: 0; border-radius: 12px 12px 0 0; }
.modal-header--sticky input { max-width: 320px; margin-left: auto; }
.modal-footer--sticky { bottom: 0; border-radius: 0 0 12px 12px; }
.modal-content { border-radius: 12px; background: #fff; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .5); pointer-events: auto; }
.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .9rem; }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 1rem; }
.modal-footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.modal-body { padding: .8rem .9rem; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1050; background: var(--teal-ink); }
.modal-backdrop.show { opacity: .5; }

/* ---------- Dropdown (opened by Bootstrap's JavaScript) ---------- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; z-index: 30; display: none; min-width: 190px; margin: 0; padding: .3rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 18px 50px -18px rgb(7 42 51 / .35); list-style: none; }
.dropdown-menu.show { display: block; }
.dropdown-item { display: flex; font-size: .8125rem; align-items: center; gap: .5rem; padding: .3rem .6rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.dropdown-item:hover { background: var(--mist); }
.dropdown-item.is-active { background: var(--teal); color: #fff; }

/* ---------- Menu search ---------- */
.a-find { padding: .7rem; }
.a-find__item { display: flex; align-items: center; gap: .55rem; margin-top: .25rem; padding: .4rem .6rem; border-radius: 8px; text-decoration: none; }
.a-find__item:hover, .a-find__item.is-active { background: var(--mist); }
.a-find__item small { margin-left: auto; color: var(--muted); }
.a-find__item mark { background: var(--gold-soft); }

/* ---------- Skeleton ---------- */
.skeleton-line { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--line) 25%, var(--mist) 37%, var(--line) 63%) 100% 50% / 400% 100%; animation: skeleton-pulse 1.4s ease infinite; }
.skeleton-line--field { height: var(--control); border-radius: 8px; }
@keyframes skeleton-pulse { to { background-position: 0 50%; } }

@media (max-width: 1000px) {
    .section-form { grid-template-columns: minmax(0, 1fr); }
    .section-form__preview { position: static; order: -1; }
    .section-form__preview img { max-height: 130px; object-fit: cover; }
}
@media (max-width: 800px) {
    .a-top__text { display: none; }
    .a-top__actions .a-btn { min-width: 40px; min-height: 40px; padding: .4rem .6rem; }

    /* Easier to tap, and 16px text stops phones zooming in when a field is tapped */
    :root { --control: 40px; --control-sm: 40px; }
    .a-side a, .a-burger, .dropdown-item { min-height: var(--control); }
    :is(.a-main, .modal, .a-login) :is(input:not([type=checkbox], [type=radio], [type=file]), select, textarea):not([class*=select2]),
    .select2-container .select2-search__field { font-size: 16px !important; }
    .flatpickr-calendar { width: 300px; }
    .flatpickr-day { height: 38px; line-height: 36px; }
    .a-check { min-height: var(--control); }

    .section-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .section-card span { display: block; }
    .section-bar { flex-basis: 100%; }
    .section-bar select { flex: 1; width: 0; max-width: none; }
    .list-handle { width: 32px; height: 40px; }
    .field-tool { min-height: 32px; }

    .list-bar { flex-direction: column-reverse; align-items: stretch; }
    .list-bar > .a-btn { align-self: flex-end; min-height: var(--control); border-radius: 8px; }
    .filter-bar { flex: none; }
    .filter-bar > .filter-bar__top, .filter-bar > .filter-bar__grid { flex-basis: 100%; }
    .filter-bar__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-select { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .skeleton-line { animation: none; } }

/* ---------- Text editor ---------- */
.trumbowyg-box { margin: 0; border-color: var(--line); border-radius: 10px; background: #fff; }
.trumbowyg-button-pane { border-radius: 10px 10px 0 0; }
.trumbowyg-editor { min-height: 320px; line-height: 1.7; }
.trumbowyg-editor :is(h2, h3) { margin: .8rem 0 .3rem; font-size: 1.1rem; }
.trumbowyg-editor :is(ul, ol) { padding-left: 1.4rem; list-style: revert; }

/* ---------- Wholesale prices ---------- */
.wholesale-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px auto; gap: .5rem; align-items: start; margin-bottom: .5rem; }
.wholesale-total { margin: 0; text-align: right; }
@media (max-width: 640px) {
    .wholesale-row { grid-template-columns: 1fr 1fr auto; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
    .wholesale-row > :first-child { grid-column: 1 / -1; }
}

/* ---------- Animals ---------- */
.animal-tabs { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.a-tabs.animal-tabs { justify-content: flex-start; }

/* ---------- Reports: black and white, the same as the PDF (layouts/pdf/report) ---------- */
.report-date { width: 140px; }
.filter-select.report-select { flex-basis: 260px; }
.report-scroll { overflow-x: auto; }
.report-paper { width: 820px; min-width: 820px; margin: 0 auto; padding: 24px 28px; border: 1px solid var(--line); background: #fff; color: #000; font-size: 13px; line-height: 1.35; }
.report-paper--wide { width: 100%; min-width: 1000px; max-width: 1180px; }
.rpt-head { margin-bottom: 12px; text-align: center; }
.rpt-head .name { font-size: 20px; font-weight: 700; }
.rpt-head .report { margin: 6px 0 0; color: #000; font-size: 17px; font-weight: 700; }
.rpt-table { width: 100%; border-collapse: collapse; }
.rpt-table th { padding: 5px 6px; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; color: #000; font-weight: 700; text-align: left; vertical-align: bottom; }
.rpt-table td { padding: 4px 6px; border-bottom: 1px dotted #000; vertical-align: top; }
.rpt-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rpt-table .serial { width: 34px; }
.rpt-table .nowrap { white-space: nowrap; }
.rpt-table .bold td { border-top: 1px solid #000; font-weight: 700; }
.rpt-table .total td { padding: 5px 6px; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; font-weight: 700; }
.rpt-notes { margin: 10px 0 0; padding: 0; font-size: 12px; list-style: none; }
.rpt-notes a { color: #000; font-weight: 700; text-decoration: underline; }
.report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: .7rem; }
.report-group { margin: 1.1rem 0 .5rem; font-size: 1rem; }
.report-group:first-child { margin-top: 0; }
.report-link { display: flex; align-items: center; gap: .8rem; margin: 0; color: inherit; text-decoration: none; }
.report-link > .icon { flex: none; color: var(--teal); }
.report-link span { display: grid; flex: 1; gap: .1rem; }
.report-link strong { color: var(--teal-ink); }
.report-link small { color: var(--muted); }
.report-link:hover { border-color: var(--teal); }

/* Kureghor: a guest who did not come */
.badge--no_show { background: var(--red-soft); color: var(--red); }

/* Kureghor calendar: closed nights, and numbers that open their bookings */
.occ--closed { background: var(--red-soft); color: var(--red); }
.a-occ td a { display: block; line-height: 30px; color: inherit; text-decoration: none; }

/* Investors found while adding an investment */
.investor-results { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }

/* ---------- Accounts ---------- */
.chart-class { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; margin-bottom: 1rem; }
.chart-class h2 { margin: 0; font-size: 1rem; }
.chart-group { background: var(--mist); }
.opening-group { margin: .3rem 0 0; font-size: .9rem; }
.voucher-line { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: .6rem; align-items: start; }
.voucher-line--journal { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1fr) auto; }
.voucher-line > .a-btn { margin-top: 1.45rem; }
@media (max-width: 760px) {
    .voucher-line, .voucher-line--journal { grid-template-columns: minmax(0, 1fr); padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
    .voucher-line > .a-btn { justify-self: end; margin-top: 0; }
}
