/* ============================================
   短视频去水印小程序 - 管理后台样式
   ============================================ */

/* Font Awesome 图标字体 */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #303133;
    line-height: 1.6;
    font-size: 14px;
}

a {
    color: #CC7A5C;
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: #B86A70;
}

/* 侧边栏 - 深色现代化设计 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    background: rgba(0,0,0,0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255,255,255,0.65);
    transition: all 0.25s;
    font-size: 14px;
    margin: 2px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.nav-item.active {
    color: #fff;
    background: rgba(204,122,92,0.2);
    box-shadow: 0 2px 6px rgba(204,122,92,0.2);
}

.nav-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.1);
}

.admin-info {
    margin-bottom: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.btn-logout {
    display: block;
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(255,77,79,0.8);
    color: #fff;
}

/* 主内容区 */
.main-content {
    margin-left: 220px;
    min-height: 100vh;
    background: #f5f7fa;
}

/* 顶部导航栏 */
.topbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-item {
    color: #303133;
    font-weight: 600;
    font-size: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    color: #606266;
}

.topbar-btn i {
    font-size: 18px;
}

.topbar-btn:hover i {
    color: #CC7A5C;
}

/* 旋转动画 */
@keyframes fa-spin-custom {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.topbar-btn:active i {
    animation: fa-spin-custom 0.5s linear;
}


.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.topbar-user:hover {
    background: #f5f7fa;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CC7A5C, #B86A70);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(204,122,92,0.3);
}

.user-avatar i {
    font-size: 16px;
}

.user-name {
    font-size: 14px;
    color: #303133;
    font-weight: 500;
}

.user-dropdown-icon {
    font-size: 10px;
    color: #909399;
}

/* 页面内容区 */
.page-content {
    padding: 24px 32px;
}

/* 旧页面头部（已废弃，保留兼容） */
.page-header {
    display: none;
}

.page-header h2 {
    font-size: 24px;
    color: #1a1a2e;
    font-weight: 600;
}

.page-header span {
    font-size: 14px;
    color: #999;
}

/* 统计卡片 - 参考图片样式重构 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    border: 1px solid #f0f2f5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* 上部：图标 + 今日数据 */
.stat-card-top {
    padding: 20px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-info-main {
    flex: 1;
}

.stat-label-small {
    font-size: 12px;
    color: #909399;
    margin-bottom: 4px;
    display: block;
}

.stat-value-big {
    font-size: 24px;
    font-weight: 700;
    color: #303133;
    line-height: 1.2;
}

.stat-unit {
    font-size: 13px;
    font-weight: 400;
    color: #909399;
    margin-left: 4px;
}

/* 中部：周月对比数据 */
.stat-card-mid {
    padding: 12px 15px;
    border-top: 1px solid #f5f7fa;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #606266;
}

.stat-compare-item span {
    color: #909399;
    margin-right: 4px;
}

.stat-compare-item b {
    color: #303133;
    font-weight: 600;
}

/* 下部：总计行 */
.stat-card-bottom {
    padding: 15px;
    border-top: 1px solid #f5f7fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfdfe;
}

.stat-total-label {
    font-size: 13px;
    color: #606266;
    font-weight: 500;
}

.stat-total-value {
    font-size: 18px;
    font-weight: 700;
    color: #303133;
}

/* 主题颜色适配 */
.theme-green { --box-bg: #f0f9eb; --box-color: #67c23a; }
.theme-blue { --box-bg: #ecf5ff; --box-color: #409eff; }
.theme-yellow { --box-bg: #fdf6ec; --box-color: #e6a23c; }
.theme-red { --box-bg: #fff1f0; --box-color: #f5222d; }
.theme-purple { --box-bg: #f9f0ff; --box-color: #722ed1; }

.stat-icon-box {
    background: var(--box-bg);
    color: var(--box-color);
}




/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

/* 两列卡片布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.card-header h3 {
    font-size: 16px;
    color: #1a1a2e;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* 平台分布 */
.platform-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.platform-name {
    width: 70px;
    font-size: 13px;
    color: #666;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin: 0 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #CC7A5C, #B86A70);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.platform-count {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* 图表 */
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    padding: 20px 0;
    border-bottom: 2px solid #e4e7ed;
    position: relative;
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.chart-bar {
    width: 40px;
    background: linear-gradient(180deg, #CC7A5C 0%, #B86A70 100%);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    position: relative;
    transition: all 0.6s ease;
    box-shadow: 0 2px 8px rgba(204,122,92,0.3);
}

.chart-bar:hover {
    transform: scaleY(1.05);
    box-shadow: 0 4px 12px rgba(204,122,92,0.4);
}

.bar-tooltip {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #303133;
    font-weight: 600;
    white-space: nowrap;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bar-label {
    margin-top: 10px;
    font-size: 12px;
    color: #909399;
    font-weight: 500;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    color: #606266;
    font-weight: 600;
    border-bottom: 2px solid #e4e7ed;
    white-space: nowrap;
    background: #fafafa;
}

.table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid #ebeef5;
    color: #606266;
}

.table tr:hover td {
    background: #f5f7fa;
}

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    background: #E8DDD7;
    color: #CC7A5C;
}

/* 状态 */
.status-success {
    color: #52c41a;
    font-weight: 500;
}

.status-fail {
    color: #ff4d4f;
    font-weight: 500;
}

/* 头像 */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 16px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    color: #606266;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 500;
}

.btn:hover {
    border-color: #CC7A5C;
    color: #CC7A5C;
    background: #fff8f5;
}

.btn-primary {
    background: linear-gradient(135deg, #CC7A5C, #B86A70);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(204,122,92,0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    color: #fff;
    box-shadow: 0 4px 12px rgba(204,122,92,0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: #52c41a;
    color: #fff;
    border-color: transparent;
}

.btn-warning {
    background: #faad14;
    color: #fff;
    border-color: transparent;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
    border-color: transparent;
}

.btn-danger:hover {
    background: #ff7875;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,77,79,0.3);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #CC7A5C;
    box-shadow: 0 0 0 3px rgba(204,122,92,0.15);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

/* 搜索表单 */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form input,
.search-form select {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.search-form input:focus,
.search-form select:focus {
    border-color: #CC7A5C;
}

.search-form input {
    width: 240px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.page-info {
    font-size: 13px;
    color: #999;
}

/* 提示框 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.alert-error {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* 登录页 */
.login-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 26px;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    font-size: 14px;
    color: #909399;
}

.login-card .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f5f7fa;
}

.login-card .form-group input:focus {
    background: #fff;
    border-color: #CC7A5C;
    box-shadow: 0 0 0 3px rgba(204,122,92,0.15);
}

.login-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 12px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ebeef5;
    font-size: 12px;
    color: #909399;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-header h2,
    .sidebar-header p,
    .nav-item span:not(.nav-icon),
    .admin-info {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    .nav-icon {
        margin-right: 0;
    }
    .main-content {
        margin-left: 60px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
