@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
    --font-sans: "Segoe UI", Selawik, system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-sans);
}

/* WordPress-style Media Library */
.media-library {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.media-library__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.media-library__bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.media-library__input {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    background: #fff;
    color: #0f172a;
}

.media-library__input:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 0;
    border-color: #3b82f6;
}

.media-library__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
}

.media-library__btn:hover {
    background: #f8fafc;
}

.media-library__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.media-library__btn--primary {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.media-library__btn--primary:hover {
    background: #1e40af;
}

.media-library__btn--danger {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}

.media-library__btn--danger:hover {
    background: #fee2e2;
}

.media-library__view-toggle {
    display: inline-flex;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    overflow: hidden;
}

.media-library__view-btn {
    padding: 0.375rem 0.5rem;
    color: #64748b;
    background: #fff;
}

.media-library__view-btn.is-active {
    background: #e2e8f0;
    color: #0f172a;
}

.media-library__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    min-height: 28rem;
}

@media (min-width: 768px) {
    .media-library__layout {
        grid-template-columns: 13rem minmax(0, 1fr);
    }

    .media-library__layout.has-detail {
        grid-template-columns: 13rem minmax(0, 1fr) 20rem;
    }
}

@media (min-width: 1280px) {
    .media-library__layout.has-detail {
        grid-template-columns: 14rem minmax(0, 1fr) 22rem;
    }
}

.media-library__folders,
.media-library__main,
.media-library__detail {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.media-library__folders {
    padding: 1rem;
}

.media-library__folder {
    display: block;
    border-radius: 0.375rem;
    padding: 0.4rem 0.55rem;
    color: #475569;
}

.media-library__folder:hover {
    background: #f8fafc;
}

.media-library__folder.is-active {
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}

.media-library__main {
    padding: 1rem;
    position: relative;
    min-height: 24rem;
}

.media-library__main.is-dragging {
    outline: 2px dashed #3b82f6;
    outline-offset: -6px;
    background: #eff6ff;
}

.media-library__dropzone {
    margin-bottom: 1rem;
    border: 2px dashed #94a3b8;
    border-radius: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
    background: #f8fafc;
}

.media-library__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

@media (min-width: 640px) {
    .media-library__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .media-library__grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .media-library__grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

.media-library__tile {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.media-library__tile:hover {
    border-color: #93c5fd;
}

.media-library__tile.is-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #bfdbfe;
}

.media-library__thumb {
    aspect-ratio: 1;
    width: 100%;
    max-height: 88px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.media-library__file-icon {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.media-library__tile-meta {
    padding: 0.25rem 0.35rem;
    font-size: 0.65rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-library__check {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    z-index: 2;
    background: rgb(255 255 255 / 0.9);
    border-radius: 0.25rem;
    padding: 0.15rem;
    line-height: 0;
}

.media-library__list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.media-library__list-head,
.media-library__list-row {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0.625rem;
}

@media (min-width: 640px) {
    .media-library__list-head,
    .media-library__list-row {
        grid-template-columns: 1.5rem minmax(0, 1.5fr) 6rem;
    }
}

@media (min-width: 768px) {
    .media-library__list-head,
    .media-library__list-row {
        grid-template-columns: 1.5rem minmax(0, 1.5fr) 6rem 7rem;
    }
}

@media (min-width: 1024px) {
    .media-library__list-head,
    .media-library__list-row {
        grid-template-columns: 1.5rem minmax(0, 1.5fr) 6rem 7rem 5rem;
    }
}

.media-library__list-head {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.media-library__list-row {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
}

.media-library__list-row:hover {
    background: #f8fafc;
}

.media-library__list-row.is-selected {
    border-color: #93c5fd;
    background: #eff6ff;
}

.media-library__detail {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
}

.media-library__detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.media-library__detail-body {
    padding: 1rem;
    overflow-y: auto;
}

.media-library__meta {
    display: grid;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.media-library__meta > div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.5rem;
}

.media-library__meta dt {
    color: #64748b;
}

.media-library__meta dd {
    color: #0f172a;
    margin: 0;
    word-break: break-word;
}

.media-library__label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

@media (max-width: 767px) {
    .media-library__detail {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 40;
        max-height: 75vh;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -8px 30px rgb(15 23 42 / 0.18);
    }
}

/* ── Home Page Editor (premium) ── */
.home-editor {
    --he-ink: #0f172a;
    --he-muted: #64748b;
    --he-line: #e2e8f0;
    --he-surface: #ffffff;
    --he-soft: #f8fafc;
    --he-accent: #0f766e;
    --he-accent-2: #134e4a;
    --he-glow: #ccfbf1;
    --he-warn: #b45309;
}

.home-editor__hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    padding: 1.75rem 1.75rem 1.5rem;
    background:
        radial-gradient(1200px 400px at 10% -20%, rgb(20 184 166 / 0.28), transparent 55%),
        radial-gradient(800px 300px at 90% 0%, rgb(15 23 42 / 0.18), transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #134e4a 55%, #0f766e 100%);
    color: #f8fafc;
    box-shadow: 0 20px 50px rgb(15 23 42 / 0.18);
}

.home-editor__hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -40% 40%;
    height: 180px;
    background: radial-gradient(circle, rgb(255 255 255 / 0.12), transparent 65%);
    pointer-events: none;
}

.home-editor__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.12);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-editor__title {
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.home-editor__lead {
    margin-top: 0.5rem;
    max-width: 40rem;
    color: rgb(248 250 252 / 0.78);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.home-editor__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.home-editor__shell {
    margin-top: 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid var(--he-line);
    background: var(--he-surface);
    box-shadow: 0 10px 30px rgb(15 23 42 / 0.04);
    overflow: hidden;
}

.home-editor__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--he-line);
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.home-editor__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--he-muted);
    transition: 0.15s ease;
}

.home-editor__tab:hover {
    color: var(--he-ink);
    background: #f1f5f9;
}

.home-editor__tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--he-accent-2), var(--he-accent));
    box-shadow: 0 8px 18px rgb(15 118 110 / 0.28);
}

.home-editor__tab-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
}

.home-editor__layout {
    display: grid;
    gap: 0;
}

@media (min-width: 1100px) {
    .home-editor__layout.has-nav {
        grid-template-columns: 220px 1fr;
    }
}

.home-editor__nav {
    display: none;
    border-right: 1px solid var(--he-line);
    background: var(--he-soft);
    padding: 1.25rem 0.85rem;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow: auto;
}

@media (min-width: 1100px) {
    .home-editor__nav {
        display: block;
    }
}

.home-editor__nav-label {
    padding: 0 0.65rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.home-editor__nav a {
    display: block;
    border-radius: 0.65rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
}

.home-editor__nav a:hover,
.home-editor__nav a.is-active {
    background: #fff;
    color: var(--he-accent-2);
    box-shadow: inset 0 0 0 1px #ccfbf1;
}

.home-editor__body {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .home-editor__body {
        padding: 1.5rem 1.75rem 1.75rem;
    }
}

.home-panel {
    border: 1px solid var(--he-line);
    border-radius: 1rem;
    background: #fff;
    margin-bottom: 1rem;
    overflow: hidden;
    scroll-margin-top: 1rem;
}

.home-panel__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.home-panel__summary::-webkit-details-marker {
    display: none;
}

.home-panel__icon {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.75rem;
    background: var(--he-glow);
    color: var(--he-accent-2);
    flex-shrink: 0;
}

.home-panel__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.home-panel__heading {
    font-size: 0.9375rem;
    font-weight: 650;
    color: var(--he-ink);
}

.home-panel__sub {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--he-muted);
}

.home-panel__chevron {
    margin-left: auto;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.home-panel[open] .home-panel__chevron {
    transform: rotate(180deg);
}

.home-panel__body {
    border-top: 1px solid var(--he-line);
    padding: 1.15rem;
    background: #fff;
}

.home-field-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .home-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-field-grid .span-2 {
        grid-column: span 2;
    }
}

