/* ============================================
   SADEE JODI — Dashboard Styles
   User Dashboard, Sidebar, Stats, Cards
   ============================================ */

/* ---- Dashboard Layout ---- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

/* ---- Sidebar ---- */
.sidebar {
    width: 280px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    z-index: var(--z-sticky);
    overflow-y: auto;
    transition: transform var(--transition-base);
    scrollbar-width: thin;
}

.sidebar-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin: 0 auto var(--space-md);
    display: block;
    box-shadow: var(--shadow-glow-primary);
}

.sidebar-name {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.sidebar-id {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.sidebar-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--space-sm);
    padding: 3px 12px;
    border-radius: var(--border-radius-pill);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}

.sidebar-plan-badge.free { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-color); }
.sidebar-plan-badge.silver { background: rgba(192,192,192,0.1); color: #C0C0C0; border: 1px solid rgba(192,192,192,0.3); }
.sidebar-plan-badge.gold { background: rgba(255,215,0,0.1); color: var(--gold); border: 1px solid rgba(255,215,0,0.3); }
.sidebar-plan-badge.diamond { background: rgba(124,77,255,0.1); color: var(--secondary); border: 1px solid rgba(124,77,255,0.3); }

/* ---- Sidebar Navigation ---- */
.sidebar-nav {
    padding: var(--space-md) 0;
}

.sidebar-nav .nav-section {
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: var(--space-md);
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-xl);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.sidebar-nav .nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform var(--transition-fast);
}

.sidebar-nav .nav-item:hover {
    color: var(--text-primary);
    background: rgba(233, 30, 99, 0.03);
}

.sidebar-nav .nav-item.active {
    color: var(--primary);
    background: rgba(233, 30, 99, 0.05);
}

.sidebar-nav .nav-item.active::before {
    transform: scaleY(1);
}

.sidebar-nav .nav-item .nav-icon {
    font-size: var(--fs-md);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-item .nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: var(--fw-bold);
    border-radius: var(--border-radius-pill);
    min-width: 20px;
    text-align: center;
}

.sidebar-nav .nav-item .nav-badge.gold-badge {
    background: var(--gradient-gold);
    color: #111;
}

/* Sidebar Upgrade CTA */
.sidebar-upgrade {
    margin: var(--space-lg) var(--space-xl);
    padding: var(--space-lg);
    background: var(--gradient-card);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--border-radius-md);
    text-align: center;
}

.sidebar-upgrade p {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.sidebar-upgrade .btn {
    width: 100%;
    font-size: var(--fs-xs);
    padding: 8px 16px;
}

/* ---- Main Content ---- */
.dashboard-main {
    flex: 1;
    margin-left: 280px;
    padding: var(--space-xl) var(--space-2xl);
    min-height: calc(100vh - 70px);
}

/* ---- Dashboard Header (Page Title) ---- */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.dash-header .dash-title {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
}

.dash-header .dash-subtitle {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Stat Cards (Dashboard Home) ---- */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.dash-stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    transition: all var(--transition-base);
}

.dash-stat-card:hover {
    border-color: var(--border-color-active);
    transform: translateY(-2px);
}

.dash-stat-card .stat-icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.dash-stat-card .stat-icon-box.pink { background: rgba(233,30,99,0.1); }
.dash-stat-card .stat-icon-box.purple { background: rgba(124,77,255,0.12); }
.dash-stat-card .stat-icon-box.green { background: rgba(0,230,118,0.12); }
.dash-stat-card .stat-icon-box.orange { background: rgba(255,109,0,0.12); }
.dash-stat-card .stat-icon-box.blue { background: rgba(64,196,255,0.12); }

.dash-stat-card .stat-value {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

.dash-stat-card .stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Profile Completeness ---- */
.profile-completeness {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.completeness-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.completeness-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.completeness-bar .bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

/* ---- Dashboard Cards Grid ---- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.dash-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.dash-card:hover {
    border-color: var(--border-color-light);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.dash-card-header h5 {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
}

.dash-card-header a {
    font-size: var(--fs-sm);
    color: var(--primary);
    font-weight: var(--fw-medium);
}

/* ---- Activity Feed ---- */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-md);
    transition: background var(--transition-fast);
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.activity-item .activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.activity-item .activity-text {
    flex: 1;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.activity-item .activity-text strong {
    color: var(--text-primary);
}

.activity-item .activity-time {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---- Match Card (for matches/shortlisted) ---- */
.match-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.match-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.match-card:hover {
    border-color: var(--border-color-active);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.match-card .match-image {
    height: 240px;
    position: relative;
    overflow: hidden;
}

.match-card .match-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-card .match-percent-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--border-radius-pill);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--success);
}

.match-card .match-plan-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--border-radius-pill);
    font-size: 10px;
    font-weight: var(--fw-bold);
    color: var(--gold);
}

