/* ── Dashboard ── */

/* Header */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dash-header__user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-header__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}

.dash-header__name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.dash-header__sub {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin: 2px 0 0;
}

.dash-header__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dash-btn--primary {
    background: linear-gradient(135deg, #7A95F8, #6453CA);
    color: #fff;
}
.dash-btn--primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100,83,202,0.4);
}

.dash-btn--outline {
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.25);
}
.dash-btn--outline:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.4);
}

.dash-btn--sm {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border: none;
}
.dash-btn--sm:hover {
    color: #fff;
    background: rgba(255,255,255,0.18);
}

.dash-btn--accent {
    background: linear-gradient(135deg, #41b618, #2d8a11);
    color: #fff;
}
.dash-btn--accent:hover {
    color: #fff;
    transform: translateY(-1px);
}

/* Stats Row */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.dash-stat-card {
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.dash-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.dash-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Tabs */
.dash-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-lg);
    padding: 4px;
    margin-bottom: 20px;
}

.dash-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dash-tab:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
}

.dash-tab.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.dash-tab-count {
    background: rgba(255,255,255,0.15);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.dash-tab.active .dash-tab-count {
    background: rgba(255,255,255,0.2);
}

/* Panels */
.dash-panel {
    min-height: 200px;
    padding-bottom: 40px;
}

/* Empty State */
.dash-empty {
    text-align: center;
    padding: 48px 24px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-xl);
    border: 1px dashed rgba(255,255,255,0.12);
}

.dash-empty__icon {
    font-size: 40px;
    color: rgba(255,255,255,0.2);
    margin-bottom: 12px;
}

.dash-empty__title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin: 0 0 6px;
}

.dash-empty__text {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin: 0 0 20px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Favorites Grid */
.dash-fav-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dash-fav-card {
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dash-fav-card:hover {
    border-color: rgba(255,255,255,0.12);
}

.dash-fav-card__top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-fav-card__logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
}

.dash-fav-card__info {
    flex: 1;
    min-width: 0;
}

.dash-fav-card__name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-fav-card__name:hover {
    color: #fff;
    text-decoration: underline;
}

.dash-fav-card__meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

.dash-fav-card__split {
    color: #41b618;
    font-weight: 600;
}

.dash-fav-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.dash-fav-card__score {
    font-size: 18px;
    font-weight: 800;
    color: #7A95F8;
    background: rgba(122,149,248,0.12);
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

.dash-fav-remove {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.dash-fav-remove:hover {
    opacity: 1;
}

/* Favorite details row */
.dash-fav-card__details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.dash-fav-detail {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}
.dash-fav-detail i {
    margin-right: 3px;
    color: rgba(255,255,255,0.35);
}

/* Deal banner */
.dash-fav-card__deal {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(245,158,11,0.08);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.15);
}
.dash-fav-deal-pct {
    font-weight: 800;
    background: #f59e0b;
    color: #000;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Notes */
.dash-fav-card__notes {
    margin-top: 10px;
    position: relative;
}

.dash-notes-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    padding: 8px 10px;
    resize: none;
    height: 36px;
    transition: height 0.2s ease, border-color 0.2s ease;
}
.dash-notes-input:focus {
    outline: none;
    border-color: rgba(122,149,248,0.4);
    height: 60px;
}
.dash-notes-input::placeholder {
    color: rgba(255,255,255,0.25);
}

.dash-notes-save {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 600;
    background: #7A95F8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Footer */
.dash-fav-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.dash-fav-date {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
}

.dash-fav-card__btns {
    display: flex;
    gap: 6px;
}

/* Reviews List */
.dash-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dash-review-card {
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.06);
}

.dash-review-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dash-review-card__firm {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.dash-review-card__firm-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.dash-review-card__firm span {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.dash-review-card__firm:hover span {
    text-decoration: underline;
}

/* Badges */
.dash-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dash-badge--green {
    background: rgba(65,182,24,0.15);
    color: #41b618;
}
.dash-badge--yellow {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
}

/* Ratings */
.dash-review-card__ratings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px 16px;
    margin-bottom: 12px;
}

.dash-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-rating-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    width: 65px;
    flex-shrink: 0;
}

.dash-rating-stars {
    display: flex;
    gap: 2px;
}
.dash-rating-stars .fa-star {
    color: #f59e0b;
    font-size: 12px;
}
.dash-rating-stars .fa-star-o {
    color: rgba(255,255,255,0.15);
    font-size: 12px;
}

/* Review text */
.dash-review-card__text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
}

/* Review footer */
.dash-review-card__footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.dash-review-date {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
}

.dash-review-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

.dash-review-votes {
    margin-left: auto;
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}
.dash-review-votes .fa-thumbs-up { color: #41b618; }
.dash-review-votes .fa-thumbs-down { color: #e74c3c; }

/* Discover Grid */
.dash-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.dash-section-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin: 0 0 20px;
}

.dash-discover-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.dash-discover-card {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.2s ease;
}
.dash-discover-card:hover {
    border-color: rgba(255,255,255,0.15);
}

.dash-discover-card__link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.dash-discover-card__logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.dash-discover-card__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-discover-card__name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-discover-card__type {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

.dash-discover-card__score {
    font-size: 16px;
    font-weight: 800;
    color: #7A95F8;
    flex-shrink: 0;
}

.dash-discover-fav {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.4);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.dash-discover-fav:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}
.dash-discover-fav--active {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231,76,60,0.1);
}

.dash-discover-more {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 10px;
}

/* ── Firm page favorite button ── */
.firm-fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    transition: all 0.2s ease;
}
.firm-fav-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.firm-fav-btn.is-favorited {
    border-color: rgba(231,76,60,0.4);
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
}
.firm-fav-btn.is-favorited:hover {
    background: rgba(231,76,60,0.15);
}

/* Firm index card favorite */
.firm-card-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.25);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    z-index: 2;
    transition: color 0.2s;
}
.firm-card-fav:hover {
    color: #e74c3c;
}
.firm-card-fav.is-favorited {
    color: #e74c3c;
}

/* Mobile */
@media (max-width: 768px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-tabs {
        overflow-x: auto;
    }
    .dash-tab {
        font-size: 12px;
        padding: 8px 12px;
    }
    .dash-fav-card__top {
        flex-wrap: wrap;
    }
    .dash-fav-card__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .dash-review-card__ratings {
        grid-template-columns: 1fr;
    }
    .dash-header__actions {
        width: 100%;
    }
    .dash-header__actions .dash-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .dash-stat-value {
        font-size: 22px;
    }
    .dash-fav-card {
        padding: 14px;
    }
}
