:root {
    --bg: #f6f7f3;
    --surface: #ffffff;
    --surface-soft: #eef5f1;
    --ink: #17201d;
    --muted: #65726d;
    --line: #dfe6e1;
    --primary: #11635b;
    --primary-dark: #0b453f;
    --accent: #c45f3f;
    --danger: #a5363d;
    --warning: #9a6818;
    --blue: #2f5f91;
    --shadow: 0 12px 28px rgba(23, 32, 29, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: #f5f5f9;
    color: var(--ink);
    font-family: "Public Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 0.125rem 0.375rem 0 rgba(67, 89, 113, 0.12);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
}

.brand {
    align-items: center;
    display: flex;
    gap: 10px;
    font-size: 16px;
    font-weight: 850;
}

.brand-mark {
    align-items: center;
    background: #696cff;
    border-radius: 8px;
    color: #fff;
    display: grid;
    font-size: 13px;
    height: 34px;
    place-items: center;
    width: 38px;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nav a,
.nav button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    gap: 6px;
    padding: 9px 11px;
}

.app-icon {
    flex: 0 0 auto;
    font-size: 17px;
    line-height: 1;
}

.button .app-icon,
.badge .app-icon {
    font-size: 16px;
}

.nav a:hover,
.nav button:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.language-switch {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    gap: 2px;
    padding: 2px;
}

.language-switch a {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    padding: 6px 8px;
}

.language-switch a.is-active {
    background: var(--primary);
    color: #fff;
}

.container {
    margin: 0 auto;
    max-width: 1180px;
    padding: 26px 22px 58px;
}

.page-head {
    align-items: flex-end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: 0;
    line-height: 1.05;
    margin-bottom: 10px;
}

h2 {
    font-size: 23px;
    line-height: 1.2;
    margin-bottom: 12px;
}

h3 {
    font-size: 17px;
    line-height: 1.3;
    margin-bottom: 7px;
}

.lead {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.58;
    max-width: 720px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: minmax(0, 1fr) 360px;
}

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

.panel,
.card,
.metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 18px;
}

.search-band {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px;
}

.filters {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
}

.filters-compact {
    grid-template-columns: minmax(180px, 260px) auto auto;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.check-row {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 9px;
    line-height: 1.4;
}

.input,
.select,
.textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    min-height: 40px;
    padding: 9px 10px;
    width: 100%;
}

.textarea {
    min-height: 110px;
    resize: vertical;
}

.button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    text-align: center;
    white-space: nowrap;
}

.button-primary {
    background: #696cff;
    color: #fff;
}

.button-primary:hover {
    background: #5f61e6;
}

