/* Problems listing page */

.problems-page {
    --pp-primary: var(--primary-color, #46837E);
    --pp-hover: var(--primary-hover, #3D726D);
    --pp-soft: var(--primary-soft, rgba(70, 131, 126, 0.1));
    --pp-light: var(--primary-light, #F0F7F6);
    --pp-text: var(--text-primary, #2D3748);
    --pp-muted: var(--text-muted, #5A6B8A);
    --pp-radius: 18px;
    --pp-border: rgba(70, 131, 126, 0.12);
    --pp-shadow: 0 10px 28px rgba(70, 131, 126, 0.07);
    padding: 2.5rem 0 4rem;
    background:
        radial-gradient(circle at top right, rgba(70, 131, 126, 0.08), transparent 34%),
        linear-gradient(180deg, #f8fbfa 0%, #ffffff 42%);
}

.problems-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.problems-page__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--pp-soft);
    color: var(--pp-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.problems-page__title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--pp-primary);
    line-height: 1.25;
}

.problems-page__desc {
    margin: 0;
    max-width: 560px;
    color: var(--pp-muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.problems-page__create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0 1.2rem;
    border-radius: 12px;
    background: var(--pp-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(70, 131, 126, 0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

.problems-page__create:hover {
    background: var(--pp-hover);
    color: #fff;
    transform: translateY(-1px);
}

.problems-alert {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    background: rgba(72, 187, 120, 0.12);
    color: #276749;
    font-weight: 600;
}

.problems-alert .btn-close {
    margin-inline-start: auto;
}

.problems-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.problems-aside {
    position: sticky;
    top: 6.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.problems-aside__card {
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow);
    padding: 1.1rem;
}

.problems-aside__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pp-primary);
}

.problems-aside__search {
    position: relative;
}

.problems-aside__search > i {
    position: absolute;
    inset-inline-start: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pp-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.problems-aside__search .search-input {
    width: 100%;
    height: 46px;
    padding: 0 1rem;
    padding-inline-start: 2.4rem;
    border: 1px solid var(--pp-border);
    border-radius: 12px;
    background: var(--pp-light);
    color: var(--pp-text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.problems-aside__search .search-input:focus {
    background: #fff;
    border-color: var(--pp-primary);
    box-shadow: 0 0 0 3px rgba(70, 131, 126, 0.15);
}

.problems-filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.problems-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--pp-text);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.problems-filter:hover {
    background: var(--pp-light);
    color: var(--pp-primary);
}

.problems-filter.is-active {
    background: var(--pp-soft);
    border-color: rgba(70, 131, 126, 0.22);
    color: var(--pp-primary);
}

.problems-filter__badge {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.problems-filter__badge.is-pending {
    background: rgba(236, 201, 75, 0.2);
    color: #975a16;
}

.problems-filter__badge.is-progress {
    background: rgba(66, 153, 225, 0.15);
    color: #2b6cb0;
}

.problems-filter__badge.is-resolved {
    background: rgba(72, 187, 120, 0.15);
    color: #276749;
}

.problems-stats {
    display: grid;
    gap: 0.65rem;
}

.problems-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: var(--pp-light);
}

.problems-stat__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.problems-stat__icon.is-pending {
    background: rgba(236, 201, 75, 0.2);
    color: #975a16;
}

.problems-stat__icon.is-resolved {
    background: rgba(72, 187, 120, 0.15);
    color: #276749;
}

.problems-stat strong {
    display: block;
    font-size: 1.05rem;
    color: var(--pp-text);
    line-height: 1.2;
}

.problems-stat span {
    color: var(--pp-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.problems-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.15rem;
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: 0 8px 24px rgba(70, 131, 126, 0.05);
}

.problems-toolbar__count {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pp-text);
}

.problems-toolbar__reset {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--pp-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.problems-toolbar__reset:hover {
    color: var(--pp-hover);
}

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

.front-problem-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    height: 100%;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.front-problem-card:hover {
    transform: translateY(-4px);
    border-color: rgba(70, 131, 126, 0.22);
    box-shadow: 0 16px 36px rgba(45, 70, 68, 0.12);
}

.front-problem-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.front-problem-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pp-soft);
    color: var(--pp-primary);
    font-size: 1.05rem;
}

.front-problem-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.front-problem-card__status.is-pending {
    background: rgba(236, 201, 75, 0.2);
    color: #975a16;
}

.front-problem-card__status.is-progress {
    background: rgba(66, 153, 225, 0.15);
    color: #2b6cb0;
}

.front-problem-card__status.is-resolved {
    background: rgba(72, 187, 120, 0.15);
    color: #276749;
}

.front-problem-card .problem-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--pp-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.front-problem-card .problem-title a {
    color: inherit;
    text-decoration: none;
}

.front-problem-card .problem-title a:hover {
    color: var(--pp-primary);
}

.front-problem-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    color: var(--pp-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.front-problem-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.front-problem-card__meta i {
    color: var(--pp-primary);
}

.front-problem-card__consultant {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid var(--pp-border);
}

.front-problem-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--pp-light);
}

.front-problem-card__avatar.is-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pp-soft);
    color: var(--pp-primary);
}

.front-problem-card__consultant-info {
    min-width: 0;
    flex: 1;
}

.front-problem-card__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--pp-muted);
    line-height: 1.2;
}

.front-problem-card__consultant-info strong {
    display: block;
    font-size: 0.88rem;
    color: var(--pp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.front-problem-card__consultant-info small {
    display: block;
    color: var(--pp-muted);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.front-problem-card__cta {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pp-light);
    color: var(--pp-primary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.front-problem-card__cta:hover {
    background: var(--pp-primary);
    color: #fff;
}

.problems-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fff;
    border: 1px dashed rgba(70, 131, 126, 0.25);
    border-radius: var(--pp-radius);
}

.problems-empty__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--pp-soft);
    color: var(--pp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.problems-empty h3 {
    margin: 0 0 0.5rem;
    color: var(--pp-text);
    font-weight: 700;
}

.problems-empty p {
    margin: 0 0 1.25rem;
    color: var(--pp-muted);
}

.problems-pagination {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.problems-pagination__meta {
    margin: 0;
    color: var(--pp-muted);
    font-size: 0.9rem;
}

.problems-pagination__meta strong {
    color: var(--pp-text);
}

.problems-pagination .pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0.55rem 0.75rem;
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(70, 131, 126, 0.06);
}

.problems-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    color: var(--pp-text);
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.problems-pagination .page-link:hover {
    background: var(--pp-light);
    color: var(--pp-primary);
    border-color: var(--pp-primary);
}

.problems-pagination .page-item.active .page-link {
    background: var(--pp-primary);
    border-color: var(--pp-primary);
    color: #fff;
}

@media (max-width: 991.98px) {
    .problems-layout {
        grid-template-columns: 1fr;
    }

    .problems-aside {
        position: static;
        order: 2;
    }

    .problems-main {
        order: 1;
    }

    .problems-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .problems-page {
        padding: 1.75rem 0 3rem;
    }

    .problems-page__header {
        flex-direction: column;
        align-items: stretch;
    }

    .problems-page__create {
        width: 100%;
    }

    .problems-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .front-problem-card .problem-title {
        min-height: 0;
    }
}
