@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* EZ Show Manager — Frontend Styles v1.1.0 */

.esm-wrap {
    max-width: 960px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}

/* ── Account Hub ──────────────────────────────────────────────────────────── */
.esm-account {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem 1.5rem;
    font-family: 'Source Sans 3', -apple-system, sans-serif;
    color: #183244;
}

.esm-account,
.esm-account * {
    box-sizing: border-box;
}

.esm-account__hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    background: #0a3d62;
    color: #fff;
    box-shadow: 0 12px 24px rgba(10, 61, 98, .14);
    margin-bottom: 1.15rem;
}

.esm-account__hero--friendly {
    min-height: 0;
}

.esm-account__hero-copy,
.esm-account__hero-meta {
    min-width: 0;
}

.esm-account__hero-copy {
    flex: 1 1 auto;
}

.esm-account__eyebrow {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    opacity: .78;
    margin-bottom: .45rem;
}

.esm-account__hero h1 {
    margin: 0 0 .35rem;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.015em;
    color: #fff;
    word-break: break-word;
}

.esm-account__hero p {
    margin: 0;
    max-width: 34rem;
    font-size: .94rem;
    line-height: 1.5;
    color: rgba(255,255,255,.88);
}

.esm-account__hero-email {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,.96);
}

.esm-account__role-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    margin-top: .85rem;
}

.esm-account__role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: #f2c66d;
    color: #183244;
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.esm-account__role-pill--link {
    text-decoration: none;
    transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
    box-shadow: 0 6px 14px rgba(242, 198, 109, .18);
}

.esm-account__role-pill--link:hover,
.esm-account__role-pill--link:focus-visible {
    background: #c8d8c0;
    color: #183244;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(12, 45, 67, .18);
}

.esm-account__role-copy {
    font-size: .94rem;
    color: rgba(255,255,255,.84);
    max-width: 44rem;
}

.esm-account__hero-actions {
    margin-top: .8rem;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.esm-account__hero-actions--friendly {
    margin-top: 0;
    gap: .7rem;
}

.esm-account__hero-actions--stacked {
    flex: 0 0 auto;
    min-width: 190px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: .65rem;
}

.esm-account__hero-actions .esm-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 9px 15px;
    font-size: .88rem;
    text-decoration: none;
    justify-content: center;
    width: 100%;
}

.esm-account__role-pill--hero {
    width: 100%;
}

.esm-account__hero-actions .esm-btn--primary {
    background: #fff;
    border-color: #fff;
    color: #0a3d62;
}

.esm-account__hero-actions .esm-btn--primary:hover {
    background: #edf5fb;
    border-color: #edf5fb;
    color: #0a3d62;
}

.esm-account__hero-actions .esm-btn--outline {
    background: transparent;
    border-color: rgba(255,255,255,.4);
    color: #fff;
}

.esm-account__hero-actions .esm-btn--outline:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.6);
    color: #fff;
}

.esm-account__hero-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: .6rem;
    align-content: start;
}

.esm-account__hero-meta--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: start;
}

.esm-account__hero-meta--friendly {
    gap: .75rem;
    align-content: center;
}

.esm-account__hero-chip {
    padding: .8rem .95rem;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
}

.esm-account__hero-chip--compact {
    min-height: 0;
}

.esm-account__hero-chip strong,
.esm-account__hero-chip span {
    display: block;
}

.esm-account__hero-chip strong {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .12rem;
}

.esm-account__hero-chip span {
    font-size: .8rem;
    color: rgba(255,255,255,.8);
}

.esm-account__hero-chip--signout span a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.esm-account__hero-chip--signout span a:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .esm-account__hero {
        display: block;
    }

    .esm-account__hero-actions--stacked {
        min-width: 0;
        margin-top: 1rem;
    }
}

.esm-account__section {
    margin-bottom: 1.4rem;
    padding: 1.15rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border: 1px solid #dce8f2;
    box-shadow: 0 10px 24px rgba(10, 61, 98, .06);
}

.esm-account__welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #fffaf0, #fff6e7);
    border: 1px solid #e5d3a9;
    box-shadow: 0 10px 24px rgba(150, 124, 72, .08);
}

.esm-account__welcome-copy {
    min-width: 0;
}

.esm-account__welcome-title {
    margin-bottom: .25rem;
    font-size: .95rem;
    font-weight: 800;
    color: #76603a;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.esm-account__welcome p {
    margin: 0 0 .55rem;
    color: #685739;
    font-size: .94rem;
}

.esm-account__welcome-url {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .82rem;
    color: #5f6f50;
    word-break: break-all;
}

.esm-account__welcome-actions {
    flex-shrink: 0;
}

.esm-account__announcement {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #fffaf0, #fff6e7);
    border: 1px solid #e5d3a9;
    box-shadow: 0 10px 24px rgba(150, 124, 72, .08);
}

.esm-account__announcement-copy {
    min-width: 0;
}

.esm-account__announcement-title {
    margin-bottom: .35rem;
    font-size: .95rem;
    font-weight: 800;
    color: #76603a;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.esm-account__announcement-text p {
    margin: 0 0 .55rem;
    color: #685739;
    font-size: .96rem;
    line-height: 1.55;
}

.esm-account__announcement-text p:last-child {
    margin-bottom: 0;
}

.esm-account__announcement-actions {
    flex-shrink: 0;
}

.esm-account__balance {
    margin-bottom: 1.4rem;
    padding: 1.25rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff9f9, #fff1f1);
    border: 1px solid #efc3c3;
    box-shadow: 0 10px 24px rgba(159, 47, 47, .08);
}

.esm-account__balance-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.esm-account__balance-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .8rem;
}

.esm-account__balance-eyebrow {
    margin-bottom: .35rem;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9f2f2f;
}

.esm-account__balance-head h2 {
    margin: 0 0 .35rem;
    font-size: 1.45rem;
    font-weight: 800;
    color: #7a2323;
}

.esm-account__balance-head p {
    margin: 0;
    max-width: 42rem;
    color: #7a3535;
    font-size: .96rem;
    line-height: 1.6;
}

.esm-account__balance-total {
    min-width: 170px;
    padding: .95rem 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #f0d6d6;
    text-align: right;
}

.esm-account__balance-total span,
.esm-account__balance-total strong {
    display: block;
}

.esm-account__balance-total span {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9f2f2f;
}

.esm-account__balance-total strong {
    margin-top: .2rem;
    font-size: 1.65rem;
    font-weight: 800;
    color: #7a2323;
}

.esm-account__balance-note {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,.78);
    border: 1px solid #f1d8d8;
    color: #7a3535;
    font-size: .9rem;
}

.esm-account__balance-list {
    display: grid;
    gap: .85rem;
    margin-top: 1rem;
}

.esm-account__balance-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.05rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #f0d6d6;
}

.esm-account__balance-item h3 {
    margin: 0 0 .25rem;
    font-size: 1rem;
    font-weight: 800;
    color: #183244;
}

.esm-account__balance-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    color: #6f5a5a;
    font-size: .88rem;
}

.esm-account__balance-amount {
    text-align: right;
    min-width: 135px;
}

.esm-account__balance-amount span,
.esm-account__balance-amount strong {
    display: block;
}

.esm-account__balance-amount span {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9f2f2f;
    font-weight: 700;
}

.esm-account__balance-amount strong {
    margin-top: .2rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: #7a2323;
}

.esm-account__balance-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem;
    margin-top: 1rem;
}

.esm-account__balance-form {
    margin: 0;
    display: inline-flex;
    align-items: stretch;
}

.esm-account__balance-form--header .esm-btn {
    min-width: 220px;
}

.esm-account__balance-pay-btn {
    min-width: 220px;
}

.esm-account__balance-pay-btn:hover {
    color: #f7dc6f;
}

