/*
 * FIDO visual refresh
 *
 * This file is deliberately a skin over the established Bootstrap/Nette DOM.
 * It must not change the navigation, grid, form or application structure.
 */

body.fido-theme-default {
    --fido-page-bg: #11151b;
    --fido-page-overlay: rgba(9, 13, 18, 0.74);
    --fido-backdrop-filter: grayscale(1) saturate(0) contrast(0.92) brightness(0.48) blur(1.4px);
    --fido-backdrop-opacity: 0.62;
    --fido-glass: rgba(35, 40, 48, 0.87);
    --fido-glass-strong: rgba(25, 29, 36, 0.94);
    --fido-glass-soft: rgba(49, 55, 64, 0.82);
    --fido-glass-header: rgba(18, 22, 28, 0.9);
    --fido-nav-glass: rgba(25, 28, 34, 0.88);
    --fido-nav-text: #d8dde5;
    --fido-nav-text-hover: #ffffff;
    --fido-text: #f5f7fa;
    --fido-heading-text: #ffffff;
    --fido-muted: #c7ced8;
    --fido-link: #8ccaff;
    --fido-link-hover: #b8ddff;
    --fido-control-link: #075b96;
    --fido-danger-link: #c7e8ff;
    --fido-hairline: rgba(255, 255, 255, 0.15);
    --fido-hairline-strong: rgba(255, 255, 255, 0.25);
    --fido-divider: rgba(255, 255, 255, 0.15);
    --fido-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), 0 3px 10px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.13);
    --fido-shadow-raised: 0 25px 54px rgba(0, 0, 0, 0.44), 0 5px 14px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    --fido-grid: rgba(29, 34, 41, 0.88);
    --fido-grid-head: rgba(18, 22, 28, 0.9);
    --fido-grid-heading-text: #ffffff;
    --fido-grid-row: rgba(47, 52, 60, 0.84);
    --fido-grid-row-alt: rgba(58, 64, 73, 0.84);
    --fido-grid-hover: rgba(24, 28, 34, 0.94);
    --fido-grid-sticky-row: #2f343c;
    --fido-grid-sticky-head: #12161c;
    --fido-grid-sticky-footer: #191d24;
    --fido-control-bg: rgba(248, 250, 253, 0.96);
    --fido-control-text: #171b21;
    --fido-control-border: rgba(255, 255, 255, 0.5);
    --fido-picker-muted: #bac3ce;
    --fido-picker-hover: rgba(255, 255, 255, 0.14);
    --fido-attendance-muted: rgba(34, 39, 47, 0.94);
    --fido-attendance-success: rgba(48, 115, 63, 0.94);
    --fido-attendance-warning: rgba(138, 101, 45, 0.94);
    --fido-attendance-danger: rgba(151, 38, 55, 0.94);
    --fido-button-default: #f2f4f7;
    --fido-button-default-text: #171b21;
    --fido-focus: #087ac1;
    --fido-accent: #286590;
    --fido-danger: #a82d40;
    --fido-loading-scrim: rgba(5, 9, 14, 0.28);
    --fido-loading-surface: rgba(27, 33, 41, 0.92);
    --fido-loading-track: rgba(255, 255, 255, 0.2);
    --fido-loading-accent: #8ccaff;
}

body.fido-theme-dark {
    --fido-page-bg: #6f7379;
    --fido-page-overlay: rgba(112, 116, 122, 0.68);
    --fido-backdrop-filter: grayscale(1) saturate(0) contrast(0.86) brightness(0.72) blur(1.4px);
    --fido-backdrop-opacity: 0.48;
    --fido-glass: rgba(196, 200, 207, 0.87);
    --fido-glass-strong: rgba(226, 229, 233, 0.94);
    --fido-glass-soft: rgba(180, 185, 192, 0.84);
    --fido-glass-header: rgba(77, 81, 88, 0.91);
    --fido-nav-glass: rgba(76, 79, 84, 0.9);
    --fido-nav-text: #f4f6f8;
    --fido-nav-text-hover: #ffffff;
    --fido-text: #15191f;
    --fido-heading-text: #ffffff;
    --fido-muted: #444c57;
    --fido-link: #064b73;
    --fido-link-hover: #00344f;
    --fido-control-link: #064b73;
    --fido-danger-link: #ffffff;
    --fido-hairline: rgba(255, 255, 255, 0.42);
    --fido-hairline-strong: rgba(255, 255, 255, 0.64);
    --fido-divider: rgba(31, 39, 48, 0.25);
    --fido-shadow: 0 18px 42px rgba(27, 31, 37, 0.3), 0 3px 9px rgba(27, 31, 37, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.54);
    --fido-shadow-raised: 0 24px 50px rgba(27, 31, 37, 0.38), 0 5px 13px rgba(27, 31, 37, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.66);
    --fido-grid: rgba(205, 209, 215, 0.9);
    --fido-grid-head: rgba(179, 184, 191, 0.92);
    --fido-grid-heading-text: #15191f;
    --fido-grid-row: rgba(220, 223, 228, 0.88);
    --fido-grid-row-alt: rgba(203, 207, 213, 0.88);
    --fido-grid-hover: rgba(145, 151, 160, 0.92);
    --fido-grid-sticky-row: #dcdfe4;
    --fido-grid-sticky-head: #b3b8bf;
    --fido-grid-sticky-footer: #e2e5e9;
    --fido-control-bg: rgba(255, 255, 255, 0.94);
    --fido-control-text: #171b21;
    --fido-control-border: rgba(45, 52, 61, 0.25);
    --fido-picker-muted: #505a66;
    --fido-picker-hover: rgba(24, 31, 39, 0.1);
    --fido-attendance-muted: rgba(179, 184, 191, 0.94);
    --fido-attendance-success: rgba(151, 204, 161, 0.94);
    --fido-attendance-warning: rgba(231, 196, 132, 0.94);
    --fido-attendance-danger: rgba(224, 145, 158, 0.94);
    --fido-button-default: #f5f6f8;
    --fido-button-default-text: #171b21;
    --fido-focus: #006fb4;
    --fido-accent: #285f89;
    --fido-danger: #ad263b;
    --fido-loading-scrim: rgba(32, 36, 42, 0.2);
    --fido-loading-surface: rgba(232, 235, 239, 0.94);
    --fido-loading-track: rgba(24, 31, 39, 0.2);
    --fido-loading-accent: #075b96;
}

