* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

/* 按钮 */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-logout {
    padding: 8px 16px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-small {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-small:hover {
    background: #2980b9;
}

/* 错误消息 */
.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.result-message {
    margin-top: 20px;
    padding: 15px;
    background: #d4edda;
    border-radius: 8px;
    color: #155724;
}

/* 主界面 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-brand h2 {
    color: #667eea;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user span {
    color: #666;
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card.valid {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.stat-card.in-use {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-card.expired {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 标签页 */
.tabs {
    background: white;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    gap: 10px;
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.tab:hover {
    background: #f5f5f5;
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 内容区域 */
.content {
    background: white;
    padding: 30px;
    border-radius: 0 0 12px 12px;
    min-height: 500px;
}

.tab-content h3 {
    color: #333;
    margin-bottom: 20px;
}

/* 表格 */
.account-table,
.key-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.account-table th,
.account-table td,
.key-table th,
.key-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.account-table th,
.key-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.account-table tbody tr:hover,
.key-table tbody tr:hover {
    background: #f5f7fa;
}

/* 密钥列表（卡片式） */
.key-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.key-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.key-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.key-card-header .key-code {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    word-break: break-all;
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 6px;
}

.key-card-btn {
    margin-left: auto;
}

.key-card-body {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px 24px;
}

.key-card-body li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.key-label {
    font-size: 12px;
    color: #666;
}

.key-value {
    font-size: 14px;
    color: #333;
}

/* 徽章 */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge.pro-trial {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge.free {
    background: #fff3e0;
    color: #f57c00;
}

.badge.used {
    background: #ffebee;
    color: #c62828;
}

.badge.unused {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-enabled {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-disabled {
    background: #ffecb3;
    color: #f57c00;
}

.ml-1 { margin-left: 6px; }

/* 密钥生成 */
.key-generate {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.key-generate label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.generated-key {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.generated-key h4 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.key-display {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.key-display code {
    flex: 1;
    background: white;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.key-code {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.key-info {
    color: #666;
    font-size: 14px;
}

/* 账号数量显示徽章 */
.account-count-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.account-count-badge.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.account-count-badge strong {
    font-size: 16px;
    font-weight: 700;
}

/* 定时刷新设置页面样式 */
.card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 当前配置显示 */
.current-schedule {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.current-schedule strong {
    display: block;
    color: #333;
    margin-bottom: 10px;
}

.time-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.time-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 时间输入 */
.time-inputs {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.time-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.time-input-row:last-child {
    margin-bottom: 0;
}

.time-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
}

.time-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 次要按钮 */
.btn-secondary {
    padding: 12px 24px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* 危险按钮 */
.btn-danger {
    background: #e74c3c !important;
}

.btn-danger:hover {
    background: #c0392b !important;
}

/* 成功按钮 */
.btn-success {
    background: #27ae60 !important;
}

.btn-success:hover {
    background: #229954 !important;
}

/* 调度器状态 */
.scheduler-status {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    color: #666;
    font-weight: 500;
    min-width: 100px;
}

.status-running {
    color: #27ae60;
    font-weight: 600;
}

.status-stopped {
    color: #e74c3c;
    font-weight: 600;
}

/* 任务列表 */
.jobs-list {
    margin-top: 15px;
}

.jobs-list h5 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.scheduler-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.scheduler-table th,
.scheduler-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.scheduler-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.scheduler-table tbody tr:hover {
    background: #f5f7fa;
}

/* 信息列表 */
.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 10px 0;
    padding-left: 10px;
    color: #555;
    line-height: 1.6;
    border-left: 3px solid #667eea;
    margin-bottom: 8px;
    background: white;
    padding: 12px;
    border-radius: 6px;
}

.info-list li:last-child {
    margin-bottom: 0;
}

/* 提示文字 */
.hint {
    color: #3498db;
    font-size: 14px;
    margin-top: 15px;
    padding: 10px 15px;
    background: #ebf5fb;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .account-table,
    .key-table {
        font-size: 12px;
    }
    
    .account-table th,
    .account-table td,
    .key-table th,
    .key-table td {
        padding: 8px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }
    
    .time-input-row {
        flex-direction: column;
        align-items: stretch;
    }
}


