* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #333;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

h1 {
    color: white;
    font-size: 2.5em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.stat-card .number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 1em;
    opacity: 0.9;
}

.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

td {
    padding: 16px 15px;
    border-bottom: 1px solid #f0f0f5;
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 根据状态给整行添加背景色 */
/* ✅ 正常 - 绿色 */
tbody tr.row-normal {
    background: linear-gradient(90deg, #f0fff4 0%, #fff 100%);
}

tbody tr.row-normal:hover {
    background: linear-gradient(90deg, #e6ffed 0%, #f0fff4 100%);
}

/* ⚠️ 即将到期 - 橙色 */
tbody tr.row-warning {
    background: linear-gradient(90deg, #fffbeb 0%, #fff 100%);
}

tbody tr.row-warning:hover {
    background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 100%);
}

/* ❌ 急需续费 - 红色 */
tbody tr.row-danger {
    background: linear-gradient(90deg, #fef2f2 0%, #fff 100%);
}

tbody tr.row-danger:hover {
    background: linear-gradient(90deg, #fee2e2 0%, #fef2f2 100%);
}

/* 🕑 已过期 - 灰色 */
tbody tr.row-expired {
    background: linear-gradient(90deg, #f7f7f7 0%, #fff 100%);
}

tbody tr.row-expired:hover {
    background: linear-gradient(90deg, #eceff1 0%, #f7f7f7 100%);
}

.name-cell {
    font-weight: 600;
    color: #667eea;
}

.provider-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    background: #f0f0f5;
    color: #666;
}

.price-cell {
    font-weight: 600;
    color: #2c3e50;
}

.days-cell {
    font-weight: 600;
    font-size: 1.1em;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: none;
}

/* ✅ 正常 */
.status-normal {
    background: #e6fffa;
    color: #007f5f;
    border: 1px solid #00b38f;
}

/* ⚠️ 即将到期 */
.status-warning {
    background: #fff8e1;
    color: #b26a00;
    border: 1px solid #ffb300;
}

/* ❌ 急需续费 */
.status-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

/* 🕑 已过期 */
.status-expired {
    background: #eceff1;
    color: #546e7a;
    border: 1px solid #b0bec5;
}

.notes-cell {
    color: #666;
    font-style: italic;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 大屏幕优化 */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }

    h1 {
        font-size: 3em;
    }

    .stats-cards {
        grid-template-columns: repeat(5, 1fr);
    }

    table {
        font-size: 1.05em;
    }
}

/* 平板横屏 */
@media (max-width: 1200px) {
    .container {
        padding: 25px;
    }

    .stats-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    h1 {
        font-size: 2.2em;
    }
}

/* 平板竖屏 */
@media (max-width: 900px) {
    body {
        padding: 30px 15px;
    }

    .container {
        padding: 20px;
        border-radius: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 12px 10px;
    }
}

/* 手机横屏 */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    h1 {
        font-size: 1.8em;
    }

    .container {
        padding: 15px;
    }

    .stats-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-card .number {
        font-size: 2em;
    }

    .stat-card .label {
        font-size: 0.9em;
    }

    table {
        font-size: 0.8em;
    }

    th, td {
        padding: 10px 6px;
    }

    th {
        font-size: 0.85em;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    body {
        padding: 15px 8px;
    }

    h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .container {
        padding: 12px;
        border-radius: 12px;
    }

    .stats-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-card .number {
        font-size: 2.2em;
    }

    .table-container {
        border-radius: 10px;
    }

    table {
        font-size: 0.75em;
    }

    th, td {
        padding: 8px 5px;
    }

    .provider-badge,
    .status-badge {
        font-size: 0.75em;
        padding: 4px 8px;
    }

    .name-cell {
        font-size: 0.9em;
    }
}

/* 超小屏设备 */
@media (max-width: 360px) {
    h1 {
        font-size: 1.3em;
    }

    .header {
        margin-bottom: 25px;
    }

    table {
        font-size: 0.7em;
    }

    th, td {
        padding: 6px 4px;
    }

    .stat-card .number {
        font-size: 1.8em;
    }

    .provider-badge,
    .status-badge {
        font-size: 0.7em;
        padding: 3px 6px;
    }
}

/* ============================================================= */
/*  续费按钮 – 永不变色 + 完全响应式 + 美观交互                */
/* ============================================================= */

/* 1. 基础样式（所有状态） */
.action-btn,
.action-btn:link,
.action-btn:visited,
.action-btn:hover,
.action-btn:active {
    display: inline-flex;           /* 让文字垂直居中 */
    align-items: center;
    justify-content: center;
    gap: 4px;                       /* 图标与文字间距 */
    min-width: 80px;                /* 防止按钮太窄 */
    padding: 0.45rem 0.9rem;        /* 相对单位，自动随字体放大/缩小 */
    font-size: 0.9rem;              /* 基准字号 */
    font-weight: 500;
    line-height: 1.4;
    color: #fff !important;         /* 永不变色 */
    text-decoration: none !important;
    background: #6366f1;            /* 主色（indigo-600） */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

/* 2. 悬停/聚焦（微交互） */
.action-btn:hover,
.action-btn:focus {
    background: #4f46e5;            /* 稍深的 indigo-700 */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

/* 3. 按下状态 */
.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
}

/* ============================================================= */
/*  响应式字号 & 间距（覆盖你原有的媒体查询）               */
/* ============================================================= */

/* 大屏幕（≥1600px） */
@media (min-width: 1600px) {
    .action-btn { font-size: 1rem; padding: 0.55rem 1rem; }
}

/* 平板横屏（≤1200px） */
@media (max-width: 1200px) {
    .action-btn { font-size: 0.88rem; padding: 0.42rem 0.85rem; }
}

/* 平板竖屏（≤900px） */
@media (max-width: 900px) {
    .action-btn { font-size: 0.85rem; padding: 0.4rem 0.8rem; min-width: 70px; }
}

/* 手机横屏（≤768px） */
@media (max-width: 768px) {
    .action-btn { font-size: 0.82rem; padding: 0.38rem 0.75rem; min-width: 65px; }
}

/* 小屏手机（≤480px） */
@media (max-width: 480px) {
    .action-btn { 
        font-size: 0.78rem; 
        padding: 0.35rem 0.7rem; 
        min-width: 60px;
        gap: 3px;               /* 图标与文字间距稍收紧 */
    }
}

/* 超小屏（≤360px） */
@media (max-width: 360px) {
    .action-btn { 
        font-size: 0.75rem; 
        padding: 0.32rem 0.65rem; 
        min-width: 55px;
    }
}

/* ============================================================= */
/*  可选：让图标随文字等比例缩放（如果你用了 emoji）           */
/* ============================================================= */
.action-btn::before {
    font-size: 1.1em;               /* 图标略大一点 */
    line-height: 1;
}