.esm-account__balance-actions .esm-btn,
.esm-account__balance-actions .esm-account__balance-form .esm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    line-height: 1.2;
    vertical-align: middle;
}

.esm-account__balance-hint {
    font-size: .9rem;
    color: #7a3535;
}

.esm-account__section-head {
    margin-bottom: .9rem;
}

.esm-account__section-head h2 {
    margin: 0 0 .25rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0a3d62;
}

.esm-account__section-head p {
    margin: 0;
    font-size: .92rem;
    color: #5f7384;
}

.esm-manager-reports__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: 1.25rem;
}

.esm-manager-reports__card {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border: 1px solid #dce8f2;
    box-shadow: 0 10px 22px rgba(10, 61, 98, .06);
}

.esm-manager-reports__kicker {
    margin-bottom: .45rem;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7c8e;
}

.esm-manager-reports__card h3 {
    margin: 0 0 .25rem;
    font-size: 1.95rem;
    line-height: 1.05;
    font-weight: 800;
    color: #1a2535;
}

.esm-manager-reports__card p {
    margin: 0;
    font-size: .9rem;
    color: #5f7384;
}

.esm-account__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.esm-account__grid--dashboards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.esm-account-card {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 1.35rem;
    border-radius: 20px;
    border: 1px solid #d7e3ee;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,252,.98));
    box-shadow: 0 12px 28px rgba(10, 61, 98, .08);
    position: relative;
    overflow: hidden;
}

.esm-account-card--workspace {
    background:
        linear-gradient(180deg, rgba(250,252,255,.98), rgba(240,246,251,.98));
    border-color: #cfe0ec;
}

.esm-account-card--disabled {
    background:
        linear-gradient(180deg, rgba(245,247,249,.98), rgba(237,241,245,.98));
    border-color: #d7dfe6;
    box-shadow: 0 10px 22px rgba(78, 99, 116, .08);
}

.esm-account-card--disabled::before {
    background: linear-gradient(90deg, #aab7c3, #c3ccd4, #d9e0e6);
}

.esm-account-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0a3d62, #2e7d8a, #b8963a);
}

.esm-account-card__icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #e8f0f8;
    color: #0a3d62;
    font-size: 1.45rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 0 1px rgba(10, 61, 98, .06);
}

.esm-account-card__icon--ribbon {
    position: relative;
    background: #e8f0f8;
}

.esm-account-card__icon--ribbon::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background:
        radial-gradient(circle, #ffffff 0 23%, transparent 24%),
        repeating-conic-gradient(from 0deg, #2f80d0 0 14deg, #185f9f 14deg 28deg);
    box-shadow: 0 2px 6px rgba(10, 61, 98, .18);
    transform: translateX(-50%);
}

.esm-account-card__icon--ribbon::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 22px;
    height: 18px;
    background: linear-gradient(90deg, #185f9f 0 48%, transparent 48% 52%, #2f80d0 52% 100%);
    clip-path: polygon(0 0, 48% 0, 48% 100%, 24% 76%, 0 100%, 0 0, 52% 0, 100% 0, 100% 100%, 76% 76%, 52% 100%);
    transform: translateX(-50%);
}

.esm-account-card--support {
    order: 100;
}

.esm-account-card--disabled .esm-account-card__icon {
    background: #eef2f5;
    color: #7d8d9b;
}

.esm-account-card__kicker {
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #7a8e9e;
    margin-bottom: .65rem;
}

.esm-account-card h3 {
    margin: 0 0 .45rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0a3d62;
}

.esm-account-card p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.65;
    color: #4e6374;
}

.esm-account-card--disabled h3,
.esm-account-card--disabled p,
.esm-account-card--disabled .esm-account-card__meta {
    color: #7a8a97;
}

.esm-account-card__meta {
    margin-top: .95rem;
    font-size: .84rem;
    font-weight: 600;
    color: #6a7f90;
}

.esm-account-card__actions {
    margin-top: auto;
    padding-top: 1.15rem;
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.esm-account-card__actions .esm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: .88rem;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
}

