:root {
    --ink: #333333;
    --paper: #FFFFFF;
    --line: #CCCCCC;
    --pencil: #666666;
    --btn-bg: #2B5A75;
    --btn-hover: #1E4156;
    --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    padding: 20px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.wrap {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    flex: 1 0 auto;
}

h1 { font-size: 28px; margin: 0 0 10px 0; color: #000; }
.sub { color: var(--pencil); font-size: 14px; margin-bottom: 20px; }

.header-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.logo-img { width: 36px; height: 36px; }

.header-title { margin: 0; }

.contact-link { color: #000; }

.signup-container {
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.clickable-box {
    background-color: #f9f9f9;
    border: 2px solid #000;
    display: inline-block;
}

.clickable-box .cell-link {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #000;
}

.clickable-box .cell-link:hover {
    background-color: #ebebeb;
    cursor: pointer;
}

.disclaimer-text {
    font-size: 14px;
    color: #272727;
    text-align: center;
}

.table-cell-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-email { width: 18px; height: 18px; }

.footer-link { margin: 0; }

.search-row { margin-bottom: 12px; }

.hidden-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pencil);
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
}

.hidden-toggle input { 
    width: 15px; 
    height: 15px; 
    margin: 0; 
    padding: 0;
    flex-shrink: 0;
    display: block;
}

.hidden-toggle-text {
    position: relative;
    top: 1px;
}

.search-row input {
    width: 100%;
    font-family: var(--sans);
    font-size: 14px;
    padding: 10px;
    border: 2px solid var(--line);
    background: #fff;
    color: var(--ink);
}
.search-row input:focus { outline: none; border-color: var(--btn-bg); }

#treeRoot { border-top: 1px solid var(--line); }

.folder-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #EEE;
    cursor: pointer;
    user-select: none;
}
.folder-row:hover { background: #F5F5F5; }

.folder-row .chevron {
    display: inline-block;
    width: 12px;
    height: 12px;
    text-align: center;
    font-size: 10px;
    color: var(--pencil);
    flex-shrink: 0;
}
.folder-row .chevron::before { content: '➤'; }
.folder-row.open .chevron { transform: rotate(90deg); }

.node-icon { width: 18px; height: 18px; flex-shrink: 0; object-fit: contain; }

.folder-row .name {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    min-width: 0;
    overflow-wrap: anywhere;
}
.folder-row .count {
    font-size: 12px;
    color: var(--pencil);
    margin-left: auto;
    flex-shrink: 0;
}

.folder-children {
    display: none;
    padding-left: 15px;
    border-left: 1px dotted var(--line);
    margin-left: 10px;
}
.folder-children.open { display: block; }

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #EEE;
}
.file-item:hover { background: #F5F5F5; }

.file-info { min-width: 0; flex: 1 1 auto; }
.file-name { font-size: 14px; color: #222; overflow-wrap: anywhere; }
.file-meta { font-size: 12px; color: var(--pencil); margin-top: 2px; }

.file-ext {
    font-size: 11px;
    font-weight: bold;
    color: var(--pencil);
    background: #EAEAEA;
    padding: 2px 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.file-link {
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    color: #FFF;
    background: var(--btn-bg);
    padding: 5px 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.file-link:hover { background: var(--btn-hover); }

.button-group { display: flex; gap: 5px; }

.file-copy {
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    background: #666;
    color: #FFF;
    border: none;
    padding: 5px 12px;
    white-space: nowrap;
}
.file-copy:hover { background: #444; }

.empty, .error {
    color: var(--pencil);
    font-size: 14px;
    padding: 20px 0;
}
.error { color: #C00; font-weight: bold; }

.footer-container {
    flex-shrink: 0;
    text-align: center;
    padding-top: 40px;
    padding-bottom: 10px;
    width: 100%;
}

@media (max-width: 480px) {
    body { padding: 15px; }
    h1 { font-size: 24px; }
    .folder-row, .file-item { padding: 10px; gap: 8px; }
    .file-item { flex-wrap: wrap; }
    .file-link { margin-left: auto; }
}