/* Jeannie Meows rescue operations admin workspace. */
:root {
    --jm-rescue-navy: #163f78;
    --jm-rescue-blue: #214f97;
    --jm-rescue-gold: #e0ad31;
    --jm-rescue-cream: #fffaf0;
    --jm-rescue-ink: #13243a;
    --jm-rescue-muted: #65758a;
    --jm-rescue-border: rgba(22, 63, 120, .18);
}

#nav-sidebar {
    border-right: 1px solid var(--jm-rescue-border);
    box-shadow: 8px 0 25px rgba(16, 47, 88, .05);
}

#nav-sidebar .module {
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--jm-rescue-border);
    border-radius: 12px;
    background: var(--body-bg);
}

#nav-sidebar .module caption,
#nav-sidebar .module h2 {
    background: linear-gradient(135deg, #f8e9c6, #fff8e8);
    color: var(--jm-rescue-navy);
    font-weight: 900;
    letter-spacing: .01em;
}

#nav-sidebar .module th,
#nav-sidebar .module td {
    border-bottom-color: color-mix(in srgb, var(--jm-rescue-border) 65%, transparent);
}

#nav-sidebar .current-model {
    background: color-mix(in srgb, var(--jm-rescue-blue) 10%, var(--body-bg));
}

.jm-workspace-home {
    max-width: 1540px;
    margin: 0 auto;
}

.jm-workspace-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: clamp(22px, 4vw, 38px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    border: 1px solid rgba(224, 173, 49, .55);
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 18%, rgba(224, 173, 49, .28), transparent 29%),
        linear-gradient(135deg, #fffaf0, #eef5fc);
    box-shadow: 0 18px 44px rgba(16, 47, 88, .10);
}

.jm-workspace-hero::after {
    content: "♥";
    position: absolute;
    right: 3%;
    bottom: -.42em;
    color: rgba(33, 79, 151, .07);
    font-size: clamp(9rem, 18vw, 16rem);
    line-height: 1;
    pointer-events: none;
}

.jm-workspace-hero__copy,
.jm-workspace-hero__actions {
    position: relative;
    z-index: 1;
}

.jm-workspace-eyebrow {
    color: #6f4e16;
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .1em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.jm-workspace-hero h1 {
    margin: 0;
    color: var(--jm-rescue-navy);
    font-size: clamp(28px, 4vw, 45px);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.02;
}

.jm-workspace-hero p {
    max-width: 820px;
    margin: 12px 0 0;
    color: #4d6077;
    font-size: 15px;
    line-height: 1.6;
}

.jm-workspace-hero__actions {
    min-width: 220px;
    display: grid;
    gap: 9px;
}

.jm-workspace-button {
    min-height: 43px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #173f78;
    border-radius: 10px;
    background: var(--jm-rescue-blue);
    color: #ffffff !important;
    font-weight: 850;
    text-decoration: none;
}

.jm-workspace-button--secondary {
    border-color: #b87e0f;
    background: #f5e8cb;
    color: var(--jm-rescue-ink) !important;
}

.jm-workspace-quick-grid {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.jm-workspace-quick-card {
    min-width: 0;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--jm-rescue-border);
    border-radius: 17px;
    background: var(--body-bg);
    box-shadow: 0 10px 26px rgba(16, 47, 88, .07);
}

.jm-workspace-quick-card h2 {
    margin: 2px 0 4px;
    color: var(--body-fg);
    font-size: 18px;
}

.jm-workspace-quick-card p {
    margin: 0;
    color: var(--body-quiet-color);
    line-height: 1.45;
}

.jm-workspace-count {
    min-width: 42px;
    height: 42px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--jm-rescue-gold);
    color: #111111;
    font-size: 16px;
    font-weight: 900;
}

.jm-workspace-heading {
    margin: 0 0 13px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.jm-workspace-heading h2 {
    margin: 0;
    color: var(--body-fg);
    font-size: 21px;
}

.jm-workspace-heading p {
    margin: 0;
    color: var(--body-quiet-color);
}

.jm-workspace-section-grid {
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.jm-workspace-section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--jm-rescue-border);
    border-radius: 18px;
    background: var(--body-bg);
    box-shadow: 0 12px 30px rgba(16, 47, 88, .07);
}

.jm-workspace-section__header {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--jm-rescue-border);
    background: linear-gradient(135deg, #fff8e8, #f3f8fd);
}