body.fido-theme-light {
    --fido-page-bg: #eef1f5;
    --fido-page-overlay: rgba(244, 247, 250, 0.78);
    --fido-backdrop-filter: grayscale(1) saturate(0) contrast(0.84) brightness(1.08) blur(1.4px);
    --fido-backdrop-opacity: 0.38;
    --fido-glass: rgba(255, 255, 255, 0.86);
    --fido-glass-strong: rgba(255, 255, 255, 0.95);
    --fido-glass-soft: rgba(242, 245, 249, 0.84);
    --fido-glass-header: rgba(247, 249, 252, 0.92);
    --fido-nav-glass: rgba(239, 242, 246, 0.9);
    --fido-nav-text: #354355;
    --fido-nav-text-hover: #111923;
    --fido-text: #18202b;
    --fido-heading-text: #18202b;
    --fido-muted: #5b6572;
    --fido-link: #075b96;
    --fido-link-hover: #003e6c;
    --fido-control-link: #075b96;
    --fido-danger-link: #063b5a;
    --fido-hairline: rgba(255, 255, 255, 0.72);
    --fido-hairline-strong: rgba(255, 255, 255, 0.94);
    --fido-divider: rgba(43, 57, 73, 0.18);
    --fido-shadow: 0 18px 44px rgba(25, 39, 58, 0.18), 0 3px 9px rgba(25, 39, 58, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    --fido-shadow-raised: 0 24px 52px rgba(25, 39, 58, 0.24), 0 5px 13px rgba(25, 39, 58, 0.14), inset 0 1px 0 #ffffff;
    --fido-grid: rgba(255, 255, 255, 0.9);
    --fido-grid-head: rgba(235, 239, 244, 0.94);
    --fido-grid-heading-text: #18202b;
    --fido-grid-row: rgba(255, 255, 255, 0.88);
    --fido-grid-row-alt: rgba(241, 244, 248, 0.9);
    --fido-grid-hover: rgba(218, 226, 235, 0.94);
    --fido-grid-sticky-row: #ffffff;
    --fido-grid-sticky-head: #ebeff4;
    --fido-grid-sticky-footer: #ffffff;
    --fido-control-bg: rgba(255, 255, 255, 0.94);
    --fido-control-text: #18202b;
    --fido-control-border: rgba(53, 67, 84, 0.2);
    --fido-picker-muted: #5b6673;
    --fido-picker-hover: rgba(29, 56, 82, 0.1);
    --fido-attendance-muted: rgba(224, 229, 235, 0.96);
    --fido-attendance-success: rgba(190, 226, 197, 0.96);
    --fido-attendance-warning: rgba(245, 218, 166, 0.96);
    --fido-attendance-danger: rgba(242, 181, 191, 0.96);
    --fido-button-default: #ffffff;
    --fido-button-default-text: #18202b;
    --fido-focus: #087ac1;
    --fido-accent: #286590;
    --fido-danger: #b52a40;
    --fido-loading-scrim: rgba(222, 229, 237, 0.34);
    --fido-loading-surface: rgba(255, 255, 255, 0.94);
    --fido-loading-track: rgba(24, 38, 54, 0.16);
    --fido-loading-accent: #075b96;
}

body[class*="fido-theme-"] {
    isolation: isolate;
    background-color: var(--fido-page-bg);
    color: var(--fido-text);
}

body[class*="fido-theme-"][data-fido-loading="true"] { cursor: progress; }

body[class*="fido-theme-"] .fido-loading-feedback {
    position: fixed;
    z-index: 20000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    background: var(--fido-loading-scrim);
    pointer-events: none;
    transition: opacity 140ms ease, visibility 0s linear 140ms;
}

body[class*="fido-theme-"] .fido-loading-feedback.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

body[class*="fido-theme-"] .fido-loading-card {
    position: relative;
    display: inline-flex;
    min-width: min(250px, calc(100vw - 48px));
    min-height: 68px;
    padding: 15px 23px;
    gap: 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--fido-hairline-strong);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.025) 45%), var(--fido-loading-surface);
    color: var(--fido-text);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.42), 0 7px 20px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(0, 0, 0, 0.14);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
    backdrop-filter: blur(18px) saturate(1.18);
    transform: translateY(7px) scale(0.97);
    transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body[class*="fido-theme-"] .fido-loading-feedback.is-visible .fido-loading-card {
    transform: translateY(0) scale(1);
}

body[class*="fido-theme-"] .fido-loading-spinner {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    border: 3px solid var(--fido-loading-track);
    border-top-color: var(--fido-loading-accent);
    border-right-color: var(--fido-loading-accent);
    border-radius: 50%;
    filter: drop-shadow(0 2px 5px color-mix(in srgb, var(--fido-loading-accent) 38%, transparent));
    animation: fido-loading-spin 760ms cubic-bezier(0.48, 0.12, 0.38, 0.9) infinite;
}

body[class*="fido-theme-"] .fido-loading-label {
    color: var(--fido-text);
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

body[class*="fido-theme-"] .fido-loading-trigger { cursor: progress !important; }

body[class*="fido-theme-"] :is(button, .btn, .page-link).fido-loading-trigger::after {
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-inline-start: 0.55em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.1em;
    animation: fido-loading-spin 720ms linear infinite;
}

@keyframes fido-loading-spin {
    to { transform: rotate(1turn); }
}

body[class*="fido-theme-"]:not([data-fido-page$="Homepage:default"]):not([data-fido-page$="Sign:in"]):not([data-fido-page*="Graf:"])::before,
body[class*="fido-theme-"]:not([data-fido-page$="Homepage:default"]):not([data-fido-page$="Sign:in"]):not([data-fido-page*="Graf:"])::after {
    content: "";
    position: fixed;
    z-index: -2;
    inset: 0;
    pointer-events: none;
}

body[class*="fido-theme-"]:not([data-fido-page$="Homepage:default"]):not([data-fido-page$="Sign:in"]):not([data-fido-page*="Graf:"])::before {
    background: url("/images/background_fido_middle.jpg") 50% 68% / cover no-repeat;
    filter: var(--fido-backdrop-filter);
    opacity: var(--fido-backdrop-opacity);
    transform: scale(1.015);
}

body[class*="fido-theme-"]:not([data-fido-page$="Homepage:default"]):not([data-fido-page$="Sign:in"]):not([data-fido-page*="Graf:"])::after {
    z-index: -1;
    background: var(--fido-page-overlay);
}

body[class*="fido-theme-"]:not([data-fido-page$="Homepage:default"]) .site-cover {
    -webkit-filter: var(--fido-backdrop-filter);
    filter: var(--fido-backdrop-filter);
    opacity: var(--fido-backdrop-opacity);
}

body[class*="fido-theme-"] a:not(.btn) { color: var(--fido-link); }
body[class*="fido-theme-"] a:not(.btn):hover,
body[class*="fido-theme-"] a:not(.btn):focus { color: var(--fido-link-hover); }

/* Keep the established 55 px navbar geometry; only its material changes. */
body[class*="fido-theme-"] .navbar-fixed-top {
    border: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)), var(--fido-nav-glass);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 var(--fido-hairline);
}

