/* ═══════════════════════════════════════════════════════════════════════════
   ◆ AXIOM / files — Stylesheet
   Brand: docs/concepts/brand/README.md
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
    --bg-0: #07080a;
    --bg-1: #0d0f12;
    --bg-2: #12151a;
    --fg-0: #e6e8eb;
    --fg-1: #a3a8b0;
    --fg-2: #6b7280;
    --fg-3: #3d4451;
    --accent: #7ee0c9;
    --accent-dim: #3b7d6a;
    --accent-2: #f0c674;
    --warn: #e06c75;
    --line: #191c22;
    --line-2: #2a2e37;
    --glass: rgba(13, 15, 18, 0.7);
    --radius: 2px;
    --mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--bg-0);
    color: var(--fg-0);
    font-family: var(--sans);
    font-size: 13px;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(126,224,201,0.18); color: var(--fg-0); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-2); }

/* ── Scanlines ───────────────────────────────────────────────────────────── */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background:
        radial-gradient(ellipse at top, rgba(126,224,201,0.03), transparent 60%),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.008) 0 1px, transparent 1px 3px);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    height: 44px;
    min-height: 44px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    user-select: none;
}

.lockup {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.lockup .mark { color: var(--accent); }
.lockup .slash { color: var(--fg-2); font-weight: 400; }
.lockup .surface { text-transform: lowercase; font-weight: 400; letter-spacing: 0.06em; }

/* ── Navigation Buttons ──────────────────────────────────────────────────── */
.nav-btns {
    display: flex;
    gap: 2px;
}

.nav-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--fg-2);
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: color 150ms, border-color 150ms;
}

.nav-btn:hover { color: var(--fg-0); border-color: var(--line-2); }
.nav-btn:disabled { opacity: 0.3; cursor: default; }

/* ── Breadcrumbs ─────────────────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: 12px;
    overflow: hidden;
    background: var(--bg-0);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 10px;
    height: 30px;
}

.breadcrumb-item {
    color: var(--fg-2);
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 4px;
    border-radius: var(--radius);
    transition: color 150ms, background 150ms;
}

.breadcrumb-item:hover { color: var(--accent); background: rgba(126,224,201,0.06); }
.breadcrumb-item.current { color: var(--fg-0); cursor: default; }
.breadcrumb-item.current:hover { background: none; color: var(--fg-0); }
.breadcrumb-sep { color: var(--fg-3); margin: 0 2px; }

/* ── Search ──────────────────────────────────────────────────────────────── */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-0);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 10px;
    height: 30px;
    width: 220px;
    transition: border-color 150ms;
}

.search-box:focus-within { border-color: var(--accent); }

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--fg-0);
    font-family: var(--mono);
    font-size: 11px;
    width: 100%;
    padding: 0 6px;
}

.search-box input::placeholder { color: var(--fg-3); }
.search-box i { color: var(--fg-3); font-size: 11px; }

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-btn {
    background: none;
    border: 1px solid var(--line);
    color: var(--fg-2);
    font-family: var(--mono);
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 150ms, border-color 150ms;
    white-space: nowrap;
}

.tool-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.tool-btn.active { color: var(--accent); border-color: var(--accent-dim); background: rgba(126,224,201,0.06); }

/* ── Body (sidebar + main) ───────────────────────────────────────────────── */
.body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    width: 200px;
    min-width: 200px;
    background: var(--bg-1);
    border-right: 1px solid var(--line);
    padding: 12px 0;
    overflow-y: auto;
    user-select: none;
}

.sidebar-section {
    margin-bottom: 16px;
}

.sidebar-heading {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--fg-3);
    padding: 0 16px;
    margin-bottom: 6px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    color: var(--fg-1);
    font-family: var(--mono);
    font-size: 12px;
    cursor: pointer;
    transition: background 150ms, color 150ms;
}

