/* Galaxy files — colour palette
   brand: #191927 background · #E4E3EC text · #00D7D2 teal accent · #8E72EE purple accent
   (shades below are derived from these four; text contrast on cards >= 4.5:1) */
:root {
    color-scheme: dark;
    --bg: #191927;
    --bg-side: #1d1d2d;
    --surface: #212134;
    --surface-2: #2a2a40;
    --surface-hover: #262640;
    --input: #15151f;
    --border: #2e2e46;
    --border-strong: #3d3d5c;
    --track: #2e2e46;
    --text: #E4E3EC;
    --text-2: #b4b3c6;
    --muted: #8f8ea6;
    --accent: #00D7D2;
    --accent-hover: #3ee4e0;
    --accent-soft: rgba(0, 215, 210, .12);
    --accent-line: rgba(0, 215, 210, .45);
    --purple: #8E72EE;
    --purple-text: #b3a2f5;
    --purple-soft: rgba(142, 114, 238, .16);
    --gradient: linear-gradient(90deg, #00D7D2 0%, #8E72EE 100%);
    --on-accent: #191927;
    --neutral-mark: #a9a8bd;
    --good-text: #86efac; --good-soft: rgba(34, 197, 94, .14); --good: #22c55e;
    --bad-text: #fca5a5;  --bad-soft: rgba(239, 68, 68, .15);  --bad: #ef4444;
    --warn-text: #fcd34d; --warn-soft: rgba(245, 158, 11, .14); --warn: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; scrollbar-color: var(--border-strong) transparent; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--accent); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
[hidden] { display: none !important; }
::selection { background: rgba(142, 114, 238, .45); color: #fff; }

/* layout */
.container { display: flex; height: 100vh; }
.main { flex: 1; padding: 28px 32px; overflow-y: auto; background: var(--bg); min-width: 0; }
.page { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
.page-wide { max-width: 1320px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.page-head h2 { font-size: 17px; color: var(--text); font-weight: 600; }
.page-head .head-end { margin-right: auto; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.me { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 4px; }

/* activity log */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .stat-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stat-tile {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; transition: border-color .15s;
}
.stat-tile:hover { border-color: var(--accent-line); }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat-sub { font-size: 10.5px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.tone-good { background: var(--good); }
.dot.tone-bad { background: var(--bad); }
.dot.tone-warn { background: var(--warn); }
.dot.tone-info { background: var(--accent); }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-row .text-input { flex: 1 1 160px; width: auto; }
.select-input { appearance: auto; cursor: pointer; }
.table-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 10px; }
.logs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.logs-table th { text-align: right; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.logs-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.logs-table tr:hover td { background: var(--surface-hover); }
.logs-table a { text-decoration: none; }
.logs-table .target { word-break: break-word; color: var(--text); max-width: 420px; }
.empty-row { text-align: center; color: var(--muted); padding: 30px 10px !important; }
.tag { display: inline-block; font-size: 11.5px; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.tag.tone-good { background: var(--good-soft); color: var(--good-text); }
.tag.tone-bad { background: var(--bad-soft); color: var(--bad-text); }
.tag.tone-warn { background: var(--warn-soft); color: var(--warn-text); }
.tag.tone-info { background: var(--accent-soft); color: #6ff0ec; }
.tag.tag-off { background: var(--surface-2); color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--text-2); }

/* header */
.header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.header h1 { font-size: 23px; font-weight: 700; }
.header h1 a, .login-box h1 {
    background: var(--gradient); -webkit-background-clip: text; background-clip: text;
    color: transparent; text-decoration: none;
}
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.user-chip {
    font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 999px; direction: ltr;
}
.user-chip .role { color: var(--purple-text); margin-right: 6px; direction: rtl; }
form.inline { display: inline; }

/* buttons */
.btn {
    display: inline-block; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-strong);
    padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer;
    text-decoration: none; transition: background .2s, color .2s, border-color .2s; font-family: inherit; line-height: 1.4;
}
.btn:hover { background: #34344f; color: var(--text); }
.btn:focus-visible, .text-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-danger { background: var(--bad-soft); color: var(--bad-text); border-color: rgba(239, 68, 68, .45); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn.active { background: var(--purple-soft); color: var(--purple-text); border-color: var(--purple); }
.btn-back { display: inline-flex; align-items: center; gap: 6px; }
.btn-back svg { width: 16px; height: 16px; }
.btn-promote { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.btn-promote:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-warn { background: var(--warn-soft); color: var(--warn-text); border-color: rgba(245, 158, 11, .45); }
.btn-warn:hover { background: #b45309; border-color: #b45309; color: #fff; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; font-weight: 700; }
.btn:disabled { opacity: .6; cursor: wait; }

/* toolbar + breadcrumb */
.toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .breadcrumb { flex: 1; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--border-strong); }
.breadcrumb .current { color: var(--text); }
.badge {
    display: inline-block; font-size: 10.5px; color: var(--purple-text); background: var(--purple-soft);
    border-radius: 999px; padding: 1px 8px; margin-top: 5px; white-space: nowrap;
}
.badge-owner { background: var(--gradient); color: var(--on-accent); font-weight: 700; }
.locked { font-size: 11.5px; }
.badge-readonly { font-size: 12px; padding: 5px 12px; margin: 0; color: var(--warn-text); background: var(--warn-soft); }

/* alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; border: 1px solid transparent; }
.alert-success { background: var(--accent-soft); color: #7ff3ef; border-color: rgba(0, 215, 210, .3); }
.alert-error { background: var(--bad-soft); color: var(--bad-text); border-color: rgba(239, 68, 68, .35); }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px; }
.item {
    position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    transition: background .2s, border-color .2s, transform .2s;
}
.item:hover { background: var(--surface-hover); border-color: var(--accent-line); transform: translateY(-2px); }
.item-link { display: block; padding: 18px 10px 14px; text-align: center; color: inherit; text-decoration: none; }
.item .icon { width: 52px; height: 52px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; }
.item .icon svg { width: 48px; height: 48px; }
.item .name {
    font-size: 12.5px; color: var(--text); word-break: break-word; line-height: 1.3;
    max-height: 2.6em; overflow: hidden;
}
.item .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.item-del { position: absolute; top: 6px; left: 6px; opacity: 0; transition: opacity .15s; }
.item:hover .item-del, .item-del:focus-within { opacity: 1; }
.item-del button {
    width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(239, 68, 68, .45);
    background: #2a1620; color: #f87171; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.item-del button:hover { background: #b91c1c; color: #fff; }
.item-del svg { width: 16px; height: 16px; }
@media (hover: none) { .item-del { opacity: 1; } }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); font-size: 15px; }

/* sidebar */
.sidebar {
    width: 300px; background: var(--bg-side); border-left: 1px solid var(--border); padding: 24px 18px;
    display: flex; flex-direction: column; gap: 20px; overflow-y: auto;
}
.sidebar h2 { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: .5px; }
.disk-card, .formats-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.formats-card { padding: 16px; }
/* storage donut: outer ring = disk / quota usage, inner ring = share of each file format */
.donut { width: 176px; height: 176px; margin: 0 auto 10px; position: relative; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut .seg { transition: opacity .15s; cursor: default; }
.donut .seg.is-dim { opacity: .2; }
.donut-text {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
    justify-content: center; pointer-events: none; text-align: center; padding: 0 38px;
}
.donut-text .free { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.2; direction: ltr; white-space: nowrap; }
.donut-text .total { font-size: 10.5px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
.ring-legend { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-2); margin-bottom: 4px; }
.ring-legend span { display: flex; align-items: center; gap: 6px; }
.key { width: 14px; height: 6px; border-radius: 3px; display: inline-block; flex: none; }
.key-disk { background: var(--neutral-mark); }
.key-formats { background: linear-gradient(90deg, #3987e5 0 25%, #d95926 25% 50%, #199e70 50% 75%, #c98500 75%); }
.bars { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.bar-item { display: flex; flex-direction: column; gap: 5px; }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; }
.bar-label span:first-child { color: var(--text); }
.bar-label span:last-child { color: var(--text-2); }
.bar-track { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 3px; background: var(--neutral-mark); }
.formats-card h3 { font-size: 13px; color: var(--text-2); margin-bottom: 10px; font-weight: 600; }
.format-item {
    padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 12.5px;
    border-radius: 6px; transition: opacity .15s, background .15s; outline: none;
}
.format-item:last-child { border-bottom: none; }
.format-item:hover, .format-item:focus-visible { background: var(--surface-2); }
.format-item.is-dim { opacity: .45; }
.format-head { display: flex; align-items: center; gap: 8px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; background: #75748c; }
.format-name { color: var(--text); font-weight: 500; flex: 1; }
.format-name span { color: var(--muted); font-weight: 400; font-size: 11px; margin-right: 4px; }
.format-size { color: var(--text-2); font-size: 12px; direction: ltr; }
.format-track { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; margin: 7px 0 4px; }
.format-fill { height: 100%; width: 0; border-radius: 3px; background: #75748c; }
.format-pct { font-size: 11px; color: var(--text-2); }
.format-members { font-size: 10.5px; color: var(--muted); margin-top: 3px; text-align: right; word-break: break-word; }
.no-files { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0; }

/* modals */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(10, 10, 18, .75);
    z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
    padding: 28px; width: 90%; max-width: 440px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.modal h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.modal p { font-size: 13px; color: var(--text-2); margin-bottom: 20px; line-height: 1.7; }
.modal input[type="file"] {
    width: 100%; padding: 12px; background: var(--input); border: 1px dashed var(--border-strong);
    border-radius: 10px; color: var(--text); margin-bottom: 12px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.upload-info { font-size: 12px; color: var(--text-2); min-height: 18px; }
.upload-info.error { color: var(--bad-text); }
.progress { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; width: 0; background: var(--gradient); transition: width .2s; }

/* forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-group input, .text-input {
    width: 100%; padding: 11px 14px; background: var(--input); border: 1px solid var(--border-strong);
    border-radius: 10px; color: var(--text); font-size: 14px; outline: none; font-family: inherit;
}
.form-group input::placeholder, .text-input::placeholder { color: #6e6d85; }
.form-group input:focus, .text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .text-input { flex: 1 1 180px; width: auto; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* cards + users table */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-bottom: 20px; }
.card.narrow { max-width: 440px; margin: 0 auto; }
.card h2 { font-size: 16px; margin-bottom: 14px; color: var(--text); }
.hint { font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; line-height: 1.8; }
.table-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th { text-align: right; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.users-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.users-table tr:hover td { background: var(--surface-hover); }
.users-table .uname { text-align: right; font-weight: 600; }
.users-table .uname a { text-decoration: none; }
.users-table .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.users-table details summary { list-style: none; }
.users-table details summary::-webkit-details-marker { display: none; }
.mini-form {
    display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px;
    background: var(--input); border: 1px solid var(--border-strong); border-radius: 10px; min-width: 210px;
}
.mini-form label { font-size: 12px; color: var(--text); display: flex; gap: 6px; align-items: center; }

/* login / error pages */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
    background:
        radial-gradient(circle at 18% 22%, rgba(0, 215, 210, .14), transparent 42%),
        radial-gradient(circle at 82% 78%, rgba(142, 114, 238, .18), transparent 45%),
        var(--bg);
}
.login-box {
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; padding: 40px 36px;
    width: 100%; max-width: 380px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.login-box.center { text-align: center; }
.login-box h1 { font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.login-box p { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 24px; }

@media (max-width: 768px) {
    .container { flex-direction: column; height: auto; }
    .sidebar { width: 100%; border-left: none; border-top: 1px solid var(--border); }
    .main { padding: 20px 16px; }
    .page { padding: 20px 16px; }
}

/* storage quota */
.quota-sub { font-size: 12px; color: var(--text-2); margin-top: 10px; }
.quota-alert { color: var(--bad-text); }
.bar-fill.quota-fill { background: var(--neutral-mark); }
.bar-fill.quota-fill.is-high { background: #fab219; }
.bar-fill.quota-fill.is-over { background: #d03b3b; }
.bar-track.mini { height: 5px; margin: 4px 0 2px; max-width: 160px; }
.quota-cell { min-width: 150px; }
.small { font-size: 11px; }
.row-disabled td { opacity: .55; }
.row-disabled td.actions { opacity: 1; }
.inline-field { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.form-row .quota-input { flex: 0 0 90px; width: 90px; }
.text-input.stacked { margin-bottom: 10px; }
.disk-card .quota-sub { text-align: center; }
.folder-quota {
    font-size: 12.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border);
    border-right: 3px solid var(--purple); border-radius: 10px; padding: 9px 14px; margin-bottom: 14px;
}

/* download from link */
.jobs { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.jobs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.jobs-head h3 { font-size: 14px; color: var(--text); font-weight: 600; }
.jobs-list { display: flex; flex-direction: column; gap: 10px; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
       padding: 10px 12px; background: var(--input); border: 1px solid var(--border); border-radius: 10px; }
.job-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.job-name { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.job-track { grid-column: 1; height: 5px; background: var(--track); border-radius: 3px; overflow: hidden; }
.job-fill { height: 100%; width: 0; background: var(--gradient); border-radius: 3px; transition: width .4s; }
.job[data-status="done"] .job-fill { background: var(--good); }
.job[data-status="failed"] .job-fill, .job[data-status="canceled"] .job-fill { background: #75748c; }
.job-meta { grid-column: 1; display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.job-meta a { text-decoration: none; }
.job-error { color: var(--bad-text); }
.job-cancel { grid-column: 2; grid-row: 1 / span 3; }
.status-cell { white-space: nowrap; }
.status-cell .tag { margin-left: 4px; }

/* users' storage usage (admins) */
.users-usage { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.uu-row { display: flex; flex-direction: column; gap: 4px; }
.uu-row.uu-off { opacity: .6; }
.uu-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; }
.uu-head a { color: var(--text); text-decoration: none; font-weight: 600; }
.uu-head a:hover { color: var(--accent); }
.uu-head .badge { margin-top: 0; }
.uu-val { margin-right: auto; color: var(--text-2); font-size: 11.5px; }
.uu-pct { font-size: 10.5px; color: var(--muted); }
.uu-warn { color: var(--warn-text); }
.uu-more { font-size: 11.5px; color: var(--accent); text-decoration: none; border-top: 1px solid var(--border); padding-top: 10px; }
.bar-track.mini-full { height: 5px; }

/* server monitor */
.mon-ranges { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mon-status { font-size: 12px; margin-right: auto; }
.mon-tiles .stat-value { font-size: 21px; }
.mon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mon-card { margin-bottom: 0; padding: 16px 18px; }
.mon-wide { grid-column: 1 / -1; }
.mon-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mon-head h3 { font-size: 14px; color: var(--text); font-weight: 600; }
.mon-head .muted { font-size: 11.5px; }
.mon-legend { display: flex; gap: 14px; margin-right: auto; font-size: 12px; color: var(--text-2); }
.mon-legend span { display: flex; align-items: center; gap: 6px; }
.line-key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: var(--muted); }
.chart { position: relative; direction: ltr; outline: none; border-radius: 8px; transition: opacity .2s; }
.chart:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.chart.is-loading { opacity: .55; }
.chart svg { display: block; touch-action: pan-y; }
.chart-tip {
    position: absolute; top: 8px; pointer-events: none; background: var(--input); border: 1px solid var(--border-strong);
    border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 150px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    direction: rtl; z-index: 2;
}
.chart-tip-time { color: var(--muted); font-size: 11px; margin-bottom: 4px; direction: ltr; text-align: right; }
.chart-tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip-row b { color: var(--text); font-weight: 700; }
.chart-tip-row span { color: var(--text-2); }
.mon-foot { margin-top: 14px; }
@media (max-width: 900px) { .mon-grid { grid-template-columns: 1fr; } }

/* folder access (admin) */
.access-fields { border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 14px 12px; margin-top: 12px; }
.access-fields legend { font-size: 12.5px; color: var(--text-2); padding: 0 6px; }
.access-fields label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.access-modes, .access-level { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0; }
.access-users {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 10px; margin: 8px 0;
    max-height: 160px; overflow-y: auto; padding: 8px; background: var(--input); border-radius: 8px;
}
.access-level { padding-top: 6px; border-top: 1px solid var(--border); }
.access-fields .small { margin-top: 6px; line-height: 1.6; }
.item-access {
    position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
}
.item-access svg { width: 16px; height: 16px; }
.item:hover .item-access, .item-access:focus-visible { opacity: 1; }
.item-access:hover { background: var(--accent); color: var(--on-accent); }
@media (hover: none) { .item-access { opacity: 1; } }