.esm-account-card__action-stack {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.esm-account-card__action-stack .esm-btn {
    width: 100%;
    justify-content: center;
}

.esm-account-card__actions--manager {
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .7rem;
}

.esm-account-card__actions--manager .esm-account-card__action-stack {
    flex: 1 1 0;
    min-width: 0;
}

.esm-account-card__actions--manager .esm-btn {
    white-space: nowrap;
    min-height: 40px;
    padding: 9px 10px;
    font-size: .84rem;
}

@media (max-width: 640px) {
    .esm-account-card__actions--manager {
        flex-wrap: wrap;
    }

    .esm-account-card__actions--manager .esm-account-card__action-stack {
        flex-basis: 100%;
    }
}

.esm-account-card__actions .esm-btn--primary {
    background: linear-gradient(135deg, #0a3d62, #12527d);
    border-color: #0a3d62;
    color: #fff;
}

.esm-account-card__actions .esm-btn--primary:hover {
    background: linear-gradient(135deg, #082d49, #0d4569);
    border-color: #082d49;
    color: #fff;
}

.esm-account-card__actions .esm-btn--outline {
    background: #fff;
    border-color: #b8cddd;
    color: #0a3d62;
}

.esm-account-card__actions .esm-btn--outline:hover {
    background: #edf5fb;
    border-color: #0a3d62;
    color: #0a3d62;
}

.esm-account-card__actions .esm-btn--disabled {
    background: #e8edf1;
    border-color: #c5d0d9;
    color: #748594;
    cursor: default;
    pointer-events: none;
}

.esm-account a {
    text-decoration: none;
}

@media (max-width: 1024px) {
    .esm-account__grid--dashboards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .esm-account__grid,
    .esm-account__grid--dashboards,
    .esm-account__hero {
        grid-template-columns: 1fr;
    }

    .esm-account__role-line {
        align-items: flex-start;
    }

    .esm-account__hero-meta--compact {
        grid-template-columns: 1fr 1fr;
    }


    .esm-account__balance-head,
    .esm-account__balance-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .esm-account__balance-summary {
        width: 100%;
        align-items: stretch;
    }

    .esm-account__balance-total,
    .esm-account__balance-amount {
        min-width: 0;
        width: 100%;
        text-align: left;
    }

    .esm-account__section {
        padding: 1rem;
        border-radius: 16px;
    }

    .esm-account__welcome,
    .esm-account__announcement {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Notices ──────────────────────────────────────────────────────────────── */
.esm-notice {
    border-radius: 6px;
    padding: 12px 18px;
    margin: 14px 0;
    border-left: 5px solid;
    font-size: 0.95rem;
}
.esm-notice--info    { background:#d1ecf1; border-color:#0c5460; color:#0c5460; }
.esm-notice--error   { background:#f8d7da; border-color:#721c24; color:#721c24; }
.esm-notice--success { background:#d4edda; border-color:#155724; color:#155724; }
.esm-notice--warning { background:#fff3cd; border-color:#856404; color:#856404; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.esm-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all .15s;
    line-height: 1.4;
}
.esm-btn--primary  { background:#2B5797; color:#fff; border-color:#2B5797; }
.esm-btn--primary:hover { background:#1d3f6e; border-color:#1d3f6e; color:#fff; }
.esm-btn--outline  { background:transparent; color:#2B5797; border-color:#2B5797; }
.esm-btn--outline:hover { background:#2B5797; color:#fff; }
.esm-btn--danger   { background:#dc3545; color:#fff; border-color:#dc3545; }
.esm-btn--danger:hover { background:#b02a37; border-color:#b02a37; color:#fff; }
.esm-btn--small    { padding: 4px 12px; font-size: 0.8rem; }
.esm-btn--xsmall   { padding: 2px 8px;  font-size: 0.75rem; }
.esm-btn--large    { padding: 12px 28px; font-size: 1rem; }
.esm-btn--add      { margin-top: 10px; }

/* ── Status badges ────────────────────────────────────────────────────────── */
.esm-status-badge, .esm-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.esm-type-badge { background:#e8f0fe; color:#2B5797; margin-right: 6px; }

/* ── Dashboard header ─────────────────────────────────────────────────────── */
.esm-dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e5e5e5;
}
.esm-dashboard__header h2 { margin: 0; color: #2B5797; }

/* ── Show Cards ───────────────────────────────────────────────────────────── */
.esm-show-list { display: flex; flex-direction: column; gap: 16px; }

.esm-show-card {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.esm-show-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.esm-show-card__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.esm-show-card__title h3 { margin: 0; font-size: 1.15rem; color: #1d2327; }
.esm-show-card__actions { display: flex; gap: 8px; flex-shrink: 0; }

.esm-show-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 8px;
}

.esm-show-card__dates {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
    display: flex;
    gap: 20px;
}

.esm-show-card__links { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eee; }

.esm-share-url { margin-bottom: 8px; }
.esm-share-url label { display: block; font-size: 0.82rem; font-weight: 600; color: #555; margin-bottom: 4px; }
.esm-share-url__row { display: flex; gap: 8px; align-items: center; }
.esm-share-input {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    background: #f8f9fa;
    color: #333;
    min-width: 0;
}

/* ── Show Form ────────────────────────────────────────────────────────────── */
.esm-form-wrap { max-width: 800px; }

.esm-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e5e5e5;
}
.esm-form-header h2 { margin: 0; color: #2B5797; }

.esm-form-section {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.esm-form-section__title {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #2B5797;
    font-weight: 700;
    border-bottom: 1px solid #eef0f4;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.esm-form-section__desc {
    font-size: 0.88rem;
    color: #666;
    margin: -8px 0 16px;
}

.esm-optional { font-size: 0.8rem; font-weight: 400; color: #888; }

.esm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.esm-field { display: flex; flex-direction: column; }
.esm-field--full { grid-column: 1 / -1; }
.esm-entry-timing-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.esm-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}
.esm-required { color: #dc3545; }

.esm-field input[type="text"],
.esm-field input[type="number"],
.esm-field input[type="date"],
.esm-field input[type="email"],
.esm-field select,
.esm-field textarea {
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    font-size: 0.92rem;
    color: #333;
    transition: border-color .15s;
    background: #fff;
}

.esm-field select,
.esm-efield select,
.esm-walkin-field select,
.esm-sec-wrap select,
#esm-dashboard select {
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-right: 38px !important;
    background-image:
        linear-gradient(45deg, transparent 50%, #0a3d62 50%),
        linear-gradient(135deg, #0a3d62 50%, transparent 50%) !important;
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50% !important;
    background-size:
        6px 6px,
        6px 6px !important;
    background-repeat: no-repeat !important;
}

.esm-field select:disabled,
.esm-efield select:disabled,
.esm-walkin-field select:disabled,
.esm-sec-wrap select:disabled,
#esm-dashboard select:disabled {
    background-image:
        linear-gradient(45deg, transparent 50%, #8a97a8 50%),
        linear-gradient(135deg, #8a97a8 50%, transparent 50%) !important;
}
.esm-field input:focus,
.esm-field select:focus,
.esm-field textarea:focus {
    outline: none;
    border-color: #2B5797;
    box-shadow: 0 0 0 2px rgba(43,87,151,.15);
}
.esm-field__hint { font-size: 0.78rem; color: #888; margin: 4px 0 0; }

/* ── Divisions & Classes ──────────────────────────────────────────────────── */
.esm-division-row {
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #f8f9fd;
}

.esm-division-row__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.esm-division-pricing-row {
    display: none;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 10px;
    margin: 10px 0 12px 28px;
}

.esm-division-price-field {
    display: grid;
    grid-template-columns: auto 18px minmax(90px, 1fr);
    align-items: center;
    gap: 5px;
    color: #486176;
    font-size: .82rem;
    font-weight: 600;
}

.esm-division-price-field input {
    width: 100%;
}

.esm-division-handle { color: #aaa; cursor: grab; font-size: 1.1rem; flex-shrink: 0; }

.esm-division-name {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 600;
}

.esm-classes-container { padding-left: 20px; margin-bottom: 8px; }

.esm-class-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.esm-class-bullet { color: #aaa; flex-shrink: 0; }

.esm-class-name {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.88rem;
}

/* ── Add-ons ──────────────────────────────────────────────────────────────── */
.esm-addon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    background: #f8f9fd;
    border: 1px solid #e0e4ed;
    border-radius: 5px;
    padding: 8px 12px;
}

.esm-addon-label {
    flex: 2;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.esm-addon-price-prefix { color: #555; font-weight: 600; flex-shrink: 0; }

.esm-addon-price {
    width: 90px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ── Form Actions ─────────────────────────────────────────────────────────── */
.esm-form-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 20px 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .esm-form-grid { grid-template-columns: 1fr; }
    .esm-field--full { grid-column: 1; }
    .esm-entry-timing-row { grid-template-columns: 1fr; }
    .esm-show-card__header { flex-direction: column; gap: 10px; }
    .esm-dashboard__header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .esm-addon-row { flex-wrap: wrap; }
    .esm-account__grid,
    .esm-account__grid--dashboards,
    .esm-account__hero { grid-template-columns: 1fr; }
    .esm-account { margin: 1.25rem auto; }
    .esm-account__hero { padding: 1.25rem; border-radius: 18px; }
    .esm-account__hero h1 { font-size: 1.8rem; }
    .esm-account-card { min-height: auto; }
}

/* ── Secretary ────────────────────────────────────────────────────────────── */
.esm-secretary-current {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f0f4fb;
    border: 1px solid #dde3ec;
    border-radius: 6px;
    margin-bottom: 14px;
}
.esm-secretary-label { font-size: 0.85rem; color: #666; white-space: nowrap; }
.esm-secretary-name  { flex: 1; font-size: 0.92rem; }

.esm-secretary-assign { margin-top: 4px; }

.esm-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    padding: 8px 12px;
    border: 1px solid #dde3ec;
    border-radius: 6px;
    background: #f8f9fd;
    margin-bottom: 12px;
}
.esm-checkbox-option input[type="checkbox"] { accent-color: #2B5797; width: 16px; height: 16px; flex-shrink: 0; }

.esm-input-btn-row { display: flex; gap: 8px; align-items: center; }
.esm-input-btn-row input { flex: 1; }

.esm-secretary-email-row { max-width: 420px; margin-bottom: 12px; }
.esm-secretary-found { display: flex; align-items: center; gap: 12px; }

.esm-hidden { display: none !important; }

.esm-assign-self-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #2B5797;
    margin-bottom: 14px;
    text-decoration: none;
}
.esm-assign-self-link:hover { text-decoration: underline; }


/* ============================================================
   ESM Entry Form — Equestrian aesthetic
   Forest greens · warm cream · brass accents
   Adapted from driven-ct form styles
   ============================================================ */


:root {
    --esm-green:       #2c4a2e;
    --esm-green-mid:   #3d6b40;
    --esm-green-light: #e8f0e8;
    --esm-brass:       #b8963a;
    --esm-brass-light: #f5edd6;
    --esm-cream:       #faf8f3;
    --esm-text:        #1e2821;
    --esm-text-muted:  #6b7c6e;
    --esm-border:      #cdd8ce;
    --esm-error:       #b33a3a;
    --esm-radius:      10px;
    --esm-shadow:      0 4px 24px rgba(44,74,46,.10);
    --esm-transition:  all 0.22s cubic-bezier(.4,0,.2,1);
}

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.esm-entry-wrap {
    max-width: 720px;
    margin: 2rem auto;
    font-family: 'Source Sans 3', -apple-system, sans-serif;
    color: var(--esm-text);
}

/* ── Guards ───────────────────────────────────────────────────────────────── */
.esm-entry-guard {
    padding: 1.5rem;
    border-radius: var(--esm-radius);
    font-family: 'Source Sans 3', sans-serif;
    font-size: .95rem;
}
.esm-entry-guard--error   { background:#fdf2f2; border:1px solid #e9aeae; color:#721c24; }
.esm-entry-guard--warning { background:var(--esm-brass-light); border:1px solid var(--esm-brass); color:#6b4a00; }

/* ── Info Banners ─────────────────────────────────────────────────────────── */
.esm-entry-banner {
    padding: 12px 16px;
    border-radius: var(--esm-radius);
    margin-bottom: 1.2rem;
    font-size: .9rem;
    font-weight: 500;
}
.esm-entry-banner--waitlist { background:var(--esm-brass-light); border:1.5px solid var(--esm-brass); color:#6b4a00; }
.esm-entry-banner--warning  { background:#fff3cd; border:1.5px solid #ffc107; color:#856404; }

/* ── Step Indicators ──────────────────────────────────────────────────────── */
.esm-entry-show-header {
    text-align: center;
    margin: 0 auto 1.8rem;
    padding: 0 1rem;
}

.esm-entry-show-header h1 {
    margin: 0 0 .35rem;
    color: var(--esm-green);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.1;
    font-weight: 800;
}

.esm-entry-show-header p {
    margin: 0;
    color: var(--esm-text-muted);
    font-size: .98rem;
    font-weight: 700;
}

.esm-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.esm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.esm-step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--esm-border);
    color: var(--esm-text-muted);
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--esm-transition);
    border: 2px solid transparent;
}

.esm-step-label {
    font-size: .72rem;
    font-weight: 500;
    color: var(--esm-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    transition: var(--esm-transition);
    white-space: nowrap;
}

.esm-step.active .esm-step-num,
.esm-step.completed .esm-step-num {
    background: var(--esm-green);
    color: #fff;
    border-color: var(--esm-green);
}

.esm-step.active .esm-step-label,
.esm-step.completed .esm-step-label { color: var(--esm-green); }

.esm-step.completed .esm-step-num { font-size: 0; }
.esm-step.completed .esm-step-num::after { content: '✓'; font-size: 1rem; }

.esm-step-line {
    flex: 1;
    height: 2px;
    background: var(--esm-border);
    margin: 0 6px;
    margin-bottom: 20px;
    min-width: 20px;
    max-width: 80px;
    transition: background .3s;
}

/* ── Fieldset Cards ───────────────────────────────────────────────────────── */
.esm-fieldset {
    background: var(--esm-cream);
    border: 1.5px solid var(--esm-border);
    border-radius: var(--esm-radius);
    padding: 2.2rem 2.5rem;
    margin: 0;
    box-shadow: var(--esm-shadow);
    display: none;
    animation: esm-fadein .28s ease;
}
.esm-fieldset--active { display: block; }

@keyframes esm-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Legend ───────────────────────────────────────────────────────────────── */
.esm-legend {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--esm-green);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1.5px solid var(--esm-green-light);
    flex-wrap: wrap;
    width: 100%;
}
.esm-legend-icon { font-size: 1.3rem; }
.esm-legend-sub {
    font-family: 'Source Sans 3', sans-serif;
    font-size: .82rem;
    font-weight: 400;
    color: var(--esm-text-muted);
    margin-left: auto;
}

/* ── Fields ───────────────────────────────────────────────────────────────── */
.esm-efield { margin-bottom: 1.4rem; }

.esm-efield label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--esm-text);
}

.esm-efield--required > label::after { content: ' *'; color: var(--esm-brass); }

.esm-optional { font-weight: 400; color: var(--esm-text-muted); font-size: .83rem; }

.esm-efield input[type="text"],
.esm-efield input[type="email"],
.esm-efield input[type="tel"],
.esm-efield select,
.esm-efield textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--esm-border);
    border-radius: var(--esm-radius);
    background: #fff;
    font-family: 'Source Sans 3', sans-serif;
    font-size: .95rem;
    color: var(--esm-text);
    transition: var(--esm-transition);
    box-sizing: border-box;
}

.esm-efield input:focus,
.esm-efield select:focus,
.esm-efield textarea:focus {
    outline: none;
    border-color: var(--esm-green-mid);
    box-shadow: 0 0 0 3px rgba(61,107,64,.12);
}

.esm-efield input.esm-invalid {
    border-color: var(--esm-error);
    box-shadow: 0 0 0 3px rgba(179,58,58,.10);
}

.esm-error-msg {
    display: block;
    font-size: .82rem;
    color: var(--esm-error);
    margin-top: 4px;
    min-height: 18px;
}

/* ── Division blocks & Class pills ───────────────────────────────────────── */
.esm-divisions-list { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }

.esm-division-block--selectable {
    border: 1.5px solid var(--esm-border);
    border-radius: var(--esm-radius);
    background: #fff;
    overflow: hidden;
}

.esm-division-select-label {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    gap: .65rem;
    align-items: center;
    margin: 0 !important;
    padding: .85rem 1rem;
    cursor: pointer;
}

.esm-division-select-title {
    font-weight: 800;
    color: var(--esm-blue);
}

.esm-division-select-price {
    font-weight: 800;
    color: var(--esm-green);
}

.esm-division-included-classes {
    padding: 0 1rem .9rem 2.25rem;
    color: var(--esm-text-muted);
    font-size: .86rem;
    line-height: 1.45;
}

.esm-division-included-classes span {
    color: var(--esm-text);
    font-weight: 700;
}

.esm-division-block__label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--esm-text-muted);
    margin-bottom: 8px;
}

.esm-class-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.esm-class-pill { cursor: pointer; }

.esm-class-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.esm-class-pill-inner {
    display: inline-block;
    padding: 7px 16px;
    border: 1.5px solid var(--esm-border);
    border-radius: 20px;
    background: #fff;
    font-size: .88rem;
    font-weight: 500;
    color: var(--esm-text);
    transition: var(--esm-transition);
    cursor: pointer;
    user-select: none;
}

.esm-class-pill-inner:hover {
    border-color: var(--esm-green-mid);
    background: var(--esm-green-light);
}

.esm-class-pill input:checked + .esm-class-pill-inner {
    border-color: var(--esm-green);
    background: var(--esm-green-light);
    color: var(--esm-green);
    font-weight: 700;
    box-shadow: 0 0 0 2px var(--esm-green);
}

/* ── Order Summary ────────────────────────────────────────────────────────── */
.esm-order-summary {
    border: 1.5px solid var(--esm-border);
    border-radius: var(--esm-radius);
    overflow: hidden;
    margin-bottom: 1.4rem;
    background: #fff;
}

.esm-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid var(--esm-border);
    gap: 12px;
}

.esm-order-row--entry { background: var(--esm-green-light); }
.esm-order-row--addon { background: #fff; flex-wrap: wrap; gap: 8px; }
.esm-order-row--fee   { background: #fafafa; }

.esm-payment-section-break {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.35rem 0 .75rem;
    color: var(--esm-text-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.esm-payment-section-break::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--esm-border);
}

#esm-clinic-order-lines:empty {
    display: none;
}

#esm-clinic-order-lines .esm-order-row:last-child {
    border-bottom-style: dashed;
}

.esm-order-label { display: flex; flex-direction: column; gap: 2px; }
.esm-order-label strong { font-size: .95rem; color: var(--esm-text); }
.esm-order-label small  { font-size: .8rem;  color: var(--esm-text-muted); }
.esm-order-label span   { font-size: .92rem; color: var(--esm-text); }
.esm-order-entry-context {
    color: var(--esm-text-muted) !important;
    font-size: .8rem !important;
}
.esm-order-entry-items {
    display: grid;
    gap: 3px;
    margin-top: 5px;
    min-width: min(360px, 100%);
}
.esm-order-entry-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    max-width: 420px;
}
.esm-order-entry-discount span {
    color: var(--esm-green) !important;
    font-weight: 700;
}

.esm-order-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--esm-green);
    white-space: nowrap;
}

.esm-addon-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .92rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
}

.esm-addon-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--esm-green);
    cursor: pointer;
    flex-shrink: 0;
}

.esm-addon-qty-price { display: flex; align-items: center; gap: 8px; }

.esm-addon-qty {
    padding: 5px 8px;
    border: 1.5px solid var(--esm-border);
    border-radius: 6px;
    font-size: .88rem;
}

.esm-addon-unit-price { font-size: .88rem; color: var(--esm-text-muted); min-width: 52px; text-align: right; }

.esm-order-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f0ece3;
    font-weight: 700;
    font-size: 1.05rem;
}

.esm-order-total { color: var(--esm-green); font-size: 1.2rem; }

.esm-payment-note {
    font-size: .85rem;
    color: var(--esm-text-muted);
    text-align: center;
    margin-bottom: 0;
    padding: 0 1rem;
}

/* ── Payments & Refunds Policy ───────────────────────────────────────────── */
.esm-policy-page {
    --esm-policy-ink: #16202c;
    --esm-policy-muted: #5d6b7c;
    --esm-policy-border: #d9e1eb;
    --esm-policy-soft: #f7fafc;
    color: var(--esm-policy-ink);
    max-width: 1060px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px) 20px;
}

.esm-policy-hero {
    border-bottom: 1px solid var(--esm-policy-border);
    padding-bottom: clamp(24px, 4vw, 38px);
    margin-bottom: clamp(22px, 4vw, 42px);
}

.esm-policy-kicker {
    margin: 0 0 10px;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--esm-green);
}

.esm-policy-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.15rem, 4vw, 3.75rem);
    line-height: 1.02;
    color: var(--esm-policy-ink);
}

.esm-policy-hero p {
    max-width: 760px;
    margin: 0 0 12px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--esm-policy-muted);
}

.esm-policy-hero .esm-policy-updated {
    margin-top: 18px;
    font-size: .88rem;
    font-weight: 700;
    color: #334155;
}

.esm-policy-content {
    max-width: 780px;
}

.esm-policy-section {
    padding: 0 0 30px;
    margin: 0 0 30px;
    border-bottom: 1px solid var(--esm-policy-border);
}

.esm-policy-section h2,
.esm-policy-note h2 {
    margin: 0 0 14px;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.25;
    color: var(--esm-policy-ink);
}

.esm-policy-section p,
.esm-policy-note p {
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--esm-policy-muted);
}

.esm-policy-note {
    padding: 20px 22px;
    border: 1px solid #cfe0d3;
    border-radius: 8px;
    background: #f3faf4;
}

.esm-policy-note p:last-child,
.esm-policy-section p:last-child {
    margin-bottom: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.esm-btn-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--esm-border);
}

.esm-entry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 26px;
    border-radius: var(--esm-radius);
    border: 2px solid transparent;
    font-family: 'Source Sans 3', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--esm-transition);
    text-decoration: none;
}

.esm-entry-btn--next,
.esm-entry-btn--submit {
    background: var(--esm-green);
    color: #fff;
    border-color: var(--esm-green);
}

.esm-entry-btn--next:hover,
.esm-entry-btn--submit:hover {
    background: var(--esm-green-mid);
    border-color: var(--esm-green-mid);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(44,74,46,.25);
}

.esm-entry-btn--back {
    background: transparent;
    color: var(--esm-text-muted);
    border-color: var(--esm-border);
}

.esm-entry-btn--back:hover {
    border-color: var(--esm-green-mid);
    color: var(--esm-green);
}

.esm-entry-btn--checkout {
    background: var(--esm-brass);
    color: #fff;
    border-color: var(--esm-brass);
}

.esm-entry-btn--checkout:hover {
    background: #a07d2e;
    border-color: #a07d2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(184,150,58,.30);
}

.esm-entry-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Success ──────────────────────────────────────────────────────────────── */
.esm-entry-success {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--esm-cream);
    border: 1.5px solid var(--esm-border);
    border-radius: var(--esm-radius);
    box-shadow: var(--esm-shadow);
    animation: esm-fadein .4s ease;
}

.esm-success-icon { font-size: 3.5rem; margin-bottom: 1rem; }

.esm-entry-success h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: var(--esm-green);
    margin: 0 0 .75rem;
}

.esm-entry-success p { font-size: 1.05rem; color: var(--esm-text); margin-bottom: .5rem; }
.esm-success-sub     { color: var(--esm-text-muted) !important; font-size: .9rem !important; }

/* ── Error banner ─────────────────────────────────────────────────────────── */
.esm-entry-error-banner {
    background: #fdf2f2;
    border: 1.5px solid #e9aeae;
    border-radius: var(--esm-radius);
    color: var(--esm-error);
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    font-size: .93rem;
    font-weight: 500;
    animation: esm-fadein .2s ease;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 580px) {
    .esm-fieldset { padding: 1.6rem 1.4rem; }
    .esm-entry-show-header { margin-bottom: 1.4rem; }
    .esm-entry-show-header h1 { font-size: 1.45rem; }
    .esm-entry-show-header p { font-size: .9rem; }
    .esm-steps { gap: 0; }
    .esm-step-label { display: none; }
    .esm-btn-row { flex-direction: column-reverse; }
    .esm-entry-btn { justify-content: center; }
    .esm-legend { font-size: 1.2rem; }
    .esm-legend-sub { display: none; }
    .esm-class-pill-grid { gap: 6px; }
}

/* ── File Drop Zones ──────────────────────────────────────────────────────── */
.esm-file-drop {
    position: relative;
    border: 2px dashed var(--esm-border);
    border-radius: var(--esm-radius);
    background: #fff;
    cursor: pointer;
    transition: var(--esm-transition);
    overflow: hidden;
}

.esm-file-drop:hover {
    border-color: var(--esm-green-mid);
    background: var(--esm-green-light);
}

.esm-file-drop.esm-has-file {
    border-style: solid;
    border-color: var(--esm-green);
    background: var(--esm-green-light);
}

.esm-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.esm-file-ui {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
}

.esm-file-icon { font-size: 1.5rem; flex-shrink: 0; }

.esm-file-text { font-size: .9rem; color: var(--esm-text-muted); }
.esm-file-text u { color: var(--esm-green); cursor: pointer; }

.esm-file-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--esm-green);
    display: none;
}