body[class*="fido-theme-"] .navbar-inverse .navbar-nav > li > a,
body[class*="fido-theme-"] .navbar-inverse .navbar-link {
    border-radius: 10px;
    color: var(--fido-nav-text);
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

body[class*="fido-theme-"] .navbar-inverse .navbar-nav > li > a:hover,
body[class*="fido-theme-"] .navbar-inverse .navbar-nav > li > a:focus,
body[class*="fido-theme-"] .navbar-inverse .navbar-link:hover,
body[class*="fido-theme-"] .navbar-inverse .navbar-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--fido-nav-text-hover);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[class*="fido-theme-"] .database-source-badge {
    border-radius: 8px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body[class*="fido-theme-"] .dropdown-menu,
body[class*="fido-theme-"] .popover {
    border-color: var(--fido-hairline-strong);
    border-radius: 14px;
    background: var(--fido-glass-strong);
    color: var(--fido-text);
    box-shadow: var(--fido-shadow);
}

body[class*="fido-theme-"] .popover {
    --bs-popover-bg: var(--fido-glass-strong);
    --bs-popover-border-color: var(--fido-divider);
    --bs-popover-header-bg: var(--fido-glass-header);
    --bs-popover-header-color: var(--fido-heading-text);
    --bs-popover-body-color: var(--fido-text);
}

body[class*="fido-theme-"] .popover-body { color: var(--fido-text); }

body[class*="fido-theme-"] .dropdown-menu > li > a,
body[class*="fido-theme-"] .dropdown-item {
    border-radius: 8px;
    color: var(--fido-text);
}

body[class*="fido-theme-"] .dropdown-menu > li > a:hover,
body[class*="fido-theme-"] .dropdown-menu > li > a:focus,
body[class*="fido-theme-"] .dropdown-item:hover,
body[class*="fido-theme-"] .dropdown-item:focus {
    background: var(--fido-glass-soft);
    color: var(--fido-text);
}

body[class*="fido-theme-"] .dropdown-menu > li.disabled > a,
body[class*="fido-theme-"] .dropdown-item.disabled {
    background: transparent;
    color: var(--fido-muted);
    box-shadow: none;
}

body[class*="fido-theme-"] .dropdown-menu .navbar-text {
    color: var(--fido-text);
}

body[class*="fido-theme-"] .dropdown-divider {
    border-color: var(--fido-divider);
}

/* Existing panels remain exactly where templates place them. */
body[class*="fido-theme-"] .panel {
    border-color: var(--fido-hairline);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.015) 38%), var(--fido-glass);
    background-clip: padding-box;
    color: var(--fido-text);
    box-shadow: var(--fido-shadow);
}

body[class*="fido-theme-"] .panel > .panel-heading {
    border: 0;
    border-bottom: 1px solid var(--fido-divider);
    border-radius: 15px 15px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent), var(--fido-glass-header);
    color: var(--fido-heading-text);
    box-shadow: inset 0 1px 0 var(--fido-hairline);
}

body[class*="fido-theme-"] .panel > .panel-heading a:not(.btn),
body[class*="fido-theme-"] .panel > .panel-heading a:not(.btn):hover,
body[class*="fido-theme-"] .panel > .panel-heading a:not(.btn):focus {
    color: inherit;
}

body[class*="fido-theme-"] .panel > .panel-body {
    background: transparent;
    color: inherit;
}

body[class*="fido-theme-"] .panel > .panel-footer {
    border-top: 1px solid var(--fido-divider);
    border-radius: 0 0 15px 15px;
    background: var(--fido-glass-soft);
    color: inherit;
}