.home-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.home-input,
.home-textarea,
.home-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    background: #fff;
    padding: 0.65rem 0.8rem;
    font-size: 0.875rem;
    color: var(--he-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-textarea {
    min-height: 5rem;
    resize: vertical;
}

.home-input:focus,
.home-textarea:focus,
.home-select:focus {
    outline: none;
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgb(45 212 191 / 0.25);
}

.home-note {
    margin-top: 0.75rem;
    border-radius: 0.75rem;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
    font-size: 0.75rem;
    padding: 0.65rem 0.8rem;
}

.home-repeat {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.home-repeat__item {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.85rem;
    background: #f8fafc;
}

.home-editor__footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 1rem 0 0.25rem;
    background: linear-gradient(180deg, transparent, #f8fafc 35%);
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.7rem;
    padding: 0.65rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: 0.15s ease;
}

.home-btn svg {
    width: 1rem;
    height: 1rem;
}

.home-btn--primary {
    background: linear-gradient(135deg, #134e4a, #0f766e);
    color: #fff;
    box-shadow: 0 10px 20px rgb(15 118 110 / 0.22);
}

.home-btn--primary:hover {
    filter: brightness(1.05);
}

.home-btn--ghost {
    background: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.home-btn--ghost:hover {
    background: #f8fafc;
}

.home-btn--light {
    background: rgb(255 255 255 / 0.12);
    color: #fff;
    border-color: rgb(255 255 255 / 0.18);
}

.home-btn--light:hover {
    background: rgb(255 255 255 / 0.2);
}

.home-btn--sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.55rem;
}

.home-editor__tab.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Content hub (Services / catalog tables) */
.content-hub {
    display: grid;
    gap: 1.25rem;
}

.content-hub__hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-radius: 1.25rem;
    background:
        radial-gradient(ellipse 80% 120% at 100% 0%, rgb(45 212 191 / 0.18), transparent 55%),
        linear-gradient(135deg, #0f172a 0%, #134e4a 55%, #0f766e 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgb(15 23 42 / 0.18);
}

.content-hub__eyebrow {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.65);
}

.content-hub__title {
    margin: 0.35rem 0 0;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.content-hub__lead {
    margin: 0.4rem 0 0;
    max-width: 36rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgb(255 255 255 / 0.72);
}

.content-hub__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.content-hub__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.content-hub__search {
    flex: 1 1 14rem;
    min-width: 12rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
    background: #f8fafc;
}

.content-hub__search:focus {
    outline: 2px solid #99f6e4;
    border-color: #14b8a6;
    background: #fff;
}

.content-hub__select {
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
    background: #fff;
    min-width: 9rem;
}

.content-table-wrap {
    overflow: hidden;
    border-radius: 1.15rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow:
        0 1px 2px rgb(15 23 42 / 0.04),
        0 12px 28px rgb(15 23 42 / 0.05);
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.content-table thead th {
    text-align: left;
    padding: 0.85rem 1.1rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
}

.content-table tbody td {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.content-table tbody tr:last-child td {
    border-bottom: 0;
}

.content-table tbody tr:hover td {
    background: #f8fafc;
}

.content-table__primary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.content-table__thumb {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    object-fit: cover;
    background: #e2e8f0;
    flex-shrink: 0;
}

.content-table__thumb--empty {
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f766e;
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
}

.content-table__title {
    margin: 0;
    font-weight: 650;
    color: #0f172a;
}

.content-table__meta {
    margin: 0.1rem 0 0;
    font-size: 0.7rem;
    color: #94a3b8;
}

.content-table__actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.content-table__empty {
    text-align: center;
    padding: 3rem 1rem !important;
    color: #64748b;
}

.content-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f766e;
}

.content-link:hover {
    color: #115e59;
    text-decoration: underline;
}

.content-link.is-danger {
    color: #b91c1c;
}

.content-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.content-badge.is-live {
    background: #d1fae5;
    color: #065f46;
}

.content-badge.is-draft {
    background: #f1f5f9;
    color: #475569;
}

.content-badge.is-info {
    background: #e0f2fe;
    color: #0369a1;
}

.content-badge.is-warn {
    background: #fffbeb;
    color: #b45309;
}

.content-badge.is-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.content-badge.is-success {
    background: #ecfdf5;
    color: #047857;
}

.app-detail-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 1024px) {
    .app-detail-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.9fr);
        align-items: start;
    }
}

.app-meta-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.app-meta-list dt {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

.app-meta-list dd {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    font-weight: 550;
    color: #0f172a;
}

.app-cover {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e2e8f0;
}

.app-cover__label {
    margin: 0 0 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

.app-cover__body {
    margin: 0;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #334155;
}

.app-stat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.app-stat-chip:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
}

.app-stat-chip.is-active {
    border-color: #5eead4;
    background: #ecfdf5;
    color: #047857;
}

.app-stat-chip__count {
    display: inline-flex;
    min-width: 1.35rem;
    justify-content: center;
    border-radius: 999px;
    padding: 0.05rem 0.35rem;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.7rem;
}

.app-stat-chip.is-active .app-stat-chip__count {
    background: #ccfbf1;
    color: #0f766e;
}

.seo-score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.25rem;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    tabular-nums: true;
    font-variant-numeric: tabular-nums;
    border: 1px solid transparent;
}

.seo-score-pill.is-good {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.seo-score-pill.is-mid {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.seo-score-pill.is-low {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.seo-score-pill.is-muted {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
}

/* Blog writing studio */
.blog-studio__stats {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
    font-size: 0.7rem;
    font-weight: 650;
}

.blog-studio__editor {
    min-height: 22rem;
    font-family: ui-sans-serif, system-ui, sans-serif;
    line-height: 1.65;
}

.blog-studio__preview {
    min-height: 22rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    background: #fff;
}

.blog-studio__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.blog-studio__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.blog-studio__tag:has(input:checked) {
    background: #ccfbf1;
    border-color: #5eead4;
    color: #115e59;
}

.blog-studio__tag input {
    accent-color: #0f766e;
}

/* Other Pages hub cards */
.other-pages-group {
    display: grid;
    gap: 0.85rem;
}

.other-pages-group__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.other-pages-group__head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.other-pages-group__head p {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.other-pages-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.other-page-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem;
    border-radius: 1.15rem;
    border: 1px solid #e2e8f0;
    background:
        linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: 0 10px 24px rgb(15 23 42 / 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.other-page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgb(15 23 42 / 0.08);
}

.other-page-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.other-page-card__icon {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    color: #0f766e;
    font-size: 0.8rem;
    font-weight: 800;
}

.other-page-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.other-page-card__blurb {
    margin: 0;
    flex: 1;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

.other-page-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.7rem;
    color: #94a3b8;
}

.other-page-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.25rem;
}

/* Image field */
.home-image-field__card {
    display: grid;
    gap: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.85rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

@media (min-width: 640px) {
    .home-image-field__card {
        grid-template-columns: 140px 1fr;
        align-items: center;
    }
}

.home-image-field__preview {
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
}

.home-image-field__preview.is-empty {
    background:
        linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.home-image-field__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-image-field__placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.75rem;
}

.home-image-field__placeholder svg {
    width: 1.75rem;
    height: 1.75rem;
    opacity: 0.7;
}

.home-image-field__label {
    font-size: 0.8125rem;
    font-weight: 650;
    color: #0f172a;
}

.home-image-field__name {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: #64748b;
}

.home-image-field__help {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: #94a3b8;
}

.home-image-field__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.home-image-field__alt {
    margin-top: 0.55rem;
    font-size: 0.7rem;
    color: #64748b;
}

/* Media modal */
.media-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.media-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(2 6 23 / 0.62);
    backdrop-filter: blur(4px);
}

.media-modal__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1100px, 100%);
    max-height: min(90vh, 860px);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 30px 80px rgb(2 6 23 / 0.35);
    overflow: hidden;
}

.media-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.media-modal__eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f766e;
}

.media-modal__title {
    margin-top: 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.media-modal__close {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: #64748b;
    background: #f1f5f9;
}

.media-modal__close svg {
    width: 1.1rem;
    height: 1.1rem;
}

.media-modal__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
}

.media-modal__search {
    position: relative;
    flex: 1 1 14rem;
    min-width: 12rem;
}

.media-modal__search svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    width: 0.95rem;
    height: 0.95rem;
    transform: translateY(-50%);
    color: #94a3b8;
}

.media-modal__search input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.65rem;
    padding: 0.55rem 0.75rem 0.55rem 2.1rem;
    font-size: 0.8125rem;
}

.media-modal__status {
    font-size: 0.75rem;
    color: #0f766e;
    font-weight: 600;
}

.media-modal__body {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    flex: 1;
}

@media (min-width: 900px) {
    .media-modal__body {
        grid-template-columns: 1fr 320px;
    }
}

.media-modal__grid-wrap {
    overflow: auto;
    padding: 1rem;
    background: #f8fafc;
}

.media-modal__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

