/*
 * The admin panel's look: a #2044AC sidebar, one blue accent family through the whole panel, a
 * display face for headings and controls, and calmer cards, tables, buttons and fields.
 *
 * Presentation only — loaded last among the stylesheets (views/partials/head.ejs), after style.css
 * (the WowDash theme) and sidebar.css, so it restyles what they draw without touching markup,
 * routes or behaviour. Body text still follows Settings › Theme (its <style> block sets the
 * family and size); this only adds the display face over headings, the menu, buttons and table
 * headers. Dark mode keeps the theme's own surfaces: only the accent and the sidebar change there.
 */

/* --- Palette ------------------------------------------------------------- */

:root {
  /* One blue family around the sidebar's #2044AC, in place of the theme's #487FFF. */
  --primary-50: #eef2fb;
  --primary-100: #d6e0f6;
  --primary-200: #b0c2ec;
  --primary-300: #809ddf;
  --primary-400: #5076cd;
  --primary-500: #3058bb;
  --primary-600: #2044ac;
  --primary-700: #1b3a93;
  --primary-800: #16307a;
  --primary-900: #102460;
  --primary-light: rgba(32, 68, 172, 0.12);
  --primary-light-white: rgba(32, 68, 172, 0.2);

  /* The sidebar colour before Settings → Theme sets it (partials/head.ejs prints the chosen one). */
  --hk-sidebar: #2044ac;

  --hk-display: "Plus Jakarta Sans", var(--admin-font-family, "Inter"), system-ui, -apple-system, "Segoe UI", sans-serif;
  --hk-radius: 12px;
  --hk-shadow: 0 1px 2px rgba(16, 36, 96, 0.04), 0 6px 20px rgba(16, 36, 96, 0.06);
  --hk-line: #e6eaf3;
  --hk-page: #f4f6fb;
}

/* Bootstrap's own primary (btn-primary, text-primary, links, focus) — its default #0d6efd stood
   out beside the theme's buttons, so it joins the same family. */
:root,
[data-bs-theme="light"] {
  --bs-primary: #2044ac;
  --bs-primary-rgb: 32, 68, 172;
  --bs-link-color: #2044ac;
  --bs-link-color-rgb: 32, 68, 172;
  --bs-link-hover-color: #1b3a93;
  --bs-link-hover-color-rgb: 27, 58, 147;
  --bs-primary-text-emphasis: #102460;
  --bs-primary-bg-subtle: #eef2fb;
  --bs-primary-border-subtle: #b0c2ec;
  --bs-focus-ring-color: rgba(32, 68, 172, 0.25);
}

.btn-primary {
  --bs-btn-bg: #2044ac;
  --bs-btn-border-color: #2044ac;
  --bs-btn-hover-bg: #1b3a93;
  --bs-btn-hover-border-color: #1b3a93;
  --bs-btn-active-bg: #16307a;
  --bs-btn-active-border-color: #16307a;
  --bs-btn-disabled-bg: #2044ac;
  --bs-btn-disabled-border-color: #2044ac;
  --bs-btn-focus-shadow-rgb: 32, 68, 172;
}

.btn-outline-primary {
  --bs-btn-color: #2044ac;
  --bs-btn-border-color: #2044ac;
  --bs-btn-hover-bg: #2044ac;
  --bs-btn-hover-border-color: #2044ac;
  --bs-btn-active-bg: #1b3a93;
  --bs-btn-active-border-color: #1b3a93;
  --bs-btn-focus-shadow-rgb: 32, 68, 172;
}

[data-theme="dark"] {
  --primary-600: #4a6fd6;
  --primary-light: rgba(74, 111, 214, 0.16);
  --hk-line: var(--neutral-200);
  --hk-page: var(--bg-color);
  --hk-shadow: none;
}