body[class*="fido-theme-"] .panel-success { border-color: rgba(84, 171, 104, 0.62); }
body[class*="fido-theme-"] .panel-warning { border-color: rgba(222, 165, 67, 0.66); }
body[class*="fido-theme-"] .panel-danger { border-color: rgba(203, 64, 83, 0.68); }
body[class*="fido-theme-"] .panel-info { border-color: rgba(63, 158, 190, 0.66); }
body[class*="fido-theme-"] .panel-success > .panel-heading { background-color: rgba(31, 88, 44, 0.98); }
body[class*="fido-theme-"] .panel-warning > .panel-heading { background-color: rgba(100, 69, 24, 0.98); }
body[class*="fido-theme-"] .panel-danger > .panel-heading { background-color: rgba(129, 27, 44, 0.98); }
body[class*="fido-theme-"] .panel-info > .panel-heading { background-color: rgba(24, 82, 105, 0.98); }
body[class*="fido-theme-"] .panel-success > .panel-heading,
body[class*="fido-theme-"] .panel-warning > .panel-heading,
body[class*="fido-theme-"] .panel-danger > .panel-heading,
body[class*="fido-theme-"] .panel-info > .panel-heading { color: #ffffff; }

body[class*="fido-theme-"] a.wpanel-link,
body[class*="fido-theme-"] a.wpanel-link div { color: var(--fido-text) !important; }

body[class*="fido-theme-"] a.wpanel-link > .panel {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body[class*="fido-theme-"] a.wpanel-link:focus-visible > .panel {
    border-color: var(--fido-hairline-strong);
    box-shadow: var(--fido-shadow-raised);
}

body[class*="fido-theme-"] .menu-vecere,
body[class*="fido-theme-"] .login-box,
body[class*="fido-theme-"] .well,
body[class*="fido-theme-"] .thumbnail {
    border-color: var(--fido-hairline);
    border-radius: 14px;
    background: var(--fido-glass-strong);
    color: var(--fido-text);
    box-shadow: inset 0 1px 0 var(--fido-hairline), 0 10px 26px rgba(0, 0, 0, 0.18);
}

/* DataGrid density and column layout stay untouched. */
body[class*="fido-theme-"] .panel .datagrid,
body[class*="fido-theme-"] .modal .datagrid,
body[class*="fido-theme-"] .datagrid {
    border-radius: 13px;
    background: var(--fido-grid);
    color: var(--fido-text);
    box-shadow: inset 0 1px 0 var(--fido-hairline);
}

body[class*="fido-theme-"] .datagrid .table {
    --bs-table-color: var(--fido-text);
    --bs-table-bg: var(--fido-grid-row);
    --bs-table-border-color: var(--fido-hairline);
    --bs-table-striped-color: var(--fido-text);
    --bs-table-striped-bg: var(--fido-grid-row-alt);
    --bs-table-hover-color: var(--fido-text);
    --bs-table-hover-bg: var(--fido-grid-hover);
}

body[class*="fido-theme-"] .datagrid .table > thead {
    --bs-table-bg: var(--fido-grid-head);
    --bs-table-color: var(--fido-grid-heading-text);
}

body[class*="fido-theme-"] .datagrid .table > thead a:not(.btn),
body[class*="fido-theme-"] .datagrid .table > thead a:not(.btn):hover,
body[class*="fido-theme-"] .datagrid .table > thead a:not(.btn):focus {
    color: var(--fido-grid-heading-text);
}

body[class*="fido-theme-"] .datagrid .table tr.danger a:not(.btn),
body[class*="fido-theme-"] .datagrid .table td.danger a:not(.btn),
body[class*="fido-theme-"] .datagrid .table th.danger a:not(.btn) {
    color: var(--fido-danger-link);
}

body[class*="fido-theme-"] .datagrid .table tr.danger a:not(.btn):hover,
body[class*="fido-theme-"] .datagrid .table tr.danger a:not(.btn):focus,
body[class*="fido-theme-"] .datagrid .table td.danger a:not(.btn):hover,
body[class*="fido-theme-"] .datagrid .table td.danger a:not(.btn):focus,
body[class*="fido-theme-"] .datagrid .table th.danger a:not(.btn):hover,
body[class*="fido-theme-"] .datagrid .table th.danger a:not(.btn):focus {
    color: var(--fido-danger-link);
    text-decoration: underline;
}

body[class*="fido-theme-"] .panel .datagrid table thead tr.row-group-actions th,
body[class*="fido-theme-"] .modal .datagrid table thead tr.row-group-actions th,
body[class*="fido-theme-"] .datagrid table thead tr.row-group-actions th {
    background-color: var(--fido-grid-head);
    color: var(--fido-grid-heading-text);
}

body[class*="fido-theme-"] .panel .datagrid .row-grid-bottom,
body[class*="fido-theme-"] .modal .datagrid .row-grid-bottom,
body[class*="fido-theme-"] .datagrid .row-grid-bottom {
    border-color: var(--fido-divider);
    border-radius: 0 0 10px 10px;
    background: var(--fido-glass-strong);
}

body[class*="fido-theme-"] .table-bordered,
body[class*="fido-theme-"] .table-bordered > :not(caption) > * > * {
    border-color: var(--fido-divider);
}

/* Controls gain depth without changing their established height or padding. */
body[class*="fido-theme-"] .form-control,
body[class*="fido-theme-"] .form-select,
body[class*="fido-theme-"] .input-group-text {
    border-color: var(--fido-control-border);
    border-radius: 10px;
    background-color: var(--fido-control-bg);
    color: var(--fido-control-text);
    box-shadow: inset 0 1px 2px rgba(16, 25, 36, 0.1), 0 1px 0 rgba(255, 255, 255, 0.2);
}

body[class*="fido-theme-"] .form-control::placeholder { color: #687381; opacity: 1; }

body[class*="fido-theme-"] .text-muted,
body[class*="fido-theme-"] .help-block:not(.text-danger) { color: var(--fido-muted); }

body[class*="fido-theme-"] .form-control:focus,
body[class*="fido-theme-"] .form-select:focus {
    border-color: var(--fido-focus);
    box-shadow: 0 0 0 3px rgba(69, 155, 220, 0.24);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--fido-focus) 24%, transparent);
}

body[class*="fido-theme-"] .has-error .form-control,
body[class*="fido-theme-"] .form-control.is-invalid {
    border-color: var(--fido-danger);
    box-shadow: 0 0 0 3px rgba(181, 42, 64, 0.2);
}

body[class*="fido-theme-"] .has-error .control-label,
body[class*="fido-theme-"] .has-error .help-block,
body[class*="fido-theme-"] .invalid-feedback { color: #dc6678; }

body.fido-theme-dark .has-error .control-label,
body.fido-theme-dark .has-error .help-block,
body.fido-theme-dark .invalid-feedback,
body.fido-theme-light .has-error .control-label,
body.fido-theme-light .has-error .help-block,
body.fido-theme-light .invalid-feedback { color: #92233a; }

body[class*="fido-theme-"] .form-control:disabled,
body[class*="fido-theme-"] .form-control[readonly],
body[class*="fido-theme-"] .form-select:disabled {
    border-color: var(--fido-divider);
    background-color: var(--fido-glass-soft);
    color: var(--fido-muted);
}

body[class*="fido-theme-"] .panel fieldset > legend {
    border-color: var(--fido-divider);
    color: var(--fido-text);
}

body[class*="fido-theme-"] .panel .checkbox label:hover,
body[class*="fido-theme-"] .panel .radio label:hover {
    background-color: var(--fido-picker-hover) !important;
    color: var(--fido-text);
}

body[class*="fido-theme-"] .input-group > .form-control:first-child,
body[class*="fido-theme-"] .input-group > .form-select:first-child {
    border-radius: 10px 0 0 10px;
}

body[class*="fido-theme-"] .input-group > .input-group-text:last-child,
body[class*="fido-theme-"] .input-group > .input-group-btn:last-child > .btn,
body[class*="fido-theme-"] .input-group > .btn:last-child {
    border-radius: 0 10px 10px 0;
}

body[class*="fido-theme-"] .datagrid .form-control,
body[class*="fido-theme-"] .datagrid .form-select,
body[class*="fido-theme-"] .datagrid .input-group-text { border-radius: 8px; }

body[class*="fido-theme-"] .datagrid .input-group > .form-control:first-child,
body[class*="fido-theme-"] .datagrid .input-group > .form-select:first-child {
    border-radius: 8px 0 0 8px;
}

body[class*="fido-theme-"] .datagrid .input-group > .input-group-text:last-child,
body[class*="fido-theme-"] .datagrid .input-group > .input-group-btn:last-child > .btn,
body[class*="fido-theme-"] .datagrid .input-group > .btn:last-child {
    border-radius: 0 8px 8px 0;
}

body[class*="fido-theme-"] input[type="checkbox"],
body[class*="fido-theme-"] input[type="radio"] { accent-color: var(--fido-accent); }

body[class*="fido-theme-"] .btn:not(.btn-link) {
    border-radius: 10px;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.035) 48%, rgba(0, 0, 0, 0.08));
    background-repeat: repeat-x;
    box-shadow: 0 5px 11px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

body[class*="fido-theme-"] .btn:not(.btn-link):disabled,
body[class*="fido-theme-"] .btn:not(.btn-link).disabled {
    background-image: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    filter: saturate(0.45);
}

body[class*="fido-theme-"] .btn-default {
    border-color: var(--fido-control-border);
    background-color: var(--fido-button-default);
    color: var(--fido-button-default-text);
}

body[class*="fido-theme-"] .btn-primary { background-color: var(--fido-accent); border-color: var(--fido-accent); }
body[class*="fido-theme-"] .btn-danger { background-color: var(--fido-danger); border-color: var(--fido-danger); }

body[class*="fido-theme-"] .btn:not(.btn-link):not(:disabled):not(.disabled):focus-visible {
    filter: brightness(1.06);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

body[class*="fido-theme-"] .btn:not(.btn-link):not(:disabled):not(.disabled):active,
body[class*="fido-theme-"] .btn:not(.btn-link):not(:disabled):not(.disabled).active {
    transform: translateY(1px);
    filter: brightness(0.96);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22), inset 0 2px 3px rgba(0, 0, 0, 0.16);
}

body[class*="fido-theme-"] .datepicker-controls .btn:not(:disabled):not(.disabled):active,
body[class*="fido-theme-"] .datepicker-controls .btn:not(:disabled):not(.disabled).active {
    transform: none;
    filter: none;
    background: var(--fido-picker-hover);
    box-shadow: none;
}

body[class*="fido-theme-"] .datagrid .btn.btn-xs { border-radius: 8px; }

body[class*="fido-theme-"] .pagination .page-link {
    border-color: var(--fido-control-border);
    background: var(--fido-control-bg);
    color: var(--fido-control-link);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

body[class*="fido-theme-"] .pagination .active > .page-link,
body[class*="fido-theme-"] .pagination .page-link.active {
    border-color: var(--fido-accent);
    background-color: var(--fido-accent);
    color: #fff;
}

body[class*="fido-theme-"] .pagination .disabled > .page-link,
body[class*="fido-theme-"] .pagination .page-link.disabled {
    background: var(--fido-glass-soft);
    color: var(--fido-muted);
    box-shadow: none;
}

body[class*="fido-theme-"] .modal-content {
    border-color: var(--fido-hairline-strong);
    border-radius: 18px;
    background: var(--fido-glass-strong);
    color: var(--fido-text);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 var(--fido-hairline);
}

body[class*="fido-theme-"] .modal-content .modal-header {
    border-bottom: 1px solid var(--fido-divider);
    border-radius: 17px 17px 0 0;
    background: var(--fido-glass-header);
    color: var(--fido-heading-text);
}

body[class*="fido-theme-"] .modal-content .modal-body,
body[class*="fido-theme-"] .modal-content .modal-footer {
    border-color: var(--fido-divider);
    background: transparent;
    color: var(--fido-text);
}

body[class*="fido-theme-"] .modal-content .close {
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fido-heading-text);
    text-shadow: none;
    opacity: 0.82;
}

body[class*="fido-theme-"] .modal-content .close:hover,
body[class*="fido-theme-"] .modal-content .close:focus { opacity: 1; }

body[class*="fido-theme-"] .tooltip-inner {
    border: 1px solid var(--fido-hairline);
    border-radius: 10px;
    background: var(--fido-glass-strong);
    color: var(--fido-text);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

body[class*="fido-theme-"] .popover-header,
body[class*="fido-theme-"] .popover-title {
    border-color: var(--fido-divider);
    border-radius: 13px 13px 0 0;
    background: var(--fido-glass-header);
    color: var(--fido-heading-text);
}

body[class*="fido-theme-"] .datepicker.dropdown-menu,
body[class*="fido-theme-"] .datetimepicker.dropdown-menu,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget.dropdown-menu {
    color: var(--fido-text);
}

/* DataGrid 7 uses vanillajs-datepicker; the legacy Bootstrap picker remains below. */
body[class*="fido-theme-"] .datepicker-picker {
    border-radius: 14px;
    background: var(--fido-glass-strong);
    color: var(--fido-text);
    box-shadow: var(--fido-shadow), inset 0 1px 0 var(--fido-hairline);
}

body[class*="fido-theme-"] .datepicker-header,
body[class*="fido-theme-"] .datepicker-footer {
    background: transparent;
    color: var(--fido-text);
}

body[class*="fido-theme-"] .datepicker-title,
body[class*="fido-theme-"] .datepicker-footer {
    background: var(--fido-glass-soft);
    color: var(--fido-text);
    box-shadow: inset 0 1px 0 var(--fido-hairline);
}

body[class*="fido-theme-"] .datepicker-controls .button,
body[class*="fido-theme-"] .datepicker-controls .btn {
    border-color: transparent;
    border-radius: 9px;
    background: transparent;
    background-image: none;
    color: var(--fido-text);
    box-shadow: none;
}

body[class*="fido-theme-"] .datepicker-controls .button:hover,
body[class*="fido-theme-"] .datepicker-controls .button:focus,
body[class*="fido-theme-"] .datepicker-controls .btn:hover,
body[class*="fido-theme-"] .datepicker-controls .btn:focus {
    background: var(--fido-picker-hover);
    color: var(--fido-text);
    box-shadow: none;
}

body[class*="fido-theme-"] .datepicker-controls .button:disabled,
body[class*="fido-theme-"] .datepicker-controls .btn:disabled {
    background: transparent;
    color: var(--fido-picker-muted);
    box-shadow: none;
}

body[class*="fido-theme-"] .datepicker-view .dow,
body[class*="fido-theme-"] .datepicker-cell {
    color: var(--fido-text);
}

body[class*="fido-theme-"] .datepicker-cell.prev,
body[class*="fido-theme-"] .datepicker-cell.next,
body[class*="fido-theme-"] .datepicker-cell.disabled,
body[class*="fido-theme-"] .datepicker .week {
    color: var(--fido-picker-muted);
}

body[class*="fido-theme-"] .datepicker-cell:not(.disabled):hover,
body[class*="fido-theme-"] .datepicker-cell.focused:not(.selected) {
    border-radius: 8px;
    background: var(--fido-picker-hover);
    color: var(--fido-text);
}

body[class*="fido-theme-"] .datepicker-cell.selected,
body[class*="fido-theme-"] .datepicker-cell.selected:hover {
    border-radius: 8px;
    background: var(--fido-accent);
    color: #ffffff;
}

body[class*="fido-theme-"] .datepicker-cell.today:not(.selected) {
    border-radius: 8px;
    background: var(--fido-picker-hover);
    color: var(--fido-text);
    font-weight: 700;
}

body[class*="fido-theme-"] .datepicker-cell.highlighted:not(.selected),
body[class*="fido-theme-"] .datepicker-cell.range:not(.selected) {
    background: var(--fido-picker-hover);
    color: var(--fido-text);
}

body[class*="fido-theme-"] .datepicker-cell.range-start:not(.selected),
body[class*="fido-theme-"] .datepicker-cell.range-end:not(.selected) {
    background: var(--fido-accent);
    color: #ffffff;
}

body[class*="fido-theme-"] .datepicker table tr td.old,
body[class*="fido-theme-"] .datepicker table tr td.new,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.old,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.new,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.disabled,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table th.disabled {
    color: var(--fido-picker-muted);
}

body[class*="fido-theme-"] .datepicker table tr td.day.focused,
body[class*="fido-theme-"] .datepicker table tr td.day:hover,
body[class*="fido-theme-"] .datepicker table tr td span:hover,
body[class*="fido-theme-"] .datepicker .datepicker-switch:hover,
body[class*="fido-theme-"] .datepicker .next:hover,
body[class*="fido-theme-"] .datepicker .prev:hover,
body[class*="fido-theme-"] .datepicker tfoot tr th:hover,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table thead tr:first-child th:hover,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.day:hover,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.hour:hover,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.minute:hover,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.second:hover,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td span:hover {
    background: var(--fido-picker-hover);
    color: var(--fido-text);
}

body[class*="fido-theme-"] .datepicker table tr td.active,
body[class*="fido-theme-"] .datepicker table tr td.active:hover,
body[class*="fido-theme-"] .datepicker table tr td span.active,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.active,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td.active:hover,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget table td span.active {
    background-color: var(--fido-accent);
    background-image: none;
    color: #ffffff;
}

body[class*="fido-theme-"] .datepicker-dropdown.datepicker-orient-bottom::after,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget.dropdown-menu.bottom::after {
    border-bottom-color: var(--fido-glass-strong);
}

body[class*="fido-theme-"] .datepicker-dropdown.datepicker-orient-top::after,
body[class*="fido-theme-"] .bootstrap-datetimepicker-widget.dropdown-menu.top::after {
    border-top-color: var(--fido-glass-strong);
}

body[class*="fido-theme-"] .alert {
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body[class*="fido-theme-"] .progress {
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.24), 0 1px 0 rgba(255, 255, 255, 0.1);
}

body[class*="fido-theme-"] .progress-bar:first-child { border-radius: 999px 0 0 999px; }
body[class*="fido-theme-"] .progress-bar:last-child { border-radius: 0 999px 999px 0; }
body[class*="fido-theme-"] .progress-bar:only-child { border-radius: 999px; }

body[class*="fido-theme-"] .img-thumbnail,
body[class*="fido-theme-"] .imagetext,
body[class*="fido-theme-"] div.gallery-list-holder > a[data-gallery],
body[class*="fido-theme-"] .fido-photo-frame {
    border-color: var(--fido-hairline);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 var(--fido-hairline);
}

body[class*="fido-theme-"] .imagetexttop { border-radius: 12px 12px 0 0; }
body[class*="fido-theme-"] .imagetextbottom { border-radius: 0 0 12px 12px; }

body[class*="fido-theme-"] div#calendar div.box,
body[class*="fido-theme-"] div#calendar ul.label li {
    border-color: var(--fido-divider);
    background: var(--fido-grid-head);
    color: var(--fido-grid-heading-text);
}

body[class*="fido-theme-"] div#calendar ul.dates li {
    border-color: var(--fido-divider);
    background: var(--fido-grid-row);
    color: var(--fido-text);
}

body[class*="fido-theme-"] div#calendar ul.dates li.mask { background: var(--fido-glass-strong); }

body[class*="fido-theme-"] div#calendar div.header span.title {
    color: var(--fido-grid-heading-text);
}