@media (min-width: 640px) {
    .media-modal__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .media-modal__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.media-modal__tile {
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    overflow: hidden;
    background: #fff;
    transition: 0.15s ease;
}

.media-modal__tile:hover {
    border-color: #5eead4;
    transform: translateY(-1px);
}

.media-modal__tile.is-active {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgb(15 118 110 / 0.18);
}

.media-modal__tile img,
.media-modal__file {
    aspect-ratio: 1;
    width: 100%;
    max-height: 84px;
    object-fit: cover;
    display: block;
}

.media-modal__file {
    display: grid;
    place-items: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
}

.media-modal__tile-name {
    display: block;
    padding: 0.25rem 0.35rem;
    font-size: 0.6rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-modal__empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

.media-modal__details {
    border-top: 1px solid #e2e8f0;
    padding: 1rem;
    overflow: auto;
    background: #fff;
}

@media (min-width: 900px) {
    .media-modal__details {
        border-top: 0;
        border-left: 1px solid #e2e8f0;
    }
}

.media-modal__details--empty {
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.5;
}

.media-modal__details-preview {
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.85rem;
    background: #f1f5f9;
}

.media-modal__details-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.media-modal__details-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.media-modal__fields {
    display: grid;
    gap: 0.65rem;
}

.media-modal__fields label span {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}

.media-modal__fields input,
.media-modal__fields textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.55rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.8125rem;
}

.media-modal__details-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.media-modal__hint {
    margin-top: 0.55rem;
    font-size: 0.7rem;
    color: #0f766e;
    font-weight: 600;
}

.home-seo-card,
.home-audit-score {
    border: 1px solid var(--he-line);
    border-radius: 1rem;
    background: #fff;
    padding: 1.15rem;
}

.home-audit-score {
    background: linear-gradient(160deg, #ecfdf5, #fff 55%);
}

/* ── Settings Studio ── */
.settings-studio {
    --ss-ink: #0f172a;
    --ss-muted: #64748b;
    --ss-line: #e2e8f0;
    --ss-accent: #0f766e;
}

.settings-studio__hero {
    border-radius: 1.25rem;
    padding: 1.6rem 1.75rem;
    color: #f8fafc;
    background:
        radial-gradient(900px 280px at 0% 0%, rgb(20 184 166 / 0.28), transparent 55%),
        linear-gradient(135deg, #0f172a, #134e4a 60%, #0f766e);
    box-shadow: 0 18px 40px rgb(15 23 42 / 0.16);
}

.settings-studio__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

.settings-studio__title {
    margin-top: 0.4rem;
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.settings-studio__lead {
    margin-top: 0.4rem;
    max-width: 38rem;
    color: rgb(248 250 252 / 0.78);
    font-size: 0.9rem;
}

.settings-studio__shell {
    margin-top: 1.15rem;
    border: 1px solid var(--ss-line);
    border-radius: 1.25rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 28px rgb(15 23 42 / 0.04);
}

.settings-studio__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--ss-line);
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.settings-studio__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ss-muted);
}

.settings-studio__tab:hover {
    background: #f1f5f9;
    color: var(--ss-ink);
}

.settings-studio__tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, #134e4a, #0f766e);
    box-shadow: 0 8px 18px rgb(15 118 110 / 0.25);
}

.settings-studio__tab-dot {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
}

.settings-studio__body {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .settings-studio__body {
        padding: 1.5rem 1.75rem;
    }
}

.settings-panel {
    border: 1px solid var(--ss-line);
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    background: #fff;
}

.settings-panel__head {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--ss-line);
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.settings-panel__head h2 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ss-ink);
}

.settings-panel__grid {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}

@media (min-width: 768px) {
    .settings-panel__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-field--wide {
        grid-column: span 2;
    }
}

.settings-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    font-weight: 650;
    color: #334155;
}

.settings-help {
    margin: -0.1rem 0 0.45rem;
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.4;
}

.settings-input,
.settings-textarea,
.settings-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    padding: 0.65rem 0.8rem;
    font-size: 0.875rem;
    background: #fff;
}

.settings-textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.settings-input:focus,
.settings-textarea:focus,
.settings-select:focus {
    outline: none;
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgb(45 212 191 / 0.22);
}

.settings-color {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 0.5rem;
    align-items: center;
}

.settings-color input[type="color"] {
    width: 3rem;
    height: 2.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.65rem;
    padding: 0.15rem;
    background: #fff;
}

.settings-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    font-weight: 500;
}

.settings-switch input {
    width: 1rem;
    height: 1rem;
    accent-color: #0f766e;
}

.settings-studio__footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    padding-top: 0.75rem;
    background: linear-gradient(180deg, transparent, #fff 40%);
}

.social-builder__row {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.85rem;
    background: #f8fafc;
    margin-bottom: 0.65rem;
}

.social-builder__grid {
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 900px) {
    .social-builder__grid {
        grid-template-columns: 8rem 9rem 1fr auto;
        align-items: end;
    }
}

.social-builder__toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.15rem;
}

.social-builder__remove {
    font-size: 0.75rem;
    color: #b91c1c;
    font-weight: 600;
}

/* ── Admin sidebar ─────────────────────────────────────────── */
.admin-sidebar {
    --admin-sidebar-bg: #070b14;
    --admin-sidebar-elevated: rgba(255, 255, 255, 0.035);
    --admin-sidebar-border: rgba(148, 163, 184, 0.12);
    --admin-sidebar-text: #94a3b8;
    --admin-sidebar-text-strong: #e2e8f0;
    --admin-sidebar-accent: #10b981;
    --admin-sidebar-accent-soft: rgba(16, 185, 129, 0.14);
    --admin-sidebar-accent-strong: rgba(16, 185, 129, 0.22);

    position: sticky;
    top: 0;
    display: none;
    flex-direction: column;
    width: 17.5rem;
    flex-shrink: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    color: var(--admin-sidebar-text);
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(16, 185, 129, 0.12), transparent 55%),
        radial-gradient(90% 50% at 100% 100%, rgba(14, 165, 233, 0.08), transparent 50%),
        linear-gradient(180deg, #0b1220 0%, var(--admin-sidebar-bg) 48%, #05080f 100%);
    border-right: 1px solid var(--admin-sidebar-border);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

@media (min-width: 1024px) {
    .admin-sidebar {
        display: flex;
    }
}

.admin-sidebar__glow {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
        radial-gradient(circle at 20% 12%, rgba(52, 211, 153, 0.08), transparent 28%);
}

.admin-sidebar__brand {
    position: relative;
    z-index: 1;
    padding: 1.15rem 1rem 1rem;
    border-bottom: 1px solid var(--admin-sidebar-border);
}

.admin-sidebar__brand-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 1rem;
    padding: 0.55rem 0.6rem;
    transition: background 180ms ease, transform 180ms ease;
}

.admin-sidebar__brand-link:hover {
    background: var(--admin-sidebar-elevated);
}

.admin-sidebar__mark {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, #34d399 0%, #059669 55%, #0f766e 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    box-shadow:
        0 10px 24px rgba(16, 185, 129, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.admin-sidebar__brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-sidebar__brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.admin-sidebar__brand-meta {
    font-size: 0.6875rem;
    font-weight: 560;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-sidebar__nav {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem 0.75rem 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.admin-sidebar__nav::-webkit-scrollbar {
    width: 0.4rem;
}

.admin-sidebar__nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
}

.admin-sidebar__group + .admin-sidebar__group {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.admin-sidebar__group-title {
    margin: 0 0 0.55rem 0.7rem;
    font-size: 0.625rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-sidebar__link,
.admin-sidebar__footer-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    margin-bottom: 0.2rem;
    border-radius: 0.8rem;
    padding: 0.58rem 0.7rem;
    color: var(--admin-sidebar-text);
    font-size: 0.875rem;
    font-weight: 520;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition:
        background 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.admin-sidebar__link.is-child {
    padding-left: 0.85rem;
}

.admin-sidebar__link:hover,
.admin-sidebar__footer-link:hover {
    color: var(--admin-sidebar-text-strong);
    background: rgba(255, 255, 255, 0.045);
}

.admin-sidebar__link.is-active {
    color: #ecfdf5;
    background: linear-gradient(90deg, var(--admin-sidebar-accent-soft), rgba(16, 185, 129, 0.05));
    box-shadow:
        inset 0 0 0 1px rgba(16, 185, 129, 0.18),
        0 8px 20px rgba(2, 6, 23, 0.28);
}

.admin-sidebar__link.is-active::before {
    content: '';
    position: absolute;
    left: 0.2rem;
    top: 50%;
    width: 0.22rem;
    height: 1.15rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #6ee7b7, var(--admin-sidebar-accent));
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.55);
    transform: translateY(-50%);
}

.admin-sidebar__icon {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.admin-sidebar__link:hover .admin-sidebar__icon,
.admin-sidebar__footer-link:hover .admin-sidebar__icon {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.18);
}

.admin-sidebar__link.is-active .admin-sidebar__icon {
    color: #ecfdf5;
    background: var(--admin-sidebar-accent-strong);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.22);
}

.admin-sidebar__label-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar__footer {
    position: relative;
    z-index: 1;
    padding: 0.85rem 0.75rem 1rem;
    border-top: 1px solid var(--admin-sidebar-border);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22));
}

.admin-sidebar__footer-link {
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-sidebar__footer-link:hover {
    border-color: rgba(16, 185, 129, 0.28);
    background: var(--admin-sidebar-accent-soft);
    color: #ecfdf5;
}

/* ── Booking calendar ──────────────────────────────────────── */
.booking-calendar-layout {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 1200px) {
    .booking-calendar-layout {
        grid-template-columns: minmax(0, 1fr) 19rem;
        align-items: start;
    }
}

.booking-calendar-filters {
    justify-content: flex-start;
}

.booking-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin-left: auto;
}

.booking-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.booking-legend__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
}

