/*!
 * Admin theme for Bootstrap 5.
 *
 * Modern dark-sidebar layout replacing the sb-admin-2-era skin. The shell is
 * unchanged from the markup's point of view: a fixed .navbar-admin holds the
 * header row and the .sidebar, #page-wrapper carries the content, and admin.js
 * marks the current entry in #side-menu active.
 */

:root {
    --admin-header-h: 56px;
    --admin-sidebar-w: 260px;
    --admin-bg: #f1f5f9;
    --admin-surface: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text: #0f172a;
    --admin-muted: #64748b;

    --sidebar-bg: #0f172a;
    --sidebar-bg-hover: rgba(148, 163, 184, .12);
    --sidebar-text: #cbd5e1;
    --sidebar-heading: #64748b;

    --accent: #198754;
    --accent-hover: #157347;
    --accent-soft: rgba(25, 135, 84, .16);
}

body {
    background-color: var(--admin-bg);
    color: var(--admin-text);
    -webkit-font-smoothing: antialiased;
}

#wrapper {
    width: 100%;
}

/* The navbar is fixed-top, so the content has to start below it. Small screens
   also clear the collapsed sidebar toggle row. */
#page-wrapper {
    padding: 16px;
    min-height: 568px;
    margin-top: var(--admin-header-h);
}

@media (min-width: 768px) {
    #page-wrapper {
        margin: var(--admin-header-h) 0 0 var(--admin-sidebar-w);
        padding: 24px 28px 32px;
    }
}

/* The layout row has exactly one full-width column, so its gutter only adds
   negative side margins that would bleed the sheet into the page padding.
   Rows inside the content keep their gutters. */
#page-wrapper > .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

/* Every admin page renders inside the layout's single full-width column; give
   that column a white "sheet" so tables, forms and alerts sit on a surface. */
#page-wrapper > .row > [class*="col-"] {
    background: var(--admin-surface);
    border-radius: 14px;
    padding: 22px 24px 26px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
}

@media (max-width: 767.98px) {
    #page-wrapper > .row > [class*="col-"] {
        padding: 16px 16px 20px;
        border-radius: 10px;
    }
}

/* Header ---------------------------------------------------------------- */

/* Bootstrap's .navbar is a wrapping flex row; this instance only needs to
   stack the header bar and the absolutely positioned sidebar beneath it. */
.navbar-admin {
    display: block;
    padding: 0;
    background: transparent;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--admin-header-h);
    padding: 0 16px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.navbar-admin .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #475569;
}

.navbar-admin .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem var(--accent-soft);
}

.navbar-admin .navbar-toggler .navbar-toggler-icon {
    width: 1.15em;
    height: 1.15em;
}

@media (min-width: 768px) {
    /* The sidebar is permanently visible on larger screens. */
    .navbar-admin .navbar-toggler {
        display: none;
    }
}

.navbar-admin .navbar-brand {
    margin: 0;
    padding: 0;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--admin-text);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.admin-brand:hover,
.admin-brand:focus {
    color: var(--admin-text);
}

.admin-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    background: linear-gradient(135deg, #21a06c, #146c43);
    box-shadow: 0 4px 10px rgba(25, 135, 84, .35);
}

.admin-brand-version {
    font-size: .6875rem;
    font-weight: 600;
    color: var(--admin-muted);
    background: #eef2f7;
    border-radius: 999px;
    padding: 2px 8px;
    line-height: 1.4;
}

/* Pushes the user menu to the far right of the header row. */
.navbar-top-links {
    margin-bottom: 0;
    margin-left: auto;
    padding-left: 0;
    list-style: none;
}

.navbar-top-links > li {
    display: inline-block;
}

.navbar-top-links > li > a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    min-height: var(--admin-header-h);
    color: #475569;
    text-decoration: none;
    border-radius: 10px;
}

.navbar-top-links > li > a:hover,
.navbar-top-links > li > a:focus {
    color: var(--admin-text);
}

.navbar-top-links > li > a .fa-caret-down {
    font-size: .8rem;
    color: #94a3b8;
}

/* Round avatar chip in the user menu toggle. */
.admin-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #fff;
    font-size: .9rem;
    background: linear-gradient(135deg, #21a06c, #146c43);
    box-shadow: 0 2px 6px rgba(25, 135, 84, .3);
}