body[class*="fido-theme-"] div#calendar ul.dates li.cal-day-sel:hover {
    background: var(--fido-grid-hover);
    color: var(--fido-text);
}

body[class*="fido-theme-"] td.vecer-th,
body[class*="fido-theme-"] .table-rocni-ucast .ucast-list-bgrnd {
    border-color: var(--fido-divider) !important;
    background-color: var(--fido-attendance-muted) !important;
    color: var(--fido-grid-heading-text);
}

body[class*="fido-theme-"] .table-rocni-ucast .td-success { background-color: var(--fido-attendance-success) !important; }
body[class*="fido-theme-"] .table-rocni-ucast .td-warning { background-color: var(--fido-attendance-warning) !important; }
body[class*="fido-theme-"] .table-rocni-ucast .td-danger { background-color: var(--fido-attendance-danger) !important; }

body[class*="fido-theme-"] .table.table-rocni-ucast > tbody > tr > td:not(:first-child),
body[class*="fido-theme-"] .table.table-rocni-ucast > tbody > tr > td:last-child,
body[class*="fido-theme-"] .table.table-rocni-ucast > tbody > tr:last-child,
body[class*="fido-theme-"] .table.table-rocni-ucast > tbody > tr:last-child > td:first-child {
    border-color: var(--fido-divider) !important;
}

