/**
 * Starlink Dashboard V22.0 - 清爽卡片风格
 * 🌸 萌神重构：参考目标截图的简约美学
 */

:root {
    /* 主色调 */
    --db-primary: #3b82f6;
    --db-primary-light: #eff6ff;
    --db-success: #22c55e;
    --db-success-light: #f0fdf4;
    --db-warning: #f97316;
    --db-warning-light: #fff7ed;

    /* 渐变 - 柔和淡雅版 */
    --db-banner-gradient: linear-gradient(135deg, #93b4ff 0%, #b4a0fa 50%, #d8c4fc 100%);

    /* 背景与卡片 */
    --db-bg: #f8fafc;
    --db-card: #ffffff;

    /* 文字 */
    --db-text: #1e293b;
    --db-text-secondary: #64748b;
    --db-text-muted: #94a3b8;

    /* 边框阴影 */
    --db-border: #e2e8f0;
    --db-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --db-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* ═══════════════════════════════════════
   欢迎横幅 - 渐变背景 + 装饰圆
   ═══════════════════════════════════════ */
.db-banner {
    background: var(--db-banner-gradient);
    position: relative;
    overflow: hidden;
}

.db-banner::before {
    content: '';
    position: absolute;
    left: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.db-banner::after {
    content: '';
    position: absolute;
    left: 60px;
    bottom: -60px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

/* ═══════════════════════════════════════
   卡片基础 - 带底部光晕和交互效果
   ═══════════════════════════════════════ */
.db-card {
    background: var(--db-card);
    border-radius: 20px;
    box-shadow:
        var(--db-shadow),
        0 8px 24px -8px rgba(99, 102, 241, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 底部渐变光晕 */
.db-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4), transparent);
    border-radius: 0 0 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

/* 卡片悬浮效果 */
.db-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 28px -8px rgba(99, 102, 241, 0.15),
        0 8px 16px -8px rgba(0, 0, 0, 0.1);
}

.db-card:hover::after {
    opacity: 1;
    width: 80%;
}

/* ═══════════════════════════════════════
   用户头像 - 渐变边框圆形
   ═══════════════════════════════════════ */
.db-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    padding: 3px;
    position: relative;
}

.db-avatar-sm {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    padding: 2px;
    position: relative;
}

.db-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
}

.db-avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
}

.db-avatar-status-sm {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
}

/* ═══════════════════════════════════════
   财务卡片 - 浅色背景 + 箭头
   ═══════════════════════════════════════ */
.db-finance-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.db-finance-card:hover {
    background: #f1f5f9;
}

.db-finance-card .arrow {
    color: var(--db-primary);
    opacity: 0.6;
}

/* 财务卡片 - 迷你版（单行布局用） */
.db-finance-card-mini {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 14px;
    transition: background 0.2s;
}

.db-finance-card-mini:hover {
    background: #f1f5f9;
}

/* ═══════════════════════════════════════
   统计卡片 - 彩色圆形图标
   ═══════════════════════════════════════ */
.db-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-stat-icon.blue {
    background: var(--db-primary);
    color: white;
}

.db-stat-icon.green {
    background: var(--db-success);
    color: white;
}

.db-stat-icon.orange {
    background: var(--db-warning);
    color: white;
}

