/* Knowledge drive (drive.js) and the shared Lucide icon style (icons.js). Uses the brand tokens from brand.css. */

/* Icons: Lucide, brand blue everywhere; status colours set by their own styles win. */
.ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-blue); flex: none; vertical-align: -0.18em; display: inline-block; }
[data-icon]:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 6px; }
.btn-primary .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)), .btn.btn-primary .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)), .nav-tab.active .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: currentColor; }
.btn .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin-right: 2px; }

.drive-view:where(:not([data-ui="v2"], [data-ui="v2"] *)) { height: calc(100dvh - var(--ua-header-h, 64px)); overflow-y: auto; box-sizing: border-box; background: var(--ua-page); }
.drive:where(:not([data-ui="v2"], [data-ui="v2"] *)) { max-width: 1240px; margin: 0 auto; padding: 20px 24px 48px; font-family: var(--ua-font); color: var(--ua-ink); }
.drive-muted:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-ink-muted); font-size: 13px; }

.drive-top:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.drive-crumbs:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 4px; flex: 1 1 280px; min-width: 0; flex-wrap: wrap; font-size: 18px; font-weight: 600; }
.drive-crumb:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 6px; color: var(--ua-ink-strong); text-decoration: none; padding: 4px 8px; border-radius: var(--ua-radius); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.drive-crumb:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-soft); color: var(--ua-blue); }
.drive-crumb-sep:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; }
.drive-crumb-sep .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-ink-muted); }
.drive-search:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: relative; flex: 0 1 300px; }
.drive-search input:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; box-sizing: border-box; padding: 9px 12px 9px 36px; border: 1px solid var(--ua-border-strong); border-radius: 999px; background: var(--ua-surface); color: var(--ua-ink); font: inherit; font-size: 14px; }
.drive-search input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: none; border-color: var(--ua-blue); box-shadow: 0 0 0 3px var(--ua-blue-ring); }
.drive-search-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; pointer-events: none; }

.drive-seg:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; border: 1px solid var(--ua-border-strong); border-radius: var(--ua-radius); overflow: hidden; }
.drive-seg button:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-surface); border: 0; padding: 7px 10px; cursor: pointer; display: flex; }
.drive-seg button + button:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-left: 1px solid var(--ua-border-strong); }
.drive-seg button.on:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-soft); }
.drive-seg button:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: 2px solid var(--ua-blue); outline-offset: -2px; }

.drive-new:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: relative; }
.drive-new .btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 6px; }
.drive-menu:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 200px; background: var(--ua-surface); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-lg); box-shadow: var(--ua-shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.drive-menu[hidden]:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: none; }
.drive-menu button:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 10px; background: none; border: 0; text-align: left; padding: 9px 12px; border-radius: var(--ua-radius); font: inherit; font-size: 14px; color: var(--ua-ink); cursor: pointer; }
.drive-menu button:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-menu button:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-soft); outline: none; }
.drive-pop:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: fixed; top: 0; left: 0; right: auto; z-index: 3000; }

.drive-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.drive-side:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.drive-side a:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; color: var(--ua-ink); text-decoration: none; font-size: 14px; }
.drive-side a:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-tint); }
.drive-side a.on:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-soft); color: var(--ua-blue); font-weight: 600; }
.drive-main:where(:not([data-ui="v2"], [data-ui="v2"] *)) { min-width: 0; min-height: 300px; border-radius: var(--ua-radius-lg); transition: box-shadow .15s; }
.drive-main.drop:where(:not([data-ui="v2"], [data-ui="v2"] *)) { box-shadow: 0 0 0 2px var(--ua-blue) inset; background: var(--ua-blue-tint); }

.drive-pin:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--ua-blue-border); background: var(--ua-blue-tint); border-radius: var(--ua-radius-lg); text-decoration: none; color: var(--ua-ink); }
.drive-pin > span:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.drive-pin:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--ua-blue); }
.drive-folder-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.drive-folder-bar > span:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; display: inline-flex; align-items: center; gap: 6px; }
.drive-note:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--ua-radius); background: var(--ua-blue-tint); font-size: 13px; color: var(--ua-ink); }
.drive-warn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #FEF3C7; color: #78350F; }
.btn-sm:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 6px 10px !important; font-size: 13px !important; display: inline-flex; align-items: center; gap: 6px; }
.drive-danger:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-danger .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-danger) !important; }

