:root {
    --brand-color: #E0EC89;
    --brand-color-dark: #c5d470;
    --brand-color-light: #f5f9e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-logo { height: 24px; width: auto; display: inline-block; }

.logo svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(34, 149, 204, 0.2));
}

.logo img {
    height: 40px;
    width: auto; /* 保持原始宽高比 */
}

.nav-title {
    color: var(--brand-color);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
}

.user-role {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.logout-button {
    padding: 10px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Main Container */
.main-container {
    display: flex;
    max-width: 1920px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: none;
    padding: 16px 0;
    transition: width 0.2s ease;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}
.sidebar.hidden { display: none; }

.sidebar-header { display: none; }
.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px 12px;
}
.sidebar-close-handle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
}
.sidebar-close-handle:hover { color: #1e293b; }
.sidebar-logo {
    display: block;
    width: 50%;
    height: auto;
    margin: 8px auto 12px auto;
}
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
    flex: 1;
}
.sidebar-footer {
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sidebar-footer .user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.sidebar-footer .logout-button {
    margin-left: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.menu-item.active {
    background: var(--brand-color);
    color: #000000;
    font-weight: 700;
}

.menu-item.active svg {
    color: #000000;
}

.menu-item.active:hover {
    background: var(--brand-color);
    color: #000000;
}

.menu-item svg {
    flex-shrink: 0;
}

/* Content */
.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    margin-left: 260px;
}

.sidebar.hidden ~ .content {
    margin-left: 0;
}
.sidebar-open-btn {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    width: 24px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #94a3b8;
    z-index: 1000;
}
.sidebar-open-btn:hover { color: #1e293b; }

.welcome-section {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.welcome-section > p {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 40px;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.info-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-color);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-color-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon svg {
    color: white;
}

.info-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.info-card p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 16px 20px;
    }
    
    .nav-title {
        font-size: 20px;
    }
    
    .user-info {
        display: none;
    }
    
    .sidebar {
        position: fixed;
        left: -260px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 50;
    }
    
    .content {
        padding: 20px;
    }
    
    .welcome-section h2 {
        font-size: 24px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
}

/* Under Development Page */
.under-development {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 60px 20px;
}

.dev-icon {
    color: var(--brand-color);
    opacity: 0.8;
    margin-bottom: 32px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.under-development h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.under-development p {
    font-size: 18px;
    color: #64748b;
    max-width: 500px;
    line-height: 1.6;
    margin: 0;
}

/* Submenu Styles */
.menu-group {
    display: flex;
    flex-direction: column;
}

.menu-item.has-submenu {
    position: relative;
    display: flex;
    justify-content: flex-start;
}

.submenu-icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.menu-item.has-submenu.expanded .submenu-icon {
    transform: rotate(90deg);
}

.submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding-left: 32px;
    margin-top: 4px;
}

.submenu.open {
    display: flex;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.submenu-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.submenu-item.active {
    background: var(--brand-color);
    color: #000000;
    font-weight: 700;
}

.submenu-item.active svg {
    color: #000000;
}

.submenu-item.active:hover {
    background: var(--brand-color);
    color: #000000;
}

/* Page Containers */
.page-container {
    display: none;
}

.page-container.active {
    display: block;
}

/* Sales Page Styles */
.sales-page {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Update Time Display */
.update-time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}

.update-label {
    font-weight: 600;
    color: #475569;
}

.update-value {
    font-weight: 500;
    color: #64748b;
}

.sales-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.sales-page .page-header h1 {
    flex: 1;
}

.sales-page .update-time-display {
    margin-top: 0;
}

.products-page .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.inventory-page .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Time Range Controls */
.time-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 24px;
    flex-wrap: wrap;
}

/* Country Selector */
.country-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.country-label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
    min-width: 200px;
    user-select: none;
}

.select-selected {
    padding: 10px 40px 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.select-selected:after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.select-selected.select-arrow-active:after {
    transform: translateY(-50%) rotate(180deg);
}

.select-selected:hover {
    border-color: #cbd5e1;
}

.custom-select:focus-within .select-selected {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 236, 137, 0.1);
}

.select-items {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 99;
    max-height: 300px;
    overflow-y: auto;
}

.select-items.select-hide {
    display: none;
}

.select-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.15s ease;
}

.select-option:hover {
    background: #f8fafc;
    color: #000000;
}