body[class*="fido-theme-"] div#calendar div.header a.prev,
body[class*="fido-theme-"] div#calendar div.header a.next,
body[class*="fido-theme-"] .btn-cal-primary,
body[class*="fido-theme-"] .btn-cal-default {
    border-color: var(--fido-accent);
    border-radius: 10px;
    background-color: var(--fido-accent);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.035) 48%, rgba(0, 0, 0, 0.08));
    color: #ffffff;
    box-shadow: 0 5px 11px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

body[class*="fido-theme-"] div#calendar div.header a.prev.disabled,
body[class*="fido-theme-"] div#calendar div.header a.next.disabled {
    border-color: var(--fido-divider);
    background: var(--fido-glass-soft);
    color: var(--fido-muted);
    box-shadow: none;
    filter: saturate(0.35);
    cursor: not-allowed;
    transform: none;
}

body[class*="fido-theme-"] :where(a, button, input, select, textarea):not([tabindex="-1"]):focus-visible,
body[class*="fido-theme-"] [tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 3px solid var(--fido-focus) !important;
    outline-offset: 2px;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body[class*="fido-theme-"] .navbar-fixed-top,
    body[class*="fido-theme-"] .panel,
    body[class*="fido-theme-"] .datagrid,
    body[class*="fido-theme-"] .dropdown-menu,
    body[class*="fido-theme-"] .datepicker-picker,
    body[class*="fido-theme-"] .popover,
    body[class*="fido-theme-"] .modal-content,
    body[class*="fido-theme-"] .fido-loading-card { background-color: var(--fido-glass-strong); }
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body[class*="fido-theme-"] .navbar-fixed-top {
        -webkit-backdrop-filter: blur(12px) saturate(1.16);
        backdrop-filter: blur(12px) saturate(1.16);
    }

    body[class*="fido-theme-"] .dropdown-menu,
    body[class*="fido-theme-"] .datepicker-picker,
    body[class*="fido-theme-"] .popover,
    body[class*="fido-theme-"] .modal-content {
        -webkit-backdrop-filter: blur(14px) saturate(1.12);
        backdrop-filter: blur(14px) saturate(1.12);
    }
}

