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


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 70px;
    background: rgb(19, 12, 66);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

.logo {
    width: 40px;
    height: 40px;
    /* background: rgba(255, 255, 255, 0.1); */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(98, 0, 235, 0.4);
    backdrop-filter: blur(10px);
}

.nav-icons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.nav-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    border-radius: 8px;
    transition: all 0.25s ease;
    text-decoration: none;
    font-size: 16px;
}

.nav-icon:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
}

.nav-icon.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.nav-bottom {
    margin-top: auto;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1e3a8a;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #1e3a8a;
    color: white;
    box-shadow: 0 2px 6px rgba(30,58,138,0.2);
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.month-dropdown {
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    color: #374151;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    position: relative;
}

.avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.region-chips {
    display: flex;
    gap: 4px;
}

.region-chip {
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Region Filter Dropdown */
.region-filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 15px;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.region-filter-dropdown.active {
    display: block;
}

.region-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.region-option:hover {
    background: #f5f7fa;
}

/* Column Settings Dropdown */
.column-settings-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 15px;
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.column-settings-dropdown.active {
    display: block;
}

.column-settings-header {
    font-weight: 600;
    font-size: 12px;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-all-btn {
    font-size: 11px;
    color: #6366f1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline;
}

.select-all-btn:hover {
    color: #4f46e5;
}

.column-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
    cursor: pointer;
}

.column-option:hover {
    background: #f5f7fa;
}

.column-option input[type="checkbox"] {
    cursor: pointer;
}

.column-option label {
    cursor: pointer;
    flex: 1;
    font-size: 12px;
    color: #374151;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: white;
    padding: 16px 18px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.metric-card:hover::before {
    transform: scaleX(1);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.metric-icon {
    font-size: 18px;
    opacity: 0.7;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1;
}

.metric-change {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1f2937;
    color: white;
    font-size: 11px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 8px;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Charts Section */
.charts-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin: 16px 0;
    overflow: hidden;
}

.charts-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #e5e7eb;
}

.charts-toggle:hover {
    background: #f9fafb;
}

.charts-toggle h3 {
    margin: 0;
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.charts-toggle i {
    color: #6b7280;
    transition: transform 0.2s;
}

.charts-toggle.active i {
    transform: rotate(180deg);
}

.charts-content {
    padding: 16px;
    display: none;
}

.charts-content.active {
    display: block;
}

/* Breakdown Stats */
.breakdown-stats {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin: 16px 0;
}

.breakdown-stats h3 {
    margin: 0 0 12px 0;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breakdown-item {
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    min-width: 110px;
    flex: 1;
    transition: all 0.2s;
}

.breakdown-item:hover {
    background: #e0e7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.breakdown-item.active {
    background: #dbeafe;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.breakdown-item-header {
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.breakdown-item-stats {
    font-size: 10px;
    color: #6b7280;
    line-height: 1.5;
}

.breakdown-item-stats strong {
    font-size: 11px;
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table-content {
    padding: 20px;
    overflow-x: auto;
}

/* Search Bar Styling - Merged with Table */
.table-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 2px solid #e5e7eb;
}

.table-search-container label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table-search-input {
    flex: 1;
    padding: 10px 16px 10px 42px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 13px;
    outline: none;
    color: #374151;
    transition: all 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 20px;
}

.table-search-input:focus {
    background: white;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.table-search-input::placeholder {
    color: #9ca3af;
}

/* Advanced Filter Styling */
.advanced-filter-container {
    padding: 16px 20px;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-select, .filter-operator, .filter-value {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
}

.filter-select {
    min-width: 150px;
}

.filter-operator {
    min-width: 120px;
}

.filter-value {
    flex: 1;
    min-width: 200px;
}

.filter-select:focus, .filter-operator:focus, .filter-value:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn-apply {
    background: #6366f1;
    color: white;
}

.filter-btn-apply:hover {
    background: #4f46e5;
}

.filter-btn-add {
    background: #10b981;
    color: white;
}

.filter-btn-add:hover {
    background: #059669;
}

.filter-btn-remove {
    background: #ef4444;
    color: white;
    padding: 8px 12px;
}

.filter-btn-remove:hover {
    background: #dc2626;
}

.filter-btn-clear {
    background: #6b7280;
    color: white;
}

.filter-btn-clear:hover {
    background: #4b5563;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.advanced-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.advanced-filter-toggle:hover {
    background: #e5e7eb;
}

.advanced-filter-toggle span {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.advanced-filter-toggle i {
    color: #6b7280;
    transition: transform 0.2s;
}

.advanced-filter-toggle.active i {
    transform: rotate(180deg);
}

/* Loading Screen */
/* Loading Overlay - Modern Design */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

.loading-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 24px rgba(98, 0, 235, 0.25));
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Animated rings around logo */
.loading-logo::before,
.loading-logo::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.loading-logo::before {
    width: 100px;
    height: 100px;
    border-top-color: rgba(99, 102, 241, 0.4);
    border-right-color: rgba(99, 102, 241, 0.4);
    animation: spin 2s linear infinite;
}

.loading-logo::after {
    width: 120px;
    height: 120px;
    border-bottom-color: rgba(168, 85, 247, 0.3);
    border-left-color: rgba(168, 85, 247, 0.3);
    animation: spin 3s linear infinite reverse;
}

.loader {
    width: 70px;
    height: 70px;
    position: relative;
    margin: 20px 0;
}

.loader::before,
.loader::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.loader::before {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top-color: #6366f1;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader::after {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border: 3px solid rgba(168, 85, 247, 0.1);
    border-right-color: #a855f7;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

/* Progress dots */
.loading-dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    animation: bounce-dots 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.loading-text {
    margin-top: 25px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.3px;
    animation: fade-in-out 2s ease-in-out infinite;
}

.loading-subtext {
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;
    font-weight: 400;
    animation: fade-in-out 2s ease-in-out infinite 0.5s;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes pulse-glow {
    0%, 100% { 
        filter: drop-shadow(0 8px 24px rgba(98, 0, 235, 0.25));
    }
    50% { 
        filter: drop-shadow(0 12px 32px rgba(98, 0, 235, 0.45));
    }
}

@keyframes bounce-dots {
    0%, 80%, 100% { 
        transform: scale(0.8) translateY(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1.2) translateY(-10px);
        opacity: 1;
    }
}

@keyframes fade-in-out {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.6;
    }
}

.loading-logo {
    width: 80px;
    height: 80px;
    /* background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.loading-logo svg {
    width: 36px;
    height: 40px;
}

/* Export Button */
.export-btn {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

/* Active Filter Badges */
.active-filters-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 0 20px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.filter-badge i {
    cursor: pointer;
    transition: color 0.2s;
}

.filter-badge i:hover {
    color: #dc2626;
}

/* Format large numbers */
.compact-number {
    font-variant-numeric: tabular-nums;
}

/* High cost indicator */
.high-cost-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #dc2626;
    font-size: 14px;
    margin-left: 4px;
}

/* Chart Container */
.chart-container {
    margin: 0;
}

#costChart {
    max-height: 350px;
}

/* DataTables Custom Styling */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 4px !important;
    width: 100% !important;
    font-size: 13px;
}

table.dataTable thead th {
    background: #dbeafe;
    border: none !important;
    padding: 10px 12px !important;
    font-weight: 600;
    font-size: 11px;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table.dataTable tbody tr {
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border-radius: 6px;
    transition: all 0.2s;
}

table.dataTable tbody tr:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

table.dataTable tbody td {
    border: none !important;
    padding: 12px !important;
    vertical-align: middle;
    font-size: 12px;
    color: #374151;
}

table.dataTable tbody td:first-child {
    border-radius: 8px 0 0 8px;
}

table.dataTable tbody td:last-child {
    border-radius: 0 8px 8px 0;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    margin-left: 10px;
}

.dataTables_wrapper .dataTables_length {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 30px 6px 10px;
    margin: 0 10px;
    background: #f9fafb;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 3px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
    color: white !important;
}

/* Cost badges */
.cost-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.cost-high {
    background: #fee2e2;
    color: #dc2626;
}

.cost-medium {
    background: #fef3c7;
    color: #d97706;
}

.cost-low {
    background: #d1fae5;
    color: #059669;
}

/* Region badges */
.region-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.region-europe {
    background: #dbeafe;
    color: #1e40af;
}

.region-us {
    background: #fce7f3;
    color: #be185d;
}

.region-dsp {
    background: #e0e7ff;
    color: #4338ca;
}

.region-far_east {
    background: #fef3c7;
    color: #d97706;
}

.region-flipkart {
    background: #dbeafe;
    color: #0284c7;
}

.region-myntra {
    background: #fce7f3;
    color: #ec4899;
}

.region-brand_analytics {
    background: #e9d5ff;
    color: #7c3aed;
}

.region-marketing_stream {
    background: #d1fae5;
    color: #059669;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .breakdown-stats {
        flex-direction: column;
    }

    .sidebar {
        width: 60px;
    }

    .main-content {
        padding: 20px;
    }
}

/* Hierarchical List Styles for Platforms and Clients Pages */
.platforms-list,
.clients-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.platform-row,
.client-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.1s ease;
    gap: 20px;
    border-radius: 0;
}

.row-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.archive-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.archive-btn:active {
    transform: translateY(0);
}

.archive-btn i {
    font-size: 12px;
}

.platform-row:hover,
.client-row:hover {
    background: #f9fafb;
}

.platform-row:last-child,
.client-row:last-child {
    border-bottom: none;
}

.expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.expand-icon.expanded {
    transform: rotate(90deg);
}

.expand-icon i {
    font-size: 11px;
}

.row-name {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.row-name small {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
    margin-left: 6px;
    letter-spacing: 0;
}

.row-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    min-width: 85px;
}

.row-stat strong {
    font-size: 15px;
    color: #111827;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.row-stat span {
    font-size: 11px;
    color: #9ca3af;
    text-transform: lowercase;
    letter-spacing: 0;
    font-weight: 500;
}

.row-stat.cost strong {
    color: #10b981;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Children containers */
.client-children,
.brand-children,
.platform-children {
    display: none;
    padding-left: 32px;
}

.client-children.expanded,
.brand-children.expanded,
.platform-children.expanded {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Brand rows */
.brand-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: #fafbfc;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.1s ease;
    gap: 16px;
    border-radius: 0;
}

.brand-row:hover {
    background: #f3f4f6;
}

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

.brand-row .row-name {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.brand-row .row-stat strong {
    font-size: 14px;
}

.brand-row .row-stat span {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

/* Platform rows (nested under brands in clients page) */
.platform-children .platform-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
    border-radius: 0;
}

.platform-item .row-name {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.platform-item .row-stat {
    min-width: 70px;
}

.platform-item .row-stat strong {
    font-size: 12px;
}

.platform-item .row-stat span {
    font-size: 9px;
    color: #9ca3af;
    font-weight: 500;
}

/* Dataset rows (leaf nodes - no expansion) */
.dataset-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #fafbfc;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
    border-radius: 0;
}

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

.dataset-row .no-expand {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dataset-row .row-name {
    flex: 1;
    font-size: 13px;
    color: #6b7280;
    font-family: 'SF Mono', 'Monaco', 'Courier New', Courier, monospace;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.dataset-row .row-stat {
    min-width: 80px;
    text-align: right;
}

.dataset-row .row-stat strong {
    font-size: 14px;
    color: #111827;
}

.dataset-row .row-stat span {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

/* Dataset children container */
.dataset-children {
    display: none;
    padding-left: 32px;
}

.dataset-children.expanded {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Empty state */
.platforms-list:empty::after,
.clients-list:empty::after {
    content: 'No data available';
    display: block;
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

