/* Windows 10/11 ListView 스타일 — Segoe UI, 작은 음영, 시스템 컬러 */

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

html, body {
    height: 100%;
    font-family: "Segoe UI", "Malgun Gothic", "맑은 고딕", "Noto Sans CJK KR", -apple-system, sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    background: #f3f3f3;
    user-select: none;
}

/* ====== 메뉴바 ====== */
.menubar {
    height: 26px;
    background: #f3f3f3;
    border-bottom: 1px solid #d4d4d4;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 12px;
}
.menubar .title {
    font-weight: 600;
    color: #444;
    margin-right: 16px;
    font-size: 12px;
}
.menubar .menus {
    display: flex;
    gap: 2px;
    margin-left: auto;
}
.menubar .menus a {
    color: #333;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}
.menubar .menus a:hover {
    background: #e0e0e0;
}

/* ====== 툴바 ====== */
.toolbar {
    height: 32px;
    background: linear-gradient(to bottom, #fafafa, #ececec);
    border-bottom: 1px solid #c0c0c0;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
}
.toolbar .btn {
    background: linear-gradient(to bottom, #fcfcfc, #e8e8e8);
    border: 1px solid #b0b0b0;
    padding: 3px 10px;
    font-size: 12px;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
    cursor: pointer;
}
.toolbar .btn:hover {
    background: linear-gradient(to bottom, #f0f8ff, #d8e8f8);
    border-color: #6699cc;
}
.toolbar .btn:active {
    background: #d0d0d0;
}
.toolbar .path {
    margin-left: auto;
    font-size: 12px;
    color: #555;
}
.toolbar .path a {
    color: #0066cc;
    text-decoration: none;
}

/* ====== 메인 (좌트 트리 + 우 리스트) ====== */
.main {
    display: flex;
    height: calc(100vh - 26px - 32px - 22px);
    background: #fff;
}

.left-pane {
    width: 240px;
    background: #f8f8f8;
    border-right: 1px solid #d0d0d0;
    overflow-y: auto;
    flex-shrink: 0;
}
.pane-header {
    height: 24px;
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    border-bottom: 1px solid #d0d0d0;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

.tree {
    list-style: none;
    padding: 2px 0;
    font-size: 13px;
}
.tree-item {
    height: 24px;
    line-height: 24px;
    padding: 0 4px;
    cursor: pointer;
    position: relative;
}
.tree-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1a1a1a;
    padding: 0 6px;
    height: 100%;
}
.tree-item:hover {
    background: #e5f1fb;
}
.tree-item.active a {
    background: #cce8ff;
    border: 1px solid #99d1ff;
}
.tree-item .tree-icon {
    width: 22px;
    font-size: 14px;
    flex-shrink: 0;
}
.tree-item .tree-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tree-item .tree-count {
    color: #888;
    font-size: 11px;
    margin-left: 4px;
    font-family: "Consolas", "Courier New", monospace;
}
.pane-footer {
    position: sticky;
    bottom: 0;
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 4px 8px;
    color: #888;
    font-size: 11px;
}

.right-pane {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

/* ====== 사이트 헤더 (단일 사이트 보기) ====== */
.site-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #f8fbff, #eef4fa);
    border-bottom: 1px solid #d0e0f0;
}
.site-header .big-emoji {
    font-size: 36px;
}
.site-header h2 {
    font-size: 18px;
    color: #003366;
    font-weight: 600;
}
.site-header h2 small {
    font-size: 13px;
    color: #666;
    font-weight: normal;
}
.site-info {
    flex: 1;
}
.site-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #444;
    display: flex;
    gap: 16px;
    align-items: center;
}
.site-meta b {
    color: #0066cc;
}

/* ====== ListView 테이블 (Windows 탐색기) ====== */
.listview {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
}
.listview thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
}
.listview th {
    text-align: left;
    padding: 5px 8px;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #a0a0a0;
    font-weight: 600;
    color: #333;
    font-size: 12px;
    user-select: none;
}
.listview th:first-child { border-left: 1px solid #c0c0c0; }
.listview th.col-icon { width: 28px; padding: 5px 4px; }
.listview th.col-name { width: 180px; }
.listview th.col-country { width: 80px; }
.listview th.col-currency { width: 60px; }
.listview th.col-status { width: 110px; }
.listview th.col-count { width: 60px; text-align: right; }
.listview th.col-elapsed { width: 100px; }
.listview th.col-action { width: 60px; }
.listview th.col-title { }
.listview th.col-author { width: 160px; }
.listview th.col-price { width: 100px; }
.listview th.col-link { width: 50px; }

.listview td {
    padding: 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    font-size: 12px;
    color: #1a1a1a;
}
.listview tr:hover td {
    background: #e5f1fb;
}
.listview tr.selected td {
    background: #cce8ff;
}
.listview .col-icon { text-align: center; }
.listview .col-name a, .listview .col-title a {
    color: #0066cc;
    text-decoration: none;
}
.listview .col-name a:hover, .listview .col-title a:hover {
    text-decoration: underline;
}
.listview .col-count { text-align: right; font-family: "Consolas", "Courier New", monospace; }
.listview .col-elapsed { color: #888; font-size: 11px; }
.listview .col-action a, .listview .col-link a {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}
.listview .empty {
    text-align: center;
    color: #999;
    padding: 30px;
    font-style: italic;
}

/* ====== 상태 인디케이터 ====== */
.status-ok { color: #16a34a; font-weight: 600; }
.status-running { color: #2563eb; font-weight: 600; }
.status-error { color: #dc2626; font-weight: 600; }
.status-pending { color: #999; }

/* ====== 작은 새로고침 버튼 (행) ====== */
.btn-mini {
    background: #f0f0f0;
    border: 1px solid #c0c0c0;
    padding: 1px 6px;
    font-size: 11px;
    color: #333;
    text-decoration: none;
    border-radius: 2px;
    display: inline-block;
}
.btn-mini:hover {
    background: #d0e8f8;
    border-color: #6699cc;
}

/* ====== 힌트 (하단 메시지) ====== */
.hint {
    padding: 10px 16px;
    background: #ffffe0;
    border-top: 1px solid #e8e0a0;
    color: #606030;
    font-size: 12px;
    line-height: 1.6;
}

/* ====== 상태바 ====== */
.statusbar {
    height: 22px;
    background: linear-gradient(to bottom, #f8f8f8, #e0e0e0);
    border-top: 1px solid #c0c0c0;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    color: #444;
}
.statusbar .status-left {
    padding-right: 12px;
    border-right: 1px solid #c0c0c0;
}
.statusbar .status-center {
    flex: 1;
    padding-left: 12px;
}
.statusbar .status-right {
    padding-left: 12px;
    border-left: 1px solid #c0c0c0;
    color: #888;
    font-family: "Consolas", "Courier New", monospace;
}

/* ====== 스크롤바 (Windows 스타일) ====== */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}
::-webkit-scrollbar-track {
    background: #f0f0f0;
}
::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid #f0f0f0;
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}