.booking-legend__dot--pending { background: #d97706; }
.booking-legend__dot--confirmed { background: #059669; }
.booking-legend__dot--completed { background: #0284c7; }
.booking-legend__dot--cancelled { background: #94a3b8; }
.booking-legend__dot--no_show { background: #dc2626; }

.booking-calendar-shell {
    overflow: hidden;
    border-radius: 1.15rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow:
        0 1px 2px rgb(15 23 42 / 0.04),
        0 12px 28px rgb(15 23 42 / 0.05);
    padding: 1rem 1.1rem 1.25rem;
}

#booking-calendar {
    --fc-border-color: #e2e8f0;
    --fc-page-bg-color: #fff;
    --fc-neutral-bg-color: #f8fafc;
    --fc-list-event-hover-bg-color: #f0fdfa;
    --fc-today-bg-color: rgb(20 184 166 / 0.08);
    --fc-now-indicator-color: #0f766e;
    --fc-button-bg-color: #0f172a;
    --fc-button-border-color: #0f172a;
    --fc-button-hover-bg-color: #134e4a;
    --fc-button-hover-border-color: #134e4a;
    --fc-button-active-bg-color: #0f766e;
    --fc-button-active-border-color: #0f766e;
    --fc-button-text-color: #fff;
    min-height: 42rem;
}

#booking-calendar .fc {
    font-family: inherit;
}

#booking-calendar .fc-toolbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

#booking-calendar .fc-button {
    border-radius: 0.65rem !important;
    font-size: 0.75rem !important;
    font-weight: 650 !important;
    text-transform: none !important;
    padding: 0.4rem 0.7rem !important;
    box-shadow: none !important;
}

#booking-calendar .fc-button-group > .fc-button {
    border-radius: 0 !important;
}

#booking-calendar .fc-button-group > .fc-button:first-child {
    border-radius: 0.65rem 0 0 0.65rem !important;
}

#booking-calendar .fc-button-group > .fc-button:last-child {
    border-radius: 0 0.65rem 0.65rem 0 !important;
}

#booking-calendar .fc-col-header-cell-cushion,
#booking-calendar .fc-timegrid-axis-cushion,
#booking-calendar .fc-timegrid-slot-label-cushion {
    font-size: 0.72rem;
    font-weight: 650;
    color: #64748b;
    text-decoration: none;
}

#booking-calendar .fc-daygrid-day-number {
    font-size: 0.75rem;
    font-weight: 650;
    color: #334155;
    text-decoration: none;
    padding: 0.45rem;
}

#booking-calendar .fc-event {
    border-radius: 0.45rem !important;
    border-width: 0 !important;
    box-shadow: 0 4px 12px rgb(15 23 42 / 0.12);
    font-size: 0.72rem;
    font-weight: 650;
    padding: 0.15rem 0.3rem;
    cursor: pointer;
}

#booking-calendar .fc-timegrid-event {
    border-radius: 0.55rem !important;
}

#booking-calendar .fc-list-event-dot {
    display: none;
}

#booking-calendar .fc-list-day-cushion {
    background: #f8fafc !important;
}

