/* EveMan - theme presets inspired by ngx-admin (Akveo, MIT) / Eva Design System colours.
 * Applied with <html data-em-preset="ngx-default|ngx-dark|ngx-cosmic|ngx-corporate">.
 * "tabler" (default) adds nothing here.
 */

/* ------------------------------------------------------------------ light palette (Default / Dark / Cosmic presets in light mode) */
html[data-em-preset^="ngx-"]:not([data-bs-theme="dark"]) {
  --tblr-body-bg: #edf1f7;
  --tblr-body-color: #222b45;
  --tblr-body-color-rgb: 34, 43, 69;
  --tblr-emphasis-color: #192038;
  --tblr-heading-color: #222b45;
  --tblr-bg-surface: #ffffff;
  --tblr-bg-surface-secondary: #f7f9fc;
  --tblr-bg-surface-tertiary: #edf1f7;
  --tblr-bg-forms: #f7f9fc;
  --tblr-secondary-bg: #f7f9fc;
  --tblr-tertiary-bg: #edf1f7;
  --tblr-secondary-color: #8f9bb3;
  --tblr-secondary: #8f9bb3;
  --tblr-secondary-rgb: 143, 155, 179;
  --tblr-muted: #8f9bb3;
  --tblr-border-color: #e4e9f2;
  --tblr-border-color-translucent: rgba(143, 155, 179, .24);
  --em-ngx-shadow: 0 .5rem 1rem 0 rgba(44, 51, 73, .1);
}

/* ------------------------------------------------------------------ Nebular "dark" palette */
html[data-em-preset^="ngx-"][data-bs-theme="dark"],
html[data-em-preset^="ngx-"] [data-bs-theme="dark"] {
  --tblr-body-bg: #151a30;
  --tblr-body-color: #ffffff;
  --tblr-body-color-rgb: 255, 255, 255;
  --tblr-emphasis-color: #ffffff;
  --tblr-heading-color: #ffffff;
  --tblr-bg-surface: #222b45;
  --tblr-bg-surface-secondary: #1a2138;
  --tblr-bg-surface-tertiary: #151a30;
  --tblr-bg-surface-dark: #101426;
  --tblr-bg-forms: #1a2138;
  --tblr-secondary-bg: #1a2138;
  --tblr-tertiary-bg: #151a30;
  --tblr-secondary-color: #8f9bb3;
  --tblr-secondary: #8f9bb3;
  --tblr-secondary-rgb: 143, 155, 179;
  --tblr-muted: #8f9bb3;
  --tblr-border-color: #101426;
  --tblr-border-color-translucent: rgba(143, 155, 179, .16);
  --em-ngx-shadow: 0 .5rem 1rem 0 rgba(16, 20, 38, .45);
}

/* ------------------------------------------------------------------ Nebular "cosmic" palette */
html[data-em-preset="ngx-cosmic"][data-bs-theme="dark"],
html[data-em-preset="ngx-cosmic"] [data-bs-theme="dark"] {
  --tblr-body-bg: #1b1b38;
  --tblr-bg-surface: #323259;
  --tblr-bg-surface-secondary: #252547;
  --tblr-bg-surface-tertiary: #1b1b38;
  --tblr-bg-surface-dark: #13132b;
  --tblr-bg-forms: #252547;
  --tblr-secondary-bg: #252547;
  --tblr-tertiary-bg: #1b1b38;
  --tblr-secondary-color: #b4b4db;
  --tblr-secondary: #b4b4db;
  --tblr-secondary-rgb: 180, 180, 219;
  --tblr-muted: #b4b4db;
  --tblr-border-color: #1b1b38;
  --tblr-border-color-translucent: rgba(180, 180, 219, .16);
  --em-ngx-shadow: 0 .5rem 1rem 0 #1a1f33;
}

/* ------------------------------------------------------------------ Nebular "corporate" palette (light) */
html[data-em-preset="ngx-corporate"]:not([data-bs-theme="dark"]) {
  --tblr-body-bg: #f7f9fc;
  --tblr-bg-surface-secondary: #f7f9fc;
  --tblr-border-color: #e4e9f2;
  --em-ngx-shadow: none;
}

