/**
 * Shop Index - User-Facing Shop Dashboard
 * Project: ContentFlows
 * Pure CSS - Dark Theme
 * 
 * Uses site CSS variables for consistency
 */

/* =====================================================
   PAGE LAYOUT
   ===================================================== */

.shop-dashboard {
    padding: 1.5rem;
    min-height: 100vh;
}

/* =====================================================
   PAGE HEADER
   ===================================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content {
    flex: 1;
    min-width: 200px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text, #e2e8f0);
    margin: 0 0 0.5rem 0;
}

.page-title i {
    color: var(--accent, #818cf8);
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text2, #94a3b8);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* =====================================================
   SHOP LAYOUT - MAIN + SIDEBAR
   ===================================================== */

.shop-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.shop-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.shop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 1.5rem;
}

/* =====================================================
   STATS GRID
   ===================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-card {
    background-color: var(--bg2, #1a1a2e);
    border: 1px solid var(--border, #2d2d44);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
    border-color: var(--accent, #818cf8);
    transform: translateY(-2px);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon-primary {
    background-color: rgba(129, 140, 248, 0.15);
    color: var(--accent, #818cf8);
}

.stat-icon-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success, #10b981);
}

.stat-icon-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--info, #3b82f6);
}

.stat-icon-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning, #f59e0b);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text, #e2e8f0);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text2, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* =====================================================
   WELCOME CARD
   ===================================================== */

.welcome-card {
    background-color: var(--bg2, #1a1a2e);
    border: 1px solid var(--border, #2d2d44);
    border-radius: 0.75rem;
    padding: 2.5rem;
    text-align: center;
}

.welcome-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(99, 102, 241, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent, #818cf8);
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text, #e2e8f0);
    margin: 0 0 0.75rem 0;
}

.welcome-text {
    font-size: 0.9375rem;
    color: var(--text2, #94a3b8);
    margin: 0 0 1.5rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.welcome-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* =====================================================
   SIDEBAR PANEL
   ===================================================== */

.sidebar-panel {
    background-color: var(--bg2, #1a1a2e);
    border: 1px solid var(--border, #2d2d44);
    border-radius: 0.75rem;
    overflow: hidden;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text, #e2e8f0);
    padding: 1rem 1.25rem;
    margin: 0;
    border-bottom: 1px solid var(--border, #2d2d44);
    background-color: rgba(255, 255, 255, 0.02);
}

.panel-title i {
    color: var(--accent, #818cf8);
    font-size: 1rem;
}

/* =====================================================
   ANALYTICS PREVIEW
   ===================================================== */

.analytics-preview {
    padding: 1rem 1.25rem;
}

.analytics-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border, #2d2d44);
}

.analytics-row:last-child {
    border-bottom: none;
}

.analytics-label {
    font-size: 0.875rem;
    color: var(--text2, #94a3b8);
}

.analytics-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text, #e2e8f0);
}

.sidebar-panel > .button {
    margin: 0 1.25rem 1.25rem;
    width: calc(100% - 2.5rem);
}

/* =====================================================
   TOOL NAVIGATION
   ===================================================== */

.tool-nav {
    padding: 0.5rem 0;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text2, #94a3b8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.tool-link:hover {
    background-color: rgba(129, 140, 248, 0.08);
    color: var(--text, #e2e8f0);
    border-left-color: var(--accent, #818cf8);
}

.tool-link i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.button-primary {
    background-color: var(--accent, #818cf8);
    color: #ffffff;
    border-color: var(--accent, #818cf8);
}

.button-primary:hover {
    background-color: var(--accent-hover, #6366f1);
    border-color: var(--accent-hover, #6366f1);
}

.button-success {
    background-color: var(--success, #10b981);
    color: #ffffff;
    border-color: var(--success, #10b981);
}

.button-success:hover {
    background-color: #059669;
    border-color: #059669;
}

.button-outline {
    background-color: transparent;
    color: var(--text, #e2e8f0);
    border-color: var(--border, #2d2d44);
}

.button-outline:hover {
    background-color: var(--bg3, #252540);
    border-color: var(--text2, #94a3b8);
}

.button-full {
    width: 100%;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

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

    .shop-sidebar {
        position: static;
        order: -1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .shop-dashboard {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        justify-content: stretch;
    }

    .header-actions .button {
        flex: 1;
    }

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

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .welcome-card {
        padding: 1.5rem;
    }

    .welcome-actions {
        flex-direction: column;
    }

    .welcome-actions .button {
        width: 100%;
    }
}