.drive-table:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: 1px solid var(--ua-border); border-radius: var(--ua-radius-lg); background: var(--ua-surface); overflow: hidden; }
.drive-tr:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(80px, 170px) 96px 72px auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--ua-border); cursor: pointer; font-size: 14px; }
.drive-th:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-top: 0; cursor: default; font-size: 12px; font-weight: 600; color: var(--ua-ink-muted); text-transform: uppercase; letter-spacing: .03em; background: var(--ua-page); }
.drive-tr:not(.drive-th):hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-tint); }
.drive-tr:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-tile:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: 2px solid var(--ua-blue); outline-offset: -2px; }
.drive-name:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 500; }
.drive-name-t:where(:not([data-ui="v2"], [data-ui="v2"] *)) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-lock:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; }
.drive-lock .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-ink-muted); }
.drive-tr > span:where(:not([data-ui="v2"], [data-ui="v2"] *)) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-acts:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 6px; justify-content: flex-end; }
.drive-more:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: none; border: 0; padding: 6px; border-radius: 999px; cursor: pointer; display: flex; }
.drive-more:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-more:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-soft); outline: none; }

.drive-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.drive-tile:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: relative; background: var(--ua-surface); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-lg); padding: 16px 14px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.drive-tile:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--ua-blue-border); box-shadow: var(--ua-shadow); }
.drive-tile-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { height: 56px; display: flex; align-items: center; justify-content: center; background: var(--ua-blue-tint); border-radius: var(--ua-radius); }
.drive-tile-name:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 22px; }
.drive-tile .drive-more:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: absolute; right: 6px; bottom: 26px; }

.drive-empty:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 56px 16px; text-align: center; color: var(--ua-ink-muted); }
.drive-empty p:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0; }

/* Modals */
.drive-modal-back:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: fixed; inset: 0; z-index: 4000; background: rgba(17, 24, 39, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.drive-modal:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--ua-surface); color: var(--ua-ink); border-radius: var(--ua-radius-xl); box-shadow: var(--ua-shadow-lg); padding: 22px 22px 18px; font-family: var(--ua-font); }
.drive-modal h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 14px; font-size: 18px; color: var(--ua-ink-strong); }
.drive-modal-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 12px; }
.drive-modal-body p:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0; }
.drive-modal-err:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-danger); font-size: 13px; min-height: 18px; margin-top: 8px; }
.drive-modal-foot:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.drive-field:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.drive-field input:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-field select:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-add select:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-person select:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--ua-border-strong); border-radius: var(--ua-radius); background: var(--ua-surface); color: var(--ua-ink); }
.drive-field input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-field select:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: none; border-color: var(--ua-blue); box-shadow: 0 0 0 3px var(--ua-blue-ring); }
.drive-radio:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 8px; }
.drive-radio label:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.drive-share-people:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 10px; }
.drive-share-people[hidden]:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: none; }
.drive-add:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 8px; }
.drive-add select:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; min-width: 0; }
.drive-person:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--ua-border); font-size: 14px; }
.drive-person > span:where(:not([data-ui="v2"], [data-ui="v2"] *)) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Uploads */
.drive-uploads:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: fixed; right: 16px; bottom: 16px; z-index: 3500; width: min(340px, calc(100vw - 32px)); background: var(--ua-surface); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-lg); box-shadow: var(--ua-shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.drive-up:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: auto minmax(0, 1fr) 80px; gap: 8px; align-items: center; padding: 6px; font-size: 13px; }
.drive-up-name:where(:not([data-ui="v2"], [data-ui="v2"] *)) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-up-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { height: 6px; background: var(--ua-blue-soft); border-radius: 999px; overflow: hidden; }
.drive-up-bar i:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: block; height: 100%; background: var(--ua-blue); transition: width .2s; }
.drive-up.ok .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-success); }
.drive-up.bad .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-danger); }