/* --- Type ---------------------------------------------------------------- */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.sidebar,
.navbar-header,
.btn,
.card-header,
.nav-link,
.badge,
.bordered-table thead th,
.table thead th {
  font-family: var(--hk-display);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  letter-spacing: -0.01em;
  color: var(--text-primary-light);
}

.text-secondary-light {
  line-height: 1.55;
}

/* --- Page ---------------------------------------------------------------- */

html:not([data-theme="dark"]) body,
html:not([data-theme="dark"]) .dashboard-main {
  background-color: var(--hk-page);
}

@media (min-width: 1400px) {
  .dashboard-main-body {
    padding: 1.75rem 2rem;
  }
}

/* The page fills the window, so the footer sits at the bottom of a short screen (Admin Users,
   a short list) instead of floating under the content with bare page below it. The footer
   already asks for this with margin-block-start: auto; the column is what lets it. */
.dashboard-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dashboard-main-body {
  flex: 1 0 auto;
}

/* The footer on the page's own ground, set off by a hairline rather than a white band. */
.d-footer {
  background-color: transparent;
  border-top: 1px solid var(--hk-line);
  color: var(--text-secondary-light);
  font-size: 0.8125rem;
}

.d-footer p {
  color: inherit;
}

/* The page title and the breadcrumb beside it. */
.dashboard-main-body > .d-flex:first-child h6,
.dashboard-main-body > .d-flex:first-child h1,
.dashboard-main-body > .d-flex:first-child h4 {
  font-weight: 700;
}

.breadcrumb,
.dashboard-main-body > .d-flex:first-child ul {
  font-size: 0.875rem;
}

/* The bar across the top: white, one hairline, no heavy shadow. */
.navbar-header {
  border-bottom: 1px solid var(--hk-line);
  box-shadow: 0 1px 0 rgba(16, 36, 96, 0.02);
}

html:not([data-theme="dark"]) .navbar-header {
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
}

/* --- Sidebar ------------------------------------------------------------- */

/*
 * One colour, chosen by the Super Admin under Settings → Theme (default #2044AC), printed by
 * partials/head.ejs as --hk-sidebar. Every other shade below is mixed from it, so any colour
 * reads as intended without a rule per colour. On a light colour the sidebar carries
 * `sidebar-tone-light` (partials/sidebar.ejs) and the text, lines and logo turn dark.
 */