.select-option.selected {
    background: var(--brand-color);
    color: #000000;
    font-weight: 600;
}

/* Scrollbar for select items */
.select-items::-webkit-scrollbar {
    width: 6px;
}

.select-items::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.select-items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.select-items::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.time-range-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.time-btn {
    padding: 10px 24px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #475569;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-btn:hover {
    border-color: var(--brand-color);
    color: #1e293b;
    background: #f8fafc;
}

.time-btn.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #000000;
    box-shadow: 0 2px 4px rgba(224, 236, 137, 0.3);
}

/* Custom Date Range */
.custom-date-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-input {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 150px;
}

.date-input:hover {
    border-color: #cbd5e1;
}

.date-input:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 236, 137, 0.1);
}

.date-separator {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.query-btn {
    padding: 10px 32px;
    background: var(--brand-color);
    color: #000000;
    border: 2px solid var(--brand-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(224, 236, 137, 0.2);
}

.query-btn:hover {
    background: #d4e070;
    border-color: #d4e070;
    box-shadow: 0 4px 6px rgba(224, 236, 137, 0.3);
}

.query-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(224, 236, 137, 0.2);
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-container canvas {
    height: 500px !important;
    max-height: 500px;
}

/* Products Page Styles */
.products-page {
    max-width: 1800px;
    margin: 0 auto;
}

.products-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.products-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    transition: all 0.2s ease;
    min-width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 236, 137, 0.1);
}

.page-size-select {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.page-size-select:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 236, 137, 0.1);
}

.page-size-select:hover {
    border-color: var(--brand-color);
}

.products-table-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.products-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.products-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #000000;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
}

/* Fixed columns */
.products-table th:nth-child(1),
.products-table th:nth-child(2),
.products-table th:nth-child(3),
.products-table td:nth-child(1),
.products-table td:nth-child(2),
.products-table td:nth-child(3) {
    position: sticky;
    background: white;
    z-index: 5;
}