.button-secondary {
    background: #fff;
    border-color: var(--line);
    color: #566a7f;
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.button-danger {
    background: #fff5f4;
    border-color: #f1c5c3;
    color: var(--danger);
}

.listing-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listing-card {
    overflow: hidden;
}

.clickable-card {
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.clickable-card:hover {
    border-color: #cfd2ff;
    box-shadow: 0 14px 32px rgba(67, 89, 113, 0.14);
    transform: translateY(-1px);
}

.listing-gallery {
    background: var(--surface-soft);
    display: grid;
    gap: 8px;
    padding: 8px;
    position: relative;
}

.listing-main-photo {
    border-radius: 8px;
    display: block;
    overflow: hidden;
}

.listing-image {
    aspect-ratio: 16 / 10;
    background: var(--surface-soft);
    display: block;
    object-fit: cover;
    transition: opacity 180ms ease, transform 220ms ease;
    width: 100%;
}

.listing-image.is-changing,
.detail-gallery-image.is-changing {
    opacity: 0;
    transform: translateX(10px);
}

.listing-gallery-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 10px;
}

.detail-main-photo {
    background: var(--surface-soft);
    border-radius: 8px;
    overflow: hidden;
}

.detail-gallery-image {
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: cover;
    transition: opacity 180ms ease, transform 220ms ease;
    width: 100%;
}

.listing-thumbs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.listing-thumb {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

.listing-thumb img {
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    width: 100%;
}

.listing-thumb.is-active {
    border-color: #696cff;
}

.detail-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-nav {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #566a7f;
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    position: absolute;
    top: calc((100% - 70px) / 2);
    transform: translateY(-50%);
    width: 34px;
    z-index: 2;
}

.gallery-nav:hover {
    background: #696cff;
    color: #fff;
}

.gallery-nav-prev {
    left: 16px;
}

.gallery-nav-next {
    right: 16px;
}

.listing-body {
    display: grid;
    gap: 12px;
    padding: 15px;
}

.listing-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 8px;
}

.listing-meta span,
h2 {
    align-items: center;
    display: flex;
    gap: 6px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.badge {
    align-items: center;
    background: #eef2ff;
    border: 1px solid #d9ddff;
    border-radius: 999px;
    color: #696cff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 5px;
    padding: 5px 8px;
}

.badge-warning {
    background: #fff7e8;
    border-color: #f1d6a7;
    color: var(--warning);
}

.badge-danger {
    background: #fff5f4;
    border-color: #f1c5c3;
    color: var(--danger);
}

.score {
    align-items: center;
    display: flex;
    gap: 10px;
}

.score-bar {
    background: #e5ebe7;
    border-radius: 999px;
    flex: 1;
    height: 9px;
    overflow: hidden;
}

.score-fill {
    background: #696cff;
    height: 100%;
}

.side-stack {
    display: grid;
    gap: 14px;
}

.muted {
    color: var(--muted);
}

.price {
    font-size: 20px;
    font-weight: 900;
}

.divider {
    background: var(--line);
    height: 1px;
    margin: 14px 0;
}

.flash {
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.flash-success {
    background: #eaf6ef;
    border: 1px solid #c8e8d4;
    color: #1f5c38;
}

.flash-error {
    background: #fff5f4;
    border: 1px solid #f1c5c3;
    color: var(--danger);
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.hero-visual {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
}

.stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
    padding: 15px;
}

.metric strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
}

.metric span {
    color: var(--muted);
    font-size: 13px;
}

.table-list {
    display: grid;
    gap: 10px;
}

.queue-item {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr auto;
    padding: 14px;
}

.grid-3 .queue-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
}

.payment-row {
    align-items: flex-start;
}

.photo-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.thumb {
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
}

.pricing-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.empty {
    background: var(--surface);
    border: 1px dashed #bdc9c3;
    border-radius: 8px;
    color: var(--muted);
    padding: 24px;
    text-align: center;
}

.role-card {
    box-shadow: none;
    display: grid;
    gap: 8px;
}

.role-card.is-active {
    border-color: var(--primary);
    outline: 3px solid #d9eee6;
}

.mini-listing-grid {
    display: grid;
    gap: 12px;
}

.mini-listing {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 116px 1fr;
    padding: 10px;
}

.mini-listing img {
    aspect-ratio: 4 / 3;
    border-radius: 7px;
    object-fit: cover;
    width: 100%;
}

.next-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.benefit-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.benefit-list li {
    align-items: flex-start;
    color: var(--muted);
    display: flex;
    gap: 9px;
    line-height: 1.45;
}

.profile-summary {
    align-items: center;
    display: flex;
    gap: 14px;
}

.profile-photo-field {
    align-items: center;
    display: grid;
    gap: 10px;
    justify-items: start;
}

.profile-photo-picker {
    border-radius: 999px;
    cursor: pointer;
    display: inline-grid;
    height: 96px;
    overflow: hidden;
    position: relative;
    touch-action: none;
    user-select: none;
    width: 96px;
}

.profile-photo-picker:hover .profile-photo-overlay,
.profile-photo-picker:focus-within .profile-photo-overlay {
    opacity: 1;
}

.profile-photo-overlay {
    align-items: center;
    background: rgba(23, 32, 29, 0.68);
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    gap: 5px;
    inset: 0;
    justify-content: center;
    opacity: 0;
    position: absolute;
    text-align: center;
    transition: opacity 160ms ease;
}

.profile-avatar {
    align-items: center;
    aspect-ratio: 1;
    background: #eef2ff;
    border: 1px solid #d9ddff;
    border-radius: 999px;
    color: #696cff;
    display: grid;
    flex: 0 0 auto;
    font-weight: 900;
    height: 58px;
    object-fit: cover;
    object-position: 50% 50%;
    place-items: center;
    text-transform: uppercase;
    width: 58px;
}

.profile-avatar.is-hidden {
    display: none;
}

.profile-avatar-lg {
    height: 96px;
    width: 96px;
}

.profile-photo-picker .profile-avatar-lg {
    grid-area: 1 / 1;
}

.profile-photo-picker img.profile-avatar-lg {
    height: 118%;
    left: 50%;
    max-width: none;
    position: absolute;
    top: 50%;
    transform: translate(calc(-50% + var(--avatar-offset-x, 0px)), calc(-50% + var(--avatar-offset-y, 0px)));
    width: 118%;
}

.sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.review-flow {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.review-step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.review-step strong {
    font-size: 14px;
}

.review-step span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.review-step.is-active {
    border-color: #696cff;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.review-step.is-done strong {
    color: var(--primary);
}

.admin-review-panel {
    border-color: #d7d8ff;
    box-shadow: 0 12px 28px rgba(105, 108, 255, 0.12);
}

.review-data-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.review-data-grid > div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.review-data-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.review-data-grid strong {
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .filters,
    .grid-2,
    .listing-grid,
    .grid-3,
    .stats,
    .pricing-grid,
    .review-data-grid {
        grid-template-columns: 1fr;
    }

    .page-head,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        overflow-x: auto;
        width: 100%;
    }

    .queue-item {
        grid-template-columns: 1fr;
    }

    .mini-listing {
        grid-template-columns: 1fr;
    }
}