.sidebar-item:hover { background: rgba(126,224,201,0.04); color: var(--fg-0); }
.sidebar-item.active { color: var(--accent); background: rgba(126,224,201,0.06); }
.sidebar-item i { width: 16px; text-align: center; font-size: 13px; color: var(--fg-2); }
.sidebar-item.active i { color: var(--accent); }

.sidebar-disk {
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
}

.disk-bar {
    height: 4px;
    background: var(--bg-0);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.disk-fill {
    height: 100%;
    background: var(--accent);
    transition: width 300ms;
}

.disk-text {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-2);
}

/* ── Main file area ──────────────────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Status bar ──────────────────────────────────────────────────────────── */
.statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 28px;
    min-height: 28px;
    background: var(--bg-1);
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-2);
    user-select: none;
}

/* ── Column headers (list view) ──────────────────────────────────────────── */
.list-header {
    display: grid;
    grid-template-columns: 40px 1fr 100px 100px 110px;
    padding: 0 16px;
    height: 32px;
    align-items: center;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-3);
    user-select: none;
}

.list-header span {
    cursor: pointer;
    transition: color 150ms;
}

.list-header span:hover { color: var(--fg-1); }
.list-header span.sorted { color: var(--accent); }

/* ── File list ───────────────────────────────────────────────────────────── */
.file-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.file-row {
    display: grid;
    grid-template-columns: 40px 1fr 100px 100px 110px;
    padding: 0 16px;
    height: 32px;
    align-items: center;
    cursor: pointer;
    transition: background 100ms;
    border-bottom: 1px solid transparent;
}

.file-row:hover { background: rgba(126,224,201,0.03); }
.file-row.selected { background: rgba(126,224,201,0.08); border-color: var(--line); }
.file-row.selected .file-name { color: var(--accent); }
.file-row.cut { opacity: 0.4; }

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--fg-2);
}

.file-icon.dir { color: var(--accent); }
.file-icon.image { color: var(--accent-2); }
.file-icon.code { color: var(--fg-1); }

.file-name {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name.dir { color: var(--accent); }

.file-size, .file-perms, .file-date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-2);
    font-variant-numeric: tabular-nums;
}

/* ── Grid view ───────────────────────────────────────────────────────────── */
.file-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    align-content: start;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 100ms, border-color 100ms;
}

.grid-item:hover { background: rgba(126,224,201,0.04); border-color: var(--line); }
.grid-item.selected { background: rgba(126,224,201,0.08); border-color: var(--accent-dim); }

.grid-icon {
    font-size: 32px;
    color: var(--fg-2);
    margin-bottom: 8px;
}

.grid-icon.dir { color: var(--accent); }
.grid-icon.image { color: var(--accent-2); }

.grid-name {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-1);
    text-align: center;
    word-break: break-all;
    max-height: 30px;
    overflow: hidden;
    line-height: 1.3;
}

.grid-item.selected .grid-name { color: var(--accent); }

/* ── Context menu ────────────────────────────────────────────────────────── */
.context-menu {
    position: fixed;
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: 4px 0;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: none;
}

.context-menu.visible { display: block; }

.ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-1);
    cursor: pointer;
    transition: background 100ms, color 100ms;
}

.ctx-item:hover { background: rgba(126,224,201,0.06); color: var(--fg-0); }
.ctx-item i { width: 14px; text-align: center; color: var(--fg-2); font-size: 11px; }
.ctx-item .shortcut { margin-left: auto; color: var(--fg-3); font-size: 10px; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 0; }
.ctx-item.danger:hover { color: var(--warn); }
.ctx-item.danger:hover i { color: var(--warn); }

/* ── Rename input ────────────────────────────────────────────────────────── */
.rename-input {
    background: var(--bg-0);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    color: var(--fg-0);
    font-family: var(--mono);
    font-size: 12px;
    padding: 2px 6px;
    outline: none;
    width: 100%;
}

