:root {
    --wcc-dash-bg: #1a1d21;
    --wcc-dash-sidebar: #22252a;
    --wcc-dash-card: #2c3036;
    --wcc-dash-text: #e0e0e0;
    --wcc-dash-primary: #4ecca3;
    --wcc-dash-secondary: #393e46;
    --wcc-dash-danger: #ff6b6b;
    --wcc-dash-title: #E6D5B8;
    /* Light Coffee Color */
}

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--wcc-dash-bg) !important;
    min-height: 100vh;
}

.wcc-dashboard-wrapper {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background-color: var(--wcc-dash-bg);
    color: var(--wcc-dash-text);
    font-family: 'Inter', sans-serif;
}

/* Sidebar */
.wcc-sidebar {
    width: 250px;
    background-color: var(--wcc-dash-sidebar);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.wcc-logo h2 {
    color: var(--wcc-dash-primary);
    margin-bottom: 40px;
    font-size: 1.5em;
}

.wcc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wcc-nav li {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--wcc-dash-title) !important;
    /* Premium light coffee color */
    font-weight: 600 !important;
}

.wcc-nav li:hover,
.wcc-nav li.active {
    background-color: var(--wcc-dash-card);
    color: var(--wcc-dash-primary);
}

.wcc-nav li a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Main Content */
.wcc-main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.wcc-main-content h2,
.wcc-section-header h2,
.wcc-modal-content h3,
.wcc-card h3 {
    color: var(--wcc-dash-title);
}

.wcc-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.wcc-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcc-user-profile img {
    border-radius: 50%;
}

/* Tabs */
.wcc-tab-content {
    display: none;
}

.wcc-tab-content.active {
    display: block;
}

/* Cards */
.wcc-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wcc-card {
    background-color: var(--wcc-dash-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wcc-card h3 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: var(--wcc-dash-title);
}

.wcc-stat-number {
    font-size: 2em;
    font-weight: bold;
    margin: 0;
}

/* Chart */
/* Chart */
.wcc-chart-container {
    background-color: var(--wcc-dash-card);
    padding: 20px;
    border-radius: 12px;
    height: 300px;
    /* Reduced height */
    position: relative;
    width: 100%;
}

.wcc-charts-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .wcc-charts-row {
        flex-direction: column;
    }

    .wcc-chart-container {
        height: 250px;
    }
}

/* Tables */
.wcc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 10px;
}

.wcc-section-header h3 {
    color: var(--wcc-dash-title);
    /* Updated Color */
}

.wcc-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.3s;
}

.wcc-btn-primary {
    background-color: var(--wcc-dash-primary);
    color: #fff;
}

.wcc-btn-danger {
    background-color: var(--wcc-dash-danger);
    color: #fff;
}

.wcc-btn:hover {
    opacity: 0.9;
}

.wcc-table-responsive {
    overflow-x: auto;
}

.wcc-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--wcc-dash-card);
    border-radius: 12px;
    overflow: hidden;
}

.wcc-table th,
.wcc-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--wcc-dash-secondary);
}

.wcc-table th {
    background-color: var(--wcc-dash-secondary) !important;
    color: var(--wcc-dash-title) !important;
    /* Matching titles color (light coffee/gold) */
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 0.95em !important;
    letter-spacing: 1px;
}

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

.wcc-table td {
    vertical-align: middle;
}

.wcc-product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--wcc-dash-secondary);
}

/* Forms */
.wcc-form-control {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--wcc-dash-secondary);
    background-color: var(--wcc-dash-bg);
    color: var(--wcc-dash-title);
    outline: none;
}

.wcc-form-control:focus {
    border-color: var(--wcc-dash-primary);
}

/* Dropdown Filter */
.wcc-dropdown {
    position: relative;
}

.wcc-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--wcc-dash-card);
    border: 1px solid var(--wcc-dash-secondary);
    z-index: 100;
    width: 200px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin-top: 5px;
}

.wcc-dropdown-content label {
    display: block;
    margin-bottom: 5px;
    color: var(--wcc-dash-text);
    cursor: pointer;
}

.wcc-dropdown-content label:hover {
    color: var(--wcc-dash-primary);
}

/* Modal */
.wcc-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.wcc-modal-content {
    background-color: var(--wcc-dash-card);
    margin: 3vh auto;
    padding: 20px;
    border: 1px solid var(--wcc-dash-secondary);
    width: 90%;
    max-width: 1600px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.wcc-modal-content h3 {
    color: var(--wcc-dash-title);
    margin-top: 0;
}

.wcc-form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--wcc-dash-title);
}

.wcc-close-modal {
    color: var(--wcc-dash-text);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.wcc-close-modal:hover,
.wcc-close-modal:focus {
    color: var(--wcc-dash-primary);
    text-decoration: none;
    cursor: pointer;
}

/* Iframe Modal Specifics */
.wcc-iframe-modal {
    height: 92vh;
    display: flex;
    flex-direction: column;
}

.wcc-iframe-container {
    flex: 1;
    width: 100%;
    position: relative;
    background: #fff;
    /* Admin forms usually need white bg */
    border-radius: 8px;
    overflow: hidden;
}

.wcc-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcc-dashboard-wrapper {
        flex-direction: column;
    }

    .wcc-sidebar {
        width: 100%;
        padding: 10px 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .wcc-logo h2 {
        margin-bottom: 0;
        font-size: 1.2em;
    }

    .wcc-nav ul {
        display: flex;
        gap: 10px;
    }

    .wcc-nav li {
        margin-bottom: 0;
        padding: 8px;
    }

    .wcc-nav-text {
        display: none;
        /* Hide text on mobile nav */
    }

    .wcc-charts-row {
        flex-direction: column !important;
    }

    .wcc-chart-container {
        height: 300px;
    }

    .wcc-filters {
        flex-direction: column;
        width: 100%;
    }

    .wcc-filters input,
    .wcc-filters select,
    .wcc-filters button {
        width: 100%;
    }
}