:root {
    --bg-primary: #1e2a3a;
    --bg-secondary: #172030;
    --bg-deep: #111828;
    --bg-card: rgba(255,255,255,0.04);
    --bg-input: #1e272e;
    --text-primary: #dfe6e9;
    --text-secondary: #b2bec3;
    --text-muted: #636e72;
    --text-label: #8fa3b8;
    --accent: #fdcb6e;
    --success: #00b894;
    --warning: #fdcb6e;
    --error: #d63031;
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.06);
}

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

body {
    background: linear-gradient(135deg, #1e2a3a 0%, #172030 40%, #111828 100%);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Toolbar */
.toolbar {
    width: 90%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    padding: 12px 0;
    gap: 16px;
}
.toolbar-logo img {
    width: 80px;
    height: auto;
}

/* Buttons row */
.actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.btn {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}
.btn svg { vertical-align: -2px; margin-right: 4px; }
.btn:hover:not(:disabled) { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.btn:active { background: rgba(255,255,255,0.04); }
.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.btn-pull { border-left: 3px solid #7c6fe0; }
.btn-add { border-left: 3px solid #e17055; }
.btn-load { border-left: 3px solid #00a381; }
.btn-find { border-left: 3px solid #3da2f0; }

/* Button groups */
.button-groups {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex: 1;
}
.button-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.button-group-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4a5568;
    font-weight: 600;
}
.button-group-buttons {
    display: flex;
    gap: 3px;
}
.toolbar-separator {
    display: none;
}

/* Lock overlay when pulling */
.app-lock {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    cursor: not-allowed;
}
.app-lock.active { display: block; }

/* Data zone */
.data-zone {
    width: 90%;
    max-width: 1100px;
    flex: 1;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 24px;
    margin-bottom: 30px;
    min-height: 400px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    background: linear-gradient(135deg, #243244 0%, #1e2a3a 40%, #182436 100%);
    border-radius: 8px;
}
.data-zone .placeholder {
    color: var(--text-muted);
    text-align: center;
    margin-top: 150px;
    font-size: 18px;
}

/* Report display */
.report-header {
    margin: -24px -24px 0 -24px;
    padding: 20px 24px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 0;
    position: relative;
}
.btn-wcl-link {
    position: absolute;
    right: 16px;
    top: 16px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(230,126,34,0.4);
    transition: all 0.2s;
}
.btn-wcl-link:hover { background: linear-gradient(135deg, #d35400, #e67e22); color: #fff; text-decoration: none; }
.report-header h2 { color: var(--accent); margin-bottom: 4px; }
.report-header .meta { color: var(--text-secondary); font-size: 13px; }

.fight-block { margin-bottom: 24px; }
.fight-title {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 12px;
    margin-bottom: 8px;
}
.fight-title.kill { background: var(--success); color: #fff; }
.fight-title.wipe { background: var(--error); color: #fff; }

.section-label { color: var(--accent); font-weight: 600; margin: 8px 0 4px 0; }

table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
th { text-align: left; color: var(--text-secondary); font-size: 12px; padding: 4px 8px; border-bottom: 1px solid var(--text-muted); }
td { padding: 3px 8px; font-size: 13px; }
tr:nth-child(even) { background: rgba(255,255,255,0.03); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.death-list { list-style: none; padding-left: 8px; }
.death-list li { color: var(--error); font-size: 13px; }
.death-list li::before { content: "\2620 "; }

/* Modal overlay */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; }

.modal {
    background: linear-gradient(145deg, #1e2a3a, #172030);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 28px;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.modal h3 { margin-bottom: 16px; color: var(--accent); }
.modal select, .modal input[type="text"] {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    background: var(--bg-input);
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
    margin-bottom: 16px;
}
.select-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.date-input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    background: var(--bg-input);
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
    margin-bottom: 16px;
    color-scheme: dark;
}
.date-input:focus {
    outline: none;
    border-color: var(--accent);
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* WoW class colors */
.class-Warrior  { color: #C79C6E; }
.class-Paladin  { color: #F58CBA; }
.class-Hunter   { color: #ABD473; }
.class-Rogue    { color: #FFF569; }
.class-Priest   { color: #FFFFFF; }
.class-Shaman   { color: #0070DE; }
.class-Mage     { color: #3FC7EB; }
.class-Warlock  { color: #8788EE; }
.class-Druid    { color: #FF7D0A; }
.class-Unknown  { color: var(--text-muted); }

/* Role icons */
.role-badge {
    display: inline-block;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 3px;
    font-weight: 600;
}
.role-tank { background: var(--text-muted); color: #fff; }
.role-healer { background: var(--success); color: #fff; }
.role-dps { background: var(--error); color: #fff; }

.spec-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    margin-right: 3px;
}

/* Navigation bar */
.nav-bar {
    width: 90%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    min-height: 32px;
}
.btn-back {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, var(--error), #e74c3c);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
    box-shadow: 0 2px 8px rgba(214,48,49,0.4);
}
.btn-back:hover { background: linear-gradient(135deg, #c0392b, var(--error)); }
.btn-back.visible { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
}
.breadcrumb span { color: var(--text-secondary); }

/* Player detail - gear display */
.player-detail { padding: 0; margin: -24px; }
.player-detail-header {
    text-align: center;
    padding: 20px 24px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.player-detail-header h2 {
    font-size: 22px;
    margin-bottom: 4px;
}
.btn-discord-report {
    position: absolute;
    right: 16px;
    top: 14px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #5865F2, #7289da);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(88,101,242,0.4);
}
.btn-discord-report:hover { background: linear-gradient(135deg, #4752c4, #5865F2); }
.btn-discord-report:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-discord-report svg { vertical-align: -2px; margin-right: 4px; }
.player-detail-header .meta { color: var(--text-secondary); font-size: 13px; }

/* Gear analysis panel */
.gear-analysis {
    margin: 16px 20px;
    background: linear-gradient(145deg, #141c2e, #0e1422);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 4px solid var(--text-muted);
    padding: 14px 16px;
    position: relative;
}
.gear-analysis.severity-ok { border-left-color: var(--success); }
.gear-analysis.severity-warn { border-left-color: var(--accent); }
.gear-analysis.severity-error { border-left-color: var(--error); }
.gear-analysis-header {
    margin-bottom: 8px;
}
.gear-analysis-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.gear-analysis-score {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}
.gear-analysis-score.ok { background: var(--success); color: #fff; }
.gear-analysis-score.warn { background: var(--accent); color: var(--bg-input); }
.gear-analysis-score.error { background: var(--error); color: #fff; }
.gear-analysis-issues {
    list-style: none;
    padding: 0;
    margin: 0;
}
.gear-analysis-issue {
    font-size: 12px;
    padding: 3px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.gear-analysis-issue-icon {
    flex-shrink: 0;
    font-size: 13px;
    line-height: 1.4;
}
.gear-analysis-issue.issue-error .gear-analysis-issue-icon { color: var(--error); }
.gear-analysis-issue.issue-warn .gear-analysis-issue-icon { color: var(--accent); }
.gear-analysis-loading {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* Gear timeline */
.gear-timeline {
    padding: 16px 24px;
    position: relative;
}
.gear-timeline-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: center;
}
.gear-timeline-track {
    position: relative;
    height: 36px;
    margin: 0 8px;
    cursor: pointer;
}
.gear-timeline-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: var(--text-muted);
    transform: translateY(-50%);
}
.gear-timeline-handle {
    position: absolute;
    top: 50%;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(253,203,110,0.6), 0 2px 6px rgba(0,0,0,0.4);
    cursor: grab;
    z-index: 3;
    transform: translateX(-50%);
    transition: left 0.25s ease-out;
}
.gear-timeline-handle:active { cursor: grabbing; }
.gear-timeline-stops {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 2;
}
.gear-timeline-stop {
    position: absolute;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0 12px;
}
.gear-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4a5568;
    border: 2px solid #2d3436;
    transition: all 0.2s;
}
.gear-timeline-stop:hover .gear-timeline-dot { background: var(--text-secondary); }
.gear-timeline-stop.active .gear-timeline-dot {
    background: var(--accent);
}
.gear-timeline-date-labels {
    display: flex;
    justify-content: space-between;
    margin: 6px 8px 0;
}
.gear-timeline-date-label {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    transition: color 0.2s;
}
.gear-timeline-date-label:hover { color: var(--text-secondary); }
.gear-timeline-date-label.active { color: var(--accent); font-weight: 600; }

.gear-layout {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 0;
    min-height: 480px;
    padding: 30px 10px;
    overflow: hidden;
}
.gear-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.gear-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.35;
    filter: saturate(0.6);
}
.gear-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, #1e2a3a 0%, transparent 25%, transparent 75%, #1e2a3a 100%),
        linear-gradient(to bottom, #1e2a3a 0%, transparent 15%, transparent 85%, #1e2a3a 100%);
}
.gear-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    width: 280px;
    z-index: 2;
    position: relative;
}
.gear-column.left { align-items: flex-end; text-align: right; }
.gear-column.right { align-items: flex-start; text-align: left; }
.gear-center {
    width: 120px;
    z-index: 1;
}

.gear-slot {
    display: flex;
    align-items: center;
    min-height: 58px;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.15s;
    background: linear-gradient(145deg, #141c2e, #0e1422);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.gear-slot:hover { background: linear-gradient(145deg, #1a2438, #121a2c); border-color: rgba(255,255,255,0.2); box-shadow: 0 4px 14px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08); text-decoration: none; color: inherit; }
.gear-column.left .gear-slot { flex-direction: row-reverse; }
.gear-slot-icon {
    width: 46px;
    height: 46px;
    border-radius: 3px;
    border: 2px solid var(--text-muted);
    flex-shrink: 0;
}
.gear-slot-icon.q2 { border-color: #1eff00; }
.gear-slot-icon.q3 { border-color: #0070dd; }
.gear-slot-icon.q4 { border-color: #a335ee; }
.gear-slot-icon.q5 { border-color: #ff8000; }

.gear-slot-info { min-width: 0; }
.gear-slot-name {
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: block;
}
.gear-slot-name.q2 { color: #1eff00; }
.gear-slot-name.q3 { color: #0070dd; }
.gear-slot-name.q4 { color: #a335ee; }
.gear-slot-name.q5 { color: #ff8000; }
.gear-slot-name a { color: inherit; text-decoration: none; }
.gear-slot-name a:hover { color: inherit; text-decoration: none; }

.gear-slot-sub {
    font-size: 10px;
    color: var(--text-muted);
}
.gear-slot-enchant {
    font-size: 10px;
    color: var(--success);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.gear-slot-noenchant {
    font-size: 10px;
    color: var(--error);
    font-style: italic;
}
.gear-gem-empty {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid var(--text-muted);
    vertical-align: -1px;
    margin-left: 1px;
    background: rgba(255,255,255,0.05);
}
.gear-gem {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    vertical-align: -1px;
    margin-left: 1px;
}
.gear-slot-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4a5568;
}
.gear-empty {
    font-size: 11px;
    color: #4a5568;
    font-style: italic;
}

/* New item highlight */
.gear-slot.is-new {
    outline: 2px solid rgba(253,203,110,0.6);
    outline-offset: -1px;
    box-shadow: 0 0 12px rgba(253,203,110,0.25), 0 3px 10px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
}
.gear-new-badge {
    position: absolute;
    top: -1px;
    left: -1px;
    background: linear-gradient(135deg, var(--accent), #e17055);
    color: var(--bg-input);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px 1px 4px;
    border-radius: 5px 0 6px 0;
    line-height: 1.4;
    z-index: 5;
}
.gear-column.left .gear-slot.is-new .gear-new-badge {
    left: auto;
    right: -1px;
    border-radius: 0 5px 0 6px;
}

/* Custom Wowhead-style tooltip */
.wh-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    width: 320px;
    min-height: 80px;
    background: linear-gradient(160deg, #111828, #0d1320);
    border: 1px solid rgba(100,120,180,0.3);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8);
    pointer-events: none;
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-primary);
}
.wh-tooltip.visible { display: block; }
.wh-tooltip-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-muted);
    font-size: 13px;
}
/* Quality colors */
.wh-tooltip .q0 { color: #9d9d9d; }
.wh-tooltip .q1 { color: #fff; }
.wh-tooltip .q2 { color: #1eff00; }
.wh-tooltip .q3 { color: #74b3ff; }
.wh-tooltip .q4 { color: #a335ee; }
.wh-tooltip .q5 { color: #ff8000; }
.wh-tooltip .q { color: #ffd100; }
.wh-tooltip b { font-weight: normal; color: inherit; }
/* Fix table alignment */
.wh-tooltip table { width: 100%; border-collapse: collapse; }
.wh-tooltip td, .wh-tooltip th { padding: 0; vertical-align: top; }
.wh-tooltip th { text-align: right; }
.wh-tooltip .whtt-extra { font-size: 11px; }
/* No underlines on links */
.wh-tooltip a { color: inherit; text-decoration: none; }
/* Socket images */
.wh-tooltip img { vertical-align: middle; }
/* Set bonus title */
.wh-tooltip .indent { padding-left: 10px; }
/* Gem socket styling */
.wh-tooltip span[class*="socket"] {
    display: inline-block;
    padding-left: 20px;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: 0 center;
    min-height: 18px;
    line-height: 18px;
}

/* Report tabs */
.report-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin: 0 -24px 16px -24px;
    padding: 0 24px;
    background: rgba(0,0,0,0.1);
    position: relative;
}
.report-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.report-tab:hover { color: var(--text-secondary); }
.report-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.report-tabs-spacer { flex: 1; }
.report-tab-content {
    padding: 0 8px;
}

/* Report gear analysis - player list */
.report-player-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    width: 100%;
}
.report-player-row:hover { background: rgba(255,255,255,0.06); }
.report-player-row .player-name { font-weight: 600; white-space: nowrap; }
.report-player-row .player-info { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.report-gear-issues { flex: 1; text-align: right; min-width: 0; }

/* Consumables table */
.consumables-wrapper {
    overflow-x: auto;
    margin: 0 -8px;
}
.consumables-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 600px;
}
.consumables-table thead th {
    padding: 4px 8px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-right: 1px solid rgba(255,255,255,0.06);
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}
.consumables-table thead th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: linear-gradient(135deg, #243244, #1e2a3a);
    z-index: 2;
    min-width: 140px;
}
.consumables-table thead th:last-child {
    width: 50px;
    border-right: none;
}
.consumables-table tbody td:last-child {
    border-right: none;
}
.consumables-table tbody td {
    padding: 5px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-right: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
    line-height: 22px;
}
.consumables-table tbody tr { height: 36px; }
.consumables-table img { display: inline-block; vertical-align: middle; }
.consumables-table a { display: inline-block; vertical-align: middle; line-height: 0; }
.consumables-table tbody td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: linear-gradient(135deg, #243244, #1e2a3a);
    z-index: 1;
    cursor: pointer;
}
.consumables-table tbody tr:hover td {
    background: rgba(255,255,255,0.04);
}
.consumables-table tbody tr:hover td:first-child {
    background: linear-gradient(135deg, #2a3a4e, #243244);
}
.consumables-table .buff-ok { color: var(--success); }
.consumables-table .buff-missing { color: var(--error); }
.consumables-table .buff-pending { color: var(--text-muted); }
.report-player-check {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    align-self: stretch;
    cursor: pointer;
    margin: -8px 0 -8px 0;
    padding: 8px 0;
}
.report-player-check input { accent-color: #00cec9; width: 14px; height: 14px; cursor: pointer; }


/* Cooldowns table */
.cooldowns-wrapper {
    overflow-x: auto;
    margin: 0 -8px;
}
.cooldowns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 780px;
}
.cooldowns-table thead th {
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-label);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cooldowns-table thead th:first-child {
    width: 170px;
    min-width: 170px;
    text-align: left;
}
.cooldowns-table thead th:last-child {
    text-align: left;
}
.cooldowns-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: top;
}
.cooldowns-player-cell {
    white-space: nowrap;
    width: 170px;
    min-width: 170px;
}
.cooldowns-spells-cell {
    width: auto;
}
.cooldown-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 2px 10px 2px 0;
    vertical-align: middle;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}
.cooldown-chip img {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.12);
}
.cooldown-chip-label {
    display: none;
}
.cooldown-chip-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.cooldowns-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 11px;
}

/* Sortable headers */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}
.sortable:hover { color: var(--accent); }

/* Clickable player row */
.player-row { cursor: pointer; transition: background 0.15s; }
tbody .player-row:hover { background: rgba(255,255,255,0.08); }
.modal select:focus, .modal input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.btn.btn-cancel {
    background: rgba(214,48,49,0.15);
    border: 1px solid rgba(214,48,49,0.4);
    border-left: 3px solid var(--error);
    color: #e17055;
}
.btn.btn-cancel:hover:not(:disabled) { background: rgba(214,48,49,0.25); }
.btn.btn-confirm {
    background: rgba(0,163,129,0.15);
    border: 1px solid rgba(0,163,129,0.4);
    border-left: 3px solid #00a381;
    color: #55efc4;
}
.btn.btn-confirm:hover:not(:disabled) { background: rgba(0,163,129,0.25); }

.modal-error {
    color: var(--error);
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}

/* Pull result popup */
.pull-result {
    margin-top: 8px;
    font-size: 14px;
}
.pull-result .stat { margin: 4px 0; }
.pull-result .new { color: var(--success); }
.pull-result .existing { color: var(--text-secondary); }
.pull-result .errors { color: var(--error); }

/* Spinner */
.spinner {
    display: none;
    text-align: center;
    padding: 20px;
}
.spinner.active { display: block; }
.spinner::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--text-muted);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Progress bar */
.progress-container {
    padding: 30px 40px;
}
.progress-status {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}
.progress-bar-outer {
    width: 100%;
    height: 24px;
    background: var(--bg-input);
    border: 1px solid var(--text-muted);
    overflow: hidden;
    position: relative;
}
.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--accent));
    transition: width 0.3s ease;
    width: 0%;
}
.progress-percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.progress-detail {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}
.progress-file {
    color: var(--accent);
    font-weight: 600;
}
.progress-counter {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .toolbar { width: 98%; flex-wrap: wrap; gap: 8px; padding: 10px; }
    .toolbar-separator { display: none; }
    .toolbar-logo img { height: 28px; }
    .button-group { width: 100%; }
    .button-group-buttons { flex-wrap: wrap; width: 100%; }
    .button-group-buttons .btn { flex: 1; min-width: 0; }
    .modal { min-width: 90vw; max-width: 95vw; }
    .data-zone { width: 98%; padding: 12px; }
    .consumables-table, .cooldowns-table { font-size: 11px; }
    .gear-columns { flex-direction: column; }
    .gear-column { width: 100%; }
    .player-detail-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .report-header { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 480px) {
    body { padding: 8px; }
    .toolbar { padding: 8px; }
    .btn { font-size: 11px; padding: 6px 10px; }
    .report-header h2 { font-size: 16px; }
    .modal { padding: 14px; }
    .gear-slot { min-height: 48px; }
}

/* --- Focus visible for keyboard navigation --- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --- Skip link (accessibility) --- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #000;
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 700;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}
