:root {
    --caando-green: #17483f;
    --caando-green-2: #21695c;
    --caando-honey: #f2b441;
    --caando-honey-soft: #fff5dc;
    --caando-ink: #17211f;
    --caando-muted: #6b7a78;
    --caando-border: #d9e4e1;
    --caando-bg: #f3f7f6;
}

.agency-profile-page {
    min-height: 100vh;
    background: var(--caando-bg);
    color: var(--caando-ink);
    padding-bottom: 70px;
}

.agency-cover {
    position: relative;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    background:
        linear-gradient(180deg, rgba(23, 72, 63, .20), rgba(23, 72, 63, .88)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 50px, transparent 50px 120px),
        linear-gradient(135deg, #17483f, #21695c);
}

.cover-shade {
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, var(--caando-bg));
}

.agency-container {
    margin-top: -110px;
    position: relative;
    z-index: 1;
}

.profile-card,
.profile-tabs,
.profile-filters,
.agency-property-card,
.consultant-card {
    border: 1px solid var(--caando-border);
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(23, 72, 63, .08);
}

.profile-card {
    padding: 24px;
}

.profile-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--caando-border);
    padding-bottom: 16px;
    margin-bottom: 22px;
    color: var(--caando-muted);
    font-size: 13px;
}

.profile-breadcrumb a {
    color: var(--caando-green);
    text-decoration: none;
    font-weight: 800;
}

.profile-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
}

.agency-avatar {
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
    border-radius: 28px;
    background: var(--caando-honey-soft);
    color: #8a5a00;
    border: 4px solid #fff;
    box-shadow: 0 12px 28px rgba(23, 72, 63, .16);
    font-size: 42px;
    font-weight: 900;
    overflow: hidden;
}

.agency-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agency-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.agency-title-row h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
}

.verified-badge {
    border-radius: 999px;
    background: var(--caando-honey-soft);
    color: #7a4c00;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.agency-description,
.agency-address {
    margin: 0 0 12px;
    color: var(--caando-muted);
    line-height: 1.9;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.profile-stats span {
    border-left: 1px solid var(--caando-border);
    padding-left: 12px;
    color: var(--caando-muted);
    font-weight: 800;
}

.profile-stats span:last-child {
    border-left: 0;
}

.profile-stats strong {
    color: var(--caando-green);
}

.profile-actions {
    display: grid;
    gap: 10px;
    min-width: 160px;
}

.profile-actions a,
.profile-actions button {
    border-radius: 13px;
    min-height: 48px;
    font-weight: 900;
    text-align: center;
}

.profile-actions a {
    display: grid;
    place-items: center;
    background: var(--caando-green);
    color: #fff;
    text-decoration: none;
}

.profile-actions button {
    border: 1px solid var(--caando-green);
    background: #fff;
    color: var(--caando-green);
}

.profile-tabs {
    display: flex;
    gap: 24px;
    margin: 22px 0;
    padding: 0 22px;
}

.profile-tabs button {
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    padding: 18px 4px;
    color: var(--caando-muted);
    font-weight: 900;
}

.profile-tabs button.is-active {
    color: var(--caando-green);
    border-bottom-color: var(--caando-honey);
}

.profile-filters {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 22px;
    padding: 18px;
}

.profile-filters select {
    min-width: 160px;
    min-height: 44px;
    border: 1px solid var(--caando-border);
    border-radius: 12px;
    background: #fff;
    padding: 0 12px;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

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

.agency-property-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    overflow: hidden;
    color: var(--caando-ink);
    text-decoration: none;
}

.property-thumb {
    position: relative;
    min-height: 160px;
    background-size: cover;
    background-position: center;
    background:
        linear-gradient(180deg, transparent, rgba(0,0,0,.45)),
        linear-gradient(135deg, #dbe9e5, #fff2c9);
}

.image-count,
.district {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--caando-ink);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.image-count {
    top: 10px;
    right: 10px;
}

.district {
    bottom: 10px;
    left: 10px;
}

.property-info {
    padding: 16px;
}

.property-info h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.8;
}

.property-info strong {
    display: block;
    color: var(--caando-green);
    margin-bottom: 12px;
}

.property-info p {
    margin: 0;
    color: var(--caando-muted);
    font-size: 13px;
}

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

.consultant-card {
    padding: 22px;
    text-align: center;
}

.consultant-avatar {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--caando-honey-soft);
    color: #8a5a00;
    font-size: 28px;
    font-weight: 900;
}

.consultant-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
}

.consultant-card p {
    margin: 0 0 10px;
    color: var(--caando-muted);
}

.consultant-card strong {
    color: var(--caando-green);
}

.agency-empty-state {
    border: 1px dashed var(--caando-border);
    border-radius: 18px;
    background: #fff;
    color: var(--caando-muted);
    padding: 28px;
    text-align: center;
    line-height: 2;
}

.agency-empty-state h1 {
    margin: 0 0 10px;
    color: var(--caando-green);
    font-size: 24px;
}

.agency-empty-state p {
    margin: 0 0 18px;
}

.agency-empty-state a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    background: var(--caando-green);
    color: #fff;
    padding: 0 16px;
    text-decoration: none;
    font-weight: 900;
}

.not-found-container {
    margin-top: 40px;
}

.agency-list-header {
    margin-bottom: 22px;
}

.agency-list-header h1 {
    margin: 0 0 8px;
    color: var(--caando-green);
    font-size: 24px;
    font-weight: 900;
}

.agency-list-header p {
    margin: 0;
    color: var(--caando-muted);
}

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

.agency-list-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 1px solid var(--caando-border);
    border-radius: 18px;
    background: #fff;
    color: var(--caando-ink);
    text-align: center;
    text-decoration: none;
    padding: 22px;
}

.agency-list-card h2 {
    margin: 0;
    color: var(--caando-green);
    font-size: 18px;
    font-weight: 900;
}

.agency-list-card p {
    margin: 0;
    color: var(--caando-muted);
    line-height: 1.8;
}

.agency-list-card strong {
    color: var(--caando-green);
}

@media (max-width: 900px) {
    .agency-list-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .agency-property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .profile-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .agency-avatar {
        margin: 0 auto;
    }

    .agency-title-row,
    .profile-stats {
        justify-content: center;
    }

    .profile-actions {
        grid-template-columns: 1fr 1fr;
    }

    .agency-property-grid,
    .consultant-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .agency-cover {
        min-height: 210px;
    }

    .agency-container {
        margin-top: -90px;
    }

    .profile-card {
        padding: 18px;
    }

    .agency-title-row h1 {
        font-size: 23px;
    }

    .profile-actions,
    .profile-filters {
        grid-template-columns: 1fr;
        display: grid;
    }

    .profile-tabs {
        overflow-x: auto;
        gap: 18px;
    }

    .agency-property-card {
        grid-template-columns: 1fr;
    }

    .property-thumb {
        min-height: 210px;
    }
}