.jm-workspace-section__header h3 {
    margin: 0;
    color: var(--jm-rescue-navy);
    font-size: 17px;
    font-weight: 900;
}

.jm-workspace-section__header p {
    margin: 4px 0 0;
    color: #62738a;
    font-size: 12px;
    line-height: 1.45;
}

.jm-workspace-model-list {
    margin: 0;
    padding: 11px;
    display: grid;
    gap: 8px;
    list-style: none;
}

.jm-workspace-model {
    min-width: 0;
    padding: 10px 11px 10px 13px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--jm-rescue-border) 75%, transparent);
    border-radius: 11px;
    background: var(--body-bg);
}

.jm-workspace-model:hover {
    border-color: rgba(224, 173, 49, .8);
    box-shadow: 0 5px 14px rgba(16, 47, 88, .07);
}

.jm-workspace-model__name {
    color: var(--body-fg) !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}


.jm-workspace-model__actions {
    display: flex;
    gap: 6px;
}

.jm-workspace-model__action {
    min-height: 31px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--jm-rescue-border);
    border-radius: 8px;
    background: #f3f7fb;
    color: var(--jm-rescue-blue) !important;
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
}

.jm-workspace-model__action--add {
    border-color: #c59425;
    background: #fff4d4;
    color: #49340e !important;
}

.jm-workspace-recent {
    overflow: hidden;
    border: 1px solid var(--jm-rescue-border);
    border-radius: 18px;
    background: var(--body-bg);
}

.jm-workspace-recent__header {
    padding: 15px 18px;
    border-bottom: 1px solid var(--jm-rescue-border);
    background: linear-gradient(135deg, #fff8e8, #f3f8fd);
}

.jm-workspace-recent__header h2 {
    margin: 0;
    color: var(--jm-rescue-navy);
    font-size: 18px;
}

.jm-workspace-recent__list {
    margin: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    list-style: none;
}

.jm-workspace-recent__item {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--jm-rescue-border);
    border-radius: 10px;
}

.jm-workspace-recent__item a,
.jm-workspace-recent__item strong {
    display: block;
    overflow: hidden;
    color: var(--body-fg) !important;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jm-workspace-recent__item span {
    display: block;
    margin-top: 3px;
    color: var(--body-quiet-color);
    font-size: 10px;
}

html[data-theme="dark"] .jm-workspace-hero,
html[data-theme="dark"] .jm-workspace-section__header,
html[data-theme="dark"] .jm-workspace-recent__header {
    background: linear-gradient(135deg, #302f20, #182b37);
}

html[data-theme="dark"] .jm-workspace-hero p,
html[data-theme="dark"] .jm-workspace-section__header p {
    color: #c6d1df;
}

@media (min-width: 1420px) {
    .jm-workspace-section-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .jm-workspace-hero {
        grid-template-columns: 1fr;
    }

    .jm-workspace-hero__actions {
        width: 100%;
    }

    .jm-workspace-section-grid,
    .jm-workspace-recent__list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .jm-workspace-quick-grid,
    .jm-workspace-section-grid,
    .jm-workspace-recent__list {
        grid-template-columns: 1fr;
    }

    .jm-workspace-quick-card,
    .jm-workspace-heading,
    .jm-workspace-model {
        align-items: stretch;
        flex-direction: column;
    }

    .jm-workspace-model {
        grid-template-columns: 1fr;
    }

    .jm-workspace-model__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* BEGIN INSPECTED ADMIN LAYOUT FIX */
/*
The admin home uses #content-main for the custom workspace. Another
project stylesheet applies a horizontal layout to that same ID and is
loaded later. Reset that inherited layout here and keep the workspace's
major sections in normal vertical document flow.
*/
body.jm-rescue-admin-home #content {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.jm-rescue-admin-home
#content-main.jm-workspace-home {
    display: block !important;
    width: 100% !important;
    max-width: 1500px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-auto-rows: auto !important;
    column-count: auto !important;
    columns: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    box-sizing: border-box !important;
}

body.jm-rescue-admin-home
#content-main.jm-workspace-home > * {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

body.jm-rescue-admin-home
.jm-workspace-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 24px !important;
}

body.jm-rescue-admin-home
.jm-workspace-quick-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

body.jm-rescue-admin-home
.jm-workspace-section-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(18px, 2vw, 26px) !important;
    align-items: start !important;
}

