/* Tabler/Bootstrap 5 components with the existing Connecat brand and layouts.
 * The material resource/theme identifier is retained for stored preferences. */
:root {
    --tblr-primary: #0b57d0;
    --tblr-primary-rgb: 11, 87, 208;
    --tblr-body-bg: #f0f4f9;
    --tblr-body-color: #1f1f1f;
    --tblr-border-radius: 12px;
    --tblr-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.icon {
    display: inline-block;
    font-family: "Material Icons";
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    width: 1em;
    height: 1em;
    line-height: 1;
    white-space: nowrap;
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}
.icon-lg { font-size: 24px; }
.icon-sm { font-size: 18px; }
.access-hide { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.app-shell .app-header { background: #fff; border-bottom: 1px solid var(--ui-border); }
.app-shell .app-drawer { --tblr-offcanvas-width: 256px; background: #fff; border-right: 1px solid var(--ui-border); }
.app-shell .app-drawer .menu-scroll { width: 100%; background: #fff; box-shadow: none; overflow-y: auto; }
.app-shell .app-drawer .nav { display: flex; flex-direction: column; width: 100%; }
.app-shell .app-drawer .nav > li { width: 100%; list-style: none; }
.app-shell .app-drawer .nav > li > a { min-height: 44px; padding: 10px 14px; text-decoration: none; }
.app-shell .app-drawer .menu-logo { font-size: 19px; text-decoration: none; }
.app-shell .app-header .dropdown-menu { margin: 0; }
.app-shell .app-header .avatar { flex-shrink: 0; overflow: hidden; border-radius: 50%; }
.app-shell .app-header .avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.app-shell .dropdown-menu { min-width: 180px; border: 1px solid var(--ui-border); }
.app-shell .dropdown-menu.show { visibility: visible; pointer-events: auto; }
.app-shell .dropdown-menu > li > a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.app-shell .dropdown-menu > li > a > .icon { flex: 0 0 auto; margin: 0; }
.app-shell .app-header .dropdown-item { min-height: 44px; }
.app-shell .dropdown-menu > li > a:focus-visible { outline: 2px solid var(--ui-primary); outline-offset: -2px; }
.app-shell .ui-content-header { padding: 24px 0; }
.app-shell .content-heading { font-size: 28px; font-weight: 600; }
.app-shell .card { border: 1px solid var(--ui-border-soft); border-radius: 16px; }
.app-shell .card-main { width: 100%; }
.app-shell .shop-table .card { flex-direction: row; }
.app-shell .card-action { padding: 0 24px 20px; }
.app-shell .card-action::after { display: block; content: ""; clear: both; }
.app-shell .card-heading { font-size: 18px; }
.app-shell .btn { border-radius: var(--tblr-border-radius); }
.app-shell .btn-dl { border-radius: var(--tblr-border-radius); text-decoration: none; }
.btn-block { width: 100%; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.pull-left { float: left; }
.pull-right { float: right; }
.margin-right { margin-right: 8px; }
.margin-top-no { margin-top: 0; }
.margin-top { margin-top: 16px; }
.margin-bottom { margin-bottom: 16px; }
.padding-no { padding: 0; }
.col-xs-12 { width: 100%; }
.form-group { margin-bottom: 1rem; }
.form-group > label { display: block; margin-bottom: 7px; }
/* Field names are labels, not footnotes; keep them consistent across forms. */
.app-shell .floating-label,
.app-shell .form-label,
.app-shell .form-group-label > label:not(.checkbox):not(.switch),
.app-shell .form-group > label:not(.checkbox):not(.switch) { font-size: 14px; line-height: 1.5; }
.app-shell .help-block,
.app-shell .form-control-guide { font-size: 13px; line-height: 1.5; }
/* Legacy prose uses .form-help, which Tabler reserves for a tiny ? control. */
.app-shell p.form-help,
.app-shell p.form-help:hover {
    display: block; width: auto; height: auto;
    color: var(--ui-text-muted); background: transparent; border-radius: 0;
    font-size: 13px; font-weight: 400; line-height: 1.5; text-align: left;
    cursor: auto; user-select: text;
}
/* One surface and size for text fields and native selects, including auth forms. */
.app-shell .form-control:not([type="hidden"]),
.app-shell .form-select {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ui-text);
    font-size: 15px;
    line-height: 22px;
    background-color: #fff;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    box-shadow: none;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.app-shell .form-select { padding-right: 40px; text-align: left; background-position: right 12px center; }
.app-shell textarea.form-control:not([type="hidden"]) { height: auto; min-height: 112px; resize: vertical; }
.app-shell .form-control:not([type="hidden"]):hover,
.app-shell .form-select:hover { border-color: #9aa8ba; }
.app-shell .form-control:not([type="hidden"]):focus,
.app-shell .form-select:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px rgba(11, 87, 208, .12);
    outline: none;
}
.app-shell .form-control:not([type="hidden"])::placeholder { color: #8a94a3; opacity: 1; }
.app-shell .form-control:not([type="hidden"]):disabled,
.app-shell .form-control:not([type="hidden"])[readonly],
.app-shell .form-select:disabled {
    color: var(--ui-text-muted);
    background-color: #f5f7fa;
    border-color: var(--ui-border);
    box-shadow: none;
}
.app-shell .form-control:not([type="hidden"]):disabled,
.app-shell .form-select:disabled { cursor: not-allowed; }
.app-shell .form-control:not([type="hidden"])[readonly] { cursor: text; }
.app-shell .form-control:not([type="hidden"]):-webkit-autofill {
    -webkit-text-fill-color: var(--ui-text);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
}
.app-shell .form-control:not([type="hidden"]):-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(11, 87, 208, .12);
}
.app-shell .checkbox label, .app-shell .switch label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.app-shell .checkbox input, .app-shell .switch input {
    position: static !important; width: 18px !important; height: 18px !important; margin: 0 !important;
    clip: auto !important; overflow: visible; accent-color: var(--ui-primary); flex-shrink: 0;
}
.checkbox-circle, .checkbox-circle-check, .checkbox-circle-icon, .switch-toggle { display: none !important; }
.app-shell .modal { padding: 0; }
.app-shell .modal-dialog { width: auto; max-width: min(540px, calc(100vw - 32px)); margin: 28px auto; }
/* Retain the old centering marker using Bootstrap 5's flex-dialog layout. */
.app-shell .modal-va-middle .modal-dialog { display: flex; align-items: center; min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); }
.app-shell .modal-xs { max-width: min(420px, calc(100vw - 32px)); }
.app-shell .modal-content { border: 1px solid var(--ui-border); border-radius: 16px; }
.app-shell .modal-heading { padding: 20px 24px 8px; }
.app-shell .modal-title { font-size: 20px; }
/* Login/save/error feedback is the main message, not a small h5 caption. */
.app-shell .ui-result-message {
    margin: 0; color: var(--ui-text); font-size: 20px; font-weight: 500;
    line-height: 1.5; overflow-wrap: anywhere;
}
.app-shell .ui-result-message > :last-child { margin-bottom: 0; }
.app-shell .ui-result-message > .form-control { margin-top: 16px; font-weight: 400; }
.app-shell .modal.fade.show .modal-dialog { transform: none; }
.app-shell .modal-body { padding: 16px 24px 24px; }
.app-shell .modal-close { z-index: 1; }
.app-shell .modal-footer { justify-content: flex-end; }
.app-shell .ui-footer { position: static; width: auto; padding: 20px; text-align: center; color: var(--ui-text-muted); font-size: 13px; }
.page-user-profile .dl-horizontal dd { min-width: 0; white-space: normal; overflow: visible; }
.app-shell .pagination { display: flex; flex-wrap: wrap; margin: 0; gap: 4px; }
.app-shell .pagination > li { list-style: none; }
.app-shell .ui-table-pagination { min-height: 0; }
.app-shell .dataTables_wrapper { padding: 16px; }
.app-shell .dataTables_wrapper > .row { align-items: center; row-gap: 12px; }
.app-shell .dataTables_wrapper .pagination { justify-content: flex-end; }
.app-shell .dataTables_wrapper .form-select { min-width: 80px; }
.app-shell .dataTables_wrapper .dataTables_filter input,
.app-shell .dataTables_wrapper .dataTables_length select {
    height: 38px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 22px;
    border-color: var(--ui-border);
    border-radius: 10px;
}
.app-shell .dataTables_wrapper .dataTables_length .form-select {
    padding-right: 2.5rem;
    background: var(--tblr-form-select-bg-img) right .75rem center / 16px 12px no-repeat #fff;
}
.app-shell .dataTables_wrapper .dataTables_length select:focus { border-color: var(--ui-primary); }
.app-shell .table-responsive { max-width: 100%; }
.app-shell .fbtn-container { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 30; width: auto; margin: 0; display: block; }
/* Material 3 standard FAB: 56px container, 16px corners, 24px symbol. */
.app-shell .fbtn {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 56px; height: 56px; padding: 0; border: 0; border-radius: 16px;
    background: var(--ui-primary-soft); color: var(--ui-primary-dark); text-decoration: none;
    box-shadow: 0 3px 8px rgba(31, 31, 31, .16), 0 1px 3px rgba(31, 31, 31, .12);
    transition: background-color var(--ui-transition), box-shadow var(--ui-transition), transform var(--ui-motion-short) var(--ui-ease-standard);
}
.app-shell .fbtn > .icon { width: 24px; height: 24px; margin: 0; font-size: 24px; line-height: 1; }
.app-shell .fbtn:focus { background: var(--ui-primary-soft); color: var(--ui-primary-dark); }
.app-shell .fbtn:is(:hover, :focus-visible, [aria-expanded="true"]) { background: #c2d7f7; color: var(--ui-primary-dark); }
.app-shell .fbtn:focus-visible { outline: 3px solid var(--ui-primary); outline-offset: 3px; }
.app-shell .fbtn:active { transform: scale(.96); box-shadow: 0 1px 3px rgba(31, 31, 31, .18); }
@media (hover: hover) {
    .app-shell .fbtn:hover { box-shadow: 0 5px 12px rgba(31, 31, 31, .18), 0 2px 4px rgba(31, 31, 31, .12); }
}
.fbtn-sub { display: none; }
.htmx-request { cursor: progress; }
.app-shell main.htmx-request .ui-table-pagination { opacity: .6; }
/* Animate the frame's breakpoint changes in both directions, including drawer exit. */
.app-shell-user, .app-shell-admin { transition: padding-top var(--ui-motion-medium) var(--ui-ease-standard); }
.app-shell-user main.content, .app-shell-admin main.content,
.app-shell-user > .ui-footer, .app-shell-admin > .ui-footer {
    transition: margin-left var(--ui-motion-medium) var(--ui-ease-standard);
}
.app-shell .app-header {
    transition: left var(--ui-motion-medium) var(--ui-ease-standard), height var(--ui-motion-medium) var(--ui-ease-standard),
        padding var(--ui-motion-medium) var(--ui-ease-standard), background-color var(--ui-transition), border-color var(--ui-transition);
}
.app-shell .app-drawer {
    transition: transform var(--ui-motion-medium) var(--ui-ease-standard), width var(--ui-motion-medium) var(--ui-ease-standard), visibility 0s var(--ui-motion-medium);
}
.app-shell .app-drawer:is(.show, .showing) { transition-delay: 0s; }
.app-shell .app-menu-trigger {
    opacity: 1;
    transition: opacity var(--ui-motion-medium) var(--ui-ease-standard), width var(--ui-motion-medium) var(--ui-ease-standard),
        visibility 0s, background-color var(--ui-transition), color var(--ui-transition);
}
@media (min-width: 992px) {
    .app-shell-user .app-header, .app-shell-admin .app-header { background: transparent; border-bottom: 0; }
    .app-shell .app-drawer .menu-scroll { height: 100vh; }
    .app-shell .app-drawer { transition-delay: 0s; }
    .app-shell .app-menu-trigger { opacity: 0; }
}
@media (max-width: 991px) {
    .app-shell .app-drawer { width: min(280px, calc(100vw - 48px)); max-width: 100%; }
    .app-shell .app-drawer .menu-scroll { width: 100%; padding-top: 8px; }
    .app-shell .app-drawer .menu-logo { margin-bottom: 12px; }
}
@media (max-width: 767px) {
    .app-shell .fbtn-container { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
    .app-shell .form-control:not([type="hidden"]), .app-shell .form-select { font-size: 16px; }
    .app-shell .content-heading { font-size: 24px; }
    .app-shell .modal-dialog { margin: 16px auto; }
    .app-shell .modal-va-middle .modal-dialog { min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); }
    .app-shell .dataTables_wrapper { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .app-shell .modal.fade .modal-dialog, .app-shell .dropdown-menu { transition: none; transform: none; }
    .app-shell-user, .app-shell-admin, .app-shell-user main.content, .app-shell-admin main.content,
    .app-shell-user > .ui-footer, .app-shell-admin > .ui-footer,
    .app-shell .app-header, .app-shell .app-drawer, .app-shell .app-menu-trigger, .app-shell .fbtn { transition: none; }
    .app-shell .fbtn:active { transform: none; }
}