/* Bootstrap 5 renders the caret itself; this menu supplies its own fa-caret. */
.navbar-top-links .dropdown-toggle::after {
    display: none;
}

.navbar-top-links .dropdown-menu {
    margin-top: 6px;
    border: 0;
    border-radius: 12px;
    padding: 6px;
    min-width: 210px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .16), 0 2px 8px rgba(15, 23, 42, .08);
}

.navbar-top-links .dropdown-menu li {
    display: block;
}

.navbar-top-links .dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    min-height: 0;
    border-radius: 8px;
    color: #334155;
    white-space: normal;
}

.navbar-top-links .dropdown-menu li a:hover,
.navbar-top-links .dropdown-menu li a:focus {
    background: #f1f5f9;
    color: var(--admin-text);
}

.navbar-top-links .dropdown-menu .dropdown-divider {
    margin: 6px 8px;
    opacity: 1;
    border-color: var(--admin-border);
}

.navbar-top-links .dropdown-user {
    right: 0;
    left: auto;
}

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

.sidebar {
    background: var(--sidebar-bg);
    width: 100%;
}

.sidebar .sidebar-nav {
    padding: 10px 0 18px;
}

/* Bootstrap 5's .nav is a wrapping flex row, which laid these items out
   side-by-side. The sidebar menu is a vertical list at every level. */
.sidebar ul.nav {
    flex-direction: column;
    flex-wrap: nowrap;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
    width: 100%;
}

.sidebar ul li {
    display: block;
    width: 100%;
}

.sidebar .sidebar-heading {
    padding: 18px 26px 6px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--sidebar-heading);
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 1px 10px;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: .9rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.sidebar ul li a .fa-fw {
    width: 1.35em;
    font-size: .95rem;
    color: #8ea1b9;
    text-align: left;
    transition: color .15s ease-in-out;
}

.sidebar ul li a:hover,
.sidebar ul li a:focus {
    background: var(--sidebar-bg-hover);
    color: #fff;
}

.sidebar ul li a:hover .fa-fw,
.sidebar ul li a:focus .fa-fw {
    color: #cbd5e1;
}

.sidebar ul li a.active,
.sidebar li.active > a[data-bs-toggle="collapse"] {
    background: var(--accent-soft);
    color: #fff;
    box-shadow: inset 3px 0 0 0 #2fb380;
}

.sidebar ul li a.active .fa-fw,
.sidebar li.active > a[data-bs-toggle="collapse"] .fa-fw {
    color: #3fd08f;
}

/* Keeps the pending-request count hard against the right edge of its row. */
.sidebar .sidebar-badge {
    margin-left: auto;
    background: #dc2626;
    font-size: .6875rem;
    font-weight: 600;
    line-height: 1.5;
}

.sidebar .arrow {
    margin-left: auto;
    color: #7d8ea6;
    line-height: 1;
}

.sidebar .fa.arrow:before {
    content: "\f104";
}

.sidebar a[aria-expanded="true"] > .fa.arrow:before {
    content: "\f107";
}

.sidebar a[aria-expanded="true"] > .fa.arrow {
    color: #3fd08f;
}

.sidebar .nav-second-level,
.sidebar .nav-third-level {
    margin: 2px 10px 6px 32px;
    padding-left: 14px;
    border-left: 1px solid rgba(148, 163, 184, .18);
}

.sidebar .nav-second-level li,
.sidebar .nav-third-level li {
    border-bottom: none !important;
}

.sidebar .nav-second-level li a,
.sidebar .nav-third-level li a {
    margin: 0;
    padding: 6px 10px;
    font-size: .84rem;
    color: #9fb0c6;
}

.sidebar .nav-second-level li a .fa-fw,
.sidebar .nav-third-level li a .fa-fw {
    font-size: .8rem;
}

.sidebar .nav-second-level li a:hover,
.sidebar .nav-second-level li a:focus,
.sidebar .nav-second-level li a.active,
.sidebar .nav-third-level li a:hover,
.sidebar .nav-third-level li a:focus,
.sidebar .nav-third-level li a.active {
    box-shadow: none;
}

.sidebar .nav-second-level li a.active,
.sidebar .nav-third-level li a.active {
    background: transparent;
    color: #3fd08f;
}

