/* =========================================
   DASHBOARD LAYOUT
   ========================================= */

/* Container */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
    width: 100%;
}

/* -----------------------------------------
   SIDEBAR
   ----------------------------------------- */
.dashboard-sidebar {
    width: 270px;
    min-width: 270px;
    background: rgba(20, 2, 20, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

/* Sidebar Profile Mini */
.sidebar-profile {
    text-align: center;
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.75rem;
}

.sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--primary-pink);
    box-shadow: 0 0 20px rgba(255, 49, 159, 0.3);
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.sidebar-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-white);
    margin-bottom: 0.15rem;
}

.sidebar-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 0 0.75rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 0.25rem;
    border: 1px solid transparent;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-white);
}

.sidebar-nav-item.active {
    background: rgba(255, 49, 159, 0.15);
    color: var(--primary-pink);
    border-color: rgba(255, 49, 159, 0.25);
}

.sidebar-nav-item i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0.75rem 0.75rem;
}

.sidebar-nav-item.logout-item {
    color: #ef5350;
}

.sidebar-nav-item.logout-item:hover {
    background: rgba(239, 83, 80, 0.1);
    color: #ef5350;
}

/* -----------------------------------------
   MAIN CONTENT
   ----------------------------------------- */
.dashboard-content {
    flex: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto;
    max-width: calc(100% - 270px);
}

.dashboard-section {
    display: none;
    animation: fadeInSection 0.3s ease;
}

.dashboard-section.active {
    display: block;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Header */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text-white);
    margin-bottom: 0.35rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Profile Card */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    margin-bottom: 1.5rem;
}

.profile-hero-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary-pink);
    box-shadow: 0 0 25px rgba(255, 49, 159, 0.25);
    object-fit: cover;
    flex-shrink: 0;
}

.profile-hero-info h3 {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.profile-hero-info .email {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Stat Chips */
.stat-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.stat-chip .chip-icon {
    font-size: 1rem;
}

.stat-chip.coin-chip {
    color: #ffd700;
}

.stat-chip.role-chip {
    color: var(--primary-pink);
}

/* Become Host Card */
.become-host-card {
    background: linear-gradient(135deg, rgba(255, 49, 159, 0.15) 0%, rgba(169, 26, 143, 0.15) 100%);
    border: 1px solid rgba(255, 49, 159, 0.25);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin-top: 1.5rem;
}

.become-host-card h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.become-host-card p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* Plan Cards */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.plan-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.plan-card.current-plan {
    border-color: var(--primary-pink);
    box-shadow: 0 0 20px rgba(255, 49, 159, 0.15);
}

.plan-card .plan-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-card .plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-pink);
    margin-bottom: 1rem;
}

.plan-card .plan-price small {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    text-align: left;
}

.plan-card .plan-features li {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-card .plan-features li i {
    color: var(--state-success);
    font-size: 0.9rem;
}

.plan-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-pink);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Data Table */
.data-table-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.data-table-search {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table tbody td {
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Billing Placeholder */
.billing-placeholder {
    text-align: center;
    padding: 4rem 2rem;
}

.billing-placeholder i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

/* Create Org Modal styles */
.modal-content.dashboard-modal {
    background: linear-gradient(135deg, #1a0316, #2d0526);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-white);
}

.modal-content.dashboard-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-content.dashboard-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-content.dashboard-modal .btn-close {
    filter: invert(1);
}

/* -----------------------------------------
   MOBILE RESPONSIVE
   ----------------------------------------- */
@media (max-width: 767px) {
    .dashboard-container {
        flex-direction: column;
        min-height: auto;
    }

    .dashboard-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        padding: 0.75rem 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        gap: 0.25rem;
    }

    .sidebar-profile {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        gap: 0.25rem;
        padding: 0;
        flex-wrap: nowrap;
        min-width: max-content;
    }

    .sidebar-nav-item {
        white-space: nowrap;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        border-radius: 50px;
        margin-bottom: 0;
    }

    .sidebar-nav-item span {
        display: none;
    }

    .sidebar-nav-item i {
        font-size: 1.1rem;
    }

    .sidebar-divider {
        display: none;
    }

    .dashboard-content {
        max-width: 100%;
        padding: 1.25rem;
    }

    .profile-hero {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }

    .stat-chips {
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .sidebar-nav-item span {
        display: inline;
    }
}