.booking-upcoming {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
    padding: 0.75rem;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.booking-upcoming:hover {
    border-color: #99f6e4;
    box-shadow: 0 10px 24px rgb(15 23 42 / 0.06);
    transform: translateY(-1px);
}

.booking-upcoming__when {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    background: #0f172a;
    color: #fff;
    padding: 0.45rem 0.25rem;
}

.booking-upcoming__day {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.booking-upcoming__date {
    font-size: 0.8rem;
    font-weight: 700;
}

.booking-upcoming__time {
    margin-top: 0.15rem;
    font-size: 0.62rem;
    color: #5eead4;
}

.booking-upcoming__name {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 650;
    color: #0f172a;
}

.booking-upcoming__meta {
    margin: 0.15rem 0 0.45rem;
    font-size: 0.72rem;
    color: #64748b;
}

.booking-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgb(15 23 42 / 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.booking-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.booking-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    width: min(26rem, 100vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -18px 0 40px rgb(15 23 42 / 0.12);
    transform: translateX(105%);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.booking-drawer.is-open {
    transform: translateX(0);
}

.booking-drawer__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.booking-drawer__eyebrow {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.booking-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 1.15rem;
}

.booking-drawer__title {
    margin: 0.65rem 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.booking-drawer__when {
    margin: 0;
    font-size: 0.84rem;
    color: #64748b;
}

.booking-drawer__meta {
    margin-top: 1.15rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.booking-drawer__meta .span-2 {
    grid-column: span 2;
}

.booking-drawer__actions {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e2e8f0;
}

.booking-drawer__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.booking-drawer__hint {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    color: #0f766e;
    font-weight: 600;
}

/* ── SEO hub ───────────────────────────────────────────────── */
.seo-hub__shell {
    overflow: hidden;
}

.seo-hub__body {
    padding: 1.25rem 1.15rem 1.5rem;
}

@media (min-width: 768px) {
    .seo-hub__body {
        padding: 1.5rem 1.5rem 1.75rem;
    }
}

.seo-hub__grid {
    display: grid;
    gap: 1.15rem;
}

@media (min-width: 1024px) {
    .seo-hub__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .seo-hub__grid--keywords {
        grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.4fr);
    }

    .seo-hub__grid--three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.seo-hub__card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.seo-hub__sitemap-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.seo-hub__chip-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.3rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 650;
    color: #0f766e;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease;
}

.seo-hub__chip-link:hover {
    background: #ecfdf5;
    border-color: #99f6e4;
}

.seo-hub__check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.85rem 1rem;
    cursor: pointer;
}

.seo-hub__check input {
    margin-top: 0.2rem;
}

.seo-hub__check strong {
    display: block;
    font-size: 0.875rem;
    color: #0f172a;
}

.seo-hub__check em {
    display: block;
    margin-top: 0.15rem;
    font-style: normal;
    font-size: 0.75rem;
    color: #64748b;
}

.seo-hub__list,
.seo-hub__rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
    max-height: 22rem;
    overflow-y: auto;
}

.seo-hub__list li,
.seo-hub__rank-list li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.65rem 0.75rem;
}

.seo-hub__rank-list li {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.seo-hub__list li span,
.seo-hub__list li strong + span {
    font-size: 0.7rem;
    color: #64748b;
}

.seo-hub__list li strong {
    font-size: 0.84rem;
    color: #0f172a;
}

.seo-hub__list li.is-empty,
.seo-hub__rank-list li.is-empty {
    border-style: dashed;
    color: #64748b;
    font-size: 0.84rem;
}

/* ── Admin topbar ──────────────────────────────────────────── */
[x-cloak] {
    display: none !important;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: blur(10px);
    padding: 0.85rem 1.5rem;
}

.admin-topbar__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-topbar__view-site {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 650;
    color: #0f172a;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.admin-topbar__view-site svg {
    width: 1rem;
    height: 1rem;
    color: #0f766e;
}

.admin-topbar__view-site:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
}

.admin-topbar__cache-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 650;
    color: #0f172a;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.admin-topbar__cache-btn svg {
    width: 1rem;
    height: 1rem;
    color: #b45309;
}

.admin-topbar__cache-btn:hover {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.admin-topbar__profile {
    position: relative;
}

.admin-topbar__avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.3rem 0.55rem 0.3rem 0.3rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.admin-topbar__avatar-btn:hover,
.admin-topbar__avatar-btn[aria-expanded="true"] {
    border-color: #99f6e4;
    box-shadow: 0 8px 20px rgb(15 23 42 / 0.06);
}

.admin-topbar__avatar {
    display: inline-flex;
    height: 2.15rem;
    width: 2.15rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(145deg, #34d399 0%, #059669 55%, #0f766e 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3);
}

.admin-topbar__avatar--sm {
    height: 2.35rem;
    width: 2.35rem;
}

.admin-topbar__user-meta {
    display: none;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

@media (min-width: 768px) {
    .admin-topbar__user-meta {
        display: flex;
    }
}

.admin-topbar__user-name {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 650;
    color: #0f172a;
}

.admin-topbar__user-email {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    color: #64748b;
}

.admin-topbar__chevron {
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    transition: transform 150ms ease;
}

.admin-topbar__chevron.is-open {
    transform: rotate(180deg);
}

.admin-topbar__menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 50;
    width: 16.5rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
    box-shadow:
        0 1px 2px rgb(15 23 42 / 0.04),
        0 18px 40px rgb(15 23 42 / 0.12);
}

.admin-topbar__menu-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.admin-topbar__menu-name {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-topbar__menu-email {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
    word-break: break-all;
}

.admin-topbar__menu-section {
    padding: 0.4rem;
}

.admin-topbar__menu-footer {
    border-top: 1px solid #f1f5f9;
    padding: 0.4rem;
    background: #f8fafc;
}

.admin-topbar__menu-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.65rem;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    padding: 0.65rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

.admin-topbar__menu-item svg {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    color: #64748b;
}

.admin-topbar__menu-item:hover {
    background: #f0fdfa;
    color: #0f766e;
}

.admin-topbar__menu-item:hover svg {
    color: #0f766e;
}

.admin-topbar__menu-item.is-danger {
    color: #b91c1c;
}

.admin-topbar__menu-item.is-danger svg {
    color: #b91c1c;
}

.admin-topbar__menu-item.is-danger:hover {
    background: #fef2f2;
    color: #991b1b;
}

/* ── Dashboard ─────────────────────────────────────────────── */
.dash {
    display: grid;
    gap: 1.25rem;
}

.dash__hero {
    margin: 0;
}

.dash__kpi-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
    .dash__kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .dash__kpi-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.dash-kpi {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 1.1rem;
    background:
        linear-gradient(180deg, #fff, #f8fafc);
    padding: 1rem 1.05rem 1.05rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.dash-kpi__icon {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.7rem;
    margin-bottom: 0.75rem;
}

.dash-kpi__icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.dash-kpi__icon--emerald { background: #ecfdf5; color: #059669; }
.dash-kpi__icon--sky { background: #e0f2fe; color: #0284c7; }
.dash-kpi__icon--amber { background: #fffbeb; color: #d97706; }
.dash-kpi__icon--violet { background: #f5f3ff; color: #7c3aed; }
.dash-kpi__icon--teal { background: #f0fdfa; color: #0f766e; }
.dash-kpi__icon--slate { background: #f1f5f9; color: #475569; }

.dash-kpi__label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.dash-kpi__value {
    margin: 0.35rem 0 0;
    font-size: 1.85rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1;
}

.dash-kpi__meta {
    margin: 0.45rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.dash__quick {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .dash__quick {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .dash__quick {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.dash-quick {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    background: #fff;
    padding: 0.85rem 0.95rem;
    text-decoration: none;
    transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.dash-quick:hover {
    border-color: #99f6e4;
    box-shadow: 0 10px 24px rgb(15 23 42 / 0.06);
    transform: translateY(-1px);
}

.dash-quick__label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

.dash-quick__hint {
    font-size: 0.72rem;
    color: #64748b;
}

.dash__main,
.dash__columns,
.dash__bottom {
    display: grid;
    gap: 1.15rem;
}

@media (min-width: 1024px) {
    .dash__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dash__bottom {
        grid-template-columns: 1.05fr 1fr;
    }
}

.dash-panel {
    margin: 0;
}

.dash-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.dash-panel__sub {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.dash-panel__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

.dash-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: end;
    min-height: 9.5rem;
}

.dash-bars__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.dash-bars__track {
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 7rem;
    border-radius: 0.7rem;
    background: #f1f5f9;
    overflow: hidden;
    padding: 0.35rem;
}

.dash-bars__fill {
    width: 100%;
    border-radius: 0.45rem;
    background: linear-gradient(180deg, #34d399, #0f766e);
    min-height: 0.5rem;
    transition: height 220ms ease;
}

.dash-bars--sky .dash-bars__fill {
    background: linear-gradient(180deg, #38bdf8, #0284c7);
}

.dash-bars__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.dash-bars__count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0f172a;
}

.dash-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.dash-feed__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #f8fafc;
    padding: 0.7rem 0.75rem;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease;
}

a.dash-feed__item:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.dash-feed__badge {
    display: inline-flex;
    min-width: 2.6rem;
    justify-content: center;
    border-radius: 0.55rem;
    background: #0f172a;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.4rem 0.35rem;
}

.dash-feed__avatar {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(145deg, #99f6e4, #0f766e);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.dash-feed__dot {
    width: 0.55rem;
    height: 0.55rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: #14b8a6;
    box-shadow: 0 0 0 4px rgb(20 184 166 / 0.15);
}

.dash-feed__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.1rem;
}

.dash-feed__body strong {
    font-size: 0.84rem;
    font-weight: 650;
    color: #0f172a;
}

.dash-feed__body em {
    font-style: normal;
    font-size: 0.72rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-feed__empty {
    border: 1px dashed #e2e8f0;
    border-radius: 0.85rem;
    padding: 1.1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.84rem;
}

/* ── Analytics hub ─────────────────────────────────────────── */
.analytics-hub__ranges {
    flex-wrap: wrap;
}

.analytics-hub__tabs {
    flex-wrap: wrap;
}

.analytics-hub__body {
    padding-top: 0.25rem;
}

.analytics-hub__grid {
    margin-top: 1rem;
}

.analytics-hub__filters {
    margin-bottom: 1rem;
}

.analytics-kpi-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
    .analytics-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.analytics-kpi {
    padding: 1rem 1.1rem;
}

.analytics-kpi__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.analytics-kpi__value {
    margin-top: 0.35rem;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.1;
}

.analytics-kpi__hint {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: #94a3b8;
}

.analytics-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    min-height: 9rem;
    padding-top: 0.5rem;
}

.analytics-bars--hourly {
    gap: 0.15rem;
}

.analytics-bars__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.analytics-bars__stack {
    width: 100%;
    height: 7.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 0.4rem 0.4rem 0 0;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.analytics-bars__fill {
    display: block;
    width: 70%;
    min-height: 2px;
    border-radius: 0.35rem 0.35rem 0.1rem 0.1rem;
    background: linear-gradient(180deg, #0d9488, #115e59);
}

.analytics-bars__fill--events {
    background: linear-gradient(180deg, #14b8a6, #0f766e);
}

.analytics-bars__label {
    font-size: 0.62rem;
    color: #94a3b8;
    white-space: nowrap;
}

.analytics-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    color: #64748b;
}

.analytics-dot {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.analytics-dot--teal {
    background: #14b8a6;
}

.analytics-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #0f766e;
    font-size: 0.68rem;
    font-weight: 700;
    margin-right: 0.45rem;
}

.analytics-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 0.5rem;
}

.analytics-bucket-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    gap: 0.65rem;
}

.analytics-bucket {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.85rem 0.75rem;
    text-align: center;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.analytics-bucket strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.analytics-bucket span {
    font-size: 0.7rem;
    color: #64748b;
}

.analytics-meter {
    display: inline-block;
    width: 5.5rem;
    height: 0.4rem;
    margin-right: 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    vertical-align: middle;
    overflow: hidden;
}

.analytics-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
}

.analytics-depth-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.analytics-depth-list li {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    gap: 0.65rem;
    align-items: center;
}

.analytics-depth-list__label {
    font-size: 0.78rem;
    font-weight: 650;
    color: #334155;
}

.analytics-funnel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.analytics-funnel__step {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.analytics-funnel__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.analytics-funnel__meta strong {
    color: #0f172a;
}

.analytics-funnel__meta span {
    color: #64748b;
    font-size: 0.72rem;
}

.analytics-funnel__bar {
    height: 0.55rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.analytics-funnel__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #115e59, #14b8a6);
}

.content-badge--success {
    background: #ecfdf5;
    color: #047857;
}

.content-badge--warn {
    background: #fff7ed;
    color: #c2410c;
}

/* ───────────── Page builder ───────────── */
.pb {
    --pb-line: #e2e8f0;
    --pb-soft: #f8fafc;
    --pb-ink: #0f172a;
    --pb-muted: #64748b;
    --pb-accent: #0f766e;
    --pb-accent-2: #134e4a;
    --pb-glow: #ccfbf1;
    --pb-danger: #dc2626;
}

.pb-header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
    padding: 1.1rem 1.25rem;
    border-radius: 1.1rem;
    background:
        radial-gradient(900px 300px at 0% -40%, rgb(20 184 166 / 0.3), transparent 55%),
        linear-gradient(135deg, #0f172a 0%, #134e4a 60%, #0f766e 100%);
    color: #f8fafc;
    box-shadow: 0 18px 40px rgb(15 23 42 / 0.16);
}

.pb-header__main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.pb-header__back {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 0.1);
    border: 1px solid rgb(255 255 255 / 0.16);
    transition: background 0.15s ease;
}

.pb-header__back:hover {
    background: rgb(255 255 255 / 0.2);
}

.pb-header__back svg {
    width: 1.15rem;
    height: 1.15rem;
}

.pb-header__eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #99f6e4;
}

.pb-header__title {
    margin-top: 0.15rem;
    overflow: hidden;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-header__url {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: rgb(248 250 252 / 0.6);
}

.pb-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.pb-history {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.16);
    border-radius: 0.7rem;
    background: rgb(255 255 255 / 0.08);
}

.pb-history button {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    color: #fff;
    transition: background 0.15s ease;
}

.pb-history button + button {
    border-left: 1px solid rgb(255 255 255 / 0.14);
}

.pb-history button:hover:not(:disabled) {
    background: rgb(255 255 255 / 0.14);
}

.pb-history button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pb-history svg {
    width: 1.05rem;
    height: 1.05rem;
}

.pb-save-state {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(248 250 252 / 0.75);
}

.pb-save-state__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 0 3px rgb(52 211 153 / 0.2);
}

.pb-save-state.is-dirty .pb-save-state__dot {
    background: #fbbf24;
    box-shadow: 0 0 0 3px rgb(251 191 36 / 0.22);
}

.pb-save-state.is-saving .pb-save-state__dot {
    animation: pb-pulse 0.9s ease-in-out infinite;
}

.pb-save-btn {
    background: #fff;
    color: var(--pb-accent-2);
    box-shadow: 0 10px 24px rgb(2 6 23 / 0.25);
}

.pb-save-btn:hover:not(:disabled) {
    background: #f0fdfa;
}

.pb-save-btn:disabled {
    opacity: 0.75;
}

.pb-spin {
    animation: pb-spin 0.8s linear infinite;
}

@keyframes pb-spin {
    to { transform: rotate(360deg); }
}

@keyframes pb-pulse {
    50% { opacity: 0.35; }
}

.pb-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.9rem;
    padding: 0.5rem;
    border: 1px solid var(--pb-line);
    border-radius: 0.95rem;
    background: #fff;
}

.pb-tabs .home-editor__tab {
    cursor: pointer;
}

.pb-tab-score {
    margin-left: 0.25rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #fee2e2;
    color: #b91c1c;
}

.pb-tab-score.is-good { background: #dcfce7; color: #15803d; }
.pb-tab-score.is-mid { background: #fef3c7; color: #b45309; }

.pb-tabs__aside {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding-right: 0.25rem;
}

.pb-status {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #f1f5f9;
    color: #475569;
}

.pb-status.is-published { background: #dcfce7; color: #15803d; }
.pb-status.is-draft { background: #f1f5f9; color: #475569; }
.pb-status.is-scheduled { background: #e0e7ff; color: #4338ca; }

.pb-chip {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px dashed #f59e0b;
    font-size: 0.7rem;
    font-weight: 600;
    background: #fffbeb;
    color: #b45309;
}

/* Workspace */
.pb-workspace {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .pb-workspace {
        grid-template-columns: 320px minmax(0, 1fr);
    }
}

@media (min-width: 1440px) {
    .pb-workspace {
        grid-template-columns: 350px minmax(0, 1fr);
    }
}

/* Addon library */
.pb-library {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--pb-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgb(15 23 42 / 0.04);
}

@media (min-width: 1024px) {
    .pb-library {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

.pb-library__head {
    display: grid;
    gap: 0.7rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid var(--pb-line);
    background: linear-gradient(180deg, #fff, var(--pb-soft));
}

.pb-library__label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pb-accent);
}

.pb-search {
    position: relative;
}

.pb-search svg {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    transform: translateY(-50%);
}

.pb-search input {
    width: 100%;
    padding: 0.6rem 0.8rem 0.6rem 2.2rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    font-size: 0.85rem;
    background: #fff;
}

.pb-search input:focus {
    outline: none;
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgb(45 212 191 / 0.25);
}

.pb-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.2rem;
    border-radius: 0.7rem;
    background: #f1f5f9;
}

.pb-segment button {
    padding: 0.45rem 0.5rem;
    border-radius: 0.55rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--pb-muted);
    transition: 0.15s ease;
}

.pb-segment button.is-active {
    background: #fff;
    color: var(--pb-ink);
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.1);
}

.pb-library__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.65rem 0.75rem;
}

.pb-library__group + .pb-library__group {
    margin-top: 0.35rem;
}

.pb-library__group-label {
    position: sticky;
    top: -0.5rem;
    z-index: 1;
    padding: 0.65rem 0.4rem 0.4rem;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #fff;
}

.pb-addon {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.pb-addon:hover,
.pb-addon:focus-visible {
    outline: none;
    border-color: #99f6e4;
    background: #f0fdfa;
}

.pb-addon:active {
    transform: scale(0.99);
    cursor: grabbing;
}

.pb-addon__icon,
.pb-outline__icon,
.pb-card__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    background: var(--pb-glow);
    color: var(--pb-accent-2);
}

.pb-addon__icon svg,
.pb-outline__icon svg,
.pb-card__icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.pb-addon__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.pb-addon__name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--pb-ink);
}

.pb-addon__used {
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #475569;
}

.pb-addon__desc {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0.1rem;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--pb-muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pb-addon__plus {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 1px solid var(--pb-line);
    font-size: 1rem;
    font-weight: 600;
    color: var(--pb-accent);
    background: #fff;
    transition: 0.15s ease;
}

.pb-addon:hover .pb-addon__plus {
    border-color: var(--pb-accent);
    background: var(--pb-accent);
    color: #fff;
}

.pb-library__empty {
    padding: 1.5rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--pb-muted);
}

.pb-library__hint {
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--pb-line);
    font-size: 0.7rem;
    text-align: center;
    color: #94a3b8;
    background: var(--pb-soft);
}

.pb-outline {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.3rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--pb-line);
    border-radius: 0.7rem;
    background: #fff;
    cursor: grab;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pb-outline:hover {
    border-color: #99f6e4;
}

.pb-outline.is-focused {
    border-color: var(--pb-accent);
    background: #f0fdfa;
}

.pb-outline.is-hidden {
    opacity: 0.55;
}

.pb-outline__grip {
    font-size: 0.7rem;
    letter-spacing: -0.15em;
    color: #cbd5e1;
}

.pb-outline__icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.5rem;
}

.pb-outline__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.pb-outline__name {
    font-size: 0.76rem;
    font-weight: 650;
    color: var(--pb-ink);
}

.pb-outline__sum {
    overflow: hidden;
    font-size: 0.68rem;
    color: var(--pb-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-outline__eye {
    color: #94a3b8;
}

/* Drop indicators */
.pb-outline.is-drop-before::before,
.pb-card.is-drop-before::before,
.pb-outline.is-drop-after::after,
.pb-card.is-drop-after::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    height: 3px;
    border-radius: 3px;
    background: var(--pb-accent);
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.18);
}

.pb-outline.is-drop-before::before { top: -0.25rem; }
.pb-outline.is-drop-after::after { bottom: -0.25rem; }
.pb-card.is-drop-before::before { top: -0.45rem; }
.pb-card.is-drop-after::after { bottom: -0.45rem; }

/* Canvas */
.pb-canvas {
    min-width: 0;
}

.pb-settings {
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--pb-line);
    border-radius: 1rem;
    background: #fff;
}

.pb-settings__head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.85rem 1rem;
    text-align: left;
}

.pb-settings__icon {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.6rem;
    background: #f1f5f9;
    color: #475569;
}

.pb-settings__icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.pb-settings__title {
    display: flex;
    flex: 1;
    flex-direction: column;
    font-size: 0.875rem;
    font-weight: 650;
    color: var(--pb-ink);
}

.pb-settings__sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--pb-muted);
}

.pb-settings__chevron {
    width: 1.15rem;
    height: 1.15rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.pb-settings.is-open .pb-settings__chevron {
    transform: rotate(180deg);
}

.pb-settings__body {
    padding: 1rem;
    border-top: 1px solid var(--pb-line);
    background: var(--pb-soft);
}

.pb-canvas__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.pb-canvas__title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pb-ink);
}

.pb-canvas__sub {
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: var(--pb-muted);
}

.pb-canvas__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.pb-menu {
    position: relative;
}

.pb-menu__panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 30;
    width: 17rem;
    padding: 0.4rem;
    border: 1px solid var(--pb-line);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 20px 45px rgb(15 23 42 / 0.16);
}

.pb-menu__label {
    padding: 0.45rem 0.6rem 0.3rem;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
}

.pb-menu__item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 0.6rem;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pb-ink);
}

.pb-menu__item small {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--pb-muted);
}

.pb-menu__item:hover {
    background: #f0fdfa;
}

/* Section cards */
.pb-list {
    display: grid;
    gap: 0.65rem;
    min-height: 8rem;
}

.pb-card {
    position: relative;
    border: 1px solid var(--pb-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
    transition: border-color 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.pb-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgb(15 23 42 / 0.06);
}

.pb-card.is-focused {
    border-color: #5eead4;
    box-shadow: 0 0 0 3px rgb(45 212 191 / 0.15), 0 10px 28px rgb(15 23 42 / 0.06);
}

.pb-card.is-dragging {
    opacity: 0.45;
}

.pb-card.is-hidden .pb-card__head {
    background: repeating-linear-gradient(-45deg, #fff, #fff 10px, #f8fafc 10px, #f8fafc 20px);
}

.pb-card.is-hidden .pb-card__icon,
.pb-card.is-hidden .pb-card__text {
    opacity: 0.55;
}

.pb-card__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem 0.8rem 0.55rem;
    border-radius: 1rem;
    cursor: pointer;
}

.pb-card.is-open .pb-card__head {
    border-bottom: 1px solid var(--pb-line);
    border-radius: 1rem 1rem 0 0;
}

.pb-card__grip {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 2.25rem;
    border-radius: 0.4rem;
    color: #cbd5e1;
    cursor: grab;
}

.pb-card__grip:hover {
    background: #f1f5f9;
    color: #64748b;
}

.pb-card__grip:active {
    cursor: grabbing;
}

.pb-card__grip svg {
    width: 1rem;
    height: 1rem;
}

.pb-card__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.pb-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--pb-ink);
}

.pb-card__badge {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    background: #f0fdfa;
    color: var(--pb-accent);
    box-shadow: inset 0 0 0 1px #99f6e4;
}

.pb-card__desc {
    overflow: hidden;
    margin-top: 0.1rem;
    font-size: 0.76rem;
    color: var(--pb-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-card__tools {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.15rem;
}

.pb-card__tools > button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    color: #94a3b8;
    transition: 0.15s ease;
}

.pb-card__tools > button:hover:not(:disabled) {
    background: #f1f5f9;
    color: var(--pb-ink);
}

.pb-card__tools > button.is-danger:hover {
    background: #fef2f2;
    color: var(--pb-danger);
}

.pb-card__tools > button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pb-card__tools svg {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 767px) {
    .pb-card__tools > button:not(.is-danger) {
        display: none;
    }
}

.pb-visible {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0.4rem;
    cursor: pointer;
}

.pb-visible input,
.pb-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pb-visible__track,
.pb-switch__track {
    position: relative;
    flex-shrink: 0;
    width: 2.25rem;
    height: 1.3rem;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.pb-visible__track::after,
.pb-switch__track::after {
    content: "";
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.25);
    transition: transform 0.2s ease;
}

.pb-visible input:checked + .pb-visible__track,
.pb-switch input:checked + .pb-switch__track {
    background: linear-gradient(135deg, var(--pb-accent-2), var(--pb-accent));
}

.pb-visible input:checked + .pb-visible__track::after,
.pb-switch input:checked + .pb-switch__track::after {
    transform: translateX(0.95rem);
}

.pb-visible input:focus-visible + .pb-visible__track,
.pb-switch input:focus-visible + .pb-switch__track {
    box-shadow: 0 0 0 3px rgb(45 212 191 / 0.35);
}

.pb-visible__label {
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.pb-card__chevron {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.pb-card.is-open .pb-card__chevron {
    transform: rotate(180deg);
}

.pb-card__body {
    padding: 0 1.1rem 1.15rem;
    border-radius: 0 0 1rem 1rem;
    background: linear-gradient(180deg, #fbfdff, #fff 4rem);
}

.pb-card__tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--pb-line);
}

.pb-card__tabs button {
    position: relative;
    padding: 0.75rem 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--pb-muted);
}

.pb-card__tabs button.is-active {
    color: var(--pb-accent-2);
}

.pb-card__tabs button.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--pb-accent);
}

.pb-card__type {
    margin-left: auto;
    font-size: 0.7rem;
    color: #94a3b8;
}

@media (max-width: 900px) {
    .pb-card__type {
        display: none;
    }
}

/* Fields */
.pb-fields {
    display: grid;
    gap: 0.9rem 1rem;
}

@media (min-width: 768px) {
    .pb-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pb-field--full {
        grid-column: 1 / -1;
    }
}

.pb-field {
    min-width: 0;
}

.pb-field--stack {
    display: grid;
    align-content: center;
    gap: 0.6rem;
}

.pb-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 650;
    color: #475569;
}

