﻿body { padding: 20px; max-width: 920px; margin: 0 auto; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.badge { padding: 3px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 500; background: var(--bg-muted); color: var(--text-secondary); }
.badge.connected { background: var(--success-bg); color: var(--success-text); }

.status-bar { font-size: 0.8rem; color: var(--text-tertiary); min-height: 1.2em; margin-bottom: 14px; }
/* Split button */
.split-button { display: inline-flex; position: relative; }
.split-button .btn-primary { border-radius: 6px 0 0 6px; }
.split-button .btn-dropdown { border-radius: 0 6px 6px 0; border-left: 1px solid rgba(255,255,255,0.2); padding: 6px 5px; min-width: 18px; font-size: 0.6rem; }
.split-button .btn-dropdown[aria-expanded="true"] { background: var(--accent-hover); }

/* Dropdown menu */
.dropdown-menu { position: absolute; top: 100%; left: 0; margin-top: 4px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 4px 10px; min-width: 100%; z-index: 50; display: none; }
.dropdown-menu.open { display: block; }
.menu-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 0.78rem; color: var(--text-strong); cursor: pointer; user-select: none; }
.menu-item input { cursor: pointer; margin: 0; }

/* Path bar */
.path-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 8px 14px; }
.breadcrumb { flex: 1; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 0.875rem; min-width: 0; }
.crumb { color: var(--accent); cursor: pointer; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.crumb:hover { background: var(--bg-accent-tint); }
.crumb.current { color: var(--text-strong); cursor: default; font-weight: 500; }
.crumb.current:hover { background: transparent; }
.crumb-sep { color: var(--text-disabled); padding: 0 1px; }

/* Drop zone */
.drop-zone { border: 2px dashed var(--border-default); border-radius: 10px; padding: 22px; text-align: center; color: var(--text-faint); cursor: pointer; font-size: 0.875rem; transition: border-color 0.15s, background 0.15s, color 0.15s; margin-bottom: 12px; }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: var(--bg-accent-tint); color: var(--accent); }
.drop-zone.disabled { pointer-events: none; opacity: 0.4; }

/* Progress */
.progress-wrap { display: none; margin-bottom: 12px; }
.progress-wrap.visible { display: block; }
.progress-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; }
.progress-track { height: 6px; background: var(--bg-muted); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s; border-radius: 3px; }

/* File table */
.file-browser { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 10px; overflow: hidden; margin-bottom: 16px; transition: border-color 0.15s, box-shadow 0.15s; }
.file-browser.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--shadow-focus); }
.file-browser.drag-over thead th { background: var(--bg-accent-tint); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
thead th { text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--border-faint); background: var(--bg-subtle); }
tbody tr { border-bottom: 1px solid var(--border-very-faint); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-subtle); }
td { padding: 7px 14px; font-size: 0.875rem; vertical-align: middle; }
.col-name { width: 40%; }
.col-size { width: 13%; }
.col-date { width: 20%; }
.col-actions { width: 27%; text-align: right; }
thead th[data-col] { cursor: pointer; user-select: none; }
thead th[data-col]:hover { background: var(--bg-app); color: var(--text-secondary); }
thead th.sort-active { color: var(--accent); }
.sort-icon { font-size: 0.65em; margin-left: 3px; opacity: 0.6; }

.entry-name { display: flex; align-items: center; gap: 7px; }
.entry-icon { font-size: 1em; line-height: 1; flex-shrink: 0; }
.entry-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.entry-label.is-dir { color: var(--accent); cursor: pointer; font-weight: 500; }
.entry-label.is-dir:hover { text-decoration: underline; }
.file-size { color: var(--text-muted); font-size: 0.82rem; }
.file-date { color: var(--text-muted); font-size: 0.8rem; }
.placeholder-row td { text-align: center; padding: 32px; color: var(--text-disabled); font-size: 0.88rem; }

/* Log */
details summary { cursor: pointer; font-size: 0.8rem; color: var(--text-faint); user-select: none; }
.log-box { background: var(--log-bg); color: var(--log-text); font-family: monospace; font-size: 0.75rem; padding: 12px; border-radius: 8px; max-height: 160px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; margin-top: 8px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: var(--backdrop); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: var(--bg-surface); border-radius: 14px; padding: 24px; width: 360px; max-width: 92vw; box-shadow: var(--shadow-modal); }
.modal-title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.modal-body { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }
.modal-body code { font-family: monospace; font-size: 0.82rem; color: var(--code-text); background: var(--code-bg); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.modal-input { width: 100%; padding: 8px 10px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 0.875rem; margin-top: 12px; margin-bottom: 4px; background: var(--bg-surface); color: var(--text-strong); }
.modal-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }
.modal-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.btn-danger-solid { background: var(--danger) !important; color: #fff !important; border-color: var(--danger) !important; }
.btn-danger-solid:hover:not(:disabled) { background: var(--danger-hover) !important; }