/* ------------------------------------------------------------------ shared ngx-admin look */
html[data-em-preset^="ngx-"] body.em-body { background: var(--tblr-body-bg); color: var(--tblr-body-color); }
html[data-em-preset^="ngx-"] .card { border: 0; box-shadow: var(--em-ngx-shadow); background: var(--tblr-bg-surface); }
html[data-em-preset="ngx-corporate"] .card { border: 1px solid var(--tblr-border-color); }
html[data-em-preset^="ngx-"] .card-header { border-bottom-color: var(--tblr-border-color); }
html[data-em-preset^="ngx-"] .card-title { font-weight: 600; }
html[data-em-preset^="ngx-"] .page-title { font-weight: 700; }
html[data-em-preset^="ngx-"] .subheader, html[data-em-preset^="ngx-"] .page-pretitle { color: var(--tblr-secondary-color); letter-spacing: .06em; }

/* header: flat surface with soft shadow, like the ngx-admin header */
html[data-em-preset^="ngx-"] .em-topbar { border-bottom: 0; box-shadow: var(--em-ngx-shadow); background: var(--tblr-bg-surface); }
html[data-em-preset="ngx-corporate"] .em-topbar { border-bottom: 1px solid var(--tblr-border-color); box-shadow: none; }

/* sidebar: surface colour, active item = primary text + bar on the left */
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) { background: var(--tblr-bg-surface); border-right: 0; box-shadow: var(--em-ngx-shadow); }
html[data-em-preset="ngx-corporate"] .em-sidebar:not([data-bs-theme="dark"]) { border-right: 1px solid var(--tblr-border-color); box-shadow: none; }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-link,
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink { color: var(--tblr-body-color); font-weight: 600; position: relative; }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink { font-weight: 400; }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-ico { color: var(--tblr-secondary-color); }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-link:hover,
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink:hover { background: transparent; color: var(--tblr-primary); }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-link:hover .em-ico { color: var(--tblr-primary); }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active,
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink.active { background: transparent; color: var(--tblr-primary); }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active .em-ico,
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active-parent .em-ico { color: var(--tblr-primary); }
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active::before,
html[data-em-preset^="ngx-"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink.active::before {
  content: ''; position: absolute; left: -.6rem; top: 15%; bottom: 15%; width: 4px; border-radius: 0 4px 4px 0; background: var(--tblr-primary);
}

/* inputs: filled style, like Nebular */
html[data-em-preset^="ngx-"] .form-control, html[data-em-preset^="ngx-"] .form-select {
  background-color: var(--tblr-bg-forms); border-color: var(--tblr-border-color); color: var(--tblr-body-color);
}
html[data-em-preset^="ngx-"] .form-control:focus, html[data-em-preset^="ngx-"] .form-select:focus { background-color: var(--tblr-bg-surface); }
html[data-em-preset^="ngx-"] .btn { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: .8rem; }
html[data-em-preset^="ngx-"] .btn-sm { font-size: .72rem; }
html[data-em-preset^="ngx-"] .nav-tabs .nav-link { font-weight: 600; }
html[data-em-preset^="ngx-"] .table thead th { color: var(--tblr-secondary-color); }
html[data-em-preset^="ngx-"] .dropdown-menu, html[data-em-preset^="ngx-"] .modal-content { background: var(--tblr-bg-surface); border-color: var(--tblr-border-color); }

/* calendar follows the preset */
html[data-em-preset^="ngx-"]:not([data-bs-theme="dark"]) .em-calendar {
  --em-cal-bg: #ffffff; --em-cal-head-bg: #f7f9fc; --em-cal-head-fg: #222b45; --em-cal-text: #222b45;
  --em-cal-muted: #8f9bb3; --em-cal-border: #edf1f7; --em-cal-other: #f7f9fc; --em-cal-hover: #edf1f7;
}
html[data-em-preset^="ngx-"][data-bs-theme="dark"] .em-calendar {
  --em-cal-bg: #222b45; --em-cal-head-bg: #1a2138; --em-cal-head-fg: #ffffff; --em-cal-text: #ffffff;
  --em-cal-muted: #8f9bb3; --em-cal-border: #2e3a59; --em-cal-other: #1d2540; --em-cal-hover: #2b3657;
}
html[data-em-preset="ngx-cosmic"][data-bs-theme="dark"] .em-calendar {
  --em-cal-bg: #323259; --em-cal-head-bg: #252547; --em-cal-head-fg: #ffffff; --em-cal-text: #ffffff;
  --em-cal-muted: #b4b4db; --em-cal-border: #3e3e6e; --em-cal-other: #2b2b50; --em-cal-hover: #3b3b68;
}

/* cosmic: glowing primary buttons */
html[data-em-preset="ngx-cosmic"][data-bs-theme="dark"] .btn-primary { box-shadow: 0 0 .75rem 0 rgba(161, 110, 255, .45); }

/* preset picker in settings */
.em-preset { cursor: pointer; border: 2px solid transparent !important; transition: border-color .15s, transform .15s; }
.em-preset:hover { transform: translateY(-2px); }
.em-preset.active { border-color: var(--tblr-primary) !important; }
.em-preset-preview { height: 84px; border-radius: 6px; display: flex; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.em-preset-preview .pv-side { width: 26%; }
.em-preset-preview .pv-main { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.em-preset-preview .pv-bar { height: 10px; border-radius: 3px; }
.em-preset-preview .pv-card { flex: 1; border-radius: 4px; }

/* ==================================================================
 * Shadcn presets – the look of shadcn-admin by Sat Naing (MIT, github.com/satnaing/shadcn-admin),
 * shadcn/ui "slate" palette. Applied with <html data-em-preset="shadcn|shadcn-dark">.
 * ================================================================== */
html[data-em-preset^="shadcn"]:not([data-bs-theme="dark"]) {
  --tblr-body-bg: #ffffff;
  --tblr-body-color: #020618;
  --tblr-body-color-rgb: 2, 6, 24;
  --tblr-emphasis-color: #020618;
  --tblr-heading-color: #020618;
  --tblr-bg-surface: #ffffff;
  --tblr-bg-surface-secondary: #f8fafc;
  --tblr-bg-surface-tertiary: #f1f5f9;
  --tblr-bg-forms: transparent;
  --tblr-secondary-bg: #f1f5f9;
  --tblr-tertiary-bg: #f8fafc;
  --tblr-secondary-color: #62748e;
  --tblr-secondary: #62748e;
  --tblr-secondary-rgb: 98, 116, 142;
  --tblr-muted: #62748e;
  --tblr-border-color: #e2e8f0;
  --tblr-border-color-translucent: rgba(15, 23, 43, .08);
  --tblr-danger: #e7000b;
  --tblr-danger-rgb: 231, 0, 11;
  --em-sh-outer: #f8fafc;
  --em-sh-accent: #f1f5f9;
  --em-sh-popover: #ffffff;
  --em-sh-input: #e2e8f0;
  --em-sh-ring: 144, 161, 185;
  --em-sh-primary-fg: #f8fafc;
  --em-sh-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
  --em-sh-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, .05);
}
html[data-em-preset^="shadcn"][data-bs-theme="dark"],
html[data-em-preset^="shadcn"] [data-bs-theme="dark"] {
  --tblr-body-bg: #020618;
  --tblr-body-color: #f8fafc;
  --tblr-body-color-rgb: 248, 250, 252;
  --tblr-emphasis-color: #f8fafc;
  --tblr-heading-color: #f8fafc;
  --tblr-bg-surface: #020919;
  --tblr-bg-surface-secondary: #0f172b;
  --tblr-bg-surface-tertiary: #1d293d;
  --tblr-bg-surface-dark: #020618;
  --tblr-bg-forms: rgba(255, 255, 255, .045);
  --tblr-secondary-bg: #1d293d;
  --tblr-tertiary-bg: #0f172b;
  --tblr-secondary-color: #90a1b9;
  --tblr-secondary: #90a1b9;
  --tblr-secondary-rgb: 144, 161, 185;
  --tblr-muted: #90a1b9;
  --tblr-border-color: rgba(255, 255, 255, .1);
  --tblr-border-color-translucent: rgba(255, 255, 255, .1);
  --tblr-danger: #ff6467;
  --tblr-danger-rgb: 255, 100, 103;
  --em-sh-outer: #020618;
  --em-sh-accent: #1d293d;
  --em-sh-popover: #0f172b;
  --em-sh-input: rgba(255, 255, 255, .15);
  --em-sh-ring: 106, 114, 130;
  --em-sh-primary-fg: #0f172b;
  --em-sh-shadow: 0 1px 3px 0 rgba(0, 0, 0, .4);
  --em-sh-shadow-xs: none;
}
/* monochrome primary (the original shadcn look): near-black in light mode, near-white in dark mode */
html[data-em-mono]:not([data-bs-theme="dark"]) { --em-sh-primary-fg: #f8fafc; }
html[data-em-mono][data-bs-theme="dark"], html[data-em-mono] [data-bs-theme="dark"] {
  --tblr-primary: #e2e8f0; --tblr-primary-rgb: 226, 232, 240; --tblr-primary-text-emphasis: #e2e8f0;
  --tblr-link-color: #e2e8f0; --tblr-link-color-rgb: 226, 232, 240; --tblr-link-hover-color: #ffffff;
}
html[data-em-preset^="shadcn"]:not([data-em-mono]) { --em-sh-primary-fg: #ffffff; }

/* page: inset panel next to the sidebar */
html[data-em-preset^="shadcn"] body.em-body { background: var(--em-sh-outer); color: var(--tblr-body-color); font-feature-settings: "cv11", "ss01"; }
html[data-em-preset^="shadcn"] .em-inset { background: var(--tblr-body-bg); flex: 1; display: flex; flex-direction: column; min-height: calc(100vh - var(--em-top)); }
@media (min-width: 992px) {
  html[data-em-preset^="shadcn"] .em-main { padding-right: .5rem; padding-bottom: .5rem; }
  html[data-em-preset^="shadcn"] .em-inset { border-radius: .875rem; box-shadow: var(--em-sh-shadow); min-height: calc(100vh - var(--em-top) - .5rem); }
  html[data-em-preset^="shadcn"][data-bs-theme="dark"] .em-inset { border: 1px solid var(--tblr-border-color); }
}
html[data-em-preset^="shadcn"] .em-topbar { background: var(--em-sh-outer); border-bottom: 0; }
html[data-em-preset^="shadcn"] .em-brand-name { font-weight: 600; letter-spacing: -.01em; }

/* sidebar: same colour as the frame, soft grey pill for the active item */
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]),
html[data-em-preset^="shadcn"][data-bs-theme="dark"] .em-sidebar { background: var(--em-sh-outer); border-right: 0; }
html[data-em-preset^="shadcn"] .em-nav { gap: 1px; }
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-link,
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink { color: var(--tblr-body-color); font-weight: 500; font-size: .875rem; border-radius: .5rem; }
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink { color: var(--tblr-secondary-color); }
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-link:hover,
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink:hover { background: var(--em-sh-accent); color: var(--tblr-body-color); }
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active,
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink.active { background: var(--em-sh-accent); color: var(--tblr-body-color); font-weight: 600; }
html[data-em-preset^="shadcn"] .em-sidebar:not([data-bs-theme="dark"]) .em-sub { border-left: 1px solid var(--tblr-border-color); margin-left: 1.35rem; padding-left: .35rem; }
html[data-em-preset^="shadcn"] .em-side-foot { color: var(--tblr-secondary-color); }

/* typography */
html[data-em-preset^="shadcn"] .page-title { font-weight: 700; letter-spacing: -.025em; }
html[data-em-preset^="shadcn"] .page-pretitle { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--tblr-secondary-color); }
html[data-em-preset^="shadcn"] .card-title { font-weight: 600; letter-spacing: -.01em; }
html[data-em-preset^="shadcn"] h1, html[data-em-preset^="shadcn"] h2, html[data-em-preset^="shadcn"] h3 { letter-spacing: -.015em; }

/* cards */
html[data-em-preset^="shadcn"] .card { background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); border-radius: .875rem; box-shadow: var(--em-sh-shadow-xs); }
html[data-em-preset^="shadcn"] .card-header { border-bottom-color: var(--tblr-border-color); background: transparent; }
html[data-em-preset^="shadcn"] .card-footer { border-top-color: var(--tblr-border-color); background: transparent; }
html[data-em-preset^="shadcn"] .card-header:first-child { border-radius: .875rem .875rem 0 0; }
html[data-em-preset^="shadcn"] .card-footer:last-child { border-radius: 0 0 .875rem .875rem; }