.pb-help {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: #94a3b8;
}

.pb-note {
    padding: 0.65rem 0.8rem;
    border: 1px solid #99f6e4;
    border-radius: 0.7rem;
    font-size: 0.75rem;
    background: #f0fdfa;
    color: #115e59;
}

.pb-input-sm {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
}

.pb-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    background: #0f172a;
    color: #e2e8f0;
    border-color: #1e293b;
}

.pb-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 550;
    color: #334155;
}

.pb-field--half > .pb-switch {
    margin-top: 1.35rem;
}

.pb-field--stack > .pb-switch {
    margin-top: 0;
}

.pb-slug {
    display: flex;
    align-items: stretch;
}

.pb-slug > span {
    display: grid;
    place-items: center;
    padding: 0 0.7rem;
    border: 1px solid #cbd5e1;
    border-right: 0;
    border-radius: 0.7rem 0 0 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    background: #f8fafc;
}

.pb-slug > input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.pb-slug > input:disabled {
    background: #f1f5f9;
    color: #64748b;
}

/* Rich text */
.pb-rte {
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #fff;
}

.pb-rte:focus-within {
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgb(45 212 191 / 0.25);
}

.pb-rte__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem;
    border-bottom: 1px solid var(--pb-line);
    background: var(--pb-soft);
}

