:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #6366f1;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --info: #0284c7;
    --gray: #64748b;
    --light-gray: #94a3b8;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --text-light: #64748b;
    --dark: #1e293b;
    --sidebar-width: 260px;
    --header-height: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg-light);
}

body {
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark);
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-dark);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-dark);
}

.btn-outline {
    border: 1px solid var(--border);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: #f1f5f9;
}

.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark);
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #f1f5f9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--primary);
}

.stat-card.secondary {
    border-top-color: var(--secondary);
}

.stat-card.success {
    border-top-color: var(--success);
}

.stat-card.danger {
    border-top-color: var(--danger);
}

.stat-card.warning {
    border-top-color: var(--warning);
}

.stat-card.info {
    border-top-color: var(--info);
}

.stat-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-light);
}

.stat-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark);
}

.stat-card .card-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 50px;
    margin-bottom: 5px;
}

.stat-change.positive {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-change.negative {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.table th {
    font-weight: 600;
    color: var(--dark);
    background-color: #f8fafc;
}

.table tr:last-child td {
    border-bottom: none;
}

.row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.col-half {
    flex: 1;
    min-width: 0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    background-color: transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-icon:hover {
    background-color: #f1f5f9;
    color: var(--dark);
}

.chart-wrapper {
    height: 250px;
    position: relative;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title h1 {
    margin-bottom: 5px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    margin: 0 8px;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-info {
    background-color: rgba(2, 132, 199, 0.1);
    color: var(--info);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotate 0.8s linear infinite;
}

/* 平台特定颜色 */
.platform-tiktok {
    background: #000000;
}

.platform-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.platform-facebook {
    background: #4267B2;
}

.platform-youtube {
    background: #FF0000;
}

.platform-twitter {
    background: #1DA1F2;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-actions {
        margin-top: 15px;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .row-grid {
        grid-template-columns: 1fr;
    }
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.sidebar-menu {
    padding: 20px 0;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.menu-title {
    padding: 10px 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 500;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark);
    transition: all 0.3s ease;
    position: relative;
}

.menu-item:hover {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
}

.menu-item.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
}

.menu-item i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.menu-item .badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.submenu {
    padding-left: 44px;
    display: none;
}

.submenu.show {
    display: block;
}

.submenu .menu-item {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
}

/* Header */
.header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    font-size: 1.2rem;
    margin-right: 15px;
    cursor: pointer;
    color: var(--gray);
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px 8px 35px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.header-right {
    display: flex;
    align-items: center;
}

.header-icon {
    font-size: 1.2rem;
    color: var(--gray);
    margin-left: 20px;
    cursor: pointer;
    position: relative;
}

.header-icon:hover {
    color: var(--primary);
}

.header-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-left: 20px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-role {
    font-size: 0.7rem;
    color: var(--gray);
}

/* Content */
.content {
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-title h1 {
    font-size: 1.5rem;
    color: var(--dark);
}

.page-title .breadcrumb {
    display: flex;
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 5px;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 5px;
}

.page-actions .btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-actions .btn i {
    margin-right: 5px;
}

.page-actions .btn:hover {
    background: var(--primary-dark);
}

.page-actions .btn-secondary {
    background: var(--secondary);
}

.page-actions .btn-secondary:hover {
    background: #e67e22;
}

/* Cards */
.card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-actions {
    display: flex;
}

.card-actions .btn-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-actions .btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card.secondary::before {
    background: var(--secondary);
}

.stat-card.success::before {
    background: var(--success);
}

.stat-card.danger::before {
    background: var(--danger);
}

.stat-title {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-change i {
    margin-right: 3px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(37, 99, 235, 0.02);
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--secondary);
}

.status.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 500;
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-text .name {
    font-weight: 500;
}

.user-text .email {
    font-size: 0.8rem;
    color: var(--gray);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-avatar {
    margin-right: 10px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    margin-bottom: 5px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Grid Layout */
.row-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container-large {
    grid-column: span 2;
}

.chart-container-small {
    grid-column: span 1;
}

.col-half {
    grid-column: span 1;
}

.col-full {
    grid-column: span 2;
}

@media (min-width: 992px) {
    .row-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Chart Styles */
.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn i {
    margin-right: 5px;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: #e67e22;
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #0d9668;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    margin-right: 0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        left: -100%;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .search-bar {
        width: 200px;
    }
    
    .header-icon {
        margin-left: 15px;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        display: none;
    }
} 