/* buttons: medium weight, 8px corners, flat with a hairline shadow */
html[data-em-preset^="shadcn"] .btn { font-weight: 500; border-radius: .5rem; box-shadow: var(--em-sh-shadow-xs); }
html[data-em-preset^="shadcn"] .btn:not([class*="btn-"]),
html[data-em-preset^="shadcn"] .btn-outline-secondary { background: var(--tblr-bg-surface); border-color: var(--em-sh-input); color: var(--tblr-body-color); }
html[data-em-preset^="shadcn"] .btn:not([class*="btn-"]):hover,
html[data-em-preset^="shadcn"] .btn-outline-secondary:hover { background: var(--em-sh-accent); color: var(--tblr-body-color); }
html[data-em-preset^="shadcn"] .btn-primary { background: var(--tblr-primary); border-color: transparent; color: var(--em-sh-primary-fg); }
html[data-em-preset^="shadcn"] .btn-primary:hover, html[data-em-preset^="shadcn"] .btn-primary:focus { background: rgba(var(--tblr-primary-rgb), .9); color: var(--em-sh-primary-fg); border-color: transparent; }
html[data-em-preset^="shadcn"] .btn-outline-primary { border-color: var(--em-sh-input); color: var(--tblr-body-color); background: var(--tblr-bg-surface); }
html[data-em-preset^="shadcn"] .btn-outline-primary:hover { background: var(--em-sh-accent); color: var(--tblr-body-color); border-color: var(--em-sh-input); }
html[data-em-preset^="shadcn"] [class*="btn-ghost-"], html[data-em-preset^="shadcn"] .btn-link, html[data-em-preset^="shadcn"] .btn-icon { box-shadow: none; }
html[data-em-preset^="shadcn"] [class*="btn-ghost-"]:hover { background: var(--em-sh-accent); }

