:root {
    --wm-navy: #264796;
    --wm-blue: #0082c9;
    --wm-green: #94ba2d;
    --wm-pink: #e5097f;
    --wm-amber: #c07a12;
    --wm-red: #c0304a;
    --wm-orange: #d9631e;
    --wm-brown: #6b4226;

    --wm-bg: #eff2f6;
    --wm-surface: #eff2f6;
    --wm-sidebar-bg: #fafafa;
    --wm-border: #e5e7eb;
    --wm-text: #14161a;
    --wm-text-muted: #767b87;

    --wm-accent: var(--wm-navy);
    --wm-accent-hover: #1c3572;
    --wm-accent-soft: #eef1f9;

    --wm-danger-bg: #fdecec;
    --wm-danger-text: #b3261e;

    --wm-radius-sm: 6px;
    --wm-radius: 8px;

    --wm-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --wm-glass-bg: linear-gradient(155deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28));
    --wm-glass-border: rgba(255, 255, 255, 0.55);
    --wm-glass-blur: blur(18px) saturate(180%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--wm-text);
    background: var(--wm-bg);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Shared cool background without the old paper/noise overlay. */
body::before { content: none; }

.wm-app {
    position: relative;
    z-index: 1;
}

@keyframes wm-rise {
    from {
        opacity: 0;
        translate: 0 10px;
        scale: 0.97;
    }
    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }
}

@keyframes wm-pop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

a {
    text-decoration: none;
    color: inherit;
}

.wm-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--wm-navy);
    transition: color 0.18s var(--wm-ease), transform 0.18s var(--wm-ease);
}

.wm-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar (horizontal nav) */

.wm-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 32px;
    background: var(--wm-glass-bg);
    backdrop-filter: var(--wm-glass-blur);
    -webkit-backdrop-filter: var(--wm-glass-blur);
    border-bottom: 1px solid var(--wm-glass-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: sticky;
    top: 0;
    z-index: 20;
}

.wm-topbar__brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.wm-topbar__logo {
    display: block;
    height: 52px;
    width: auto;
    transition: transform 0.35s var(--wm-ease);
}

.wm-topbar__brand:hover .wm-topbar__logo {
    transform: scale(1.05);
}

.wm-topbar__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.wm-topbar__link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--wm-text-muted);
    white-space: nowrap;
    transition: background 0.16s var(--wm-ease), color 0.16s var(--wm-ease);
}

.wm-topbar__link:hover {
    background: rgba(20, 22, 26, 0.05);
    color: var(--wm-text);
}

.wm-topbar__link.is-active {
    color: #fff;
}