@media (hover: hover) and (pointer: fine) {
    body[class*="fido-theme-"] a.wpanel-link:hover > .panel { transform: translateY(-2px); }

    body[class*="fido-theme-"] .btn:not(.btn-link):not(:disabled):not(.disabled):hover {
        transform: translateY(-1px);
        filter: brightness(1.06);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }

    body[class*="fido-theme-"] .datepicker-controls .btn:not(:disabled):not(.disabled):hover {
        transform: none;
        filter: none;
        background: var(--fido-picker-hover);
        box-shadow: none;
    }

    body[class*="fido-theme-"] div#calendar div.header a.prev:not(.disabled):hover,
    body[class*="fido-theme-"] div#calendar div.header a.next:not(.disabled):hover,
    body[class*="fido-theme-"] .btn-cal-primary:hover,
    body[class*="fido-theme-"] .btn-cal-default:hover {
        transform: translateY(-1px);
        filter: brightness(1.06);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 991.98px) {
    body[class*="fido-theme-"] .navbar-fixed-top .navbar-header,
    body[class*="fido-theme-"] .navbar-fixed-top .navbar-collapse {
        background-color: transparent;
    }

    body[class*="fido-theme-"] .navbar-fixed-top .navbar-collapse {
        background: var(--fido-nav-glass);
    }
}

@media (max-width: 767px) {
    body[class*="fido-theme-"] .panel { border-radius: 13px; }
    body[class*="fido-theme-"] .panel > .panel-heading { border-radius: 12px 12px 0 0; }
    body[class*="fido-theme-"] .panel > .panel-footer { border-radius: 0 0 12px 12px; }
    body[class*="fido-theme-"] a.wpanel-link:hover > .panel,
    body[class*="fido-theme-"] a.wpanel-link:focus-visible > .panel { transform: none; }

    /* Wide Contributte grids scroll inside their own glass surface. This keeps
     * Tom Select/date filters from widening the document while retaining every
     * column on compact screens. The action column and pager stay reachable. */
    body[class*="fido-theme-"] .datagrid {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    body[class*="fido-theme-"] .datagrid > div,
    body[class*="fido-theme-"] .datagrid form {
        min-width: 0;
        max-width: 100%;
    }

    body[class*="fido-theme-"] .datagrid .table > thead > tr > .col-action,
    body[class*="fido-theme-"] .datagrid .table > tbody > tr > .col-action {
        position: sticky;
        right: 0;
        z-index: 3;
        background-color: var(--fido-grid-sticky-row);
        background-image: linear-gradient(var(--bs-table-bg), var(--bs-table-bg));
    }

    body[class*="fido-theme-"] .datagrid .table > thead > tr > .col-action {
        z-index: 4;
        background-color: var(--fido-grid-sticky-head);
    }

    body[class*="fido-theme-"] .datagrid .table > thead > tr > .col-action::after,
    body[class*="fido-theme-"] .datagrid .table > tbody > tr > .col-action::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: -1px;
        width: 1px;
        pointer-events: none;
        box-shadow: -4px 0 9px rgba(0, 0, 0, 0.3);
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom > .col-items { display: none; }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom > .col-pagination {
        position: sticky;
        left: 0;
        display: block;
        width: min(340px, calc(100vw - 50px));
        max-width: calc(100vw - 50px);
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom > .col-per-page {
        position: sticky;
        left: 0;
        display: flex;
        width: min(340px, calc(100vw - 50px));
        min-width: 0;
        max-width: calc(100vw - 50px);
        gap: 8px;
        justify-content: center;
        align-items: center;
        background-color: var(--fido-grid-sticky-footer);
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom > .col-per-page:has(select, a.reset-filter) {
        margin-top: 6px;
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom > .col-per-page .form-select {
        flex: 0 0 auto;
        width: 64px;
        max-width: 64px;
        margin-left: 0;
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom > .col-per-page .reset-filter {
        flex: 0 1 auto;
        min-width: 0;
        white-space: nowrap;
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom .pagination-sm {
        --bs-pagination-padding-x: 0.45rem;
        flex-wrap: nowrap;
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom .pagination-sm > .page-item:first-child > .page-link,
    body[class*="fido-theme-"] .datagrid .row-grid-bottom .pagination-sm > .page-item:last-child > .page-link {
        font-size: 0;
    }

    body[class*="fido-theme-"] .datagrid .row-grid-bottom .pagination-sm > .page-item:first-child > .page-link .fas,
    body[class*="fido-theme-"] .datagrid .row-grid-bottom .pagination-sm > .page-item:last-child > .page-link .fas {
        font-size: 0.75rem;
    }

    body[class*="fido-theme-"] .datagrid .ts-hidden-accessible { left: 0 !important; }

    /* Vecery uses an intentional card-style mobile table. Preserve that layout
     * instead of adding a nested horizontal scroller or sticky table cells. */
    body[class*="fido-theme-"] .data-res-cont > .datagrid { overflow-x: visible; }

    body[class*="fido-theme-"] .data-res-cont > .datagrid .table > thead > tr > .col-action,
    body[class*="fido-theme-"] .data-res-cont > .datagrid .table > tbody > tr > .col-action {
        position: relative;
        right: auto;
        z-index: auto;
    }

    body[class*="fido-theme-"] .data-res-cont > .datagrid .table > thead > tr > .col-action::after,
    body[class*="fido-theme-"] .data-res-cont > .datagrid .table > tbody > tr > .col-action::after { content: none; }

    body[class*="fido-theme-"] .data-res-cont > .datagrid .row-grid-bottom > .col-items,
    body[class*="fido-theme-"] .data-res-cont > .datagrid .row-grid-bottom > .col-per-page {
        position: relative;
        left: auto;
        right: auto;
        display: block;
        width: 100%;
        min-width: 0;
        padding-left: 0;
        margin-top: 0;
        background-color: transparent;
    }

    body[class*="fido-theme-"] .data-res-cont > .datagrid .row-grid-bottom > .col-pagination {
        position: relative;
        left: auto;
        width: 100%;
        max-width: 100%;
    }

    body[class*="fido-theme-"] .data-res-cont > .datagrid .row-grid-bottom .pagination-sm > .page-item:first-child > .page-link,
    body[class*="fido-theme-"] .data-res-cont > .datagrid .row-grid-bottom .pagination-sm > .page-item:last-child > .page-link {
        font-size: inherit;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[class*="fido-theme-"] .panel,
    body[class*="fido-theme-"] .btn,
    body[class*="fido-theme-"] div#calendar div.header a.prev,
    body[class*="fido-theme-"] div#calendar div.header a.next,
    body[class*="fido-theme-"] .btn-cal-primary,
    body[class*="fido-theme-"] .btn-cal-default,
    body[class*="fido-theme-"] .navbar a,
    body[class*="fido-theme-"] .fido-photo-frame img,
    body[class*="fido-theme-"] .fido-loading-feedback,
    body[class*="fido-theme-"] .fido-loading-card { transition: none !important; }

    body[class*="fido-theme-"] .fido-loading-spinner,
    body[class*="fido-theme-"] .fido-loading-trigger::after { animation-duration: 1.4s; }

    body[class*="fido-theme-"] a.wpanel-link:hover > .panel,
    body[class*="fido-theme-"] .btn:not(.btn-link):not(:disabled):not(.disabled):hover,
    body[class*="fido-theme-"] .btn:not(.btn-link):not(:disabled):not(.disabled):active,
    body[class*="fido-theme-"] .btn:not(.btn-link):not(:disabled):not(.disabled).active,
    body[class*="fido-theme-"] div#calendar div.header a.prev:not(.disabled):hover,
    body[class*="fido-theme-"] div#calendar div.header a.next:not(.disabled):hover,
    body[class*="fido-theme-"] .btn-cal-primary:hover,
    body[class*="fido-theme-"] .btn-cal-default:hover { transform: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
    body[class*="fido-theme-"] .navbar-fixed-top,
    body[class*="fido-theme-"] .panel,
    body[class*="fido-theme-"] .datagrid,
    body[class*="fido-theme-"] .dropdown-menu,
    body[class*="fido-theme-"] .datepicker-picker,
    body[class*="fido-theme-"] .popover,
    body[class*="fido-theme-"] .modal-content,
    body[class*="fido-theme-"] .fido-loading-card {
        background-color: var(--fido-glass-strong);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (forced-colors: active) {
    body[class*="fido-theme-"] .navbar-fixed-top,
    body[class*="fido-theme-"] .panel,
    body[class*="fido-theme-"] .datagrid,
    body[class*="fido-theme-"] .dropdown-menu,
    body[class*="fido-theme-"] .datepicker-picker,
    body[class*="fido-theme-"] .modal-content,
    body[class*="fido-theme-"] .btn,
    body[class*="fido-theme-"] .fido-loading-card { border: 1px solid CanvasText; }

    body[class*="fido-theme-"] .fido-loading-spinner { forced-color-adjust: auto; }
}

@media print {
    body[class*="fido-theme-"]::before,
    body[class*="fido-theme-"]::after,
    body[class*="fido-theme-"] .fido-loading-feedback { display: none !important; }
    body[class*="fido-theme-"] .navbar-fixed-top,
    body[class*="fido-theme-"] .panel,
    body[class*="fido-theme-"] .datagrid {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
    }
}