/* ── Modal overlay ───────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7,8,10,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.visible { display: flex; }

.modal {
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: 20px;
    min-width: 340px;
    max-width: 500px;
}

.modal h3 {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-0);
    margin-bottom: 14px;
}

.modal input[type="text"] {
    width: 100%;
    background: var(--bg-0);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    color: var(--fg-0);
    font-family: var(--mono);
    font-size: 12px;
    padding: 8px 12px;
    outline: none;
    transition: border-color 150ms;
    margin-bottom: 14px;
}

.modal input[type="text"]:focus { border-color: var(--accent); }

.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-btn {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 7px 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: none;
    color: var(--fg-1);
    cursor: pointer;
    transition: border-color 150ms, color 150ms, background 150ms;
}

.modal-btn:hover { border-color: var(--accent); color: var(--accent); }
.modal-btn.primary { background: rgba(126,224,201,0.08); border-color: var(--accent-dim); color: var(--accent); }
.modal-btn.primary:hover { background: rgba(126,224,201,0.15); border-color: var(--accent); }

/* ── Upload drop zone ────────────────────────────────────────────────────── */
.drop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7,8,10,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.drop-overlay.visible { display: flex; }

.drop-box {
    border: 2px dashed var(--accent-dim);
    border-radius: var(--radius);
    padding: 60px 80px;
    text-align: center;
}

.drop-box i { font-size: 48px; color: var(--accent); margin-bottom: 16px; display: block; }
.drop-box p { font-family: var(--mono); font-size: 14px; color: var(--fg-1); }

/* ── Preview panel ───────────────────────────────────────────────────────── */
.preview-panel {
    width: 0;
    min-width: 0;
    background: var(--bg-1);
    border-left: 1px solid var(--line);
    overflow: hidden;
    transition: width 200ms, min-width 200ms;
}

.preview-panel.open {
    width: 320px;
    min-width: 320px;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.preview-header h4 {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-2);
}

.preview-close {
    background: none;
    border: none;
    color: var(--fg-3);
    cursor: pointer;
    font-size: 14px;
}

.preview-close:hover { color: var(--fg-0); }

.preview-body {
    padding: 14px;
    overflow-y: auto;
    max-height: calc(100vh - 130px);
}

.preview-img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.preview-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-2);
    line-height: 1.8;
}

.preview-meta strong { color: var(--fg-1); font-weight: 500; }

.preview-text {
    background: var(--bg-0);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-1);
    line-height: 1.5;
    max-height: 300px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 10px;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--fg-3);
    user-select: none;
}

.empty-state i { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-family: var(--mono); font-size: 12px; }

/* ── Open In modal ──────────────────────────────────────────────────────── */
.open-in-modal {
    min-width: 400px !important;
}

.open-in-list {
    margin-bottom: 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-0);
}

.open-in-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 150ms, color 150ms;
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11px;
}

.open-in-item:last-child {
    border-bottom: none;
}

.open-in-item:hover {
    background: rgba(126,224,201,0.04);
}

.open-in-item.selected {
    background: rgba(126,224,201,0.08);
    color: var(--accent);
}

.open-in-item i {
    font-size: 14px;
    color: var(--fg-2);
    width: 16px;
    text-align: center;
}

.open-in-item.selected i {
    color: var(--accent);
}

.custom-app-input {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-app-input label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--fg-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.custom-app-input input {
    margin-bottom: 0 !important;
}

/* ── Picker Bar ──────────────────────────────────────────────────────────── */
.picker-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-1);
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11px;
    user-select: none;
}

.picker-path-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.picker-label {
    color: var(--fg-2);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.picker-path {
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.picker-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 16px;
}

.picker-btn {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 6px 16px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    background: none;
    color: var(--fg-1);
    cursor: pointer;
    transition: border-color 150ms, color 150ms, background 150ms;
}

.picker-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.picker-btn.primary {
    background: rgba(126,224,201,0.08);
    border-color: var(--accent-dim);
    color: var(--accent);
}

.picker-btn.primary:hover {
    background: rgba(126,224,201,0.15);
    border-color: var(--accent);
}


