:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #ffffff;
    
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-sm: 4px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --sidebar-width: 260px;
    --topbar-height: 64px;
    
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--secondary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #16a34a;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-icon.danger:hover {
    background: #fee2e2;
    color: var(--danger);
}

.btn-icon.success:hover {
    background: #dcfce7;
    color: var(--success);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header .logo-text {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 50;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    margin-right: 16px;
}

.topbar-title h1 {
    font-size: 18px;
    font-weight: 600;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.venue-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.venue-name {
    font-weight: 500;
    color: var(--text-primary);
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.user-btn:hover {
    background: var(--bg-tertiary);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.username {
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    padding: 8px 0;
    display: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    text-decoration: none;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.main-content {
    flex: 1;
    padding: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-card.large {
    flex-direction: column;
    gap: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.screens {
    background: #dbeafe;
    color: var(--primary);
}

.stat-icon.ads {
    background: #fef3c7;
    color: var(--warning);
}

.stat-icon.revenue {
    background: #dcfce7;
    color: var(--success);
}

.stat-icon.impressions {
    background: #f3e8ff;
    color: #a855f7;
}

.stat-icon.orders {
    background: #fee2e2;
    color: var(--danger);
}

.stat-icon.avg {
    background: #e0f2fe;
    color: var(--info);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-trend {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
}

.stat-trend.up {
    background: #dcfce7;
    color: var(--success);
}

.stat-trend.down {
    background: #fee2e2;
    color: var(--danger);
}

.stat-trend.pending {
    background: #fef3c7;
    color: var(--warning);
}

.stat-compare {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-label {
    font-size: 12px;
    color: var(--text-muted);
}

.compare-value {
    font-size: 13px;
    font-weight: 500;
}

.compare-value.up {
    color: var(--success);
}

.compare-value.down {
    color: var(--danger);
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-link {
    font-size: 13px;
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表格单元格省略号：超长内容在列表中截断显示，hover 显示完整内容 */
.cell-ellipsis {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.screen-list, .review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.screen-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.screen-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.screen-status.online {
    background: var(--success);
}

.screen-status.offline {
    background: var(--danger);
}

.screen-info {
    flex: 1;
    min-width: 0;
}

.screen-name {
    display: block;
    font-weight: 500;
}

.screen-location {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.screen-playing {
    font-size: 13px;
    color: var(--text-secondary);
}

.review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.review-info {
    flex: 1;
    min-width: 0;
}

.review-title {
    display: block;
    font-weight: 500;
}

.review-company {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.review-time {
    font-size: 12px;
    color: var(--text-muted);
}

.chart-container {
    min-height: 200px;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-muted);
    gap: 12px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
    gap: 12px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.search-box input {
    width: 240px;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: var(--bg-primary);
    cursor: pointer;
}

.select-sm {
    padding: 6px 10px;
    font-size: 13px;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

.data-table th.sortable {
    cursor: pointer;
}

.data-table th.sortable:hover {
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

.loading-cell, .empty-cell {
    text-align: center !important;
    padding: 40px !important;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.page-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.page-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-current {
    font-size: 13px;
    color: var(--text-secondary);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
}

.modal-content.modal-lg {
    max-width: 720px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-separator {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.online {
    background: #dcfce7;
    color: var(--success);
}

.status-badge.offline {
    background: #fee2e2;
    color: var(--danger);
}

.status-badge.warning {
    background: #fef3c7;
    color: var(--warning);
}

.status-badge.success {
    background: #dcfce7;
    color: var(--success);
}

.status-badge.danger {
    background: #fee2e2;
    color: var(--danger);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
}

.badge-warning {
    background: #fef3c7;
    color: var(--warning);
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 300;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    display: block;
    background: var(--success);
    color: white;
}

.toast.error {
    display: block;
    background: var(--danger);
    color: white;
}

.toast.warning {
    display: block;
    background: var(--warning);
    color: white;
}

.push-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.screen-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.checkbox-card {
    cursor: pointer;
}

.checkbox-card input {
    display: none;
}

.checkbox-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.checkbox-card input:checked + .checkbox-card-content {
    border-color: var(--primary);
    background: #eff6ff;
}

.checkbox-card:hover .checkbox-card-content {
    border-color: var(--primary-light);
}

.screen-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.screen-status-dot.online {
    background: var(--success);
}

.screen-status-dot.offline {
    background: var(--danger);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.push-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.history-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-icon.ad {
    background: #dbeafe;
    color: var(--primary);
}

.history-icon.notice {
    background: #fef3c7;
    color: var(--warning);
}

.history-icon.emergency {
    background: #fee2e2;
    color: var(--danger);
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.history-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.history-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
}

.history-status.success {
    background: #dcfce7;
    color: var(--success);
}

.history-status.pending {
    background: #fef3c7;
    color: var(--warning);
}

.history-status.failed {
    background: #fee2e2;
    color: var(--danger);
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-row {
    display: flex;
    gap: 16px;
}

.preview-row label {
    width: 100px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.data-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.date-range-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-range-picker label {
    color: var(--text-secondary);
}

.date-range-picker input {
    width: 140px;
}

.quick-ranges {
    display: flex;
    gap: 8px;
}

.quick-ranges .btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.data-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.data-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 13px;
}

.rank-badge.top {
    background: var(--warning);
    color: white;
}

.ad-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ad-thumb {
    width: 60px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.ad-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ad-title {
    font-weight: 500;
}

.ad-type {
    font-size: 12px;
    color: var(--text-muted);
}

.review-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.review-preview {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.review-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--border-radius);
}

.review-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-row label {
    font-size: 12px;
    color: var(--text-muted);
}

.info-row span {
    font-weight: 500;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .data-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .push-grid {
        grid-template-columns: 1fr;
    }
    
    .data-charts {
        grid-template-columns: 1fr;
    }
    
    .review-detail {
        grid-template-columns: 1fr;
    }
}

.stat-icon.play {
    background: #fef3c7;
    color: var(--warning);
}

.stat-icon.duration {
    background: #e0f2fe;
    color: var(--info);
}

.data-section {
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.revenue-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.revenue-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.revenue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.revenue-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.revenue-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
}

.revenue-badge.settled {
    background: #dcfce7;
    color: var(--success);
}

.revenue-badge.pending {
    background: #fef3c7;
    color: var(--warning);
}

.revenue-amount {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.revenue-detail {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.revenue-detail strong {
    color: var(--text-primary);
}

.split-ratio {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.split-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.split-label {
    width: 50px;
    font-size: 13px;
    color: var(--text-secondary);
}

.split-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.split-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.split-fill.platform {
    background: var(--primary);
}

.split-fill.venue {
    background: var(--success);
}

.split-fill.service {
    background: var(--warning);
}

.split-value {
    width: 40px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.chart-card {
    background: var(--bg-primary);
}

.chart-container {
    min-height: 280px;
    position: relative;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 280px;
}

.advertiser-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-mini-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.mini-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-overview {
        grid-template-columns: 1fr;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left, .toolbar-right {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .data-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-range-picker {
        flex-wrap: wrap;
    }
    
    .screen-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .revenue-overview {
        grid-template-columns: 1fr;
    }
    
    .advertiser-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