.wm-topbar__link--blue.is-active { background: linear-gradient(135deg, #045f91, #0082c9); }
.wm-topbar__link--pink.is-active { background: linear-gradient(135deg, #a3065c, #e5097f); }
.wm-topbar__link--green.is-active { background: linear-gradient(135deg, #5c7a1a, #8aad2a); }
.wm-topbar__link--navy.is-active { background: linear-gradient(135deg, #182f63, #264796); }
.wm-topbar__link--amber.is-active { background: linear-gradient(135deg, #8a5a0d, #c07a12); }
.wm-topbar__link--red.is-active { background: linear-gradient(135deg, #7a1728, #c0304a); }
.wm-topbar__link--orange.is-active { background: linear-gradient(135deg, #8a4008, #d9631e); }
.wm-topbar__link--brown.is-active { background: linear-gradient(135deg, #3d2415, #6b4226); }
a.wm-topbar__link.is-active:not([class*="--"]) { background: var(--wm-accent); }

.wm-topbar__navmenu {
    position: relative;
    flex: 1;
    display: flex;
    min-width: 0;
}

.wm-topbar__navmenu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--wm-glass-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--wm-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s var(--wm-ease), color 0.16s var(--wm-ease), border-color 0.16s var(--wm-ease);
}

.wm-topbar__navmenu-trigger svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.wm-topbar__navmenu-chev {
    width: 11px;
    height: 11px;
    margin-left: -2px;
    transition: transform 0.2s var(--wm-ease);
}

.wm-topbar__navmenu:hover .wm-topbar__navmenu-trigger,
.wm-topbar__navmenu:focus-within .wm-topbar__navmenu-trigger,
.wm-topbar__navmenu.is-active-section .wm-topbar__navmenu-trigger {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.85);
    color: var(--wm-text);
}

.wm-topbar__navmenu:hover .wm-topbar__navmenu-chev,
.wm-topbar__navmenu:focus-within .wm-topbar__navmenu-chev {
    transform: rotate(180deg);
}

.wm-topbar__navmenu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s var(--wm-ease), transform 0.2s var(--wm-ease), visibility 0.2s;
    z-index: 30;
}

.wm-topbar__navmenu:hover .wm-topbar__navmenu-panel,
.wm-topbar__navmenu:focus-within .wm-topbar__navmenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.wm-topbar__navmenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 20px;
    background: var(--wm-glass-bg);
    backdrop-filter: var(--wm-glass-blur);
    -webkit-backdrop-filter: var(--wm-glass-blur);
    border: 1px solid var(--wm-glass-border);
    box-shadow: 0 20px 50px rgba(20, 22, 26, 0.18);
}

.wm-topbar__navmenu-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    min-height: 78px;
    padding: 14px 14px 12px;
    border-radius: 14px;
    color: #fff;
    overflow: hidden;
    transition: transform 0.18s var(--wm-ease), box-shadow 0.18s var(--wm-ease);
}

.wm-topbar__navmenu-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -10px rgba(20, 22, 26, 0.4);
}

.wm-topbar__navmenu-cell svg {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 17px;
    height: 17px;
    stroke: rgba(255, 255, 255, 0.9);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wm-topbar__navmenu-cell span {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1.25;
}

.wm-topbar__navmenu-cell--blue { background: linear-gradient(135deg, #045f91, #0082c9); }
.wm-topbar__navmenu-cell--pink { background: linear-gradient(135deg, #a3065c, #e5097f); }
.wm-topbar__navmenu-cell--green { background: linear-gradient(135deg, #5c7a1a, #8aad2a); }
.wm-topbar__navmenu-cell--darkgreen { background: linear-gradient(135deg, #33450f, #4c661a); }
.wm-topbar__navmenu-cell--navy { background: linear-gradient(135deg, #182f63, #264796); }
.wm-topbar__navmenu-cell--amber { background: linear-gradient(135deg, #8a5a0d, #c07a12); }
.wm-topbar__navmenu-cell--red { background: linear-gradient(135deg, #7a1728, #c0304a); }
.wm-topbar__navmenu-cell--orange { background: linear-gradient(135deg, #8a4008, #d9631e); }
.wm-topbar__navmenu-cell--brown { background: linear-gradient(135deg, #3d2415, #6b4226); }
.wm-topbar__navmenu-cell--teal { background: linear-gradient(135deg, #0b5c56, #0f8a7f); }

.wm-topbar__search {
    position: relative;
    flex: 0 1 220px;
    min-width: 140px;
}

.wm-topbar__search svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--wm-text-muted);
    pointer-events: none;
}

.wm-topbar__search input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 12px 7px 32px;
    border-radius: 999px;
    border: 1px solid var(--wm-border);
    background: #fff;
    font: inherit;
    font-size: 13px;
    color: var(--wm-text);
}

.wm-topbar__search input:focus {
    outline: none;
    border-color: var(--wm-navy);
}

.wm-searchResults {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 320px;
    max-width: 380px;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--wm-border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(20, 22, 26, 0.18);
    z-index: 50;
    padding: 6px 0;
}

.wm-searchResults.is-open {
    display: block;
}

.wm-searchResults__group {
    padding: 8px 14px 4px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wm-text-muted);
    font-weight: 700;
}

.wm-searchResults__item {
    display: block;
    padding: 7px 14px;
    text-decoration: none;
    color: var(--wm-text);
}

.wm-searchResults__item:hover {
    background: rgba(20, 22, 26, 0.05);
}

.wm-searchResults__title {
    font-size: 13.5px;
    font-weight: 600;
}

.wm-searchResults__subtitle {
    font-size: 11.5px;
    color: var(--wm-text-muted);
    margin-top: 1px;
}

.wm-searchResults__empty,
.wm-searchResults__hint {
    padding: 14px;
    font-size: 13px;
    color: var(--wm-text-muted);
}

.wm-topbar__right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wm-topbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wm-text-muted);
}

.wm-topbar__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--wm-accent-soft);
    color: var(--wm-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.wm-topbar__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--wm-text-muted);
    transition: background 0.16s var(--wm-ease), color 0.16s var(--wm-ease);
}

.wm-topbar__logout:hover {
    background: rgba(20, 22, 26, 0.06);
    color: var(--wm-text);
}

.wm-content {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 28px 32px;
}

/* Sections */

.wm-section {
    margin-bottom: 28px;
}

.wm-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wm-text);
    margin: 0 0 12px;
}

.wm-section__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.wm-section__icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
}

.wm-section__icon .wm-icon {
    width: 14px;
    height: 14px;
}

.wm-section__icon--blue { background: rgba(0, 130, 201, 0.12); }
.wm-section__icon--blue .wm-icon { color: var(--wm-blue); }
.wm-section__icon--pink { background: rgba(229, 9, 127, 0.1); }
.wm-section__icon--pink .wm-icon { color: var(--wm-pink); }
.wm-section__icon--green { background: rgba(148, 186, 45, 0.14); }
.wm-section__icon--green .wm-icon { color: var(--wm-green); }
.wm-section__icon--navy { background: rgba(38, 71, 150, 0.1); }
.wm-section__icon--navy .wm-icon { color: var(--wm-navy); }
.wm-section__icon--amber { background: rgba(192, 122, 18, 0.12); }
.wm-section__icon--amber .wm-icon { color: var(--wm-amber); }
.wm-section__icon--red { background: rgba(192, 48, 74, 0.1); }
.wm-section__icon--red .wm-icon { color: var(--wm-red); }
.wm-section__icon--orange { background: rgba(217, 99, 30, 0.12); }
.wm-section__icon--orange .wm-icon { color: var(--wm-orange); }
.wm-section__icon--brown { background: rgba(107, 66, 38, 0.12); }
.wm-section__icon--brown .wm-icon { color: var(--wm-brown); }

/* Cards grid */

.wm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.wm-card--break-row {
    /* forces the auto-placement grid to skip to a fresh row without stretching this card full-width */
    grid-column-start: 1;
}

/* Solid card, no glass/blur, smaller radius — same treatment given to the
   Tables/file-library cards: a translucent tint over a blurred panel read
   as hazy rather than crisp, and the decorative dot pattern under the icon
   (below) was pure decoration with no function. */
.wm-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(20, 22, 26, 0.08);
    box-shadow: 0 1px 2px rgba(20, 22, 26, 0.05);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    animation: wm-rise 0.5s var(--wm-ease) forwards;
    animation-delay: calc(var(--wm-i, 0) * 60ms);
    transition: transform 0.22s var(--wm-ease), box-shadow 0.22s var(--wm-ease);
}

.wm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(20, 22, 26, 0.14);
}

.wm-card:active {
    transform: translateY(-2px) scale(0.99);
}

.wm-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    overflow: hidden;
}

.wm-card__media .wm-icon {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    color: #fff;
}

.wm-card--blue .wm-card__media { background: #0082c9; }
.wm-card--pink .wm-card__media { background: #e5097f; }
.wm-card--green .wm-card__media { background: #8aad2a; }
.wm-card--navy .wm-card__media { background: #264796; }
.wm-card--amber .wm-card__media { background: #c07a12; }
.wm-card--red .wm-card__media { background: #c0304a; }
.wm-card--orange .wm-card__media { background: #d9631e; }
.wm-card--brown .wm-card__media { background: #6b4226; }
.wm-card--darkgreen .wm-card__media { background: #4c661a; }
.wm-card--teal .wm-card__media { background: #0f8a7f; }

.wm-card__body {
    position: relative;
    z-index: 1;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.wm-card__title {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.006em;
}

.wm-card__desc {
    font-size: 12.5px;
    color: var(--wm-text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.wm-card__more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wm-accent);
}

.wm-card__more svg {
    width: 13px;
    height: 13px;
    transition: transform 0.22s var(--wm-ease);
}

.wm-card--blue .wm-card__more { color: var(--wm-blue); }
.wm-card--pink .wm-card__more { color: var(--wm-pink); }
.wm-card--green .wm-card__more { color: #6f8f1f; }
.wm-card--navy .wm-card__more { color: var(--wm-navy); }
.wm-card--amber .wm-card__more { color: var(--wm-amber); }
.wm-card--red .wm-card__more { color: var(--wm-red); }
.wm-card--orange .wm-card__more { color: var(--wm-orange); }
.wm-card--brown .wm-card__more { color: #6b4226; }
.wm-card--darkgreen .wm-card__more { color: #4c661a; }
.wm-card--teal .wm-card__more { color: #0f8a7f; }

.wm-card:hover .wm-card__more svg {
    transform: translateX(4px);
}

.wm-empty-state {
    border: 1px dashed var(--wm-border);
    border-radius: var(--wm-radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--wm-text-muted);
    font-size: 13.5px;
    max-width: 460px;
}

/* Back link (category page) */

.wm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wm-text-muted);
    margin-bottom: 18px;
    transition: color 0.16s var(--wm-ease), gap 0.16s var(--wm-ease);
}

.wm-back-link .wm-icon {
    color: inherit;
}

.wm-back-link:hover {
    color: var(--wm-accent);
    gap: 10px;
}

/* Bento dashboard grid */

.wm-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.wm-bento__tile {
    position: relative;
    grid-column: span 1;
    min-height: 200px;
    border-radius: 26px;
    padding: 26px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    opacity: 0;
    animation: wm-rise 0.55s var(--wm-ease) forwards;
    animation-delay: calc(var(--wm-i, 0) * 90ms);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 14px 30px -8px rgba(20, 22, 26, 0.28);
    transition: transform 0.32s var(--wm-ease), box-shadow 0.32s var(--wm-ease);
}

.wm-bento__tile::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    right: -70px;
    bottom: -90px;
    pointer-events: none;
    transition: transform 0.4s var(--wm-ease);
}

.wm-bento__tile:hover {
    transform: scale(1.035);
    box-shadow: 0 24px 44px -10px rgba(20, 22, 26, 0.36);
    z-index: 2;
}

.wm-bento__tile:hover::after {
    transform: scale(1.15) translate(6px, -6px);
}

.wm-bento__tile:active {
    transform: scale(1.03);
}

.wm-bento__tile--blue { background: linear-gradient(135deg, #045f91, #0082c9); }
.wm-bento__tile--pink { background: linear-gradient(135deg, #a3065c, #e5097f); }
.wm-bento__tile--green { background: linear-gradient(135deg, #5c7a1a, #8aad2a); }
.wm-bento__tile--darkgreen { background: linear-gradient(135deg, #33450f, #4c661a); }
.wm-bento__tile--navy { background: linear-gradient(135deg, #182f63, #264796); }
.wm-bento__tile--amber { background: linear-gradient(135deg, #8a5a0d, #c07a12); }
.wm-bento__tile--red { background: linear-gradient(135deg, #7a1728, #c0304a); }
.wm-bento__tile--orange { background: linear-gradient(135deg, #8a4008, #d9631e); }
.wm-bento__tile--brown { background: linear-gradient(135deg, #3d2415, #6b4226); }
.wm-bento__tile--teal { background: linear-gradient(135deg, #0b5c56, #0f8a7f); }

.wm-bento__icon {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    transition: transform 0.3s var(--wm-ease);
}

.wm-bento__tile:hover .wm-bento__icon {
    transform: scale(1.16);
}

.wm-bento__icon .wm-icon {
    width: 22px;
    height: 22px;
    color: #fff;
}

.wm-bento__body {
    position: relative;
    z-index: 1;
}

.wm-bento__title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 4px;
}

.wm-bento__desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.4;
    max-width: 320px;
}

.wm-bento__meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.wm-bento__count {
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

@media (max-width: 780px) {
    .wm-bento {
        grid-template-columns: 1fr;
    }

    .wm-bento__tile:first-child {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Auth page */

.wm-auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wm-sidebar-bg);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wm-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px;
    background: var(--wm-glass-bg);
    backdrop-filter: var(--wm-glass-blur);
    -webkit-backdrop-filter: var(--wm-glass-blur);
    border: 1px solid var(--wm-glass-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 20px 48px rgba(20, 22, 26, 0.1);
    border-radius: var(--wm-radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: wm-rise 0.45s var(--wm-ease) both;
}

.wm-auth-card__logo {
    margin-bottom: 6px;
}

.wm-auth-card__logo-img {
    height: 26px;
    width: auto;
}

.wm-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--wm-text-muted);
}

.wm-field input {
    font-family: inherit;
    font-size: 13.5px;
    padding: 8px 10px;
    border: 1px solid var(--wm-border);
    border-radius: var(--wm-radius-sm);
    color: var(--wm-text);
    outline: none;
    transition: border-color 0.16s var(--wm-ease), box-shadow 0.16s var(--wm-ease);
}

.wm-field input:focus {
    border-color: var(--wm-accent);
    box-shadow: 0 0 0 3px var(--wm-accent-soft);
}

.wm-btn {
    position: relative;
    font-family: inherit;
    border: none;
    border-radius: var(--wm-radius-sm);
    padding: 9px 14px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.16s var(--wm-ease), transform 0.12s var(--wm-ease), box-shadow 0.16s var(--wm-ease);
}

.wm-btn--primary {
    background: linear-gradient(155deg, var(--wm-accent-hover), var(--wm-accent) 60%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 16px rgba(38, 71, 150, 0.28);
}

.wm-btn--primary::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.55s var(--wm-ease);
}

.wm-btn--primary:hover {
    background: linear-gradient(155deg, var(--wm-accent-hover), #16255c 60%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 20px rgba(38, 71, 150, 0.36);
}

.wm-btn--primary:hover::before {
    left: 130%;
}

.wm-btn--primary:active {
    transform: scale(0.97);
}

.wm-alert {
    background: var(--wm-danger-bg);
    color: var(--wm-danger-text);
    border-radius: var(--wm-radius-sm);
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 500;
    animation: wm-rise 0.3s var(--wm-ease) both;
}

/* Shared "materialize" motion for custom modal/popover surfaces that module
   JS builds and appends to <body> (position/edit/PDF-setup modals, dropdown
   panels, etc.) — a surface should arrive as a real object (scale + fade
   together), not blink into existence. Add .wm-materialize-backdrop to the
   dimming scrim and .wm-materialize to the panel; toggle .is-open on both a
   frame after insertion to animate in, remove it and wait ~180ms before
   detaching from the DOM to animate out. Set transform-origin from the
   trigger element's position where one exists, so the surface reads as
   coming from what opened it rather than fading in at a fixed spot. */
.wm-materialize-backdrop {
    opacity: 0;
    transition: opacity 0.18s var(--wm-ease);
}

.wm-materialize-backdrop.is-open {
    opacity: 1;
}

.wm-materialize {
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.18s var(--wm-ease), transform 0.22s var(--wm-ease);
}

.wm-materialize.is-open {
    opacity: 1;
    transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .wm-card,
    .wm-auth-card,
    .wm-alert,
    .wm-bento__tile {
        animation: none !important;
        opacity: 1 !important;
    }

    .wm-materialize-backdrop,
    .wm-materialize {
        transition: opacity 0.15s ease !important;
        transform: none !important;
    }

    .wm-card,
    .wm-card__media .wm-icon,
    .wm-card__more svg,
    .wm-topbar__link,
    .wm-topbar__logo,
    .wm-topbar__navmenu-panel,
    .wm-topbar__navmenu-chev,
    .wm-topbar__navmenu-cell,
    .wm-btn--primary::before,
    .wm-bento__tile,
    .wm-bento__tile::after,
    .wm-bento__icon,
    .wm-bento__arrow,
    .wm-icon {
        transition: none !important;
        animation: none !important;
    }

    .wm-btn--primary::before {
        display: none;
    }
}

@media (prefers-contrast: more) {
    .wm-topbar,
    .wm-card,
    .wm-auth-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--wm-surface);
    }
}

@media (max-width: 720px) {
    .wm-topbar {
        padding: 10px 16px;
        gap: 14px;
        flex-wrap: wrap;
    }

    .wm-topbar__logo {
        height: 30px;
    }

    .wm-topbar__nav {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .wm-topbar__navmenu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wm-topbar__user span:last-child {
        display: none;
    }

    .wm-content {
        padding: 16px;
    }
}

/* Shared page background sampled from the approved reference. */
html,
body,
body.wm-auth-body {
    background: #eff2f6 !important;
}

/* Text panels and cards use the approved neutral sample. */
body .wm-card,
body .wm-auth-card,
body .imo-card,
body .imo-add-box {
    background: #eff2f6;
}