body.jm-rescue-admin-home
.jm-workspace-section {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    align-self: start !important;
}

body.jm-rescue-admin-home
.jm-workspace-recent__list {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

@media (max-width: 1180px) {
    body.jm-rescue-admin-home
    .jm-workspace-section-grid {
        grid-template-columns: 1fr !important;
    }

    body.jm-rescue-admin-home
    .jm-workspace-recent__list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 820px) {
    body.jm-rescue-admin-home
    .jm-workspace-hero,
    body.jm-rescue-admin-home
    .jm-workspace-quick-grid,
    body.jm-rescue-admin-home
    .jm-workspace-recent__list {
        grid-template-columns: 1fr !important;
    }
}
/* END INSPECTED ADMIN LAYOUT FIX */

/* BEGIN SOLID ADOPT GOLD ADMIN BACKGROUND */
:root {
    --jm-admin-adopt-gold-background: #f1e6cb;
}

body.jm-rescue-admin-home,
body.jm-rescue-admin-home #container,
body.jm-rescue-admin-home .main,
body.jm-rescue-admin-home .content,
body.jm-rescue-admin-home #content,
body.jm-rescue-admin-home #content-main,
body.jm-rescue-admin-home #nav-sidebar {
    background-color: var(
        --jm-admin-adopt-gold-background
    ) !important;
    background-image: none !important;
}

body.jm-rescue-admin-home::before,
body.jm-rescue-admin-home::after,
body.jm-rescue-admin-home #container::before,
body.jm-rescue-admin-home #container::after,
body.jm-rescue-admin-home .main::before,
body.jm-rescue-admin-home .main::after,
body.jm-rescue-admin-home .content::before,
body.jm-rescue-admin-home .content::after,
body.jm-rescue-admin-home #content::before,
body.jm-rescue-admin-home #content::after {
    background: none !important;
    background-image: none !important;
}

body.jm-rescue-admin-home
.jm-workspace-home {
    background: transparent !important;
}

body.jm-rescue-admin-home
.jm-workspace-hero,
body.jm-rescue-admin-home
.jm-workspace-quick-card,
body.jm-rescue-admin-home
.jm-workspace-section,
body.jm-rescue-admin-home
.jm-workspace-recent {
    /* Keep dashboard content readable on the solid gold canvas. */
    background-color: #ffffff;
}
/* END SOLID ADOPT GOLD ADMIN BACKGROUND */

/* BEGIN COMPACT ADMIN SECTION FLOW */
body.jm-rescue-admin-home
.jm-workspace-quick-grid {
    display: block !important;
    margin-bottom: 26px !important;
}

body.jm-rescue-admin-home
.jm-workspace-quick-card {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.jm-rescue-admin-home
.jm-workspace-section-grid {
    display: block !important;
    column-count: 2 !important;
    column-gap: clamp(18px, 2vw, 26px) !important;
    column-fill: balance !important;
    margin-bottom: 4px !important;
}

body.jm-rescue-admin-home
.jm-workspace-section {
    display: inline-block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 0 clamp(18px, 2vw, 26px) !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
}

body.jm-rescue-admin-home
.jm-workspace-model {
    min-height: 52px;
}

body.jm-rescue-admin-home
.jm-workspace-model > div:first-child {
    min-width: 0;
    display: flex;
    align-items: center;
}

body.jm-rescue-admin-home
.jm-workspace-model__name {
    line-height: 1.35;
}

body.jm-rescue-admin-home
.jm-workspace-recent {
    margin-top: 0 !important;
}

@media (max-width: 1180px) {
    body.jm-rescue-admin-home
    .jm-workspace-section-grid {
        column-count: 1 !important;
    }
}
/* END COMPACT ADMIN SECTION FLOW */

/* BEGIN ICON-FREE ADMIN SECTION HEADERS */
body.jm-rescue-admin-home
.jm-workspace-section__header {
    display: block !important;
    gap: 0 !important;
}

body.jm-rescue-admin-home
.jm-workspace-section__header > div {
    width: 100%;
    min-width: 0;
}

body.jm-rescue-admin-home
.jm-workspace-section__header h3 {
    width: 100%;
}
/* END ICON-FREE ADMIN SECTION HEADERS */
