html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- Needlr ---- */

body { background: #fafafa; color: #1f1f1f; margin: 0; }

.needlr-home { max-width: 600px; margin: 2rem auto; padding: 0 1rem; }
.needlr-home h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.01em; }
.needlr-home .needlr-sub { color: #555; font-size: 1rem; margin: 0 0 1.5rem; }
.needlr-home .needlr-greeting { color: #1f1f1f; }

.needlr-cta-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0 2rem; }
.needlr-btn {
    display: inline-block; padding: 0.6rem 1rem; border-radius: 8px;
    border: 1px solid #ccc; background: #fff; color: #111; text-decoration: none;
    font-weight: 500; cursor: pointer; font-size: 0.95rem;
}
.needlr-btn:hover { background: #f0f0f0; }
.needlr-btn.primary { background: #111; border-color: #111; color: #fff; }
.needlr-btn.primary:hover { background: #333; }
.needlr-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.needlr-auth { max-width: 420px; margin: 2rem auto; padding: 0 1rem; }
.needlr-auth h1 { margin: 0 0 0.5rem; font-size: 1.5rem; letter-spacing: -0.01em; }
.needlr-auth .needlr-sub { color: #666; margin: 0 0 1.5rem; }
.needlr-auth label { display: block; margin: 0 0 1rem; }
.needlr-auth label > span { display: block; font-weight: 500; margin-bottom: 0.25rem; font-size: 0.9rem; }
.needlr-auth input {
    width: 100%; padding: 0.6rem 0.75rem; border-radius: 6px; border: 1px solid #ccc;
    font-size: 1rem; background: #fff;
}
.needlr-auth input:focus { outline: 2px solid #111; outline-offset: -1px; border-color: #111; }
.needlr-auth small { display: block; color: #666; font-size: 0.8rem; margin-top: 0.25rem; }
.needlr-auth .needlr-error {
    background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
    padding: 0.6rem 0.75rem; border-radius: 6px; margin: 0 0 1rem; font-size: 0.9rem;
}
.needlr-auth .needlr-aside { color: #666; font-size: 0.9rem; margin-top: 1.5rem; text-align: center; }

.needlr-role-picker { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1rem 0; }
.needlr-role-card {
    display: block; padding: 1.25rem; border: 1px solid #ddd; border-radius: 10px;
    background: #fff; color: #111; text-decoration: none;
}
.needlr-role-card:hover { border-color: #111; }
.needlr-role-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.needlr-role-card p { margin: 0; color: #666; font-size: 0.9rem; }

@media (min-width: 600px) {
    .needlr-role-picker { grid-template-columns: 1fr 1fr; }
}

/* ---- Discovery / map ---- */

.needlr-discovery { display: flex; flex-direction: column; gap: 0.75rem; }
.needlr-filter-bar {
    display: flex; flex-direction: column; gap: 0.5rem;
    background: #fff; padding: 0.75rem 1rem; border: 1px solid #e6e6e6; border-radius: 10px;
}
.needlr-filter-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.needlr-availability-row label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: #555; }
.needlr-availability-row input[type=date] {
    padding: 0.4rem 0.5rem; border-radius: 6px; border: 1px solid #ccc; background: #fff;
}
.needlr-toggle { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.needlr-select-label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.needlr-select-label select {
    padding: 0.35rem 0.5rem; border: 1px solid #ccc; border-radius: 6px; background: #fff;
}

.needlr-discovery-body { display: flex; flex-direction: column; gap: 0.75rem; }
.needlr-map-wrap { height: 50vh; border-radius: 10px; overflow: hidden; border: 1px solid #e6e6e6; background: #eee; }
.needlr-map { width: 100%; height: 100%; }
.needlr-pin {
    width: 18px; height: 18px; border-radius: 50%;
    background: #111; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}
.needlr-pin.verified { background: #2563eb; }

.needlr-side-panel {
    background: #fff; border: 1px solid #e6e6e6; border-radius: 10px; padding: 1rem;
    max-height: 60vh; overflow-y: auto;
}
.needlr-back {
    background: none; border: none; padding: 0; color: #555; cursor: pointer; font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.needlr-result-count { color: #666; font-size: 0.85rem; margin: 0 0 0.5rem; }
.needlr-result-list { list-style: none; padding: 0; margin: 0; }
.needlr-result-row {
    width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #f0f0f0;
    padding: 0.6rem 0; cursor: pointer; display: flex; flex-direction: column; gap: 0.15rem;
}
.needlr-result-row:hover { background: #fafafa; }
.needlr-result-row > strong { color: #111; }
.needlr-result-row > span { color: #666; font-size: 0.85rem; }
.needlr-meta { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

@media (min-width: 900px) {
    .needlr-discovery-body { flex-direction: row; align-items: flex-start; }
    .needlr-map-wrap { flex: 1; height: 70vh; }
    .needlr-side-panel { width: 360px; max-height: 70vh; }
}

/* ---- Badges ---- */

.needlr-badge {
    display: inline-block; padding: 0.15rem 0.45rem; border-radius: 999px;
    background: #eee; color: #333; font-size: 0.75rem; font-weight: 500; line-height: 1.5;
}
.needlr-badge.small { font-size: 0.7rem; }
.needlr-badge.verified { background: #dbeafe; color: #1e40af; }
.needlr-badge.submitted { background: #fef3c7; color: #92400e; }
.needlr-badge.unverified { background: #f3f4f6; color: #6b7280; }
.needlr-badges { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }

/* ---- Studio panel ---- */

.needlr-studio-panel header { margin-bottom: 0.5rem; }
.needlr-studio-panel h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.needlr-roster { list-style: none; padding: 0; margin: 0.5rem 0; }
.needlr-roster li { padding: 0.4rem 0; border-bottom: 1px solid #f0f0f0; }
.needlr-roster a { color: #111; text-decoration: none; font-weight: 500; }
.needlr-roster a:hover { text-decoration: underline; }
.needlr-role { display: block; color: #999; font-size: 0.75rem; }

/* ---- Artist page ---- */

.needlr-artist { max-width: 900px; margin: 0 auto; }
.needlr-artist-header {
    display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start;
    margin-bottom: 1rem;
}
.needlr-artist-header h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.01em; }
.needlr-bio { color: #444; line-height: 1.5; }

.needlr-style-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.needlr-tag {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px;
    background: #f3f4f6; color: #374151; font-size: 0.8rem;
}

.needlr-signals {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.5rem;
    margin: 1rem 0;
}
.needlr-signal {
    background: #fafafa; border: 1px solid #e6e6e6; border-radius: 8px;
    padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.1rem;
}
.needlr-signal strong { font-size: 1.1rem; }
.needlr-signal small { color: #666; font-size: 0.75rem; }

.needlr-portfolio-section h2 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }
.needlr-portfolio-grid {
    display: grid; gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.needlr-piece-card {
    display: block; text-decoration: none; color: inherit; border-radius: 10px;
    overflow: hidden; background: #fff; border: 1px solid #e6e6e6;
}
.needlr-piece-card:hover { border-color: #111; }
.needlr-piece-photo { aspect-ratio: 1 / 1; background: #f3f4f6; }
.needlr-piece-photo img { width: 100%; height: 100%; object-fit: cover; }
.needlr-piece-meta {
    padding: 0.5rem 0.6rem; display: flex; flex-direction: column; gap: 0.1rem;
}
.needlr-piece-meta small { color: #666; font-size: 0.75rem; }

@media (min-width: 600px) {
    .needlr-artist-header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

/* ---- Portfolio piece page ---- */

.needlr-piece-page { max-width: 900px; margin: 0 auto; }
.needlr-piece-page header { margin-bottom: 1rem; }
.needlr-piece-page h1 { margin: 0 0 0.25rem; font-size: 1.4rem; letter-spacing: -0.01em; }
.needlr-link-back { display: inline-block; margin-top: 0.5rem; color: #555; font-size: 0.9rem; text-decoration: none; }
.needlr-link-back:hover { color: #111; }

.needlr-piece-photos {
    display: grid; gap: 1rem; grid-template-columns: 1fr;
}
.needlr-piece-figure {
    margin: 0; background: #fff; border: 1px solid #e6e6e6; border-radius: 10px; overflow: hidden;
}
.needlr-piece-figure img { width: 100%; display: block; }
.needlr-piece-figure figcaption {
    padding: 0.5rem 0.75rem; color: #666; font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem;
}
.needlr-photo-placeholder {
    aspect-ratio: 1 / 1; background: #f3f4f6; color: #999; display: flex;
    align-items: center; justify-content: center; font-size: 0.85rem;
}
.needlr-photo-type {
    text-transform: uppercase; font-size: 0.7rem; padding: 0.15rem 0.5rem;
    border-radius: 999px; background: #f3f4f6; color: #374151;
}
.needlr-photo-type.fresh { background: #dbeafe; color: #1e40af; }
.needlr-photo-type.healed { background: #dcfce7; color: #166534; }

@media (min-width: 700px) {
    .needlr-piece-photos { grid-template-columns: 1fr 1fr; }
}

/* ---- Booking dashboard ---- */

.needlr-bookings-dashboard { max-width: 800px; margin: 0 auto; }
.needlr-dashboard-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;
}
.needlr-status-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 0; }
.needlr-status-tab {
    padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid #ddd;
    background: #fff; cursor: pointer; font-size: 0.85rem; color: #555;
}
.needlr-status-tab.active { background: #111; color: #fff; border-color: #111; }

.needlr-booking-list { list-style: none; padding: 0; margin: 0; }
.needlr-booking-list li { margin: 0.5rem 0; }
.needlr-booking-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-radius: 10px; border: 1px solid #e6e6e6;
    background: #fff; text-decoration: none; color: #111;
}
.needlr-booking-row:hover { border-color: #111; }
.needlr-booking-row > div { display: flex; gap: 0.4rem; align-items: baseline; }
.needlr-booking-row > div span { color: #666; font-size: 0.85rem; }
.needlr-meta-time { color: #888; font-size: 0.8rem; }

.needlr-booking-group { margin: 1.5rem 0; }
.needlr-booking-group h2 { font-size: 1rem; margin: 0 0 0.5rem; display: flex; align-items: baseline; gap: 0.5rem; }
.needlr-booking-group h2 small { color: #666; font-weight: 400; font-size: 0.8rem; }

/* ---- Booking request form ---- */

.needlr-booking-form { max-width: 700px; margin: 0 auto; }
.needlr-booking-form fieldset {
    border: 1px solid #e6e6e6; border-radius: 10px; padding: 1rem 1.25rem; margin: 0 0 1rem;
    background: #fff;
}
.needlr-booking-form legend {
    padding: 0 0.4rem; font-weight: 600; font-size: 0.95rem;
}
.needlr-booking-form label { display: block; margin: 0 0 0.75rem; }
.needlr-booking-form label > span { display: block; font-weight: 500; margin-bottom: 0.25rem; font-size: 0.9rem; }
.needlr-booking-form input:not([type=checkbox]),
.needlr-booking-form select,
.needlr-booking-form textarea {
    width: 100%; padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid #ccc;
    font-size: 1rem; background: #fff; box-sizing: border-box;
}
.needlr-booking-form textarea { font-family: inherit; resize: vertical; }
.needlr-booking-form small { display: block; color: #666; font-size: 0.8rem; margin-top: 0.25rem; }
.needlr-warn {
    background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
    padding: 0.5rem 0.75rem; border-radius: 6px; margin: 0.5rem 0; font-size: 0.85rem;
}
.needlr-policy-snapshot {
    background: #f3f4f6; padding: 0.75rem 1rem; border-radius: 8px; margin: 0 0 0.5rem;
}

.needlr-stripe-mount { min-height: 100px; padding: 0.5rem; }
.needlr-stripe-fallback {
    background: #fef3c7; border: 1px solid #fcd34d; color: #92400e;
    padding: 0.6rem 0.75rem; border-radius: 6px; font-size: 0.85rem;
}

/* ---- Booking detail ---- */

.needlr-booking-detail { max-width: 800px; margin: 0 auto; }
.needlr-booking-summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; }
.needlr-booking-summary dt { color: #666; font-size: 0.85rem; }
.needlr-booking-summary dd { margin: 0; color: #111; }
.needlr-booking-summary { margin: 1rem 0; }

.needlr-timeline { list-style: none; padding: 0; margin: 0.5rem 0; }
.needlr-timeline li {
    padding: 0.4rem 0 0.4rem 1.25rem; position: relative; color: #888;
}
.needlr-timeline li::before {
    content: ''; position: absolute; left: 0; top: 0.7rem; width: 8px; height: 8px;
    border-radius: 50%; background: #ccc;
}
.needlr-timeline li.reached { color: #111; }
.needlr-timeline li.reached::before { background: #111; }

.needlr-actions { margin: 1.5rem 0; padding: 1rem; background: #fff; border: 1px solid #e6e6e6; border-radius: 10px; }
.needlr-actions h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.needlr-actions h3 { margin: 0 0 0.5rem; font-size: 0.95rem; color: #333; }
.needlr-action-group { margin: 0 0 1rem; }
.needlr-action-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.needlr-info {
    background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
    padding: 0.5rem 0.75rem; border-radius: 6px; margin: 0.5rem 0; font-size: 0.9rem;
}

/* ---- Messaging ---- */

.needlr-threads-list { max-width: 700px; margin: 0 auto; }
.needlr-thread-list { list-style: none; padding: 0; margin: 0; }
.needlr-thread-list li { margin: 0.5rem 0; }
.needlr-thread-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-radius: 10px; border: 1px solid #e6e6e6;
    background: #fff; text-decoration: none; color: #111;
}
.needlr-thread-row:hover { border-color: #111; }
.needlr-thread-row small { color: #666; font-size: 0.8rem; margin-left: 0.4rem; }

.needlr-thread-page { max-width: 800px; margin: 0 auto; }
.needlr-thread-view { display: flex; flex-direction: column; gap: 0.75rem; }
.needlr-thread-status { display: flex; align-items: center; gap: 0.5rem; color: #666; font-size: 0.85rem; }

.needlr-message-list {
    border: 1px solid #e6e6e6; border-radius: 10px; background: #fff;
    padding: 0.75rem; min-height: 200px; max-height: 60vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.needlr-message {
    max-width: 80%; padding: 0.5rem 0.75rem; border-radius: 12px;
    background: #f3f4f6; border: 1px solid #e6e6e6;
}
.needlr-message.mine { align-self: flex-end; background: #111; color: #fff; border-color: #111; }
.needlr-message.theirs { align-self: flex-start; }
.needlr-message.reported { opacity: 0.6; }
.needlr-message header { display: flex; align-items: baseline; gap: 0.4rem; font-size: 0.75rem; color: #666; }
.needlr-message.mine header { color: #ddd; }
.needlr-msg-author { font-weight: 600; }
.needlr-read-receipt { font-size: 0.7rem; }
.needlr-message p { margin: 0.25rem 0 0; white-space: pre-wrap; }
.needlr-report {
    background: none; border: none; color: inherit; text-decoration: underline;
    cursor: pointer; font-size: 0.7rem; padding: 0; margin-top: 0.25rem;
}

.needlr-composer { display: flex; flex-direction: column; gap: 0.4rem; }
.needlr-composer textarea {
    width: 100%; padding: 0.6rem 0.75rem; border-radius: 8px; border: 1px solid #ccc;
    font-family: inherit; font-size: 0.95rem; resize: vertical; box-sizing: border-box;
}
.needlr-composer button { align-self: flex-end; }

.needlr-unread-badge {
    display: inline-block; min-width: 18px; padding: 0 6px; height: 18px;
    line-height: 18px; text-align: center; border-radius: 999px;
    background: #ef4444; color: #fff; font-size: 0.7rem; font-weight: 600;
    margin-left: 0.4rem; vertical-align: middle;
}

/* ---- Modal dialog ---- */

.needlr-dialog-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.needlr-dialog {
    background: #fff; border-radius: 12px; padding: 1.25rem; max-width: 460px;
    width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.needlr-dialog h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.needlr-dialog label { display: block; margin: 0.75rem 0; }
.needlr-dialog label > span { display: block; font-weight: 500; margin-bottom: 0.25rem; font-size: 0.9rem; }
.needlr-dialog input, .needlr-dialog select, .needlr-dialog textarea {
    width: 100%; padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid #ccc;
    font-size: 0.95rem; box-sizing: border-box; font-family: inherit;
}

/* ---- Artist tooling (Phase 20) ---- */

.needlr-artist-tools, .needlr-availability-page, .needlr-portfolio-tools,
.needlr-profile-tools, .needlr-studio-tools { max-width: 800px; margin: 0 auto; }

.needlr-tool-grid {
    display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin: 1rem 0;
}
.needlr-tool-card {
    display: block; padding: 1rem 1.25rem; border-radius: 10px; border: 1px solid #e6e6e6;
    background: #fff; color: #111; text-decoration: none;
}
.needlr-tool-card:hover { border-color: #111; }
.needlr-tool-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.needlr-tool-card p { margin: 0; color: #666; font-size: 0.9rem; }

@media (min-width: 600px) {
    .needlr-tool-grid { grid-template-columns: 1fr 1fr; }
}

.needlr-card {
    background: #fff; border: 1px solid #e6e6e6; border-radius: 10px;
    padding: 1rem 1.25rem; margin: 1rem 0;
}
.needlr-card h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }

.needlr-pattern-grid {
    width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem;
}
.needlr-pattern-grid th, .needlr-pattern-grid td {
    text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid #f0f0f0;
}
.needlr-pattern-grid input, .needlr-pattern-grid select {
    padding: 0.3rem 0.5rem; border: 1px solid #ccc; border-radius: 6px;
}

.needlr-availability-page label { display: block; margin: 0.5rem 0; }
.needlr-availability-page label > span { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.2rem; }
.needlr-availability-page input, .needlr-availability-page select {
    padding: 0.4rem 0.6rem; border: 1px solid #ccc; border-radius: 6px;
}

.needlr-override-add {
    display: grid; gap: 0.5rem; margin: 0.75rem 0;
    grid-template-columns: 1fr;
}
@media (min-width: 700px) {
    .needlr-override-add { grid-template-columns: 1fr 1fr 2fr auto; align-items: end; }
}
.needlr-override-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.needlr-override-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0;
}

.needlr-feed-url { word-break: break-all; background: #f3f4f6; padding: 0.5rem 0.75rem; border-radius: 6px; }

.needlr-studio-tools .needlr-card label { display: block; margin: 0.5rem 0; }
.needlr-studio-tools .needlr-card label > span { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.2rem; }
.needlr-studio-tools .needlr-card input, .needlr-studio-tools .needlr-card select,
.needlr-studio-tools .needlr-card textarea {
    width: 100%; padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid #ccc;
    font-size: 0.95rem; box-sizing: border-box; font-family: inherit;
}

/* ---- Customer tooling (Phase 21) ---- */

.needlr-prefs-page, .needlr-account-page { max-width: 800px; margin: 0 auto; }

.needlr-prefs-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.needlr-prefs-table th, .needlr-prefs-table td {
    text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid #f0f0f0;
}
.needlr-prefs-table th:nth-child(2), .needlr-prefs-table th:nth-child(3),
.needlr-prefs-table td:nth-child(2), .needlr-prefs-table td:nth-child(3) {
    text-align: center; width: 80px;
}

/* ---- Admin tooling (Phase 22) ---- */

.needlr-admin-page { max-width: 900px; margin: 0 auto; }

.needlr-queue-list { list-style: none; padding: 0; margin: 0; }
.needlr-queue-item {
    background: #fff; border: 1px solid #e6e6e6; border-radius: 10px;
    padding: 1rem 1.25rem; margin: 0.75rem 0;
}
.needlr-queue-item header strong { font-size: 1rem; }

.needlr-flagged-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.needlr-flagged-list li { padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.needlr-feedback-quote {
    margin: 0.4rem 0 0; padding: 0.5rem 0.75rem; border-left: 3px solid #fef3c7;
    background: #fffbeb; color: #5f4d0d; font-size: 0.9rem; font-style: italic;
}