/* form fields: transparent with a thin border, soft focus ring */
html[data-em-preset^="shadcn"] .form-control, html[data-em-preset^="shadcn"] .form-select {
  background-color: var(--tblr-bg-forms); border-color: var(--em-sh-input); border-radius: .5rem; box-shadow: var(--em-sh-shadow-xs); color: var(--tblr-body-color);
}
html[data-em-preset^="shadcn"] .form-control:focus, html[data-em-preset^="shadcn"] .form-select:focus,
html[data-em-preset^="shadcn"] .form-check-input:focus {
  border-color: rgb(var(--em-sh-ring)); box-shadow: 0 0 0 3px rgba(var(--em-sh-ring), .5);
}
html[data-em-preset^="shadcn"] .form-check-input:checked { background-color: var(--tblr-primary); border-color: var(--tblr-primary); }
html[data-em-preset^="shadcn"][data-em-mono][data-bs-theme="dark"] .form-check-input:checked { --tblr-form-check-bg-image: none; background-color: #e2e8f0; }
html[data-em-preset^="shadcn"] .form-label { font-weight: 500; }
html[data-em-preset^="shadcn"] .input-group-text { background: var(--em-sh-accent); border-color: var(--em-sh-input); }

/* tables, badges, menus, dialogs */
html[data-em-preset^="shadcn"] .table thead th { background: transparent; color: var(--tblr-secondary-color); text-transform: none; letter-spacing: 0; font-size: .8125rem; font-weight: 500; }
html[data-em-preset^="shadcn"] .table > :not(caption) > * > * { border-bottom-color: var(--tblr-border-color); }
html[data-em-preset^="shadcn"] .table-hover > tbody > tr:hover > * { --tblr-table-bg-state: var(--em-sh-accent); }
html[data-em-preset^="shadcn"] .badge { border-radius: .375rem; font-weight: 500; }
html[data-em-preset^="shadcn"] .dropdown-menu, html[data-em-preset^="shadcn"] .em-bell-panel { background: var(--em-sh-popover); border: 1px solid var(--tblr-border-color); border-radius: .5rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }
html[data-em-preset^="shadcn"] .dropdown-item { border-radius: .375rem; }
html[data-em-preset^="shadcn"] .dropdown-item:hover, html[data-em-preset^="shadcn"] .dropdown-item:focus { background: var(--em-sh-accent); }
html[data-em-preset^="shadcn"] .modal-content { background: var(--em-sh-popover); border: 1px solid var(--tblr-border-color); border-radius: .875rem; }
html[data-em-preset^="shadcn"] .alert { border-radius: .75rem; box-shadow: none; }
html[data-em-preset^="shadcn"] .avatar { border-radius: 999px; }
html[data-em-preset^="shadcn"] .nav-tabs .nav-link.active { color: var(--tblr-body-color); border-bottom-color: var(--tblr-body-color); }
html[data-em-preset^="shadcn"] .list-group-item.active { background: var(--em-sh-accent); color: var(--tblr-body-color); border-color: var(--tblr-border-color); }
html[data-em-preset^="shadcn"] .pagination .page-item.active .page-link { background: var(--tblr-primary); color: var(--em-sh-primary-fg); }
html[data-em-preset^="shadcn"] * { scrollbar-width: thin; scrollbar-color: var(--tblr-border-color) transparent; }

/* calendar */
html[data-em-preset^="shadcn"]:not([data-bs-theme="dark"]) .em-calendar {
  --em-cal-bg: #ffffff; --em-cal-head-bg: #ffffff; --em-cal-head-fg: #62748e; --em-cal-text: #020618;
  --em-cal-muted: #62748e; --em-cal-border: #e2e8f0; --em-cal-other: #f8fafc; --em-cal-hover: #f1f5f9;
}
html[data-em-preset^="shadcn"][data-bs-theme="dark"] .em-calendar {
  --em-cal-bg: #020919; --em-cal-head-bg: #020919; --em-cal-head-fg: #90a1b9; --em-cal-text: #f8fafc;
  --em-cal-muted: #90a1b9; --em-cal-border: #1d293d; --em-cal-other: #050d22; --em-cal-hover: #1d293d;
}
html[data-em-preset^="shadcn"] .em-topbar { box-shadow: none; }
/* tabs: grey track with a white "pill" for the active tab (shadcn Tabs) */
html[data-em-preset^="shadcn"] .nav-tabs { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 3px; border: 0; border-radius: .625rem; background: var(--em-sh-accent); margin-bottom: .75rem; }
html[data-em-preset^="shadcn"] .card-header .nav-tabs { margin-bottom: 0; }
html[data-em-preset^="shadcn"] .nav-tabs .nav-link { border: 0; border-radius: .5rem; padding: .3rem .75rem; color: var(--tblr-secondary-color); font-weight: 500; background: transparent; margin: 0; }
html[data-em-preset^="shadcn"] .nav-tabs .nav-link:hover { color: var(--tblr-body-color); border: 0; }
html[data-em-preset^="shadcn"] .nav-tabs .nav-link.active { background: var(--tblr-bg-surface); color: var(--tblr-body-color); box-shadow: var(--em-sh-shadow-xs), 0 0 0 1px var(--tblr-border-color); border: 0; }
html[data-em-preset^="shadcn"][data-bs-theme="dark"] .nav-tabs .nav-link.active { background: #020618; }

/* ==================================================================
 * Vuestic presets – the look of Vuestic Admin by Epicmax (MIT, github.com/epicmaxco/vuestic-admin),
 * Vuestic UI colour palette. Applied with <html data-em-preset="vuestic|vuestic-dark">.
 * ================================================================== */
html[data-em-preset^="vuestic"]:not([data-bs-theme="dark"]) {
  --tblr-body-bg: #f4f6f8;
  --tblr-body-color: #262824;
  --tblr-body-color-rgb: 38, 40, 36;
  --tblr-emphasis-color: #154ec1;
  --tblr-heading-color: #262824;
  --tblr-bg-surface: #ffffff;
  --tblr-bg-surface-secondary: #f7f9fb;
  --tblr-bg-surface-tertiary: #ecf0f1;
  --tblr-bg-forms: #ffffff;
  --tblr-secondary-bg: #ecf0f1;
  --tblr-tertiary-bg: #f7f9fb;
  --tblr-secondary-color: #767c88;
  --tblr-secondary: #767c88;
  --tblr-secondary-rgb: 118, 124, 136;
  --tblr-muted: #767c88;
  --tblr-border-color: #dee5f2;
  --tblr-border-color-translucent: rgba(118, 124, 136, .2);
  --tblr-success: #3d9209; --tblr-success-rgb: 61, 146, 9;
  --tblr-danger: #e42222; --tblr-danger-rgb: 228, 34, 34;
  --tblr-info: #158de3; --tblr-info-rgb: 21, 141, 227;
  --em-vu-shadow: 0 2px 8px rgba(38, 40, 36, .08);
  --em-vu-side: #ffffff;
}
html[data-em-preset^="vuestic"][data-bs-theme="dark"],
html[data-em-preset^="vuestic"] [data-bs-theme="dark"] {
  --tblr-body-bg: #050a10;
  --tblr-body-color: #f1f1f1;
  --tblr-body-color-rgb: 241, 241, 241;
  --tblr-emphasis-color: #ffffff;
  --tblr-heading-color: #f1f1f1;
  --tblr-bg-surface: #1f262f;
  --tblr-bg-surface-secondary: #171d25;
  --tblr-bg-surface-tertiary: #0d1117;
  --tblr-bg-surface-dark: #050a10;
  --tblr-bg-forms: #121820;
  --tblr-secondary-bg: #171d25;
  --tblr-tertiary-bg: #0d1117;
  --tblr-secondary-color: #9aa1ad;
  --tblr-secondary: #9aa1ad;
  --tblr-secondary-rgb: 154, 161, 173;
  --tblr-muted: #9aa1ad;
  --tblr-border-color: #3d4c58;
  --tblr-border-color-translucent: rgba(154, 161, 173, .2);
  --tblr-success: #4cb20e; --tblr-success-rgb: 76, 178, 14;
  --tblr-danger: #f34a4a; --tblr-danger-rgb: 243, 74, 74;
  --em-vu-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  --em-vu-side: #1f262f;
}
html[data-em-preset^="vuestic"] body.em-body { background: var(--tblr-body-bg); color: var(--tblr-body-color); }
html[data-em-preset^="vuestic"] .card { border: 0; box-shadow: var(--em-vu-shadow); background: var(--tblr-bg-surface); }
html[data-em-preset^="vuestic"] .card-title { font-weight: 700; }
html[data-em-preset^="vuestic"] .page-title { font-weight: 700; }
html[data-em-preset^="vuestic"] .page-pretitle { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--tblr-primary); }
html[data-em-preset^="vuestic"] .em-topbar { background: var(--em-vu-side); border-bottom: 0; box-shadow: var(--em-vu-shadow); }
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]),
html[data-em-preset^="vuestic"][data-bs-theme="dark"] .em-sidebar { background: var(--em-vu-side); border-right: 0; box-shadow: var(--em-vu-shadow); }
html[data-em-preset^="vuestic"] .em-sidebar .em-link, html[data-em-preset^="vuestic"] .em-sidebar .em-sublink { position: relative; border-radius: .25rem; }
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-link { color: var(--tblr-body-color); font-weight: 600; }
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-ico { color: var(--tblr-secondary-color); }
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-link:hover,
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink:hover { background: rgba(var(--tblr-primary-rgb), .06); color: var(--tblr-primary); }
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active,
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-sublink.active { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); }
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active .em-ico,
html[data-em-preset^="vuestic"] .em-sidebar:not([data-bs-theme="dark"]) .em-link.active-parent .em-ico { color: var(--tblr-primary); }
html[data-em-preset^="vuestic"] .em-sidebar .em-link.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: .25rem 0 0 .25rem; background: var(--tblr-primary);
}
html[data-em-preset^="vuestic"] .btn { font-weight: 600; }
html[data-em-preset^="vuestic"] .btn-primary { box-shadow: 0 2px 6px rgba(var(--tblr-primary-rgb), .3); }
html[data-em-preset^="vuestic"] .form-control, html[data-em-preset^="vuestic"] .form-select { background-color: var(--tblr-bg-forms); border-width: 1px; }
html[data-em-preset^="vuestic"] .form-label { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tblr-primary); }
html[data-em-preset^="vuestic"] .table thead th { color: var(--tblr-secondary-color); font-weight: 700; }
html[data-em-preset^="vuestic"] .dropdown-menu, html[data-em-preset^="vuestic"] .modal-content { background: var(--tblr-bg-surface); border-color: var(--tblr-border-color); }
html[data-em-preset^="vuestic"] .nav-tabs .nav-link { font-weight: 600; }
html[data-em-preset^="vuestic"] .nav-tabs .nav-link.active { color: var(--tblr-primary); border-bottom-color: var(--tblr-primary); }
html[data-em-preset^="vuestic"]:not([data-bs-theme="dark"]) .em-calendar {
  --em-cal-bg: #ffffff; --em-cal-head-bg: #f7f9fb; --em-cal-head-fg: #262824; --em-cal-text: #262824;
  --em-cal-muted: #767c88; --em-cal-border: #dee5f2; --em-cal-other: #f7f9fb; --em-cal-hover: #ecf0f1;
}
html[data-em-preset^="vuestic"][data-bs-theme="dark"] .em-calendar {
  --em-cal-bg: #1f262f; --em-cal-head-bg: #171d25; --em-cal-head-fg: #f1f1f1; --em-cal-text: #f1f1f1;
  --em-cal-muted: #9aa1ad; --em-cal-border: #3d4c58; --em-cal-other: #171d25; --em-cal-hover: #2a333e;
}