/* 统计图标 - 小号版 */
.db-stat-icon-sm {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-stat-icon-sm.blue {
    background: var(--db-primary);
    color: white;
}

.db-stat-icon-sm.green {
    background: var(--db-success);
    color: white;
}

.db-stat-icon-sm.orange {
    background: var(--db-warning);
    color: white;
}

/* 统计项悬浮效果 - 彩色背景 */
.db-stat-item {
    cursor: pointer;
}

.db-stat-item.blue:hover {
    background: rgba(59, 130, 246, 0.08);
}

.db-stat-item.green:hover {
    background: rgba(34, 197, 94, 0.08);
}

.db-stat-item.orange:hover {
    background: rgba(249, 115, 22, 0.08);
}

.db-stat-item:hover .db-stat-icon-sm {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* ═══════════════════════════════════════
   快捷功能 - 描边圆形图标
   ═══════════════════════════════════════ */
.db-shortcut-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.db-shortcut-item:hover .db-shortcut-icon {
    border-color: var(--db-primary);
    color: var(--db-primary);
    background: var(--db-primary-light);
}

/* ═══════════════════════════════════════
   安全评分圆环 - 绿色进度
   ═══════════════════════════════════════ */
.db-score-circle {
    width: 120px;
    height: 120px;
    position: relative;
}

.db-score-circle svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.db-score-circle .bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 10;
}

.db-score-circle .progress {
    fill: none;
    stroke: var(--db-success);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 314.159;
    stroke-dashoffset: 0;
}

.db-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* 安全评分圆环 - 小号版 */
.db-score-circle-sm {
    width: 90px;
    height: 90px;
    position: relative;
}

.db-score-circle-sm svg {
    width: 90px;
    height: 90px;
    transform: rotate(-90deg);
}

.db-score-circle-sm .bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.db-score-circle-sm .progress {
    fill: none;
    stroke: var(--db-success);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 263.89;
    stroke-dashoffset: 0;
}

.db-score-text-sm {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* ═══════════════════════════════════════
   安全项目 - 勾选标记
   ═══════════════════════════════════════ */
.db-security-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.db-security-item-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.db-security-check {
    width: 20px;
    height: 20px;
    background: var(--db-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-left: auto;
}

.db-security-check.pending {
    background: #f59e0b;
}

/* 安全项目 - 小号版 */
.db-security-item-sm {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.db-security-item-icon-sm {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
}

.db-security-check-sm {
    width: 16px;
    height: 16px;
    background: var(--db-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.db-security-check-sm.pending {
    background: #f59e0b;
}

/* 安全评分 - 中号版（安全中心用） */
.db-score-md {
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-score-md svg {
    position: absolute;
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.db-score-md .bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 4;
}

.db-score-md .progress {
    fill: none;
    stroke: var(--db-success);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 125.66;
    transition: stroke-dashoffset 0.5s ease;
}

.db-score-md span {
    position: relative;
    z-index: 1;
}

/* 安全评分 - 迷你版（状态条用） */
.db-score-mini {
    width: 36px;
    height: 36px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-score-mini svg {
    position: absolute;
    width: 36px;
    height: 36px;
    transform: rotate(-90deg);
}

.db-score-mini .bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.db-score-mini .progress {
    fill: none;
    stroke: var(--db-success);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 94.25;
    stroke-dashoffset: 0;
}

.db-score-mini span {
    position: relative;
    z-index: 1;
}

/* 安全状态点 */
.db-security-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
}

.db-security-dot.active {
    background: var(--db-success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.db-security-dot.pending {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* ═══════════════════════════════════════
   新闻日期徽章
   ═══════════════════════════════════════ */
.db-date-badge {
    min-width: 44px;
    height: 44px;
    background: var(--db-primary-light);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════
   服务分类项
   ═══════════════════════════════════════ */
.db-service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    transition: background 0.2s;
}

.db-service-item:hover {
    background: #f1f5f9;
}

.db-service-icon {
    width: 40px;
    height: 40px;
    background: var(--db-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* ═══════════════════════════════════════
   响应式 — 萌神 2026-02-26 终极移动端修复
   ═══════════════════════════════════════ */
@media (max-width: 991.98px) {

    /* 欢迎横幅：纵向堆叠 */
    .db-banner {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 20px !important;
        gap: 16px !important;
    }

    /* 按钮区域：横排小按钮 */
    .db-banner .flex.gap-3 {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .db-banner .flex.gap-3 a {
        padding: 8px 16px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    /* 快捷功能网格 4 列 */
    .db-shortcuts-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }

    /* 安全状态条：换行 */
    .flex-1.flex.items-center.justify-end.gap-6 {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }
}

@media (max-width: 575.98px) {
    .db-shortcuts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .db-banner .flex.gap-3 a {
        flex: 1 !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .db-avatar-sm {
        width: 44px;
        height: 44px;
    }

    .db-avatar-inner {
        font-size: 1rem;
    }
}