.esm-has-file .esm-file-text { display: none; }
.esm-has-file .esm-file-name { display: block; }

.esm-docs-note {
    font-size: .82rem;
    color: var(--esm-text-muted);
    margin-top: .5rem;
    padding: 10px 14px;
    background: var(--esm-green-light);
    border-radius: var(--esm-radius);
    border: 1px solid var(--esm-border);
}

/* ── Pricing Toggle (Step 5 — "both" mode) ─────────────────────────────────── */
.esm-pricing-toggle {
    margin-bottom: 20px;
    padding: 16px;
    background: #f5f7f5;
    border: 1px solid #d4ddd5;
    border-radius: 10px;
}
.esm-pricing-toggle__label {
    margin: 0 0 12px;
    font-weight: 600;
    color: #3a5c3c;
    font-size: .9rem;
}
.esm-pricing-toggle__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.esm-pricing-option {
    cursor: pointer;
}
.esm-pricing-option input[type="radio"] {
    display: none;
}
.esm-pricing-option__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px;
    border: 2px solid #c8d8c9;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    transition: border-color .15s, background .15s;
    gap: 3px;
}
.esm-pricing-option input[type="radio"]:checked + .esm-pricing-option__inner {
    border-color: #3a5c3c;
    background: #eef3ee;
}
.esm-pricing-option__inner strong {
    font-size: .9rem;
    color: #2c4a2e;
}
.esm-pricing-option__inner small {
    font-size: .78rem;
    color: #7a9a7c;
}
.esm-pricing-option__cost {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3a5c3c;
    margin-top: 4px;
}