.products-table th:nth-child(1),
.products-table td:nth-child(1) {
    left: 0;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.products-table th:nth-child(2),
.products-table td:nth-child(2) {
    left: 80px;
    width: 120px;
    min-width: 120px;
    box-shadow: 1px 0 0 #e2e8f0;
}

.products-table th:nth-child(3),
.products-table td:nth-child(3) {
    left: 200px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.products-table thead th:nth-child(1),
.products-table thead th:nth-child(2),
.products-table thead th:nth-child(3) {
    background: #f8fafc;
    z-index: 15;
}

.products-table tbody tr:hover td:nth-child(1),
.products-table tbody tr:hover td:nth-child(2),
.products-table tbody tr:hover td:nth-child(3) {
    background: #f8fafc;
}

.products-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.products-table th.sortable:hover {
    background: #f1f5f9;
}

.products-table th.sortable::after {
    content: "⇅";
    font-size: 12px;
    color: #000000;
    margin-left: 6px;
    opacity: 0.4;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.products-table th.sortable:hover::after {
    opacity: 0.8;
    color: #000000;
}

.products-table th.sort-asc::after {
    content: " ▲";
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    margin-left: 6px;
    opacity: 1;
    display: inline-block;
}

.products-table th.sort-desc::after {
    content: " ▼";
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    margin-left: 6px;
    opacity: 1;
    display: inline-block;
}

.products-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    white-space: nowrap;
    background: white;
}

.products-table tbody tr {
    transition: background 0.15s ease;
}

.products-table tbody tr:hover {
    background: #f8fafc;
}

.products-table .image-cell {
    width: 80px;
    padding: 8px;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.no-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
}

.product-name-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.price-cell {
    font-weight: 600;
    color: #059669;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    font-size: 13px;
}

.number-cell {
    text-align: right;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
}

.level-cell {
    text-align: center;
}

.sales-level {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}

.sales-level.s {
    background: #dcfce7;
    color: #166534;
}

.sales-level.a {
    background: #dbeafe;
    color: #1e40af;
}

.sales-level.b {
    background: #fef3c7;
    color: #92400e;
}

.sales-level.c {
    background: #fee2e2;
    color: #991b1b;
}

.loading-cell,
.empty-cell,
.error-cell {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 14px;
}

.error-cell {
    color: #ef4444;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #475569;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--brand-color);
    color: #1e293b;
    background: #f8fafc;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-number-btn {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #475569;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 36px;
}

.page-number-btn:hover {
    border-color: var(--brand-color);
    color: #1e293b;
    background: #f8fafc;
}

.page-number-btn.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #000000;
}

@media (max-width: 1400px) {
    .products-table-container {
        overflow-x: auto;
    }
    
    .products-table {
        min-width: 1400px;
    }
}

/* Overview Page Styles */
.overview-page {
    max-width: 1400px;
    margin: 0 auto;
}

.overview-page .page-header {
    margin-bottom: 24px;
}

.todo-list-container {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.todo-list-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.todo-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.todo-item {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
}

.todo-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.todo-item.updating {
    opacity: 0.6;
    pointer-events: none;
    border-color: var(--brand-color);
}

.todo-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.todo-item-image {
    flex-shrink: 0;
}

.product-image-small {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.no-image-small {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-size: 9px;
    color: #94a3b8;
    text-align: center;
}

.todo-item-info {
    flex: 1;
    min-width: 150px;
}

.todo-item-sku {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.todo-item-name {
    font-size: 11px;
    color: #475569;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.todo-item-price {
    font-size: 11px;
    color: #64748b;
}

.todo-item-cost-input {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.todo-item-cost-input label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.cost-input {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #1e293b;
    background: white;
    width: 100px;
    transition: all 0.2s ease;
}

.cost-input:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 236, 137, 0.1);
}

.cost-input:disabled {
    background: #f8fafc;
    cursor: not-allowed;
}

.update-cost-btn {
    padding: 6px 16px;
    background: var(--brand-color);
    color: #000000;
    border: 1px solid var(--brand-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.update-cost-btn:hover:not(:disabled) {
    background: #d4e070;
    border-color: #d4e070;
    box-shadow: 0 2px 4px rgba(224, 236, 137, 0.3);
}

.update-cost-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #000000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .todo-item-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .todo-item-cost-input {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .cost-input {
        width: 100%;
    }
    
    .update-cost-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Inventory Page Styles */
.inventory-page {
    padding: 32px;
    max-width: 1600px;
    margin: 0 auto;
}

.inventory-page .page-header {
    margin-bottom: 32px;
}

.inventory-page .page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--brand-color);
}

.summary-card:hover::before {
    opacity: 1;
}

.summary-card.card-primary {
    border-left: 4px solid #3b82f6;
}

.summary-card.card-primary:hover {
    border-left-color: #2563eb;
}

.summary-card.card-success {
    border-left: 4px solid #10b981;
}

.summary-card.card-success:hover {
    border-left-color: #059669;
}

.summary-card.card-warning {
    border-left: 4px solid #f59e0b;
}

.summary-card.card-warning:hover {
    border-left-color: #d97706;
}

.summary-card.card-info {
    border-left: 4px solid #06b6d4;
}

.summary-card.card-info:hover {
    border-left-color: #0891b2;
}

.summary-card.card-purple {
    border-left: 4px solid #8b5cf6;
}

.summary-card.card-purple:hover {
    border-left-color: #7c3aed;
}

.summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    text-align: center;
}

.summary-value.summary-currency {
    color: #059669;
    font-size: 22px;
}

.monthly-table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.monthly-table-container .table-header {
    padding: 24px 32px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.monthly-table-container .table-header.table-header-centered {
    text-align: center;
}

.monthly-table-container .table-header.table-header-centered h2,
.monthly-table-container .table-header.table-header-centered .table-subtitle {
    text-align: center;
}

.monthly-table-container .table-header h2 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

.table-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.table-wrapper {
    overflow-x: auto;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.inventory-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.inventory-table th {
    padding: 14px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    white-space: normal;
    line-height: 1.4;
    word-break: break-word;
}

.inventory-table th .column-label {
    display: inline-block;
    text-transform: none;
    line-height: 1.4;
}

.inventory-table th.text-right {
    text-align: right;
}

.inventory-table td {
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #1e293b;
}

.inventory-table tbody tr {
    transition: background-color 0.2s ease;
}

.inventory-table tbody tr:hover {
    background: #f8fafc;
}

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

.inventory-table .number-cell {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-weight: 500;
    color: #334155;
    padding-right: 24px;
}

.inventory-table .number-cell:has-text("¥") {
    color: #059669;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .inventory-summary {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .summary-card {
        padding: 24px;
    }
    
    .summary-value {
        font-size: 28px;
    }
    
    .summary-value.summary-currency {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .inventory-page {
        padding: 20px;
    }
    
    .inventory-summary {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .monthly-table-container {
        border-radius: 12px;
    }
    
    .monthly-table-container .table-header {
        padding: 20px;
    }
    
    .inventory-table {
        font-size: 12px;
    }
    
    .inventory-table th,
    .inventory-table td {
        padding: 12px 8px;
    }
}

/* Finance Page Styles */
.finance-page {
    padding: 32px;
    max-width: 1600px;
    margin: 0 auto;
}

.finance-page .page-header,
.ads-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.finance-page .page-header .header-left,
.ads-page .page-header .header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ads-page .finance-cards {
    margin-bottom: 32px;
}

.ads-page .monthly-table-container + .monthly-table-container {
    margin-top: 36px;
}

.ads-page .table-footer {
    margin-top: 12px;
}

.finance-page .page-header {
    margin-bottom: 32px;
}

.finance-page .page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0;
}

.finance-page .update-time-display,
.ads-page .update-time-display {
    margin-top: 0;
}

.finance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.finance-card {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.finance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.finance-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--brand-color);
}

.finance-card:hover::before {
    opacity: 1;
}

.finance-card.card-primary {
    border-left: 4px solid #3b82f6;
}

.finance-card.card-primary:hover {
    border-left-color: #2563eb;
}

.finance-card.card-success {
    border-left: 4px solid #10b981;
}

.finance-card.card-success:hover {
    border-left-color: #059669;
}

.finance-card.card-warning {
    border-left: 4px solid #f59e0b;
}

.finance-card.card-warning:hover {
    border-left-color: #d97706;
}

.finance-card.card-info {
    border-left: 4px solid #06b6d4;
}

.finance-card.card-info:hover {
    border-left-color: #0891b2;
}

.finance-card.card-secondary {
    border-left: 4px solid #64748b;
}

.finance-card.card-secondary:hover {
    border-left-color: #475569;
}

.finance-card.card-purple {
    border-left: 4px solid #8b5cf6;
}

.finance-card.card-purple:hover {
    border-left-color: #7c3aed;
}

.finance-card.card-purple .finance-value {
    color: #7c3aed;
}

.finance-card.card-orange {
    border-left: 4px solid #f97316;
}

.finance-card.card-orange:hover {
    border-left-color: #ea580c;
}

.finance-card.card-orange .finance-value {
    color: #ea580c;
}

.finance-card.card-green-dark {
    border-left: 4px solid #16a34a;
}

.finance-card.card-green-dark:hover {
    border-left-color: #15803d;
}

.finance-card.card-green-dark .finance-value {
    color: #15803d;
}

.finance-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.finance-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 8px;
}

.finance-card.card-success .finance-value {
    color: #059669;
}

.finance-card.card-warning .finance-value {
    color: #d97706;
}

.finance-card.card-info .finance-value {
    color: #0891b2;
}

.finance-card.card-secondary .finance-value {
    color: #475569;
}

.finance-description {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: auto;
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.finance-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.finance-table th {
    padding: 14px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.finance-table th.text-right {
    text-align: right;
}

.finance-table td {
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #1e293b;
}

.finance-table tbody tr {
    transition: background-color 0.2s ease;
}

.finance-table tbody tr:hover {
    background: #f8fafc;
}

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

.finance-table .text-right {
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-weight: 500;
    color: #334155;
}

/* Responsive Finance Page */
@media (max-width: 1024px) {
    .finance-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .finance-card {
        padding: 18px 20px;
    }
    
    .finance-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .finance-page {
        padding: 20px;
    }
    
    .finance-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .finance-table {
        font-size: 12px;
    }
    
    .finance-table th,
    .finance-table td {
        padding: 12px 8px;
    }
}
.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sidebar-toggle:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.sidebar.collapsed {
    width: 72px;
}
.sidebar.collapsed .menu-item span {
    display: none;
}
.sidebar.collapsed .submenu {
    display: none !important;
}
.sidebar.collapsed .menu-item {
    justify-content: center;
}

/* Analytics Page */
.analytics-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.analytics-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analytics-sync-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    min-width: 220px;
}

.sync-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-right: 8px;
}

.sync-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-left: 8px;
}