/* ==================================================================
 * Clear controls (Settings > Appearance > Buttons and borders = Clear, the default).
 * Works on every preset: stronger borders, tinted card headers, coloured outline buttons
 * and a close button you can actually see. Kept last so it wins over the presets above.
 * ================================================================== */
html[data-em-contrast]:not([data-bs-theme="dark"]) {
  --em-c-border: #cbd5e1; --em-c-input: #b6c2d2; --em-c-check: #8a99ad;
  --em-c-head: rgba(var(--tblr-primary-rgb), .035); --em-c-canvas: #eef2f6;
}
html[data-em-contrast][data-bs-theme="dark"], html[data-em-contrast] [data-bs-theme="dark"] {
  --em-c-border: rgba(255, 255, 255, .16); --em-c-input: rgba(255, 255, 255, .24); --em-c-check: rgba(255, 255, 255, .45);
  --em-c-head: rgba(255, 255, 255, .035); --em-c-canvas: rgba(255, 255, 255, .025);
}
/* close (×) buttons: round, bordered, dark × that turns red on hover */
html[data-em-contrast] { --em-c-x: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23334155'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e"); --em-c-x-hover: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23dc2626'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e"); }
html[data-em-contrast][data-bs-theme="dark"], html[data-em-contrast] [data-bs-theme="dark"] { --em-c-x: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e2e8f0'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e"); --em-c-x-hover: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ff8a8a'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e"); }
html[data-em-contrast] .btn-close {
  -webkit-mask: none; mask: none; filter: none; opacity: 1; width: 1rem; height: 1rem; padding: .5rem; box-sizing: content-box; border-radius: 50%;
  background: rgba(var(--tblr-body-color-rgb), .06) var(--em-c-x) center / .75rem auto no-repeat; border: 1px solid var(--em-c-input);
}
html[data-em-contrast] .btn-close:hover { background-color: rgba(var(--tblr-danger-rgb), .12); background-image: var(--em-c-x-hover); border-color: rgba(var(--tblr-danger-rgb), .6); opacity: 1; }
html[data-em-contrast] .btn-close:focus { box-shadow: 0 0 0 3px rgba(var(--tblr-primary-rgb), .3); opacity: 1; }
/* cards: visible edge, tinted header, coloured header icon */
html[data-em-contrast] .card { border: 1px solid var(--em-c-border); }
html[data-em-contrast] .card-header { background: var(--em-c-head); border-bottom-color: var(--em-c-border); }
html[data-em-contrast] .card-footer { background: var(--em-c-head); border-top-color: var(--em-c-border); }
html[data-em-contrast] .card-title > .icon, html[data-em-contrast] .card-title > .ti { color: var(--tblr-primary); }
html[data-em-contrast] .card > .list-group-flush > .list-group-item, html[data-em-contrast] .list-group-item { border-color: var(--em-c-border); }
/* dialogs: tinted header and footer; big dialogs get a light canvas so the cards stand out */
html[data-em-contrast] .modal-content { border: 1px solid var(--em-c-border); }
html[data-em-contrast] .modal-header { background: var(--em-c-head); border-bottom: 1px solid var(--em-c-border); }
html[data-em-contrast] .modal-footer { background: var(--em-c-head); border-top: 1px solid var(--em-c-border); }
html[data-em-contrast] .modal-fullscreen .modal-body { background: var(--em-c-canvas); }
/* fields */
html[data-em-contrast] .form-control, html[data-em-contrast] .form-select, html[data-em-contrast] .input-group-text { border-color: var(--em-c-input); }
html[data-em-contrast] .form-control:focus, html[data-em-contrast] .form-select:focus {
  border-color: var(--tblr-primary); box-shadow: 0 0 0 3px rgba(var(--tblr-primary-rgb), .18);
}
html[data-em-contrast] .form-check-input:not(:checked) { border-color: var(--em-c-check); }
html[data-em-contrast] .form-label { font-weight: 600; }
html[data-em-contrast] .form-selectgroup-label { border-color: var(--em-c-input); }
html[data-em-contrast] .form-selectgroup-input:checked + .form-selectgroup-label {
  border-color: var(--tblr-primary); background: rgba(var(--tblr-primary-rgb), .08); color: var(--tblr-primary); box-shadow: 0 0 0 1px var(--tblr-primary);
}
/* buttons: neutral ones get a real border, outline buttons keep their colour */
html[data-em-contrast] .btn:not([class*="btn-"]), html[data-em-contrast] .btn-outline-secondary { border-color: var(--em-c-input); }
html[data-em-contrast] .btn:not([class*="btn-"]):hover, html[data-em-contrast] .btn-outline-secondary:hover { border-color: var(--em-c-check); }
html[data-em-contrast] .btn-outline-primary { color: var(--tblr-primary); border-color: rgba(var(--tblr-primary-rgb), .55); background: rgba(var(--tblr-primary-rgb), .04); }
html[data-em-contrast] .btn-outline-primary:hover { color: var(--tblr-primary); border-color: var(--tblr-primary); background: rgba(var(--tblr-primary-rgb), .12); }
html[data-em-contrast] .btn-ghost-danger { color: var(--tblr-danger); }
html[data-em-contrast] .btn-ghost-primary { color: var(--tblr-primary); }
/* tables */
html[data-em-contrast] .table thead th { background: var(--em-c-head); }
html[data-em-contrast] .table > :not(caption) > * > * { border-bottom-color: var(--em-c-border); }
html[data-em-contrast] .dropdown-menu { border-color: var(--em-c-border); }
html[data-em-contrast] .alert { border-width: 1px; }
html[data-em-contrast] .modal-header .btn-close { margin: 0 0 0 auto; }
html[data-em-contrast] .alert-dismissible .btn-close { top: .6rem; right: .6rem; }