/* ── Division price input in Manager Dashboard ─────────────────────────────── */
.esm-div-price-wrap {
    display: none;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
}
.esm-show-div-price .esm-div-price-wrap,
.esm-div-price-wrap[style*="display: flex"],
.esm-div-price-wrap[style*="display:flex"] {
    display: flex !important;
}
.esm-div-price-prefix {
    font-size: .85rem;
    color: #6b7c6e;
    font-weight: 600;
}
.esm-div-price {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #c8d8c9;
    border-radius: 6px;
    font-size: .85rem;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
   SECRETARY OFFICE
═══════════════════════════════════════════════════════════════ */

.esm-sec-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 860px;
    margin: 0 auto;
    color: #1a2535;
}

/* Header */
.esm-sec-header {
    background: #0a3d62;
    color: #fff;
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}
.esm-sec-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}
.esm-sec-header__meta {
    font-size: .88rem;
    opacity: .8;
    margin-top: 3px;
}
.esm-sec-header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.esm-sec-counts {
    font-size: .83rem;
    opacity: .75;
}

/* Show switcher tabs */
.esm-sec-show-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.esm-sec-show-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem 1rem;
    border-radius: 8px;
    border: 1.5px solid #b8d0e8;
    background: #fff;
    color: #0a3d62;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    transition: all .15s;
}
.esm-sec-show-tab small {
    font-weight: 400;
    color: #6b7c8e;
    font-size: .78rem;
}
.esm-sec-show-tab.active,
.esm-sec-show-tab:hover {
    background: #0a3d62;
    color: #fff;
    border-color: #0a3d62;
}
.esm-sec-show-tab.active small,
.esm-sec-show-tab:hover small { color: rgba(255,255,255,.7); }

