/* 
 * oshi-tabi 自动测速系统 - 样式表
 * 深色主题 + 玻璃态设计
 */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* 日间模式 */
body.light-mode {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* 头部 */
.header {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* 主容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stat-value.success {
    color: var(--accent-success);
}

.stat-value.warning {
    color: var(--accent-warning);
}

.stat-value.danger {
    color: var(--accent-danger);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-warning {
    background: var(--accent-warning);
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 账号列表 */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 100%;
}

.account-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
}

.account-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
}

.account-card.disabled {
    opacity: 0.6;
    border-color: var(--accent-danger);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.account-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.account-info .username {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.account-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.account-status.enabled {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

.account-status.disabled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.account-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.account-details .detail-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.account-details .detail-value {
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
}

.account-details .detail-value.success {
    color: var(--accent-success);
}

.account-details .detail-value.warning {
    color: var(--accent-warning);
}

.account-details .detail-value.error {
    color: var(--accent-danger);
}

.account-details .detail-value.rare {
    color: #fbbf24;
    font-weight: 600;
}

.account-actions {
    display: flex;
    gap: 0.5rem;
}

.account-actions+.account-actions {
    margin-top: 0.5rem;
}

.account-actions .btn {
    flex: 1;
}

/* 抽奖历史面板 */
.history-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 1.5rem;
    overflow: hidden;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.history-header:hover {
    background: var(--bg-glass);
}

.history-header h3 {
    margin: 0;
    font-size: 1rem;
}

.history-summary {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toggle-icon {
    transition: transform 0.2s;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.history-content {
    padding: 0 1rem 1rem;
}

.history-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tab-btn {
    padding: 0.4rem 0.8rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.tab-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.history-list {
    max-height: 250px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    background: var(--bg-glass);
    font-size: 0.85rem;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.history-date {
    font-weight: 500;
}

.history-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
}

.history-stats .rare {
    color: var(--accent-warning);
}

/* 日志面板 */
.log-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.log-panel h3 {
    margin-bottom: 1rem;
}

.log-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
}

.log-entry {
    margin-bottom: 0.5rem;
}

.log-entry.success {
    color: var(--accent-success);
}

.log-entry.error {
    color: var(--accent-danger);
}

.log-entry.info {
    color: var(--accent-primary);
}

.log-entry.warning {
    color: var(--accent-warning);
}

.log-time {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--accent-success);
}

.toast.error {
    border-left: 4px solid var(--accent-danger);
}

.toast.info {
    border-left: 4px solid var(--accent-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .accounts-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   简版视图样式
   ========================================= */

.accounts-compact {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.compact-header {
    display: grid;
    grid-template-columns: 1fr 1.5fr 0.8fr 2fr 2fr;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.compact-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 0.8fr 2fr 2fr;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.compact-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.compact-row:last-child {
    border-bottom: none;
}

.compact-row.disabled {
    opacity: 0.5;
}

.compact-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-col.name {
    font-weight: 500;
    color: var(--text-primary);
}

.compact-col.password {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.compact-col.last-test {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.compact-col.cert-status {
    font-size: 0.75rem;
}

.compact-col.cert-status.success {
    color: var(--accent-success);
}

.compact-col.cert-status.warning {
    color: var(--accent-warning);
}

.compact-col.actions {
    display: flex;
    gap: 0.25rem;
}

/* 超小按钮 */
.btn-xs {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 4px;
    min-width: unset;
}

/* 简版视图响应式 */
@media (max-width: 900px) {

    .compact-header,
    .compact-row {
        grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr 1fr;
        font-size: 0.75rem;
    }

    .compact-col.password {
        font-size: 0.65rem;
    }
}

/* =========================================
   临时账号样式
   ========================================= */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header .section-title {
    margin-bottom: 0;
}

.add-account-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
    width: 130px;
}

.input-sm:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.temp-badge {
    display: inline-block;
    background: var(--accent-warning);
    color: #000;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    margin-left: 0.3rem;
    font-weight: 600;
}

.account-card.temp-account {
    border-left: 3px solid var(--accent-warning);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* 紧凑统计栏 */
.stats-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stats-compact .stat-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.stats-compact .stat-divider {
    color: var(--border-color);
}

/* 用户信息 */
.user-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* =========================================
   抽奖页面样式
   ========================================= */

/* 统计卡片增强 */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
}

.stat-content {
    flex: 1;
}

/* 批量操作 */
.batch-actions {
    display: flex;
    gap: 0.75rem;
}

/* 抽奖账号列表 */
.lottery-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.lottery-account-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.lottery-account-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
}

.lottery-account-card .account-info {
    flex: 1;
}

.lottery-account-card .account-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.lottery-account-card .lottery-status {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lottery-account-card .status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.lottery-account-card .status-badge.done {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

.lottery-account-card .status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

.lottery-account-card .account-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-disabled {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Toast warning */
.toast-warning,
.toast.warning {
    border-left: 4px solid var(--accent-warning);
    background: rgba(245, 158, 11, 0.15);
}

.toast-success {
    border-left: 4px solid var(--accent-success);
}

/* Fade out animation */
.toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 抽奖页面响应式 */
@media (max-width: 768px) {
    .lottery-accounts-grid {
        grid-template-columns: 1fr;
    }

    .lottery-account-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .lottery-account-card .account-actions {
        justify-content: flex-end;
    }

    .batch-actions {
        flex-direction: column;
        width: 100%;
    }

    .batch-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   历史记录表格样式
   ========================================= */

.history-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.history-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.history-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.history-table td {
    font-size: 0.9rem;
}

.history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.rare-highlight {
    color: var(--accent-warning);
    font-weight: 600;
}

/* 历史表格响应式 */
@media (max-width: 768px) {

    .history-table th,
    .history-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* =========================================
   调度配置页面样式
   ========================================= */

.config-form-container {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Fira Code', monospace;
    transition: var(--transition);
    max-width: 200px;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked+.toggle-label {
    background: var(--accent-success);
}

.toggle-switch input:checked+.toggle-label::after {
    left: 27px;
}

/* Execution Log */
.execution-log {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.log-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.log-item:last-child {
    border-bottom: none;
}

.log-label {
    color: var(--text-secondary);
}

.log-value {
    font-family: 'Fira Code', monospace;
    color: var(--text-primary);
}

/* 调度页面响应式 */
@media (max-width: 768px) {
    .config-form-container {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .form-input {
        max-width: 100%;
    }
}

/* =========================================
   紧凑布局样式 (抽奖页面)
   ========================================= */

.container.compact {
    padding: 1rem 2rem;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.stats-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.stat-item {
    color: var(--text-secondary);
}

.stat-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.scheduler-info {
    color: var(--text-secondary);
    opacity: 0.8;
}

/* 调度器内联控制 */
.scheduler-config {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.config-label {
    color: var(--text-secondary);
    white-space: nowrap;
}

.scheduler-config .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
    width: auto;
    height: auto;
    background: none;
}

.scheduler-config .toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-block;
}

.scheduler-config .toggle-label span {
    display: inline-block;
}

.input-time {
    padding: 0.3rem 0.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.input-time:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-xs {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}


/* 紧凑区块 */
.section-compact {
    margin-bottom: 1rem;
}

.section-compact h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.section-header-inline h3 {
    margin-bottom: 0;
}

/* 账号表格 */
.accounts-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.85rem;
    table-layout: fixed;
}

.accounts-table th,
.accounts-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.accounts-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
}

/* 列宽控制 */
.accounts-table th:nth-child(1),
.accounts-table td:nth-child(1) {
    width: auto;
    text-align: left;
}

.accounts-table th:nth-child(2),
.accounts-table td:nth-child(2),
.accounts-table th:nth-child(3),
.accounts-table td:nth-child(3) {
    width: 50px;
    text-align: center;
}

.accounts-table th:nth-child(4),
.accounts-table td:nth-child(4) {
    width: 80px;
    text-align: center;
}

.accounts-table tr:last-child td {
    border-bottom: none;
}

.accounts-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accounts-table .account-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.accounts-table .status-done {
    color: var(--accent-success);
}

.accounts-table .status-pending {
    color: var(--accent-warning);
}

.accounts-table .actions {
    display: flex;
    gap: 0.25rem;
}

/* 迷你按钮 */
.btn-mini {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-mini.primary {
    background: var(--accent-primary);
    color: white;
}

.btn-mini.primary:hover {
    background: var(--accent-secondary);
}

.btn-mini.secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-mini.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-mini.disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

/* 紧凑日志 */
.log-panel.compact {
    padding: 0.75rem;
    max-height: 150px;
}

.log-panel.compact h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.log-panel.compact .log-content {
    max-height: 100px;
    font-size: 0.8rem;
}

/* 紧凑历史表格 */
.section-compact .history-table-container {
    margin-bottom: 0;
}

.section-compact .history-table th,
.section-compact .history-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-inline {
        font-size: 0.8rem;
    }

    .batch-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .batch-actions .btn {
        flex: 1;
        justify-content: center;
    }
}