/* [СВО] 2026-07-10 — Публичный реестр представителей и кабинет */
.pub-representatives-page {
    padding-bottom: 48px;
}

.pub-representatives-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.pub-representatives-toolbar .form-label {
    margin: 0;
    font-weight: 600;
    color: #334155;
}

.pub-representatives-toolbar .form-select {
    min-width: 240px;
    border-radius: 10px;
}

.pub-representatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Карточка представителя */
.pub-rep-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-rep-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.pub-rep-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    max-height: 240px;
    overflow: hidden;
    background: #1e3a5f;
    isolation: isolate;
}

.pub-rep-card__photo-bg {
    position: absolute;
    inset: -28px;
    width: calc(100% + 56px);
    height: calc(100% + 56px);
    object-fit: cover;
    object-position: center center;
    filter: blur(22px) brightness(0.72) saturate(1.1);
    transform: scale(1.12);
    z-index: 0;
    pointer-events: none;
}

.pub-rep-card__photo {
    position: relative;
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    z-index: 2;
    pointer-events: none;
}

.pub-rep-card__avatar {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #f8e8b8;
    background: linear-gradient(145deg, #1e3a5f 0%, #243b53 50%, #c9a84c 160%);
    z-index: 1;
}

.pub-rep-card__avatar[hidden] {
    display: none !important;
}

.pub-rep-card__badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1e3a5f;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    z-index: 5;
    pointer-events: none;
    max-width: calc(100% - 24px);
    white-space: nowrap;
}

.pub-rep-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 20px;
    gap: 8px;
}

.pub-rep-card__region {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c9a84c;
}

.pub-rep-card__name {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    color: #1e3a5f;
}

.pub-rep-card__location {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.pub-rep-card__location i {
    color: #c9a84c;
    margin-right: 4px;
}

.pub-rep-card__footer {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 3;
}

.pub-rep-card__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1e3a5f;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.pub-rep-card__phone:hover {
    color: #c9a84c;
}

.pub-rep-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    color: #1e3a5f;
    background: linear-gradient(135deg, #e8c96a 0%, #c9a84c 100%);
    box-shadow: 0 6px 18px rgba(201, 168, 76, 0.35);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}

.pub-rep-card__cta:hover {
    color: #0f2744;
    background: linear-gradient(135deg, #f0d67a 0%, #d4b85a 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(201, 168, 76, 0.45);
}

.pub-rep-card__cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}

.pub-rep-card__no-phone {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.pub-rep-card__no-phone a {
    color: #1e3a5f;
    font-weight: 600;
}

/* Legacy aliases (кабинет) */
.pub-representative-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.rep-cabinet-section {
    margin-bottom: 24px;
}

.rep-cabinet-section__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.rep-cabinet-form .btn-outline {
    margin-top: 4px;
}

.rep-cabinet-form {
    display: grid;
    gap: 14px;
    max-width: 640px;
}

#repProfileStatus .badge {
    font-size: 13px;
}

.rep-members-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.rep-members-toolbar .form-input,
.rep-members-toolbar .form-select {
    min-width: 220px;
}

.rep-members-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: var(--surface);
}

.rep-members-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rep-members-table th,
.rep-members-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.rep-members-table th {
    background: var(--surface-hover);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.rep-members-table tr:last-child td {
    border-bottom: none;
}

.cabinet-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cabinet-muted {
    color: var(--text-secondary);
    font-size: 13px;
}

.cabinet-cell-date {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 13px;
}

.admin-badge--representative {
    background: #dbeafe;
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .pub-representatives-toolbar,
    .rep-members-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pub-representatives-toolbar .form-select,
    .rep-members-toolbar .form-input,
    .rep-members-toolbar .form-select {
        width: 100%;
        min-width: 0;
    }

    .pub-representatives-grid {
        grid-template-columns: 1fr;
    }
}