/* Walk-in form */
.esm-walkin-form {
    background: #fff;
    border: 2px solid #0a3d62;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
}
.esm-walkin-form h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0a3d62;
}
.esm-walkin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.esm-walkin-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #6b7c8e;
    margin-bottom: 3px;
}
.esm-walkin-field input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #b8d0e8;
    border-radius: 6px;
    font-size: .88rem;
    box-sizing: border-box;
}
.esm-walkin-classes {
    margin-bottom: 1rem;
}
.esm-walkin-classes > label {
    display: block;
    font-size: .83rem;
    font-weight: 700;
    color: #0a3d62;
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.esm-walkin-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.esm-walkin-msg {
    font-size: .85rem;
    color: #c62828;
}

/* Section */
.esm-sec-section {
    margin-bottom: 2rem;
}
.esm-sec-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}
.esm-sec-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #0a3d62;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.esm-sec-count {
    font-weight: 400;
    color: #6b7c8e;
}
.esm-sec-empty {
    background: #f0f6fb;
    border: 2px dashed #b8d0e8;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    color: #6b7c8e;
    font-size: .9rem;
}

/* Table */
.esm-sec-table-wrap {
    background: #fff;
    border: 1px solid #cde0f0;
    border-radius: 10px;
    overflow-x: auto;
}
.esm-sec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.esm-sec-table thead tr {
    background: #e8f0f8;
    border-bottom: 2px solid #b8d0e8;
}
.esm-sec-table th {
    padding: 10px 14px;
    text-align: left;
    color: #0a3d62;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.esm-sec-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #edf4fa;
    vertical-align: middle;
}
.esm-sec-table tbody tr:last-child td { border-bottom: none; }
.esm-sec-table tbody tr:hover { background: #f5f9fd; }

.esm-sec-td--name { font-weight: 600; }
.esm-sec-td--classes { color: #4a6a8a; font-size: .82rem; max-width: 280px; }
.esm-sec-td--notes { color: #555; font-size: .82rem; max-width: 200px; }
.esm-sec-td--actions {
    text-align: right;
    white-space: nowrap;
}

/* Drag handle */
.esm-drag-handle {
    cursor: grab;
    color: #bbb;
    font-size: 1.1rem;
    text-align: center;
    padding: 10px 6px !important;
    user-select: none;
}
.esm-drag-handle:active { cursor: grabbing; }
.esm-drag-ghost { opacity: .4; background: #e8f0f8 !important; }
.esm-active-row:hover { background: #f5f9fd !important; }

/* Inline edit fields */
.esm-inline-field {
    padding: 4px 6px;
    border: 1px solid #b8d0e8;
    border-radius: 5px;
    font-size: .85rem;
    width: 80px;
    text-align: center;
    transition: border-color .15s;
}
.esm-inline-field:focus {
    outline: none;
    border-color: #0a3d62;
    box-shadow: 0 0 0 2px rgba(10,61,98,.15);
}

/* Badges */
.esm-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.esm-badge--walkin  { background: #fff8e1; color: #f57f17; }
.esm-badge--online  { background: #e3f2fd; color: #1565c0; }

/* Buttons — secretary office overrides */
.esm-sec-wrap .esm-btn--primary {
    background: #0a3d62;
    border-color: #0a3d62;
    color: #fff;
}
.esm-sec-wrap .esm-btn--primary:hover { background: #072d4a; }
.esm-btn--success {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}
.esm-btn--success:hover { background: #1b5e20; }
.esm-btn--danger {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}
.esm-btn--danger:hover { background: #8e0000; }
.esm-btn--xsmall {
    padding: 4px 10px;
    font-size: .78rem;
    border-radius: 5px;
}

.esm-muted { color: #9aaabb; font-size: .82rem; }

/* Document links in secretary office */
.esm-doc-link--ok {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    color: #1565c0;
    text-decoration: none;
    white-space: nowrap;
}
.esm-doc-link--ok:hover { text-decoration: underline; }
.esm-doc-missing {
    font-size: .78rem;
    color: #e65100;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   MY SHOWS — WooCommerce My Account
═══════════════════════════════════════════════════════════════ */

.esm-my-shows h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0a3d62;
    margin-bottom: 1.5rem;
}
.esm-my-shows__empty {
    color: #6b7c8e;
}

/* ═══════════════════════════════════════════════════════════════
   MY HORSES — WooCommerce My Account
═══════════════════════════════════════════════════════════════ */

.esm-my-horses {
    max-width: 980px;
    color: #183244;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.esm-my-horses,
.esm-my-horses * {
    box-sizing: border-box;
}

.esm-my-horses__head {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #f7fbff, #eef5fb);
    border: 1px solid #d6e5f1;
}

.esm-my-horses__eyebrow {
    margin: 0 0 .35rem;
    color: #6d9466;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.esm-my-horses h2,
.esm-my-horses h3,
.esm-my-horses h4 {
    margin-top: 0;
    color: #0a3d62;
}

.esm-my-horses__head h2 {
    margin-bottom: .45rem;
    font-size: 1.65rem;
}

.esm-my-horses__head p {
    margin: 0;
    color: #5f6f82;
    line-height: 1.55;
}

.esm-my-horses__panel,
.esm-my-horse-card {
    margin-bottom: 1.2rem;
    padding: 1.15rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #dce8f2;
    box-shadow: 0 10px 24px rgba(10, 61, 98, .06);
}

.esm-my-horses__quick-panel {
    padding: 0;
    overflow: hidden;
}

.esm-my-horses__quick-panel > summary {
    min-height: 52px;
    padding: .95rem 1.15rem;
    color: #0a3d62;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.esm-my-horses__quick-panel > summary::-webkit-details-marker {
    display: none;
}

.esm-my-horses__quick-panel[open] > summary {
    border-bottom: 1px solid #dce8f2;
}

.esm-my-horses__quick-panel > form {
    padding: 1.05rem 1.15rem 1.15rem;
}

.esm-my-horses__panel--upload {
    background: #fffaf0;
    border-color: #e5d3a9;
    box-shadow: 0 10px 24px rgba(150, 124, 72, .08);
}

.esm-my-horses__horse-form,
.esm-my-horses__document-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
    align-items: end;
}

.esm-my-horses__document-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.esm-my-horses label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    color: #24394b;
    font-weight: 700;
}

.esm-my-horses label span {
    font-size: .86rem;
}

.esm-my-horses__field-helper {
    grid-column: 2 / -1;
    margin: -.35rem 0 0;
    color: #6f6249;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: right;
}

.esm-my-horses input,
.esm-my-horses select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cddbe7;
    border-radius: 10px;
    padding: .55rem .7rem;
    color: #183244;
    background: #fff;
}

.esm-my-horses__form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}

.esm-my-horses__empty {
    padding: 1rem;
    border-radius: 14px;
    background: #f7fbff;
    border: 1px solid #d6e5f1;
    color: #5f6f82;
}

.esm-my-horse-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin: -1.15rem -1.15rem 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e3edf5;
    border-radius: 16px 16px 0 0;
}

.esm-my-horse-card__head--tone-1 {
    background: #eef6fb;
    border-bottom-color: #cfe1ee;
}

.esm-my-horse-card__head--tone-2 {
    background: #f4f1fb;
    border-bottom-color: #ded5ef;
}

.esm-my-horse-card__head--tone-3 {
    background: #fff5e8;
    border-bottom-color: #efd7b5;
}

.esm-my-horse-card__head h3 {
    margin-bottom: .2rem;
    font-size: 1.25rem;
}

.esm-my-horse-card__head p {
    margin: 0;
    color: #607386;
}

.esm-my-horse-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.esm-my-horse-card__actions form {
    margin: 0;
}

.esm-my-horse-card__doc-list {
    display: grid;
    gap: .55rem;
    margin: 0 0 .9rem;
}

.esm-my-horse-card__doc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .85rem;
    padding: .7rem .8rem;
    border: 1px solid #dbe8d8;
    border-radius: 12px;
    background: #f6fbf4;
}

.esm-my-horse-card__doc-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .12rem;
}

.esm-my-horse-card__doc-main strong {
    color: #183244;
    font-size: .92rem;
}

.esm-my-horse-card__doc-main span {
    color: #52705d;
    font-size: .83rem;
    line-height: 1.35;
}

.esm-my-horse-card__quick-actions {
    display: grid;
    gap: .65rem;
}

.esm-my-horse-card__edit {
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: #f7fbff;
    border: 1px solid #d6e5f1;
    overflow: hidden;
}

.esm-my-horse-card__edit summary {
    min-height: 46px;
    padding: .75rem .9rem;
    cursor: pointer;
    color: #0a3d62;
    font-weight: 800;
    list-style: none;
}

.esm-my-horse-card__edit summary::-webkit-details-marker {
    display: none;
}

.esm-my-horse-card__edit[open] summary {
    border-bottom: 1px solid #d6e5f1;
}

.esm-my-horse-card__edit > form {
    padding: .9rem;
}

.esm-my-horses__horse-form--inline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.esm-my-horses__docs {
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e1e9ef;
    overflow: hidden;
}

.esm-my-horses__docs > summary {
    min-height: 46px;
    padding: .75rem .9rem;
    color: #0a3d62;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.esm-my-horses__docs > summary::-webkit-details-marker {
    display: none;
}

.esm-my-horses__docs[open] > summary {
    border-bottom: 1px solid #e1e9ef;
}

.esm-my-horses__docs h4 {
    padding: .9rem .9rem 0;
    margin-bottom: .65rem;
    font-size: .98rem;
}

.esm-my-horses__doc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .55rem;
    margin-left: .9rem;
    margin-right: .9rem;
    padding: .75rem .85rem;
    border-radius: 12px;
    border: 1px solid #dbe8d8;
    background: #f6fbf4;
}

.esm-my-horses__doc--archived {
    background: #f7f8fa;
    border-color: #d9e0e6;
}

.esm-my-horses__doc div {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.esm-my-horses__doc strong {
    color: #183244;
}

.esm-my-horses__doc span {
    color: #5f6f82;
    font-size: .88rem;
}

.esm-my-horses__doc a {
    color: #0a3d62;
    font-weight: 800;
    text-decoration: none;
}

.esm-my-horses__doc a:hover {
    text-decoration: underline;
}

.esm-my-horses__doc-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
}

.esm-my-horses__doc-actions form {
    margin: 0;
}

.esm-my-horses__doc-actions button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #76603a;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.esm-my-horses__doc-actions button:hover {
    text-decoration: underline;
}

.esm-my-horses__archive {
    margin: .9rem;
}

.esm-my-horses__archive summary {
    cursor: pointer;
    color: #0a3d62;
    font-weight: 800;
}

.esm-my-horses__muted {
    margin: 0 .9rem .75rem;
    color: #7a8a99;
}

.esm-my-horses__muted--card {
    margin: 0;
    padding: .75rem .85rem;
    border: 1px dashed #d6e5f1;
    border-radius: 12px;
    background: #f7fbff;
}

/* ── Entry wizard: My Horses mode ───────────────────────────────────────── */
.esm-entry-horse-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.esm-entry-step-subtitle {
    margin: 0 0 .75rem;
    color: #0a3d62;
    font-size: 1.05rem;
    font-weight: 800;
}

.esm-entry-step-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.35rem 0 1rem;
    color: #6f6249;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.esm-entry-step-divider::before,
.esm-entry-step-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #d8e4d8;
}

.esm-entry-step-divider span {
    white-space: nowrap;
}

.esm-entry-horse-card {
    position: relative;
    display: block;
    cursor: pointer;
    margin-bottom: 0;
    padding-bottom: 1rem;
}

.esm-entry-horse-card > input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.esm-entry-horse-card:has(input:checked) {
    border-color: #0a3d62;
    box-shadow: 0 0 0 2px rgba(10, 61, 98, .12), 0 10px 24px rgba(10, 61, 98, .08);
}

.esm-entry-horse-card__check {
    position: absolute;
    top: .75rem;
    right: .85rem;
    z-index: 2;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #fff;
    color: #0a3d62;
    border: 1px solid #cddbe7;
    font-size: .76rem;
    font-weight: 800;
}

.esm-entry-horse-card:has(input:checked) .esm-entry-horse-card__check {
    background: #0a3d62;
    color: #fff;
    border-color: #0a3d62;
}

.esm-entry-horse-card .esm-my-horse-card__head {
    display: block;
}

.esm-entry-horse-card .esm-my-horse-card__head strong,
.esm-entry-horse-card .esm-my-horse-card__head span span {
    display: block;
}

.esm-entry-horse-card .esm-my-horse-card__head strong {
    margin-bottom: .2rem;
    color: #0a3d62;
    font-size: 1.12rem;
}

.esm-entry-horse-docs,
.esm-entry-review-docs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.esm-entry-doc-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.esm-entry-doc-pill--ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.esm-entry-doc-pill--missing {
    background: #fff3e0;
    color: #e65100;
}

.esm-entry-horse-missing,
.esm-entry-panel-note {
    display: block;
    margin: .75rem 0 0;
    color: #6f6249;
    font-size: .84rem;
    line-height: 1.45;
}

.esm-entry-inline-horse {
    margin-top: 1rem;
}

.esm-entry-new-horse-choice {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: .5rem !important;
    margin-bottom: .9rem;
}

.esm-entry-doc-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.esm-entry-doc-upload-card {
    display: grid;
    gap: .45rem;
}

.esm-entry-doc-upload-card label {
    color: #24394b;
    font-weight: 800;
}

.esm-entry-doc-upload-card input[type="date"] {
    min-height: 40px;
    border: 1px solid #cddbe7;
    border-radius: 10px;
    padding: .45rem .65rem;
}

.esm-entry-doc-date-helper {
    margin: -.2rem 0 .1rem;
    color: #6f6249;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.35;
}

.esm-entry-review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.esm-entry-review-card {
    padding: .95rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--esm-border);
}

.esm-entry-review-card h3 {
    margin: 0 0 .45rem;
    color: var(--esm-green);
    font-size: .92rem;
    font-weight: 800;
}

.esm-entry-review-card p {
    margin: 0;
    color: var(--esm-text-muted);
    line-height: 1.45;
    font-size: .88rem;
}

@media (max-width: 780px) {
    .esm-my-horses__horse-form,
    .esm-my-horses__horse-form--inline,
    .esm-my-horses__document-form {
        grid-template-columns: 1fr;
    }

    .esm-entry-horse-grid,
    .esm-entry-doc-upload-grid,
    .esm-entry-review-grid {
        grid-template-columns: 1fr;
    }

    .esm-my-horses__field-helper {
        grid-column: 1 / -1;
        text-align: left;
    }

    .esm-my-horse-card__head,
    .esm-my-horses__doc,
    .esm-my-horse-card__doc-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .esm-my-horse-card__actions,
    .esm-my-horse-card__doc-row .esm-my-horses__doc-actions {
        justify-content: flex-start;
    }
}

.esm-my-show-card {
    background: #fff;
    border: 1px solid #cde0f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(10,61,98,.06);
}

.esm-my-show-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.esm-my-show-card__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.esm-my-show-card__name {
    font-size: 1.05rem;
    color: #0a3d62;
}
.esm-my-show-card__meta {
    font-size: .83rem;
    color: #6b7c8e;
}
.esm-my-show-card__badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}

.esm-my-show-card__header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem;
}