.sidebar {
  --hk-sidebar-deep: color-mix(in srgb, var(--hk-sidebar) 80%, #000);
  --hk-sidebar-ink: rgba(255, 255, 255, 0.8);
  --hk-sidebar-strong: #fff;
  --hk-sidebar-muted: rgba(255, 255, 255, 0.55);
  --hk-sidebar-sub: rgba(255, 255, 255, 0.74);
  --hk-sidebar-line: rgba(255, 255, 255, 0.14);
  --hk-sidebar-hover: rgba(255, 255, 255, 0.1);
  --hk-sidebar-field: rgba(255, 255, 255, 0.1);
  --hk-sidebar-field-line: rgba(255, 255, 255, 0.16);
  --hk-active-bg: #fff;
  --hk-active-ink: color-mix(in srgb, var(--hk-sidebar) 85%, #000);

  background: linear-gradient(180deg, var(--hk-sidebar) 0%, var(--hk-sidebar-deep) 100%);
  color: var(--hk-sidebar-ink);
  border-inline-end: 0;
  box-shadow: 4px 0 24px rgba(16, 36, 96, 0.12);
}

/* A light colour (pale yellow, mint, sky…): dark text on it, and a dark pill for the current page. */
.sidebar.sidebar-tone-light {
  --hk-sidebar-deep: color-mix(in srgb, var(--hk-sidebar) 88%, #000);
  --hk-sidebar-ink: rgba(17, 24, 39, 0.82);
  --hk-sidebar-strong: #111827;
  --hk-sidebar-muted: rgba(17, 24, 39, 0.55);
  --hk-sidebar-sub: rgba(17, 24, 39, 0.72);
  --hk-sidebar-line: rgba(17, 24, 39, 0.12);
  --hk-sidebar-hover: rgba(17, 24, 39, 0.07);
  --hk-sidebar-field: rgba(255, 255, 255, 0.55);
  --hk-sidebar-field-line: rgba(17, 24, 39, 0.14);
  --hk-active-bg: #111827;
  --hk-active-ink: #fff;
}

/* Dark mode: the same colour, a shade deeper, so it does not glare against dark screens. */
[data-theme="dark"] .sidebar:not(.sidebar-tone-light) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--hk-sidebar) 82%, #000) 0%, color-mix(in srgb, var(--hk-sidebar) 62%, #000) 100%);
}

/* Solid (Settings → Theme → Sidebar style): the colour alone, top to bottom. */
.sidebar.sidebar-solid {
  background: var(--hk-sidebar);
}

[data-theme="dark"] .sidebar.sidebar-solid:not(.sidebar-tone-light) {
  background: color-mix(in srgb, var(--hk-sidebar) 78%, #000);
}

/* The logo: white lettering on a dark colour, the maroon original on a light one. */
.sidebar-logo {
  border-inline-end: 0;
  border-block-end: 1px solid var(--hk-sidebar-line);
}

.sidebar-logo img.light-logo {
  display: none !important;
}

.sidebar-logo img.dark-logo {
  display: inline-block !important;
}

.sidebar.sidebar-tone-light .sidebar-logo img.light-logo {
  display: inline-block !important;
}

.sidebar.sidebar-tone-light .sidebar-logo img.dark-logo {
  display: none !important;
}

.sidebar.active:not(:hover) .sidebar-logo img.dark-logo,
.sidebar.active:not(:hover) .sidebar-logo img.light-logo {
  display: none !important;
}

.sidebar-close-btn {
  color: var(--hk-sidebar-strong);
}

/* Find a screen: a translucent field on the colour. */
.sidebar-search {
  border-inline-end: 0;
}

.sidebar-search input {
  color: var(--hk-sidebar-strong);
  background-color: var(--hk-sidebar-field);
  border-color: var(--hk-sidebar-field-line);
}

.sidebar-search input::placeholder,
.sidebar-search-icon {
  color: var(--hk-sidebar-muted);
}

.sidebar-search input:focus {
  background-color: var(--hk-sidebar-field);
  border-color: var(--hk-sidebar-muted);
  box-shadow: 0 0 0 3px var(--hk-sidebar-hover);
}

.sidebar-search-empty {
  color: var(--hk-sidebar-muted);
}

/* Rows. */
.sidebar-menu li a {
  color: var(--hk-sidebar-ink);
  font-weight: 500;
  letter-spacing: 0.005em;
  border-radius: 10px;
}

.sidebar-menu li a .menu-icon {
  color: inherit;
  opacity: 0.9;
}

.sidebar-menu li a:not(.active-page):hover,
.sidebar-menu li.dropdown.open > a:hover,
.sidebar-menu li.dropdown.dropdown-open > a:hover {
  background-color: var(--hk-sidebar-hover);
  color: var(--hk-sidebar-strong);
}

.sidebar-menu li a:focus-visible {
  outline: 2px solid var(--hk-sidebar-muted);
  outline-offset: -2px;
}

/* The page you are on: the one solid pill in the list. */
.sidebar-menu li > a.active-page,
.sidebar-menu .sidebar-submenu li.active-page a,
.sidebar-menu .sidebar-submenu li a.active-page {
  background-color: var(--hk-active-bg);
  color: var(--hk-active-ink);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(8, 20, 60, 0.18);
}

.sidebar-menu li > a.active-page:hover {
  color: var(--hk-active-ink);
}

/* An open section is just open; the one holding the current page is in the strong colour, bold. */
.sidebar-menu li.dropdown.open > a,
.sidebar-menu li.dropdown.dropdown-open > a {
  background-color: transparent;
  color: var(--hk-sidebar-ink);
}

.sidebar-menu li.dropdown.has-active-page > a {
  color: var(--hk-sidebar-strong);
  font-weight: 600;
}

.sidebar-menu li.dropdown > a::after {
  color: inherit;
  opacity: 0.7;
}

/* A section's items on a faint guide line, brighter than the headings: these are links. */
.sidebar-menu .sidebar-submenu {
  border-inline-start-color: var(--hk-sidebar-line);
}

.sidebar-menu .sidebar-submenu li a {
  color: var(--hk-sidebar-sub);
  font-size: 0.8125rem;
}

/* Not on the current page's pill: this rule comes after it, so it would turn its text the pill's
   own colour on hover. */
.sidebar-menu .sidebar-submenu li a:not(.active-page):hover {
  color: var(--hk-sidebar-strong);
}

/* Headings over the blocks. */
.sidebar-menu .sidebar-menu-heading {
  color: var(--hk-sidebar-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Folded to icons. */
.sidebar.active:not(:hover) .sidebar-menu li.sidebar-menu-heading {
  background-color: var(--hk-sidebar-line);
}

.sidebar.active:not(:hover) .sidebar-menu li.dropdown.has-active-page > a {
  background-color: var(--hk-active-bg);
  color: var(--hk-active-ink);
}

/* A slim scrollbar that belongs on the colour. */
.sidebar-menu-area {
  scrollbar-width: thin;
  scrollbar-color: var(--hk-sidebar-line) transparent;
}

.sidebar-menu-area::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu-area::-webkit-scrollbar-thumb {
  background-color: var(--hk-sidebar-line);
  border-radius: 6px;
}

.sidebar-menu-area::-webkit-scrollbar-track {
  background: transparent;
}

/* --- Cards --------------------------------------------------------------- */

.card {
  border-radius: var(--hk-radius);
  box-shadow: var(--hk-shadow);
}

html:not([data-theme="dark"]) .card {
  border: 1px solid var(--hk-line);
}

.card .card-header {
  border-start-start-radius: var(--hk-radius);
  border-start-end-radius: var(--hk-radius);
}

.card .card-header h5,
.card .card-header h6 {
  font-weight: 700;
}

/* --- Tables -------------------------------------------------------------- */

.bordered-table thead tr th,
.table thead tr th {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary-light) !important;
  padding: 12px 16px !important;
}

html:not([data-theme="dark"]) .bordered-table thead tr th {
  background-color: #f7f9fd !important;
  border-bottom-color: var(--hk-line) !important;
}

.bordered-table tbody tr td {
  vertical-align: middle;
}

html:not([data-theme="dark"]) .bordered-table tbody tr {
  transition: background-color 0.12s;
}

html:not([data-theme="dark"]) .bordered-table tbody tr:hover td {
  background-color: #f8faff;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  font-weight: 600;
  letter-spacing: 0.005em;
  /* A label on one line: "+ Add Translation" broke over two beside a long hint. The row holding
     the buttons wraps instead (see Small screens). */
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
}

.btn:active {
  transform: translateY(1px);
}

/* The main buttons only (Save, + Add …): a soft gradient, a touch lighter at the top, from the
   panel's blue — so it follows the accent. Outline, secondary, danger and success buttons stay
   solid: one kind of button carries the emphasis. */
.btn-primary,
.btn-primary-600 {
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--primary-600) 84%, #fff) 0%, var(--primary-600) 100%);
  box-shadow: 0 2px 8px rgba(32, 68, 172, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn-primary:hover,
.btn-primary-600:hover {
  background-image: linear-gradient(180deg, var(--primary-600) 0%, var(--primary-700) 100%);
  box-shadow: 0 4px 14px rgba(32, 68, 172, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:active,
.btn-primary-600:active {
  background-image: linear-gradient(180deg, var(--primary-700) 0%, var(--primary-800) 100%);
}

.btn-primary:disabled,
.btn-primary-600:disabled,
.btn-primary.disabled,
.btn-primary-600.disabled {
  background-image: none;
  box-shadow: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-light-white);
}

/* --- Fields -------------------------------------------------------------- */

.form-control,
.form-select {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-600) !important;
  box-shadow: 0 0 0 3px var(--primary-light) !important;
}

.form-label {
  color: var(--text-primary-light);
}

/* --- Status indicators ---------------------------------------------------- */

/* Every module draws its statuses the same way — a <span> with `radius-4 fw-medium` and a tone
   (format.js boolBadge, the donation and payment states, roles, permissions…). One rule turns
   them all from boxed labels into soft pills with a dot of their own colour; the toggles that
   wrap them (Active / No) keep working, as only their look changes. */
span.radius-4.fw-medium:not(.font-monospace) {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.625rem !important;
  border-radius: 999px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1.5;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

span.radius-4.fw-medium.border:not(.font-monospace) {
  border-color: color-mix(in srgb, currentColor 22%, transparent) !important;
}

/* The dot — not on a pill that already carries an icon of its own. */
span.radius-4.fw-medium:not(.font-monospace):not(.d-inline-flex)::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.85;
}

/* A toggle pill shows it can be pressed. */
form button.bg-transparent > span.radius-4.fw-medium {
  transition: filter 0.15s, box-shadow 0.15s;
}

form button.bg-transparent:hover > span.radius-4.fw-medium {
  filter: brightness(0.97);
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

/* --- Row actions ---------------------------------------------------------- */

/* The round edit / delete / view buttons at the end of each row. */
td a.rounded-circle,
td button.rounded-circle,
td .w-32-px.h-32-px {
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

td a.rounded-circle:hover,
td button.rounded-circle:hover,
td .w-32-px.h-32-px:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 36, 96, 0.12);
}

/* Native checkboxes (bulk selection) in the panel's blue. */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary-600);
}

/* --- Search and filters --------------------------------------------------- */

/* The list's search box and the toolbar beside it. */
.card-header input[type="search"],
.card-header input[type="text"],
.card-header .form-control,
.card-header .form-select {
  border-radius: 10px !important;
  min-height: 2.5rem;
}

.card-header .btn {
  border-radius: 10px;
}

/* Sortable headers: the arrow reads as part of the label, the sorted one in blue. */
.bordered-table thead th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bordered-table thead th a:hover {
  color: var(--primary-600);
}

/* --- Dropdown menus (filters, profile, bulk) ------------------------------ */

.dropdown-menu {
  border: 1px solid var(--hk-line);
  border-radius: 12px;
  padding: 0.375rem;
  box-shadow: 0 12px 32px rgba(16, 36, 96, 0.14);
}

.dropdown-menu .dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: var(--primary-50);
  color: var(--primary-700);
}

/* --- Pagination ----------------------------------------------------------- */

.pagination .page-link {
  min-width: 2.25rem;
  width: auto !important;
  height: 2.25rem !important;
  padding-inline: 0.625rem;
  border-radius: 10px !important;
  font-size: 0.875rem !important;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

html:not([data-theme="dark"]) .pagination .page-link.bg-neutral-300,
html:not([data-theme="dark"]) .pagination .page-link.bg-neutral-200 {
  background-color: #fff !important;
  border: 1px solid var(--hk-line) !important;
  color: var(--text-primary-light) !important;
}

.pagination .page-link.bg-neutral-300:hover {
  border-color: var(--primary-300) !important;
  color: var(--primary-600) !important;
}

.pagination .page-link.bg-primary-600 {
  box-shadow: 0 4px 12px rgba(32, 68, 172, 0.28);
}

/* --- Empty lists ---------------------------------------------------------- */

/* "No records yet." — a quiet illustration over the line, rather than the line alone. */
.bordered-table tbody td[colspan].text-center.py-32 {
  padding-block: 2.75rem !important;
  font-size: 0.9375rem;
  color: var(--text-secondary-light);
}

.bordered-table tbody td[colspan].text-center.py-32::before {
  content: '';
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  background: var(--primary-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232044ac' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5 12 3l9 4.5v9L12 21l-9-4.5z'/%3E%3Cpath d='M3 7.5 12 12l9-4.5M12 12v9'/%3E%3C/svg%3E") center / 1.5rem no-repeat;
}

/* --- Confirmations and toasts --------------------------------------------- */

/* The "Are you sure?" dialog: roomier, softer, and blue where it is not a warning. */
.hk-confirm {
  --hk-confirm-accent: #2044ac;
  --hk-confirm-soft: rgba(32, 68, 172, 0.12);
  --hk-confirm-halo: rgba(32, 68, 172, 0.06);
  --hk-confirm-solid: #2044ac;
  --hk-confirm-solid-hover: #1b3a93;
}

.hk-confirm .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(8, 20, 60, 0.28);
}

.hk-confirm__body {
  padding: 1.5rem 1.5rem 1.25rem !important;
}

.hk-confirm__title {
  font-family: var(--hk-display);
  font-weight: 700 !important;
}

.hk-confirm__footer {
  padding: 0.875rem 1.25rem !important;
}

.hk-confirm__btn {
  border-radius: 10px !important;
  font-family: var(--hk-display);
  font-weight: 600 !important;
  min-height: 2.5rem;
  padding-inline: 1.125rem !important;
}

.modal-backdrop.show {
  opacity: 0.45;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* Bootstrap's own modals elsewhere get the same shape. */
.modal-content {
  border-radius: 16px;
}

/* Toasts. */
.hk-toast {
  border-radius: 12px !important;
  font-family: var(--admin-font-family, inherit);
}

.hk-toast__title {
  font-family: var(--hk-display);
}

/* --- Tabs and segmented buttons ------------------------------------------ */

/* A row of tab-like buttons (the acharya workspace, the blog form): the current one solid, the
   rest quiet until hovered. */
.btn-outline-secondary {
  --bs-btn-color: var(--text-secondary-light);
  --bs-btn-border-color: var(--hk-line);
  --bs-btn-hover-color: var(--primary-700);
  --bs-btn-hover-bg: var(--primary-50);
  --bs-btn-hover-border-color: var(--primary-200);
  --bs-btn-active-color: var(--primary-700);
  --bs-btn-active-bg: var(--primary-50);
  --bs-btn-active-border-color: var(--primary-300);
}

html:not([data-theme="dark"]) .btn-outline-secondary {
  background-color: #fff;
}

/* --- Icons ---------------------------------------------------------------- */

/* One size and weight for the menu's icons, and icons in buttons sit on the text's line. */
.sidebar-menu li a .menu-icon {
  font-size: 1.125rem;
  width: 1.25rem;
  flex: none;
}

.btn iconify-icon,
.btn i[class^="ri-"] {
  vertical-align: -0.125em;
}

/* --- Small screens ------------------------------------------------------- */

/* A list's toolbar (Trash, Media, Import, Export, Add …) is one row of buttons that ran off the
   right edge of a phone, so the page scrolled sideways. Below tablet width it wraps instead. */
@media (max-width: 991.98px) {
  .card-header .d-flex,
  .card-header.d-flex {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .dashboard-main-body {
    padding: 1rem 0.875rem;
  }
}

/* On a phone a long label may break again rather than push the page sideways. */
@media (max-width: 575.98px) {
  .btn {
    white-space: normal;
  }
}

/* --- Small things -------------------------------------------------------- */

a {
  text-underline-offset: 2px;
}

.badge {
  font-weight: 600;
  letter-spacing: 0.01em;
}

::selection {
  background-color: rgba(32, 68, 172, 0.18);
}
