﻿/* ===== DASHBOARD.CSS - DASHBOARD PAGE SPECIFIC STYLES ===== */

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    padding: 0 24px 32px 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

    .logo h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1e293b;
    }

.nav-section {
    margin-bottom: 32px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    
}

    .nav-item:hover {
        background: #f1f5f9;
        color: #3b82f6;
        text-decoration: none;
    }

    .nav-item.active {
        background: #eff6ff;
        color: #3b82f6;
        border-right: 3px solid #3b82f6;
    }
.nav-item-disabled {
    pointer-events: auto !important; /* Allows hover for tooltips */
    cursor: not-allowed; /* Shows disabled cursor */
    opacity: 0.6; /* Looks disabled */
}

    .nav-item-disabled:hover {
        background-color: rgba(255, 255, 255, 0.05); /* Subtle hover feedback */
    }
.nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 7px;
    margin-right: 12px;
    font-size: 16px;
}

.nav-badge {
    background: #e2e8f0;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

.nav-item.active .nav-badge {
    background: #dbeafe;
    color: #3b82f6;
}

.nav-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 16px 24px;
}

.nav-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 24px 12px 24px;
}

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 8px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    color: #64748b;
    text-decoration: none;
    min-width: 60px;
    transition: color 0.2s ease;
    position: relative;
}

    .bottom-nav-item:hover {
        text-decoration: none;
        color: #3b82f6;
    }

    .bottom-nav-item.active {
        color: #3b82f6;
    }

.bottom-nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-nav-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    font-weight: 600;
}

/* ===== DASHBOARD MAIN CONTENT ===== */
.dashboard-layout .main-content {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
}

/* ===== DASHBOARD HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-left {
    flex: 1;
}

.header-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.header-subtitle {
    color: #64748b;
    font-size: 0.875rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 320px;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s ease;
}

    .search-input:focus {
        outline: none;
        border-color: #3b82f6;
        background: white;
    }

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.header-btn {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

    .header-btn:hover {
        border-color: #cbd5e1;
        text-decoration: none;
        color: #64748b;
    }

/* ===== DASHBOARD METRICS ROW ===== */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

    .metrics-row .metric-card {
        background: white;
        padding: 24px;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        text-align: center;
        position: relative;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

        .metrics-row .metric-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

    .metrics-row .metric-value {
        font-size: 2rem;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 8px;
    }

    .metrics-row .metric-label {
        color: #64748b;
        font-size: 0.875rem;
        font-weight: 500;
    }

.metric-change {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

    .metric-change.positive {
        background: #dcfce7;
        color: #166534;
    }

    .metric-change.negative {
        background: #fee2e2;
        color: #dc2626;
    }

    .metric-change.neutral {
        background: #f1f5f9;
        color: #64748b;
    }

/* ===== STATUS GRID ===== */
.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.status-column {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.status-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-title {
    font-weight: 600;
    color: #1e293b;
}

.status-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-content {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

/* ===== ITEM CARDS (FOR STATUS COLUMNS) ===== */
.item-card {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .item-card:hover {
        background: #f8fafc;
        transform: translateX(2px);
    }

    .item-card:last-child {
        border-bottom: none;
    }

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.item-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
    flex: 1;
    margin-right: 8px;
}

.item-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-business {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-university {
    background: #f3e8ff;
    color: #7c3aed;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-neutral {
    background: #f1f5f9;
    color: #64748b;
}

.item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.75rem;
}

.item-revenue {
    font-weight: 600;
    color: #059669;
}

/* ===== DASHBOARD CHART SECTION ===== */
.chart-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.chart-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.125rem;
}

.chart-filters {
    display: flex;
    gap: 8px;
}

.chart-filter {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .chart-filter:hover {
        border-color: #cbd5e1;
    }

    .chart-filter.active {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

.chart-container {
    height: 300px;
    position: relative;
}

/* ===== DASHBOARD EMPTY STATE ===== */
.dashboard-layout .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 0.875rem;
}

/* ===== DASHBOARD RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media (max-width: 1400px) {
    .search-input {
        width: 280px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .sidebar {
        width: 200px;
    }

    .dashboard-layout .main-content {
        margin-left: 200px;
    }

    .metrics-row,
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-input {
        width: 250px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .metrics-row,
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .header-actions {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-input {
        width: 100%;
        max-width: 300px;
    }
}

/* Mobile - Switch to bottom navigation */
@media (max-width: 768px) {
    /* Hide sidebar completely on mobile */
    .sidebar {
        display: none;
    }

    /* Show bottom navigation */
    .bottom-nav {
        display: block;
    }

    /* Adjust main content for mobile */
    .dashboard-layout .main-content {
        margin-left: 0;
        margin-bottom: 80px; /* Space for bottom navigation */
        padding: 16px;
    }

    /* Single column layouts */
    .metrics-row,
    .status-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Mobile header adjustments */
    .header {
        padding: 16px;
        margin-bottom: 20px;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .header-actions {
        justify-content: center;
    }

    .search-input {
        width: 100%;
    }

    /* Chart responsiveness */
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .chart-filters {
        align-self: stretch;
        justify-content: center;
    }

    .chart-container {
        height: 250px;
    }

    /* Status adjustments */
    .status-header {
        padding: 16px 20px;
    }

    .item-card {
        padding: 12px 20px;
    }

    .status-content {
        max-height: 300px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .dashboard-layout .main-content {
        padding: 12px;
    }

    .header {
        padding: 12px;
    }

    .header-title {
        font-size: 1.25rem;
    }

    .metrics-row .metric-card {
        padding: 20px;
    }

    .metrics-row .metric-value {
        font-size: 1.7rem;
    }

    .chart-section {
        padding: 16px;
    }

    .bottom-nav-container {
        padding: 0 4px;
    }

    .bottom-nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }

    .bottom-nav-icon {
        font-size: 18px;
    }

    .bottom-nav-label {
        font-size: 11px;
    }
}

/* ===== DASHBOARD PRINT STYLES ===== */
@media print {
    .sidebar,
    .bottom-nav,
    .header-actions,
    .chart-filters {
        display: none;
    }

    .dashboard-layout .main-content {
        margin-left: 0;
        margin-bottom: 0;
    }

    .dashboard-layout {
        display: block;
    }

    .chart-container {
        height: 200px;
    }
}