.esm-my-show-card__header-actions button {
    border: 1px solid #d89b1d;
    border-radius: 20px;
    background: #fff6d8;
    color: #7a5300;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
    padding: 5px 14px;
    white-space: nowrap;
}

.esm-my-show-card__header-actions button:hover {
    background: #f7dd83;
    color: #4f3600;
}

.esm-my-show-card__details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .4rem .75rem;
    font-size: .88rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf4fa;
}
.esm-my-show-card__classes {
    grid-column: 1 / -1;
}
.esm-my-show-card__label {
    color: #6b7c8e;
    font-size: .8rem;
    margin-right: .25rem;
}

.esm-my-show-card__docs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    margin-bottom: 1rem;
    font-size: .85rem;
}
.esm-my-show-card__doc {}
.esm-doc--ok    { color: #2e7d32; }
.esm-doc--missing { color: #e65100; }

.esm-my-show-card__upload {
    background: #f0f6fb;
    border: 1px solid #b8d0e8;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.esm-upload-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: .75rem;
}
.esm-upload-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #0a3d62;
    margin-bottom: 4px;
}
.esm-upload-field label small {
    font-weight: 400;
    color: #6b7c8e;
    margin-left: .25rem;
}
.esm-upload-field input[type="file"] {
    font-size: .85rem;
}

.esm-my-show-card__scratch {
    border-top: 1px solid #edf4fa;
    padding-top: .75rem;
    margin-top: .25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.esm-btn--danger-outline {
    border-color: #c62828 !important;
    color: #c62828 !important;
    background: transparent !important;
}
.esm-btn--danger-outline:hover {
    background: #c62828 !important;
    color: #fff !important;
}

/* Pending entries section — full width breakout */
#esm-pending-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* ── Clinic secretary doc links ─────────────────────────────────────────────── */
.esm-doc-link {
    font-size: .78rem;
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
}
.esm-doc-link:hover { text-decoration: underline; }
.esm-doc-missing {
    font-size: .78rem;
    color: #e65100;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   PUBLIC SHOW CALENDAR
═══════════════════════════════════════════════════════════════ */

.esm-calendar,
.esm-calendar * {
    box-sizing: border-box;
}

.esm-calendar {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
    color: #203040;
}

.esm-calendar__section {
    margin-bottom: 2.25rem;
}

.esm-calendar__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.esm-calendar__heading h2 {
    margin: 0;
    color: #0a3d62;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 800;
}

.esm-calendar__rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .35rem .2rem 1.2rem;
    scrollbar-width: thin;
}

.esm-calendar__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 220px);
    gap: 1rem;
    align-items: stretch;
}