.refresh-button {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    background: var(--brand-color);
    color: #1e293b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-button:hover {
    background: var(--brand-color-dark);
    box-shadow: 0 10px 20px rgba(224, 236, 137, 0.35);
}

.analytics-filter-bar {
    margin-top: 24px;
    margin-bottom: 32px;
    padding: 24px;
    border-radius: 18px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 260px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-inputs input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
}

.date-inputs input:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 236, 137, 0.2);
    background: #fff;
}

.date-divider {
    font-weight: 600;
    color: #94a3b8;
}

.quick-range-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.analytics-range-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analytics-range-btn.active,
.analytics-range-btn:hover {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #000;
}

#analyticsCountrySelect {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    min-width: 220px;
}

#analyticsCountrySelect:focus {
    outline: none;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(224, 236, 137, 0.2);
}

.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.analytics-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.05);
}

.analytics-card .card-label {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.analytics-card .card-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.card-change {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

.card-change.positive {
    color: #16a34a;
}

.card-change.negative {
    color: #dc2626;
}

.analytics-section,
.analytics-panel {
    background: white;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 32px;
}

.analytics-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.section-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #94a3b8;
}

.section-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 13px;
    color: #94a3b8;
}

.section-range {
    font-weight: 600;
    color: #475569;
}

.chart-wrapper {
    position: relative;
    min-height: 260px;
}