.sidebar .nav-second-level li a.active .fa-fw,
.sidebar .nav-third-level li a.active .fa-fw {
    color: #3fd08f;
}

@media (min-width: 768px) {
    .sidebar {
        z-index: 1;
        position: absolute;
        top: var(--admin-header-h);
        left: 0;
        width: var(--admin-sidebar-w);
        margin-top: 0;
        border-right: 1px solid rgba(148, 163, 184, .12);
    }

    /* The sidebar is inside the fixed navbar, so it must scroll on its own
       rather than running off the bottom of the viewport. */
    .sidebar .sidebar-nav {
        max-height: calc(100vh - var(--admin-header-h));
        overflow-y: auto;
    }

    /* Bootstrap's collapse plugin must not hide the menu once it is permanently
       docked. */
    .sidebar .navbar-collapse {
        display: block !important;
        height: auto !important;
    }
}

.sidebar .sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, .25) transparent;
}

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

.sidebar .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .25);
    border-radius: 999px;
}

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

/* Content polish -------------------------------------------------------- */

.page-header {
    padding-bottom: .65rem;
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--admin-text);
    border-bottom: 1px solid var(--admin-border);
}

/* Restyle plain content links to the brand green. Setting Bootstrap's link
   variables rather than "#page-wrapper a { color }" matters: a selector that
   strong would also repaint anchor-rendered buttons (CakePHP postLink emits
   <a class="btn btn-danger">), while component colours already override the
   reboot rule that consumes these variables. */
#page-wrapper {
    --bs-link-color: var(--accent-hover);
    --bs-link-hover-color: #0f5132;
}

#page-wrapper .btn {
    border-radius: .5rem;
    font-weight: 500;
}

#page-wrapper .btn-sm {
    border-radius: .4rem;
}

/* Unify the accent: primary buttons follow the brand green. */
#page-wrapper .btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-hover);
    --bs-btn-hover-border-color: #146c43;
    --bs-btn-active-bg: #13602f;
    --bs-btn-active-border-color: #12572a;
    --bs-btn-disabled-bg: var(--accent);
    --bs-btn-disabled-border-color: var(--accent);
    --bs-btn-focus-shadow-rgb: 25, 135, 84;
}

#page-wrapper .form-control,
#page-wrapper .form-select {
    border-color: var(--admin-border);
    border-radius: .5rem;
}

/* Leave .is-invalid controls their red focus state. */
#page-wrapper .form-control:not(.is-invalid):focus,
#page-wrapper .form-select:not(.is-invalid):focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem var(--accent-soft);
}

#page-wrapper label {
    font-weight: 500;
    color: #334155;
}

#page-wrapper .table {
    --bs-table-border-color: var(--admin-border);
    --bs-table-bg: var(--admin-surface);
    --bs-table-hover-bg: #f8fafc;
}

#page-wrapper .table > thead th {
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--admin-muted);
    background: #f8fafc;
}

#page-wrapper .table > :not(caption) > * > * {
    vertical-align: middle;
}

#page-wrapper .alert {
    border-radius: .65rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

#page-wrapper .pagination {
    --bs-pagination-color: var(--accent-hover);
    --bs-pagination-hover-color: #0f5132;
    --bs-pagination-active-bg: var(--accent);
    --bs-pagination-active-border-color: var(--accent);
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem var(--accent-soft);
    --bs-pagination-focus-color: var(--accent-hover);
}

#page-wrapper .paginator p {
    color: var(--admin-muted);
    font-size: .875rem;
}

/* Settings page tabs (plain <a> toggles inside .nav-tabs). */
#page-wrapper .nav-tabs {
    border-bottom: 1px solid var(--admin-border);
}

#page-wrapper .nav-tabs li a {
    display: inline-block;
    margin-bottom: -1px;
    padding: 8px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: .5rem .5rem 0 0;
    color: var(--admin-muted);
    text-decoration: none;
    font-weight: 500;
}

#page-wrapper .nav-tabs li a:hover {
    color: var(--admin-text);
    background: #f8fafc;
}

#page-wrapper .nav-tabs li a.active {
    color: var(--admin-text);
    border-bottom-color: var(--accent);
    background: transparent;
}

/* Screen toolbars -------------------------------------------------------- */

/* Page title with the primary action docked right, replacing the bare
   .page-header followed by a button at the bottom of the screen. */
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: .65rem;
    margin: 0 0 1.25rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-toolbar-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--admin-text);
}