/* Doc, file and help pages */
.drive-page-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: static; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drive-page-bar .drive-crumbs:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 14px; flex: 0 1 auto; }
.drive-page-bar .page-back:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-page-bar .page-copy:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 6px; }
.drive-ro:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ua-ink-muted); }
.drive-doc:where(:not([data-ui="v2"], [data-ui="v2"] *)) { max-width: 820px; margin: 0 auto; background: var(--ua-surface); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-xl); padding: 28px 36px 40px; box-shadow: var(--ua-shadow-sm); }
.drive-doc-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; box-sizing: border-box; border: 0; background: transparent; font: inherit; font-size: 28px; font-weight: 700; color: var(--ua-ink-strong); padding: 4px 0; }
.drive-doc-title:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: none; box-shadow: 0 2px 0 var(--ua-blue); }
.drive-doc-meta:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.drive-toolbar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; margin-bottom: 14px; border: 1px solid var(--ua-border); border-radius: var(--ua-radius); background: var(--ua-page); position: sticky; top: 0; z-index: 2; }
.drive-toolbar button:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: none; border: 0; padding: 6px 8px; border-radius: var(--ua-radius-sm); cursor: pointer; display: flex; }
.drive-toolbar button:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-toolbar button:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue-soft); outline: none; }
.drive-doc-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { min-height: 320px; font-size: 15px; line-height: 1.65; outline: none; overflow-wrap: anywhere; }
.drive-doc-body:empty:where(:not([data-ui="v2"], [data-ui="v2"] *))::before { content: attr(data-ph); color: var(--ua-ink-muted); }
.drive-doc-body a:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-blue); }
.drive-doc-body blockquote:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--ua-blue-border); color: var(--ua-ink-muted); }
.drive-doc-body h2:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 20px; margin: 18px 0 6px; }
.drive-file:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 14px; }
.drive-file-meta:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 2px; }
.drive-preview:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-surface); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-lg); overflow: hidden; display: flex; justify-content: center; }
.drive-preview img:where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-preview video:where(:not([data-ui="v2"], [data-ui="v2"] *)) { max-width: 100%; max-height: 75vh; object-fit: contain; }
.drive-preview iframe:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; height: 78vh; border: 0; }
.drive-help:where(:not([data-ui="v2"], [data-ui="v2"] *)) { max-width: 900px; display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 1100px) {
    .drive-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: 170px minmax(0, 1fr); gap: 16px; }
    .drive-tr:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: minmax(140px, 1fr) 96px auto; }
    .drive-tr > span:nth-child(2):where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-tr > span:nth-child(4):where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: none; }
}
@media (max-width: 768px) {
    .drive:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 14px 16px 40px; }
    .drive-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: 1fr; gap: 12px; }
    .drive-side:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex-direction: row; overflow-x: auto; position: static; }
    .drive-side a:where(:not([data-ui="v2"], [data-ui="v2"] *)) { white-space: nowrap; }
    .drive-search:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1 1 100%; order: 3; }
    .drive-tr:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: minmax(0, 1fr) auto; }
    .drive-tr > span:nth-child(2):where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-tr > span:nth-child(3):where(:not([data-ui="v2"], [data-ui="v2"] *)), .drive-tr > span:nth-child(4):where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: none; }
    .drive-doc:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 18px 16px 28px; }
    .drive-doc-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 22px; }
}

body.dark-mode .drive-warn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #422006; color: #FDE68A; }
body.dark-mode .drive-modal-back:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: rgba(0, 0, 0, .6); }

/* Emojis swapped for icons (icons.js); status dots keep their colours. */
.ua-emoji-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; vertical-align: -0.15em; margin-right: 2px; }
.ua-ic-status:where(:not([data-ui="v2"], [data-ui="v2"] *)) { stroke: none; }
.ua-ic-green:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #16A34A !important; fill: #16A34A; }
.ua-ic-amber:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #F59E0B !important; fill: #F59E0B; }
.ua-ic-red:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #DC2626 !important; fill: #DC2626; }
.ua-ic-grey:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #9CA3AF !important; fill: #9CA3AF; }
.ua-ic-purple:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #7C3AED !important; fill: #7C3AED; }
.ua-ic-blue:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-blue) !important; fill: var(--ua-blue); }

