
.draw-history-section {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
}
.dh-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-dark);
}
.dh-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.dh-tab:hover { color: var(--text-primary); }
.dh-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}
.dh-table-wrap { overflow-x: auto; }
.dh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.dh-table thead th {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid var(--border-dark);
}
.dh-table tbody td {
    padding: 10px 12px;
    text-align: center;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-dark);
}
.dh-table tbody tr:last-child td { border-bottom: none; }
.dh-table tbody tr:hover { background: rgba(0, 0, 0, 0.03); }

/* 행 구분선 대비 강화 — 기존 var(--border-dark)가 배경과 비슷해 라이트·다크 모두 안 보이던 문제 보정 */
.dh-table thead th,
.dh-table tbody td { border-bottom: 1px solid #9aa3b2 !important; }
.dh-table tbody tr:last-child td { border-bottom: none !important; }
[data-theme="dark"] .dh-table thead th,
[data-theme="dark"] .dh-table tbody td { border-bottom: 1px solid #56657a !important; }
[data-theme="dark"] .dh-table tbody tr:last-child td { border-bottom: none !important; }
[data-theme="dark"] .dh-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }

.dh-col-no       { width: 80px; color: var(--text-muted); font-family: monospace; }
.dh-col-type     { width: 80px; white-space: nowrap; }
.dh-col-result   { width: 60px; }
.dh-col-amount   { width: 100px; font-family: monospace; }
.dh-col-nick     { text-align: left !important; padding-left: 96px !important; }
.dh-col-time     { width: 150px; color: var(--text-muted); font-family: monospace; white-space: nowrap; }
.dh-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.dh-badge-weekly  { background: rgba(234,179,8,0.15); color: #a16207; }
.dh-badge-daily { background: rgba(59,130,246,0.15); color: #3b82f6; }
.dh-badge-win    { color: #1ea459; font-weight: 700; }
.dh-badge-lose   { color: var(--text-muted); }
.dh-badge-cancelled { color: #ef4444; font-weight: 700; }
.dh-row-cancelled td {
    color: var(--text-muted) !important;
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.04);
}
.dh-row-cancelled .dh-cancel-info {
    text-decoration: none !important;
    font-size: 11px;
    color: #ef4444;
    margin-left: 6px;
}
.dh-col-admin { width: 80px; }
.dh-cancel-btn, .dh-restore-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.dh-cancel-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}
.dh-cancel-btn:hover { background: rgba(239, 68, 68, 0.25); }
.dh-restore-btn {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #1ea459;
}
.dh-restore-btn:hover { background: rgba(34, 197, 94, 0.28); }
.dh-cancel-btn:disabled, .dh-restore-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.dh-empty {
    padding: 40px 12px !important;
    color: var(--text-muted);
    text-align: center !important;
}
.dh-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.dh-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.dh-page-btn:hover:not(:disabled):not(.active) {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--accent-primary);
}
.dh-page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
    font-weight: 700;
}
.dh-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 768px) {
    .draw-history-section { padding: 16px; }
    .dh-table { font-size: 12px; min-width: 560px; }
    .dh-table thead th, .dh-table tbody td { padding: 8px 6px; }
    .dh-col-no { width: 60px; }
    .dh-col-type { width: 60px; }
    .dh-col-amount { width: 80px; }
    .dh-col-nick { padding-left: 24px !important; }
    .dh-col-time { width: 130px; }
    .dh-pagination { gap: 2px; }
    .dh-page-btn { min-width: 28px; height: 28px; padding: 0 6px; font-size: 12px; }
}