.admin-toolbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* Empty lists (a table with no rows) ------------------------------------- */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 40px;
    text-align: center;
}

.empty-state > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 16px;
    font-size: 1.4rem;
    background: #f1f5f9;
    color: var(--admin-muted);
}

.empty-state h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--admin-text);
}

.empty-state p {
    margin: 0 0 14px;
    font-size: .875rem;
    color: var(--admin-muted);
}

/* Action columns: keep the icon buttons on one line and flush right. */
#page-wrapper .table .actions {
    white-space: nowrap;
    text-align: right;
}

/* Forms ------------------------------------------------------------------ */

#page-wrapper fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.form-legend {
    margin: 1.75rem 0 .5rem;
    padding: 0;
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--admin-muted);
    border: 0;
}

fieldset .form-legend:first-child {
    margin-top: 0;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
}

/* Blog view fragment (rendered in the overlay modal or as a full page) ---- */

.blog-view-title {
    margin: 0 0 .5rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--admin-text);
}

.blog-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 1rem;
    font-size: .82rem;
    color: var(--admin-muted);
}

.blog-view-meta i {
    width: 1.1em;
    margin-right: 5px;
    text-align: center;
}

.blog-view-image {
    float: left;
    max-width: 200px;
    height: auto;
    margin: 0 16px 8px 0;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}

.blog-view-body {
    color: #334155;
    line-height: 1.7;
}

/* Clear the floated image so long articles don't overflow their modal. */
.blog-view-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Attachment cards (the featured-image sidebar on edit screens) ----------- */

.attachment-card {
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: .8rem;
    padding: 14px;
}

.attachment-card-label {
    margin: 0 0 10px;
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--admin-muted);
}

.attachment-card-image {
    display: block;
    width: 100%;
    height: auto;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.attachment-card .btn {
    margin-top: 10px;
}

/* Detail views (view screens and overlay fragments) ----------------------- */

.detail-title {
    margin: 0 0 .75rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--admin-text);
}

.detail-view .card,
.pet-view .card {
    margin-bottom: 1rem;
}

#page-wrapper .detail-table {
    --bs-table-bg: transparent;
    margin: 0;
}

.detail-table th {
    width: 240px;
    padding: .55rem 1.25rem;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--admin-muted);
    white-space: nowrap;
}

.detail-table td {
    padding: .55rem 1.25rem .55rem 0;
    font-weight: 500;
    color: #334155;
}

.detail-body {
    color: #334155;
    line-height: 1.7;
}

/* Pet thumbnails and galleries -------------------------------------------- */

/* Table thumbnails in the pet lists. */
.pet-thumb {
    display: block;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.pet-view-photo {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.gallery-thumb {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}

/* Existing-image tiles on the pet edit screen, each with a floating delete
   button; replaces the old .img-wraps/.closes inline styles. */
.gallery-figure {
    position: relative;
    display: inline-block;
    font-size: 0;
}

.gallery-figure img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}

.gallery-figure .gallery-delete {
    position: absolute;
    top: -9px;
    right: -9px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .25);
}

/* Publish badges on the custom pages list -------------------------------- */

.badge-published {
    background: rgba(25, 135, 84, .12);
    color: #14724a;
    font-weight: 600;
}

.badge-unpublished {
    background: #f1f5f9;
    color: var(--admin-muted);
    font-weight: 600;
}

/* Sortable list (custom pages ordering) ----------------------------------- */

.sort-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 640px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sort-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: .65rem;
    cursor: grab;
}

.sort-item:active {
    cursor: grabbing;
}

.sort-item.ui-sortable-helper {
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.sort-handle {
    color: var(--admin-muted);
}

.sort-item-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--admin-text);
}

/* Small muted note under a form ------------------------------------------ */

.form-note {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: .85rem;
    color: var(--admin-muted);
}

/* Callout box inside long request forms (application wording, signature
   declarations). Replaces the old unstyled .boxed divs. */
.form-note-box {
    margin: .25rem 0 1rem;
    padding: .75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-left: 3px solid var(--accent);
    border-radius: .5rem;
    font-size: .85rem;
    line-height: 1.55;
    color: #475569;
}

/* Dashboard ------------------------------------------------------------- */