/* Team sections */
.drive-h:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 13px; font-weight: 600; color: var(--ua-ink-muted); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 10px; }
.drive-sections:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.drive-section:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ua-surface); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-lg); text-decoration: none; color: var(--ua-ink); }
.drive-section:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--ua-blue-border); box-shadow: var(--ua-shadow); }
.drive-section:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: 2px solid var(--ua-blue); outline-offset: 2px; }
.drive-section-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 40px; height: 40px; border-radius: var(--ua-radius); background: var(--ua-blue-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.drive-section-t:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drive-section-t b:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 15px; }
.drive-folder-bar .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { vertical-align: -2px; }
.drive-side a.drive-side-sub:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding-left: 24px; font-size: 13.5px; }

/* Profile page (profile.js) */
.pf:where(:not([data-ui="v2"], [data-ui="v2"] *)) { max-width: 1100px; margin: 0 auto; padding: 20px 24px 48px; font-family: var(--ua-font); color: var(--ua-ink); }
.pf .page-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: static; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.pf .page-back:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 6px; }
.pf-banner:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--ua-radius); background: var(--ua-blue-tint); border: 1px solid var(--ua-blue-border); margin-bottom: 16px; }
.pf-head:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.pf-head h2:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 2px; font-size: 22px; color: var(--ua-ink-strong); }
.pf-avatar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.pf-initials:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; justify-content: center; background: var(--ua-blue-soft); color: var(--ua-blue); font-weight: 700; font-size: 26px; }
.pf-muted:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-ink-muted); font-size: 13px; }
.pf-roles:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin-top: 6px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.pf-h:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 13px; font-weight: 600; color: var(--ua-ink-muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 6px; }
.pf-intro:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; }
.pf-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pf-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-surface); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.pf-card-head:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 10px; }
.pf-card-head h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0; font-size: 16px; flex: 1; color: var(--ua-ink-strong); }
.pf-card-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 36px; height: 36px; border-radius: var(--ua-radius); background: var(--ua-blue-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.pf-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--ua-page); border: 1px solid var(--ua-border); color: var(--ua-ink-muted); white-space: nowrap; }
.pf-pill.on:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #ECFDF5; border-color: #A7F3D0; color: var(--ua-success); }
.pf-pill.on .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-success); }
.pf-pill.warn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #FFFBEB; border-color: #FDE68A; color: var(--ua-warning); }
.pf-pill.warn .ua-ic:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-warning); }
.pf-what:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0; font-size: 14px; line-height: 1.5; }
.pf-detail:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0; font-size: 13px; color: var(--ua-ink-muted); line-height: 1.5; }
.pf-err:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--ua-danger); }
.pf-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.pf-switch:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.pf-switch input:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 36px; height: 20px; appearance: none; background: var(--ua-border-strong); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.pf-switch input:where(:not([data-ui="v2"], [data-ui="v2"] *))::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.pf-switch input:checked:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-blue); }
.pf-switch input:checked:where(:not([data-ui="v2"], [data-ui="v2"] *))::after { transform: translateX(16px); }
.pf-switch input:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: 2px solid var(--ua-blue); outline-offset: 2px; }
.pf-admin:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin-top: 18px; }
.pf-code:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-code code:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--ua-page); border: 1px solid var(--ua-border); border-radius: var(--ua-radius-sm); padding: 6px 10px; font-size: 13px; overflow-wrap: anywhere; }
.pf-form:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 12px; }
.pf-form fieldset:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: 1px solid var(--ua-border); border-radius: var(--ua-radius); padding: 12px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pf-form legend:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-weight: 600; padding: 0 6px; display: inline-flex; gap: 8px; align-items: center; }
.pf-form fieldset > p:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-column: 1 / -1; }
.pf-form label:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
.pf-form input:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--ua-border-strong); border-radius: var(--ua-radius); background: var(--ua-surface); color: var(--ua-ink); }
.pf-form input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) { outline: none; border-color: var(--ua-blue); box-shadow: 0 0 0 3px var(--ua-blue-ring); }
.pf-form > .btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 768px) { .pf:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 14px 16px 40px; } .pf-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: 1fr; } }

/* Docs open read-only (Edit switches to editing). */
.drive-doc.is-reading .drive-doc-title { border-color: transparent; background: transparent; cursor: default; }
.drive-doc.is-reading .drive-doc-body { cursor: text; }
.drive-doc.is-reading .drive-doc-body:empty::before { content: "This doc is empty."; color: var(--text-3, #8a8f98); }
