:root {
    --bg-color: #0b0e14;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #4f46e5;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
}

.sidebar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav li {
    margin-bottom: 1rem;
}

.sidebar nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.3s;
}

.sidebar nav li.nav-item {
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.sidebar nav li.active a {
    color: var(--text-primary);
    position: relative;
}

.sidebar nav li.active a::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.5rem;
    background: var(--accent-color);
    border-radius: 0 4px 4px 0;
}

.content {
    flex: 1;
    padding: 2rem 3rem;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.1), transparent 40%);
    max-height: 100vh;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}

/* List View Styles */
.list-section {
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

.status-PLANTING {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
}

.status-PROCESSING {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.status-FINISHED {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.card.highlight {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    text-align: center;
}

.blockchain-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.feed-item {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    font-size: 0.875rem;
}

.feed-item .tx-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.feed-item .batch-no {
    color: #4f46e5;
    font-weight: 700;
}

.feed-item .tx-hash {
    font-family: monospace;
    color: var(--text-secondary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-item .tx-link {
    color: #34d399;
    text-decoration: none;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: inline-block;
}

.trace-header {
    margin-bottom: 2rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card {
    padding: 2rem;
}

.card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.chart-container {
    padding: 2rem;
}

.chart-container h2 {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.chart {
    height: 350px;
    width: 100%;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .sidebar .logo {
        margin-bottom: 1rem;
        text-align: center;
    }

    .sidebar nav ul {
        display: flex;
        justify-content: space-around;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .sidebar nav li {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .sidebar nav li.active a::before {
        display: none;
    }

    .sidebar nav li.active a {
        border-bottom: 2px solid var(--accent-color);
        padding-bottom: 0.25rem;
    }

    .content {
        padding: 1.5rem 1rem;
        max-height: none;
        overflow-y: visible;
    }

    header {
        margin-bottom: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .stats-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .data-table-wrapper {
        overflow-x: auto;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .chart {
        height: 300px;
    }
}

@media (max-width: 1024px) {

    .stats-cards,
    .charts-grid {
        grid-template-columns: 1fr;
    }
}