/* 엑셀 뷰어 — 표가 주인공이라 폭을 넓게 쓴다. */

.xv-top { margin-bottom: var(--spacing-lg, 1.5rem); }

.xv-drop {
    border: 2px dashed var(--border-color, #d8dce3);
    border-radius: var(--radius-md, 8px);
    padding: var(--spacing-xl, 2rem) var(--spacing-lg, 1.5rem);
    text-align: center; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
    background: var(--bg-subtle, #f8f9fb);
}
.xv-drop:hover, .xv-drop:focus-visible, .xv-drop.is-over {
    border-color: #1d6f42; background: #eef7f1; outline: none;
}
.xv-drop.is-disabled { opacity: .5; pointer-events: none; }
.xv-drop > i { font-size: 2rem; color: #1d6f42; margin-bottom: var(--spacing-sm, .5rem); }
.xv-drop-title { margin: 0 0 .25rem; font-weight: 600; }
.xv-drop-hint  { margin: 0; font-size: var(--text-ui-sm, .8125rem); color: var(--text-muted, #626977); }

.xv-fileinfo {
    display: flex; align-items: center; gap: .625rem;
    padding: .625rem .75rem;
    border: 1px solid var(--border-color, #e5e8ed);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-surface, #fff);
}
.xv-fileinfo > i { font-size: 1.25rem; color: #1d6f42; }
.xv-fileinfo > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.xv-filename { font-weight: 600; font-size: var(--text-sm, .875rem); word-break: break-all; }
.xv-filemeta { font-size: var(--text-ui-sm, .8125rem); color: var(--text-muted, #626977); }

.xv-toolbar {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
    justify-content: space-between; margin-top: .625rem;
}
.xv-sheets { display: flex; flex-wrap: wrap; gap: .25rem; }
.xv-sheet {
    border: 1px solid var(--border-color, #e5e8ed);
    background: var(--bg-subtle, #f8f9fb);
    border-radius: var(--radius-sm, 6px) var(--radius-sm, 6px) 0 0;
    padding: .375rem .75rem;
    font-size: var(--text-ui-sm, .8125rem);
    cursor: pointer;
}
.xv-sheet.is-active {
    background: #1d6f42; color: #fff; border-color: #1d6f42; font-weight: 600;
}
.xv-actions { display: flex; gap: .5rem; align-items: center; }
.xv-search { width: 11rem; }
.xv-export { width: 13rem; }

.xv-section { margin-top: 0; }
.xv-stat { font-size: var(--text-ui-sm, .8125rem); color: var(--text-muted, #626977); }

.xv-empty { text-align: center; padding: var(--spacing-xl, 2rem) var(--spacing-md, 1rem); color: var(--text-muted, #626977); }
.xv-empty > i { font-size: 1.75rem; display: block; margin-bottom: .5rem; opacity: .6; }
.xv-empty > p { margin: 0; font-size: var(--text-sm, .875rem); }

/* 표는 가로·세로 모두 스크롤된다. 머리글은 고정한다. */
.xv-tablewrap {
    max-height: 65vh; overflow: auto;
    border: 1px solid var(--border-color, #e5e8ed);
    border-radius: var(--radius-sm, 6px);
}
.xv-table {
    border-collapse: separate; border-spacing: 0;
    font-size: var(--text-ui-sm, .8125rem);
    font-variant-numeric: tabular-nums;
}
.xv-table td, .xv-table th {
    border-right: 1px solid var(--border-soft, #eef0f4);
    border-bottom: 1px solid var(--border-soft, #eef0f4);
    padding: .25rem .5rem;
    white-space: nowrap;
    max-width: 22rem; overflow: hidden; text-overflow: ellipsis;
}
.xv-colhead, .xv-rowhead, .xv-corner {
    position: sticky; background: var(--bg-subtle, #f8f9fb);
    color: var(--text-muted, #626977); font-weight: 600; text-align: center;
    z-index: 1;
}
.xv-colhead, .xv-corner { top: 0; }
.xv-rowhead, .xv-corner { left: 0; }
.xv-corner { z-index: 2; }
.xv-rowhead { min-width: 2.5rem; }
.xv-table tr.is-hit td { background: #fffbe6; }

.xv-alert { margin-top: var(--spacing-md, 1rem); }
.xv-progress {
    display: flex; align-items: center; gap: .5rem;
    font-size: var(--text-sm, .875rem); color: var(--text-muted, #626977);
}

@media (max-width: 768px) {
    .xv-toolbar { flex-direction: column; align-items: stretch; }
    .xv-actions { flex-direction: column; }
    .xv-search, .xv-export { width: 100%; }
}