.pb-rte__toolbar button {
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.45rem;
    border-radius: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.pb-rte__toolbar button:hover,
.pb-rte__toolbar button.is-active {
    background: #fff;
    color: var(--pb-accent-2);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.1);
}

.pb-rte__source {
    margin-left: auto;
    font-family: ui-monospace, monospace;
}

.pb-rte__sep {
    width: 1px;
    height: 1.1rem;
    margin: 0 0.2rem;
    background: #e2e8f0;
}

.pb-rte__editor {
    min-height: 9rem;
    max-height: 28rem;
    overflow-y: auto;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #1e293b;
}

.pb-rte__editor:focus {
    outline: none;
}

.pb-rte__editor h2 { margin: 1rem 0 0.4rem; font-size: 1.2rem; font-weight: 700; color: #0f172a; }
.pb-rte__editor h3 { margin: 0.9rem 0 0.35rem; font-size: 1.02rem; font-weight: 700; color: #0f172a; }
.pb-rte__editor p { margin: 0.45rem 0; }
.pb-rte__editor ul { margin: 0.45rem 0; padding-left: 1.3rem; list-style: disc; }
.pb-rte__editor ol { margin: 0.45rem 0; padding-left: 1.3rem; list-style: decimal; }
.pb-rte__editor a { color: var(--pb-accent); text-decoration: underline; }
.pb-rte__editor blockquote { margin: 0.6rem 0; padding-left: 0.9rem; border-left: 3px solid #5eead4; color: #475569; font-style: italic; }
.pb-rte__editor > :first-child { margin-top: 0; }
.pb-rte .pb-code { border: 0; border-radius: 0; }

/* Media fields */
.pb-media-field {
    display: flex;
    gap: 0.85rem;
    padding: 0.65rem;
    border: 1px solid var(--pb-line);
    border-radius: 0.85rem;
    background: var(--pb-soft);
}

.pb-media-field__thumb {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    width: 7.5rem;
    aspect-ratio: 4 / 3;
    border-radius: 0.6rem;
    background: #e2e8f0;
    box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.06);
}

.pb-media-field__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.pb-media-field__thumb:hover img {
    transform: scale(1.05);
}

.pb-media-field__thumb.is-empty {
    border: 1.5px dashed #94a3b8;
    background: #fff;
    box-shadow: none;
}

.pb-media-field__empty {
    display: grid;
    place-items: center;
    gap: 0.2rem;
    height: 100%;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}

.pb-media-field__empty svg {
    width: 1.4rem;
    height: 1.4rem;
}

.pb-media-field__body {
    display: grid;
    flex: 1;
    align-content: start;
    gap: 0.45rem;
    min-width: 0;
}

.pb-media-field__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pb-file-field {
    display: grid;
    gap: 0.45rem;
    padding: 0.65rem;
    border: 1px solid var(--pb-line);
    border-radius: 0.85rem;
    background: var(--pb-soft);
}

.pb-file-field__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.pb-file-field__icon {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.6rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: var(--pb-glow);
    color: var(--pb-accent-2);
}

.pb-file-field__meta {
    flex: 1;
    min-width: 8rem;
}

.pb-file-field__name {
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pb-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-file-field__size {
    font-size: 0.7rem;
    color: var(--pb-muted);
}

/* Repeater */
.pb-repeater {
    display: grid;
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid var(--pb-line);
    border-radius: 0.85rem;
    background: var(--pb-soft);
}

.pb-repeater__item {
    overflow: hidden;
    border: 1px solid var(--pb-line);
    border-radius: 0.7rem;
    background: #fff;
}

.pb-repeater__item.is-open {
    border-color: #99f6e4;
    box-shadow: 0 4px 14px rgb(15 23 42 / 0.05);
}

.pb-repeater__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
}

.pb-repeater__index {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}

.pb-repeater__thumb {
    width: 2rem;
    height: 1.5rem;
    border-radius: 0.3rem;
    object-fit: cover;
}

.pb-repeater__title {
    flex: 1;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pb-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pb-repeater__tools {
    display: flex;
    gap: 0.1rem;
}

.pb-repeater__tools button {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.pb-repeater__tools button:hover:not(:disabled) {
    background: #f1f5f9;
    color: var(--pb-ink);
}

.pb-repeater__tools button.is-danger:hover {
    background: #fef2f2;
    color: var(--pb-danger);
}

.pb-repeater__tools button:disabled {
    opacity: 0.3;
}

.pb-repeater__chevron {
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.pb-repeater__item.is-open .pb-repeater__chevron {
    transform: rotate(180deg);
}

.pb-repeater__body {
    padding: 0.8rem;
    border-top: 1px solid var(--pb-line);
}

.pb-repeater__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pb-repeater__add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border: 1px dashed #5eead4;
    border-radius: 0.6rem;
    font-size: 0.76rem;
    font-weight: 650;
    color: var(--pb-accent);
    background: #fff;
}

.pb-repeater__add:hover:not(:disabled) {
    background: #f0fdfa;
}

.pb-repeater__add:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pb-repeater__add span:first-child {
    font-size: 1rem;
    line-height: 1;
}

.pb-repeater__count {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
}

/* Design swatches */
.pb-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pb-swatch {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.6rem;
    border: 1px solid #cbd5e1;
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    transition: 0.15s ease;
}

.pb-swatch.is-active {
    border-color: var(--pb-accent);
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.25);
}

.pb-swatch--auto { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #f1f5f9 5px, #f1f5f9 10px); }
.pb-swatch--white { background: #fff; }
.pb-swatch--muted { background: #f1f5f9; }
.pb-swatch--tint { background: #ccfbf1; }
.pb-swatch--dark { background: #0b1220; }

/* Empty + add */
.pb-empty {
    display: grid;
    justify-items: center;
    padding: 3rem 1.5rem;
    border: 2px dashed #cbd5e1;
    border-radius: 1.1rem;
    text-align: center;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pb-empty.is-drop {
    border-color: var(--pb-accent);
    background: #f0fdfa;
}

.pb-empty__icon {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: var(--pb-glow);
    color: var(--pb-accent-2);
}

.pb-empty__icon svg {
    width: 1.6rem;
    height: 1.6rem;
}

.pb-empty__title {
    margin-top: 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pb-ink);
}

.pb-empty__text {
    margin-top: 0.3rem;
    max-width: 26rem;
    font-size: 0.82rem;
    color: var(--pb-muted);
}

.pb-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.1rem;
}

.pb-add-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 0.9rem;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--pb-muted);
    transition: 0.15s ease;
}

.pb-add-end:hover {
    border-color: var(--pb-accent);
    color: var(--pb-accent);
    background: #f0fdfa;
}

.pb-add-end span {
    font-size: 1.1rem;
    line-height: 1;
}

/* Preview drawer */
.pb-preview {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    background: rgb(2 6 23 / 0.55);
    backdrop-filter: blur(3px);
}

@media (min-width: 1280px) {
    .pb-preview {
        left: auto;
        width: min(60vw, 1100px);
        background: #0f172a;
        box-shadow: -30px 0 60px rgb(2 6 23 / 0.35);
        backdrop-filter: none;
    }
}

.pb-preview__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: #0f172a;
    color: #e2e8f0;
    border-bottom: 1px solid #1e293b;
}

.pb-preview__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.pb-preview__hint {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
}

.pb-preview__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #34d399;
}

.pb-preview__dot.is-loading {
    background: #fbbf24;
    animation: pb-pulse 0.8s ease-in-out infinite;
}

.pb-devices {
    display: inline-flex;
    padding: 0.2rem;
    border-radius: 0.65rem;
    background: #1e293b;
}

.pb-devices button {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 1.9rem;
    border-radius: 0.5rem;
    color: #94a3b8;
}

.pb-devices button.is-active {
    background: #334155;
    color: #fff;
}

.pb-devices svg {
    width: 1rem;
    height: 1rem;
}

.pb-preview__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pb-preview__close {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #1e293b;
    color: #cbd5e1;
}

.pb-preview__close:hover {
    background: #334155;
    color: #fff;
}

.pb-preview__stage {
    display: flex;
    flex: 1;
    justify-content: center;
    overflow: auto;
    padding: 1rem;
    background:
        radial-gradient(circle at 1px 1px, rgb(148 163 184 / 0.18) 1px, transparent 0) 0 0 / 18px 18px,
        #111827;
}

.pb-preview__device {
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 20px 50px rgb(0 0 0 / 0.45);
    transition: width 0.3s ease;
}

.pb-preview__device.is-mobile,
.pb-preview__device.is-tablet {
    border: 10px solid #1f2937;
    border-radius: 1.75rem;
}

.pb-preview__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

/* Toast */
.pb-toast {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 95;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    border-radius: 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 18px 40px rgb(2 6 23 / 0.3);
}

.pb-toast::before {
    content: "✓";
    display: grid;
    place-items: center;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: #10b981;
}

.pb-toast.is-error {
    background: #7f1d1d;
}

.pb-toast.is-error::before {
    content: "!";
    background: #ef4444;
}

/* Page builder — new page layout picker */
.pb-layouts { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pb-layout { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1rem 1.1rem; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pb-layout:hover { border-color: #c7d2fe; transform: translateY(-1px); box-shadow: 0 8px 22px -14px rgb(15 23 42 / .35); }
.pb-layout.is-active { border-color: #4f46e5; box-shadow: 0 0 0 4px rgb(79 70 229 / .12); }
.pb-layout__icon { display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; border-radius: 10px; background: #eef2ff; color: #4f46e5; margin-bottom: 0.35rem; }
.pb-layout__icon svg { width: 1.35rem; height: 1.35rem; }
.pb-layout__name { font-size: 0.9rem; font-weight: 700; color: #0f172a; }
.pb-layout__desc { font-size: 0.75rem; line-height: 1.45; color: #64748b; }
.pb-layout__check { position: absolute; top: 0.75rem; right: 0.75rem; display: none; width: 1.3rem; height: 1.3rem; align-items: center; justify-content: center; border-radius: 999px; background: #4f46e5; color: #fff; font-size: 0.7rem; font-weight: 700; }
.pb-layout.is-active .pb-layout__check { display: inline-flex; }
