/* ═══════════════════════════════════════════════════════════════
   MX Bikes Toolbox — User Dashboard CSS
   Used by: user.php
   ═══════════════════════════════════════════════════════════════ */

:root {
    --fs-12: 12px;
    --fs-16: 16px;
    --fs-20: 20px;
    /* Included in landing.css but ensuring safety */
}

/* Main wrapping container */
.dashboard-wrap {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}


/* Profile Header Section */
.profile-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    background: rgba(0, 210, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.profile-name {
    font-family: var(--font-display);
    font-size: var(--fs-28);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: var(--track-wide);
    line-height: var(--lh-tight);
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-count {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-cyan);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--fs-13);
    font-weight: 600;
    letter-spacing: var(--track-med);
    text-transform: uppercase;
}

/* Section Headings */
.section-heading {
    font-family: var(--font-display);
    font-size: var(--fs-20);
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    margin: 8px 0 0;
    padding-left: 4px;
    border-left: 3px solid var(--accent-cyan);
    padding-left: 12px;
    line-height: 1;
}

/* Shares Grid */
.shares-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Card Styling */
.share-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 210, 255, 0.2);
}

.share-card-image {
    cursor: pointer;
    overflow: hidden;
    background: #000;
}

.share-card-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.share-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.share-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.share-card-name {
    font-size: var(--fs-16);
    font-weight: 600;
    color: var(--text-main);
    line-height: var(--lh-tight);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.share-card-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 153, 187, 0.15), rgba(0, 210, 255, 0.15));
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--accent-cyan);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: var(--fs-12);
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
}

.share-card-dl:hover {
    background: var(--accent-cyan);
    color: #000;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

/* Card Meta Data */
.share-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-12);
    color: var(--text-muted);
}

/* Files Toggle Button */
.share-files-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: var(--fs-11);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.share-files-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Expanded File List */
.share-file-list {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 0;
    margin-top: -6px;
    max-height: 140px;
    overflow-y: auto;
}

.share-file-list.open {
    display: block;
}

.share-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    font-size: var(--fs-12);
    color: var(--text-muted);
}

.share-file-tag {
    font-size: var(--fs-10);
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.tag-pnt {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-green);
}

.tag-pkz {
    background: rgba(255, 157, 0, 0.12);
    color: var(--accent-orange);
}

.share-file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty State */
.empty-state {
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-icon {
    font-size: 48px;
    opacity: 0.6;
}

.empty-state p {
    font-size: var(--fs-16);
    color: var(--text-muted);
}

/* Page Footer */
.dashboard-footer {
    text-align: center;
    font-size: var(--fs-12);
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.dashboard-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.dashboard-footer a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Lightbox Base */
.kit-img-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.kit-img-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.kit-img-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.kit-img-lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 50px);
    object-fit: contain;
    display: block;
}

.kit-img-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #111;
    border-top: 1px solid #222;
}

.kit-img-lightbox-label {
    font-size: var(--fs-14);
    font-weight: 500;
    color: var(--text-main);
}

.kit-img-lightbox-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.kit-img-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 16px;
    }

    .shares-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Tab Navigation
   ═══════════════════════════════════════════════════════════════ */
.user-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.user-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: var(--fs-14);
    font-weight: 600;
    letter-spacing: var(--track-med);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.user-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.user-tab-btn.active {
    background: rgba(0, 210, 255, 0.12);
    color: var(--accent-cyan);
    box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.25);
}

.user-tab-badge {
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent-cyan);
    font-size: var(--fs-11);
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0;
}

.user-tab-btn.active .user-tab-badge {
    background: rgba(0, 210, 255, 0.25);
}

/* Tab content sections */
.user-tab-panel {
    display: none;
}

.user-tab-panel.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   User Dashboard Ghost Cards
   ═══════════════════════════════════════════════════════════════ */
.user-ghosts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.user-ghost-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-ghost-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 210, 255, 0.2);
}

.user-ghost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-ghost-time {
    font-family: var(--font-display);
    font-size: var(--fs-28);
    font-weight: 700;
    color: #ff0080;
    line-height: 1;
    letter-spacing: -0.02em;
}

.user-ghost-badge {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: var(--fs-11);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--track-med);
}

.user-ghost-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: var(--fs-13);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
}

.user-ghost-info .label {
    color: var(--text-muted);
    font-weight: 500;
}

.user-ghost-info .value {
    color: var(--text-main);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-ghost-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.user-ghost-date {
    font-size: var(--fs-12);
    color: var(--text-muted);
}

.user-ghost-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 153, 187, 0.15), rgba(0, 210, 255, 0.15));
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--accent-cyan);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: var(--fs-12);
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
}

.user-ghost-dl:hover {
    background: var(--accent-cyan);
    color: #000;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   Owner Dashboard Toast
   ═══════════════════════════════════════════════════════════════ */
.owner-dashboard-toast {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.toast-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content strong {
    color: var(--text-main);
    font-size: var(--fs-14);
}

.toast-content p {
    margin: 4px 0 0;
    font-size: var(--fs-13);
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsive extras */
@media (max-width: 640px) {
    .user-tabs {
        flex-wrap: wrap;
    }

    .user-tab-btn {
        flex: 1;
        justify-content: center;
        padding: 9px 12px;
        font-size: var(--fs-13);
    }

    .user-ghosts-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Owner Dashboard Actions
   ═══════════════════════════════════════════════════════════════ */
.owner-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon-only {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-icon-only svg {
    width: 15px;
    height: 15px;
}

.btn-icon-only:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.05);
}

.btn-icon-only.btn-red:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(255, 51, 51, 0.05);
}


.btn-dashboard-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dashboard-toggle.active {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(76, 175, 80, 0.1);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    padding: 0 4px;
}

.btn-ghostbox-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-ghostbox-link:hover {
    background: var(--accent-cyan);
    color: var(--bg-card);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

@media (max-width: 640px) {
    .share-card-top, .user-ghost-header, .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