.dashboard-subtitle {
    margin: -1rem 0 1.5rem;
    font-size: .875rem;
    color: var(--admin-muted);
}

/* Equal-height cards: a longer label ("Available for adoption") wraps to two
   lines, which otherwise pushed the cards out of line with the rest. */
.dashboard-cards > [class*="col-"] {
    display: flex;
}

/* Stat cards: clickable tiles -- label and icon chip on top, the count below,
   and a per-colour "view details" hint pinned to the bottom edge. */
.stat-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 18px 20px 14px;
    background: var(--admin-surface);
    border-radius: .8rem;
    border: 1px solid var(--admin-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    text-decoration: none;
    color: var(--admin-text);
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover,
.stat-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(15, 23, 42, .06), 0 12px 24px rgba(15, 23, 42, .1);
    color: var(--admin-text);
}

.stat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.stat-card-label {
    padding-top: .4rem;
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--admin-muted);
}

.stat-card-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.05rem;
}

.stat-card-value {
    margin-top: 10px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.stat-card-hint {
    margin-top: auto;
    padding-top: 14px;
    font-size: .8rem;
    font-weight: 600;
}

.stat-card-hint i {
    font-size: .75rem;
    transition: transform .15s ease;
}

.stat-card:hover .stat-card-hint i,
.stat-card:focus .stat-card-hint i {
    transform: translateX(3px);
}

.stat-card-blue .stat-card-icon {
    background: rgba(51, 122, 183, .12);
    color: #2c6aa5;
}

.stat-card-blue .stat-card-hint {
    color: #2c6aa5;
}

.stat-card-green .stat-card-icon {
    background: rgba(92, 184, 92, .14);
    color: #3d8b3d;
}

.stat-card-green .stat-card-hint {
    color: #3d8b3d;
}

.stat-card-red .stat-card-icon {
    background: rgba(217, 83, 79, .12);
    color: #b52b27;
}

.stat-card-red .stat-card-hint {
    color: #b52b27;
}

.stat-card-yellow .stat-card-icon {
    background: rgba(240, 173, 78, .16);
    color: #a56b00;
}

.stat-card-yellow .stat-card-hint {
    color: #a56b00;
}

/* Requests-needing-attention panel -------------------------------------- */

.attention-panel {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: .8rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    overflow: hidden;
}

.attention-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--admin-border);
}

.attention-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: .9rem;
    background: rgba(220, 38, 38, .09);
    color: #b91c1c;
}

.attention-panel-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    color: var(--admin-text);
}

.attention-panel-badge {
    margin-left: auto;
    background: #dc2626;
    font-size: .6875rem;
    font-weight: 600;
}

.attention-empty {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
}

.attention-empty i {
    font-size: 1.35rem;
    line-height: 1.35;
    color: var(--accent);
}

.attention-empty p {
    margin: 0;
    font-size: .9rem;
    color: var(--admin-muted);
}

.attention-list {
    margin: 0;
    padding: 8px;
    list-style: none;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
}

.attention-item + .attention-item {
    margin-top: 2px;
}

.attention-item:hover {
    background: #f8fafc;
}

.attention-item-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: .9rem;
    background: rgba(220, 38, 38, .09);
    color: #b91c1c;
}

.attention-item-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--admin-text);
}

.attention-item-count {
    margin-left: auto;
    background: #fef2f2;
    color: #b91c1c;
    font-size: .72rem;
    font-weight: 600;
}

.attention-item-link {
    flex: 0 0 auto;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
}

.attention-item-link i {
    font-size: .72rem;
    transition: transform .15s ease;
}

.attention-item:hover .attention-item-link i {
    transform: translateX(3px);
}

/* Cards in general: soft corners and shadow instead of hard borders. */
#page-wrapper .card {
    border: 0;
    border-radius: .8rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .06);
}

#page-wrapper .card-header {
    border-bottom: 0;
}

#page-wrapper .card-footer {
    background: var(--admin-surface);
    border-top: 1px solid var(--admin-border);
}

/* Overlays use a Bootstrap modal; soften it to match. */
#dialogModal .modal-content {
    border: 0;
    border-radius: .9rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}

/* Login ---------------------------------------------------------------- */

.login-panel {
    margin-top: 25%;
}

/* Bootstrap 3 provided .well; Bootstrap 5 dropped it. */
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