.match-card .match-body {
    padding: var(--space-lg);
}

.match-card .match-name {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    margin-bottom: 4px;
}

.match-card .match-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.match-card .match-info span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.match-card .match-actions {
    display: flex;
    gap: var(--space-sm);
}

.match-card .match-actions .btn {
    flex: 1;
    padding: 8px;
    font-size: var(--fs-xs);
}

/* ---- Interest Item ---- */
.interest-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.interest-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.interest-item:hover {
    border-color: var(--border-color-light);
}

.interest-item .interest-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.interest-item .interest-info {
    flex: 1;
}

.interest-item .interest-name {
    font-weight: var(--fw-semibold);
    margin-bottom: 2px;
}

.interest-item .interest-details {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.interest-item .interest-message {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-top: 4px;
    font-style: italic;
}

.interest-item .interest-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.interest-item .interest-time {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---- Tabs ---- */
.dash-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-input);
    border-radius: var(--border-radius-md);
    padding: 4px;
    margin-bottom: var(--space-xl);
    width: fit-content;
}

.dash-tab {
    padding: 10px 24px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    white-space: nowrap;
}

.dash-tab.active {
    background: var(--gradient-primary);
    color: #fff;
}

.dash-tab:hover:not(.active) {
    color: var(--text-primary);
}

.dash-tab-content {
    display: none;
}

.dash-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}

.empty-state .empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.empty-state p {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

/* ---- Notification Item ---- */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-md);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notif-item.unread {
    background: rgba(233, 30, 99, 0.03);
    border-left-color: var(--primary);
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item .notif-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
}

.notif-item .notif-content {
    flex: 1;
}

.notif-item .notif-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    margin-bottom: 2px;
}

.notif-item .notif-text {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.notif-item .notif-time {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---- Mobile Sidebar Toggle ---- */
.sidebar-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 24px;
    z-index: calc(var(--z-fixed) + 1);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ---- Dashboard Responsive ---- */
@media screen and (max-width: 1024px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-main {
        padding: var(--space-lg);
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: var(--z-modal);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .dashboard-main {
        margin-left: 0;
        padding: var(--space-md);
    }
    .sidebar-mobile-toggle {
        display: flex;
    }
    .dash-stats {
        grid-template-columns: 1fr;
    }
    .dash-grid {
        grid-template-columns: 1fr;
    }
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    .match-cards-grid {
        grid-template-columns: 1fr;
    }
    .interest-item {
        flex-direction: column;
        text-align: center;
    }
    .interest-item .interest-actions {
        width: 100%;
    }
}

/* ============================================
   COMPATIBILITY RADAR WIDGET
   ============================================ */
.compatibility-radar {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.radar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.radar-header h5 {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.radar-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.radar-circle-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
}

.radar-svg {
    width: 200px;
    height: 200px;
    transform: rotate(-90deg);
}

.radar-bg {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 12;
}

.radar-fill {
    fill: none;
    stroke: url(#radarGradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 502;
    stroke-dashoffset: 502;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.radar-center-score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.radar-center-score .score-number {
    font-family: var(--font-display);
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.radar-center-score .score-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.radar-circle-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,30,99,0.08) 0%, transparent 70%);
    animation: radarPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes radarPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.radar-factors {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.radar-factor {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.radar-factor .factor-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.radar-factor .factor-icon.pink { background: rgba(233,30,99,0.12); color: var(--primary); }
.radar-factor .factor-icon.blue { background: rgba(74,144,226,0.12); color: var(--secondary); }
.radar-factor .factor-icon.green { background: rgba(0,200,83,0.12); color: var(--success); }
.radar-factor .factor-icon.orange { background: rgba(255,109,0,0.12); color: var(--warning); }
.radar-factor .factor-icon.purple { background: rgba(124,77,255,0.12); color: #7C4DFF; }

.radar-factor .factor-info {
    flex: 1;
}

.radar-factor .factor-name {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.radar-factor .factor-name span {
    color: var(--text-muted);
    font-weight: var(--fw-regular);
    font-size: var(--fs-xs);
}

.radar-factor .factor-bar {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}

.radar-factor .factor-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.factor-bar-fill.high { background: var(--gradient-primary); }
.factor-bar-fill.medium { background: linear-gradient(90deg, var(--warning), #FFB300); }
.factor-bar-fill.low { background: linear-gradient(90deg, var(--error), #FF7043); }

[data-theme="light"] .radar-bg {
    stroke: rgba(0,0,0,0.06);
}

[data-theme="light"] .radar-factor .factor-bar {
    background: rgba(0,0,0,0.06);
}

[data-theme="light"] .radar-circle-wrapper::after {
    background: radial-gradient(circle, rgba(233,30,99,0.05) 0%, transparent 70%);
}

@media screen and (max-width: 768px) {
    .radar-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}