.center-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.channel-summary {
    font-size: 14px;
    color: #475569;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
}

.panel-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analytics-table th {
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 12px 8px;
    border-bottom: 1px solid #e2e8f0;
}

.analytics-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: #0f172a;
}

.analytics-table td.text-right,
.analytics-table th.text-right {
    text-align: right;
}

.analytics-table-wrapper {
    max-height: 420px;
    overflow-y: auto;
}

.funnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.funnel-step {
    padding: 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.funnel-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
}

.funnel-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0;
}

.funnel-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0;
}

.funnel-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22d3ee 0%, #0ea5e9 100%);
    width: 0%;
    transition: width 0.4s ease;
}

.funnel-rate {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

@media (max-width: 1024px) {
    .analytics-page {
        padding: 24px;
    }
    
    .analytics-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .analytics-filter-bar {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .analytics-page {
        padding: 20px;
    }
    
    .analytics-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-split {
        grid-template-columns: 1fr;
    }
    
    .funnel-grid {
        grid-template-columns: 1fr;
    }
}
.todays-sales-section {
    margin-bottom: 24px;
}

.todays-sales-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    padding: 24px;
}

.todays-sales-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.todays-sales-body {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 24px;
    align-items: start;
}

.todays-main-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todays-sales-body {
    grid-auto-rows: 1fr;
}

.todays-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.todays-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todays-card.total-card {
    border: 1px solid rgba(122, 143, 42, 0.35);
    background: radial-gradient(circle at top right, rgba(224, 236, 137, 0.55), rgba(250, 252, 235, 0.95));
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.card-chip {
    font-size: 12px;
    font-weight: 600;
    color: #4a5c16;
    padding: 6px 10px;
    border-radius: 24px;
    background: rgba(224, 236, 137, 0.4);
}

.card-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.todays-card .metric-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.todays-card .card-value {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.card-chart {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto;
}

.card-chart canvas {
    width: 130px !important;
    height: 130px !important;
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 13px;
    color: #475569;
    pointer-events: none;
}

.chart-center strong {
    display: block;
    font-size: 18px;
    color: #111827;
}

.chart-empty {
    width: 100%;
    text-align: center;
    color: #94a3b8;
    font-weight: 600;
    padding: 18px 0;
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.channel-dot.live {
    background: #7a8f2a;
}

.channel-dot.video {
    background: #bcd75f;
}

.channel-dot.prod {
    background: #e0ec89;
    border: 1px solid #a4b448;
}

.channel-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.channel-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.channel-share {
    font-size: 12px;
    color: #64748b;
}

.channel-amount {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.loading-card {
    border: 1px dashed #cbd5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 140px;
}

.todays-zero-info {
    margin-top: 12px;
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    border: 1px dashed #cbd5f5;
    border-radius: 12px;
    padding: 12px 16px;
    display: none;
    text-align: center;
}

.top-products-section {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.top-products-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.top-products-header .section-subtitle {
    margin: 4px 0 0;
}

.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.top-product-rank {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(122, 143, 42, 0.1);
    color: #4f5f1d;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.top-product-thumb {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-product-initial {
    font-size: 20px;
    font-weight: 700;
    color: #94a3b8;
}

.top-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.top-product-qty {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}

.top-product-loading,
.top-product-empty {
    text-align: center;
    padding: 12px;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5f5;
    font-weight: 600;
}

.stacked-sales-section .chart-wrapper {
    min-height: 320px;
}

.stacked-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.stacked-card {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px 20px;
    background: #fdfdfd;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.stacked-channel-block {
    background: #fbfcf5;
    width: 100%;
    box-sizing: border-box;
}

.stacked-channel-block h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.stacked-channel-block .section-subtitle {
    margin: 4px 0 0;
}

.stacked-channel-block canvas {
    width: 100% !important;
    height: 220px !important;
}

.channel-chart-wrapper.stacked {
    min-height: 220px;
    height: 220px;
    position: relative;
}

.channel-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-breakdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #475569;
}

.channel-breakdown .label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.channel-breakdown .value {
    font-weight: 600;
    color: #0f172a;
}

.channel-breakdown .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.monthly-summary-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    table-layout: fixed;
}

.monthly-summary-table th,
.monthly-summary-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.monthly-summary-table th:nth-child(1),
.monthly-summary-table td:nth-child(1) {
    width: 120px;
}

.monthly-summary-table th:nth-child(2),
.monthly-summary-table td:nth-child(2) {
    width: 160px;
}

.monthly-summary-table th {
    background: #e0ec89;
    color: #2f5d2f;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.monthly-summary-table tbody tr:nth-child(even) {
    background: #f8faf4;
}

.monthly-summary-table tbody tr:last-child td {
    border-bottom: none;
}

.metric-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.metric-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f5f7e5;
    font-size: 12px;
    color: #475569;
}

.metric-chip .label {
    font-weight: 600;
    color: #2f5d2f;
}

.metric-chip .value {
    font-weight: 700;
    color: #0f172a;
}

.table-footer {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 32px 24px;
}

.table-footer .table-info {
    font-size: 13px;
    color: #475569;
}

.monthly-summary-header {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.monthly-summary-section .table-wrapper {
    max-height: none;
    overflow: visible;
}

.table-pagination {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.pagination-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.stacked-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.stacked-title {
    text-align: center;
    flex: 1;
}

.stacked-title h2 {
    margin: 0;
    font-size: 24px;
    color: #0f172a;
}

.stacked-subtitle {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

.stacked-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stacked-filters input[type="date"] {
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.filter-apply-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: #7a8f2a;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.filter-apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .stacked-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stacked-title {
        text-align: left;
    }
    
    .stacked-filters {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stacked-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stacked-filters input[type="date"],
    .filter-apply-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .stacked-top {
        flex-direction: column;
    }
    
    .stacked-title {
        text-align: left;
    }
    
    .stacked-filters {
        width: 100%;
        flex-wrap: wrap;
    }
}

.channel-empty {
    text-align: center;
    color: #94a3b8;
    font-weight: 600;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.card-chart .donut-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% - 4px);
    transform: translate(-50%, 0);
    background: rgba(62, 79, 16, 0.92);
    color: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    border: 1px solid rgba(224, 236, 137, 0.6);
}

.card-chart .donut-tooltip strong {
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .card-chart {
        width: 110px;
        height: 110px;
    }
    
    .card-chart canvas {
        width: 110px !important;
        height: 110px !important;
    }
}

@media (max-width: 1024px) {
    .todays-sales-body {
        grid-template-columns: 1fr;
    }
    
    .stacked-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .todays-card-grid {
        grid-template-columns: 1fr;
    }
    
    .top-product-card {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }
    
    .top-product-thumb {
        width: 48px;
        height: 48px;
    }
    
    .top-products-section {
        padding: 14px;
    }
}
.top-product-card {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.section-subtitle {
    color: #64748b;
    font-size: 14px;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.product-image-cell {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sku-cell {
    font-weight: 600;
    color: #1e293b;
    font-family: monospace;
}

.name-cell {
    color: #475569;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cost-input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    width: 120px;
    font-size: 14px;
    transition: all 0.2s;
}

.cost-input:focus {
    border-color: var(--brand-color);
    outline: none;
}

.save-btn {
    padding: 8px 16px;
    background: var(--brand-color);
    color: #000000;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #d4e070;
    transform: translateY(-1px);
}

.save-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.empty-state {
    text-align: center;
    padding: 48px;
    color: #64748b;
    font-size: 16px;
    background: white;
    border-radius: 16px;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #ef4444;
    background: #fef2f2;
    border-radius: 8px;
}