.esm-calendar-card {
    width: 220px;
    height: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: .9rem;
    background: #fff;
    border: 1px solid #d8e4d6;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(10, 61, 98, .14);
    text-align: center;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.esm-calendar-card:hover {
    transform: translateY(-2px);
    border-color: #b9cfb5;
    box-shadow: 0 20px 42px rgba(10, 61, 98, .18);
}

.esm-calendar-card__logo-wrap {
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    flex: 0 0 150px;
    margin-bottom: .15rem;
}

.esm-calendar-card__logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: block;
}

.esm-calendar-card__logo-fallback {
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef6ec;
    color: #0a3d62;
    font-size: 1.8rem;
    font-weight: 800;
}

.esm-calendar-card__manager {
    width: 100%;
    min-height: 19px;
    color: #536879;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.esm-calendar-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 24px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e8f5e3;
    color: #24552c;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.esm-calendar-card__title {
    width: 100%;
    min-height: 42px;
    margin: .05rem 0 0;
    color: #162b3b;
    font-size: .95rem;
    line-height: 1.18;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.esm-calendar-card__date {
    width: 100%;
    color: #0a3d62;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.25;
}

.esm-calendar-card__location {
    width: 100%;
    min-height: 40px;
    color: #5f7080;
    font-size: .76rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.esm-calendar-card__enter {
    width: 100%;
    margin-top: auto;
    padding: .58rem .75rem;
    border-radius: 6px;
    background: #0a3d62;
    color: #fff !important;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(10, 61, 98, .18);
}

.esm-calendar-card__enter:hover {
    background: #072d4a;
}

.esm-calendar__filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(150px, 190px) auto;
    gap: .85rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f7fbf4;
    border: 1px solid #d8e4d6;
    border-radius: 8px;
}

.esm-calendar__filters label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin: 0;
    color: #324b5d;
    font-size: .82rem;
    font-weight: 800;
}

.esm-calendar__filters input,
.esm-calendar__filters select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #c7d3df;
    border-radius: 6px;
    background: #fff;
    color: #203040;
    font-size: .92rem;
}

.esm-calendar__filters button {
    min-height: 42px;
    padding: 0 1.1rem;
    border: 1px solid #0a3d62;
    border-radius: 6px;
    background: #0a3d62;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.esm-calendar__filters button:hover {
    background: #072d4a;
}

.esm-calendar__empty {
    margin: .25rem 0 0;
    padding: 1rem;
    border: 1px dashed #c4d6bf;
    border-radius: 8px;
    color: #607487;
    background: #f7fbf4;
}

@media (max-width: 820px) {
    .esm-calendar {
        padding-inline: .35rem;
    }

    .esm-calendar__filters {
        grid-template-columns: 1fr;
    }

    .esm-calendar__grid {
        grid-template-columns: repeat(auto-fill, 220px);
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .esm-calendar__rail {
        grid-auto-flow: row;
        grid-auto-columns: unset;
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        overflow-x: visible;
        padding-inline: 0;
    }

    .esm-calendar__grid {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .esm-calendar-card {
        width: min(100%, 320px);
        height: 450px;
        padding: 1rem;
    }

    .esm-calendar-card__logo-wrap,
    .esm-calendar-card__logo,
    .esm-calendar-card__logo-fallback {
        width: 165px;
        height: 165px;
    }

    .esm-calendar-card__logo-wrap {
        flex-basis: 165px;
    }
}
