:root {
  --navy: #061a2a;
  --navy-2: #0b2638;
  --cream: #f7f3e9;
  --paper: #fffdf7;
  --lime: #c6f000;
  --ink: #10202b;
  --muted: #66727a;
  --line: #dcd8cc;
  --danger: #b23b31;
  --shadow: 0 18px 50px rgba(7, 25, 39, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { margin: 0; min-height: 100vh; background: var(--cream); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 44%) 1fr; }
.auth-brand { background: var(--navy); color: white; padding: clamp(32px, 6vw, 84px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::after { content: ""; position: absolute; width: 34vw; height: 34vw; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -10vw; bottom: 7vh; box-shadow: inset 0 0 0 6vw transparent, 0 0 0 7vw rgba(255,255,255,.035), 0 0 0 14vw rgba(255,255,255,.025); }
.brand-mark { display: flex; gap: 14px; align-items: center; position: relative; z-index: 1; }
.brand-mark img { width: 154px; height: auto; display: block; filter: invert(1) grayscale(1) brightness(2.2); }
.brand-emblem { width: 47px; height: 47px; border: 1px solid rgba(255,255,255,.32); display: grid; place-items: center; font: 700 27px Georgia, serif; }
.brand-name { font-size: .78rem; font-weight: 750; letter-spacing: .22em; line-height: 1.45; text-transform: uppercase; }
.auth-brand h1 { font: 400 clamp(3rem, 5.8vw, 6.3rem)/.96 Georgia, "Times New Roman", serif; max-width: 720px; margin: 80px 0 18px; position: relative; z-index: 1; letter-spacing: -.04em; }
.eyebrow { color: #a7c900; font-size: .74rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.auth-note { max-width: 520px; color: #bdc8ce; font-size: 1.05rem; line-height: 1.7; position: relative; z-index: 1; }
.auth-panel { background: var(--paper); padding: clamp(32px, 7vw, 110px); display: grid; align-content: center; }
.auth-card { width: min(440px, 100%); margin: auto; }
.auth-card h2 { font: 400 2.5rem/1.08 Georgia, serif; margin: 12px 0 12px; }
.auth-card > p { color: var(--muted); line-height: 1.6; margin: 0 0 32px; }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: .82rem; font-weight: 750; letter-spacing: .04em; }
.field input, .field select { width: 100%; border: 1px solid var(--line); background: white; padding: 14px 15px; border-radius: 3px; color: var(--ink); min-height: 48px; }
.field input:focus, .field select:focus { outline: 3px solid rgba(198, 240, 0, .35); border-color: #799000; }
.field-help { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.check-field { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .82rem; margin: 4px 0 12px; }
.check-field input { width: 17px; height: 17px; accent-color: var(--navy); }
.button { border: 0; min-height: 48px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--navy); color: white; font-weight: 750; border-radius: 3px; text-decoration: none; }
.button:hover { background: var(--navy-2); }
.button.lime { background: var(--lime); color: var(--navy); }
.button.ghost { background: transparent; color: inherit; border: 1px solid var(--line); }
.button.small { min-height: 36px; padding: 8px 12px; font-size: .86rem; }
.form-error { color: var(--danger); min-height: 1.4em; font-size: .9rem; margin: 8px 0; }

.shell { min-height: 100vh; display: grid; grid-template-columns: clamp(214px, 17vw, 260px) minmax(0, 1fr); }
.sidebar { background: var(--navy); color: white; padding: 28px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand-mark { padding: 0 8px 30px; border-bottom: 1px solid rgba(255,255,255,.12); }
.nav { display: grid; gap: 6px; margin-top: 28px; }
.nav button { color: #c8d1d6; background: transparent; border: 0; text-align: left; padding: 12px 13px; border-radius: 3px; font-weight: 650; display: flex; align-items: center; gap: 12px; }
.nav button:hover, .nav button.active { color: white; background: rgba(255,255,255,.08); }
.nav button.active::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(198,240,0,.12); }
.sidebar-bottom { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.user-meta strong, .user-meta span { display: block; }
.user-meta span { color: #91a2ac; font-size: .78rem; margin-top: 4px; }
.logout { margin-top: 16px; color: #b9c5cb; background: transparent; border: 0; padding: 0; font-size: .88rem; }

.main { min-width: 0; }
.topbar { height: 78px; padding: 0 clamp(24px, 4vw, 58px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; background: rgba(247,243,233,.92); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font: 400 1.5rem Georgia, serif; margin: 0; }
.network-pill { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 8px 12px; font-size: .8rem; color: var(--muted); }
.network-pill::before { content: ""; display: inline-block; width: 7px; height: 7px; background: #65a30d; border-radius: 50%; margin-right: 7px; }
.content { width: 100%; padding: clamp(22px, 3.2vw, 58px); }
.greeting { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 32px; }
.greeting h2 { font: 400 clamp(2.3rem, 4.2vw, 4.6rem)/1 Georgia, serif; margin: 8px 0 0; letter-spacing: -.035em; }
.date { color: var(--muted); font-size: .9rem; }
.core-summary { display: grid; justify-items: end; gap: 12px; flex: 0 0 auto; }

.grid { display: grid; gap: 18px; }
.quick-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); }
.home-primary .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(7,25,39,.045); }
.quick-card { min-height: 175px; padding: 22px; text-decoration: none; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; position: relative; overflow: hidden; }
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quick-card.missing { border-style: dashed; color: var(--muted); }
.quick-card .icon { width: 38px; height: 38px; background: var(--navy); color: white; display: grid; place-items: center; margin-bottom: 25px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
.quick-card h3 { margin: auto 0 5px; font-size: 1rem; }
.quick-card p { color: var(--muted); margin: 0; font-size: .83rem; line-height: 1.45; }
.quick-card .arrow { position: absolute; top: 20px; right: 21px; font-size: 1.15rem; }
.core-service { min-width: 0; position: relative; }
.core-service .quick-card { height: 100%; min-height: 96px; padding: 15px 16px; display: flex; flex-direction: column; justify-content: center; background-color: var(--paper); background-size: cover; background-position: center; }
.core-service .quick-card.has-background { transition: transform .18s ease, box-shadow .18s ease, background-position .35s ease; }
.core-service .quick-card.has-background:hover { background-position: center 46%; }
.core-service .quick-card h3 { margin: 0 32px 4px 0; position: relative; z-index: 1; }
.core-service .quick-card p { position: relative; z-index: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.core-service .quick-card .arrow { top: 13px; right: 14px; }
.core-service-actions { position: absolute; z-index: 2; top: 14px; right: 13px; display: flex; background: var(--paper); box-shadow: -8px 0 12px var(--paper); opacity: 0; transition: opacity .15s ease; }
.core-service:hover .core-service-actions, .core-service:focus-within .core-service-actions { opacity: 1; }
.core-service-actions button { border: 0; background: transparent; color: var(--muted); padding: 7px 6px; font-size: .72rem; }
.core-service-actions button:hover { color: var(--ink); }
.core-service.admin .quick-card .arrow { right: 82px; }

.section-head { display: flex; justify-content: space-between; align-items: end; margin: 48px 0 16px; gap: 18px; }
.section-head h2 { font: 400 1.8rem Georgia, serif; margin: 0; }
.section-head p { color: var(--muted); margin: 5px 0 0; font-size: .88rem; }
.personal-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); }
.personal-card { min-height: 135px; padding: 20px; display: flex; flex-direction: column; text-decoration: none; }
.personal-link { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; text-decoration: none; }
.personal-card h3 { margin: 0 0 8px; font-size: 1rem; }
.personal-card p { color: var(--muted); font-size: .84rem; line-height: 1.5; margin: 0; }
.personal-card footer { margin-top: auto; display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.empty { padding: 28px; border: 1px dashed #b9b5aa; color: var(--muted); background: rgba(255,255,255,.3); }

.home-layout { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.4fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.home-primary { min-width: 0; }
.bookmark-panel { position: sticky; top: 100px; max-height: calc(100vh - 124px); overflow: hidden; box-shadow: 0 12px 34px rgba(7,25,39,.06); container-type: inline-size; }
.bookmark-panel > header { padding: 22px 20px 18px; display: flex; align-items: end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.bookmark-panel h2 { font: 400 1.55rem/1.1 Georgia, serif; margin: 6px 0 0; }
.bookmark-list { overflow-y: auto; max-height: calc(100vh - 210px); scrollbar-width: thin; }
.bookmark-category { padding: 18px 12px 10px; }
.bookmark-category + .bookmark-category { border-top: 1px solid var(--line); }
.bookmark-category > h3 { margin: 0 8px 9px; color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.bookmark-row { position: relative; border-radius: 4px; }
.bookmark-row:hover { background: rgba(6,26,42,.045); }
.bookmark-row > a { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; text-decoration: none; }
.site-favicon { display: grid; place-items: center; background: white; border: 1px solid var(--line); position: relative; overflow: hidden; font-weight: 800; color: var(--navy); flex: 0 0 auto; }
.site-favicon img { object-fit: contain; position: relative; z-index: 1; }
.site-favicon img.failed { display: none; }
.site-favicon > span { position: absolute; inset: 0; display: grid; place-items: center; }
.bookmark-icon { width: 32px; height: 32px; }
.bookmark-icon img { width: 20px; height: 20px; }
.personal-favicon, .table-favicon { width: 34px; height: 34px; font-size: .7rem; }
.personal-favicon img, .table-favicon img { width: 22px; height: 22px; }
.network-name { display: flex; align-items: center; gap: 11px; min-width: 240px; }
.network-heading { align-items: end; }
.network-heading > div:first-child { min-width: 0; }
.network-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; flex: 0 0 auto; }
.scan-summary { color: var(--muted); margin: 12px 0 0; font-size: .86rem; }
.scan-icon { display: inline-block; font-size: 1.15rem; line-height: 1; }
#scan-network:disabled { cursor: wait; opacity: .72; }
#scan-network.scanning .scan-icon { animation: scan-pulse .8s ease-in-out infinite alternate; }
@keyframes scan-pulse { from { transform: scale(.75); opacity: .45; } to { transform: scale(1.18); opacity: 1; } }
.bookmark-copy { min-width: 0; display: block; }
.bookmark-copy strong, .bookmark-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-copy strong { font-size: .88rem; }
.bookmark-copy small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.bookmark-arrow { color: var(--muted); font-size: .82rem; }
.bookmark-actions { position: absolute; top: 4px; right: 5px; display: none; align-items: center; background: var(--paper); box-shadow: -8px 0 12px var(--paper); }
.bookmark-row:hover .bookmark-actions, .bookmark-row:focus-within .bookmark-actions { display: flex; }
.bookmark-actions button { border: 0; background: transparent; color: var(--muted); padding: 7px 6px; font-size: .72rem; }
.bookmark-actions button:hover { color: var(--ink); }

.table-wrap { background: var(--paper); border: 1px solid var(--line); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 660px; }
th, td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); }
th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
td { font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
.status { font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.status.online { color: #4d7c0f; }
.status.seen { color: #8a6c09; }
.status.disabled { color: var(--danger); }
.table-note { color: var(--muted); font-size: .78rem; }
.presence { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.presence i { width: 7px; height: 7px; border-radius: 50%; background: #a9adae; }
.presence i.online { background: #65a30d; box-shadow: 0 0 0 3px rgba(101,163,13,.12); }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.button.danger { color: var(--danger); border-color: rgba(178,59,49,.3); }
.users-table td:last-child, .users-table th:last-child { text-align: right; }
.admin-users-head { margin-top: 0; }
.users-note { margin-top: 18px; padding: 18px 20px; }

@container (min-width: 390px) {
  .bookmark-category { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
  .bookmark-category > h3 { grid-column: 1 / -1; }
}

@container (min-width: 600px) {
  .bookmark-category { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container (min-width: 820px) {
  .bookmark-category { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.files-heading { align-items: end; }
.files-heading > div:first-child { min-width: 0; }
.files-heading p { color: var(--muted); margin: 12px 0 0; line-height: 1.55; }
.file-heading-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.file-upload-button { position: relative; overflow: hidden; cursor: pointer; }
.file-upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-toolbar { min-width: 0; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.breadcrumbs { min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.breadcrumbs button { min-width: 0; max-width: 190px; border: 0; background: transparent; padding: 5px 3px; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs button:last-child { color: var(--ink); }
.breadcrumbs span { color: #9da3a5; flex: 0 0 auto; }
.file-sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.file-sort select { border: 1px solid var(--line); background: white; min-height: 36px; padding: 6px 30px 6px 10px; color: var(--ink); }
.file-drop { min-width: 0; border: 1px dashed #aaa69c; background: rgba(255,253,247,.62); padding: 18px 20px; display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; text-align: left; transition: background .15s ease, border-color .15s ease; }
.file-drop.drag { outline: 3px solid rgba(198,240,0,.38); border-color: #799000; background: white; }
.file-drop strong, .file-drop p { display: block; margin: 0; }
.file-drop p { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.drop-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: white; font-weight: 800; flex: 0 0 auto; }
.file-browser { min-width: 0; overflow: hidden; }
.file-list-head, .file-item { display: grid; grid-template-columns: minmax(220px, 1fr) 90px 120px minmax(128px, auto); gap: 16px; align-items: center; }
.file-list-head { padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.file-item { min-width: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.file-item:last-child { border-bottom: 0; }
.file-item:hover { background: rgba(6,26,42,.025); }
.file-item[draggable="true"] { cursor: grab; }
.file-item.dragging { opacity: .45; cursor: grabbing; }
.file-item[data-drop-folder].drag { position: relative; z-index: 1; outline: 2px solid #91ac00; outline-offset: -3px; background: rgba(198,240,0,.1); }
.file-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.file-copy { min-width: 0; }
.file-copy small { display: block; color: var(--muted); font-size: .72rem; margin-top: 3px; }
.file-name-button, .file-name-link { display: block; max-width: 100%; border: 0; padding: 0; background: transparent; color: var(--ink); font-weight: 750; text-align: left; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name-button:hover, .file-name-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.file-size, .file-created { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.file-actions { display: flex; justify-content: flex-end; gap: 5px; }
.icon-button { border: 0; background: transparent; color: var(--muted); padding: 7px 6px; font-size: .74rem; }
.icon-button:hover { color: var(--ink); background: rgba(6,26,42,.05); }
.icon-button.danger:hover { color: var(--danger); }
.file-type-icon { width: 36px; height: 42px; border-radius: 3px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: #66727a; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); font-size: .58rem; font-weight: 900; letter-spacing: .04em; position: relative; }
.file-type-icon::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 0 8px 8px; border-color: transparent transparent rgba(255,255,255,.55) transparent; }
.file-type-icon.pdf { background: #c2413b; }
.file-type-icon.word { background: #2563a9; }
.file-type-icon.excel { background: #258052; }
.file-type-icon.presentation { background: #c55b2d; }
.file-type-icon.diagram { background: #4f6fb2; }
.file-type-icon.design { background: #69499b; }
.file-type-icon.image { background: #7159a6; }
.file-type-icon.video { background: #8a4b78; }
.file-type-icon.audio { background: #256f78; }
.file-type-icon.archive { background: #786a43; }
.file-type-icon.text { background: #526571; }
.file-type-icon.folder { width: 40px; height: 30px; margin-top: 7px; background: #d4b42c; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(85,67,0,.1); }
.file-type-icon.folder::before { content: ""; position: absolute; left: 3px; top: -6px; width: 17px; height: 8px; border-radius: 3px 3px 0 0; background: #d4b42c; }
.file-type-icon.folder::after { display: none; }
.file-empty { padding: 54px 24px; display: grid; justify-items: center; text-align: center; color: var(--muted); }
.file-empty strong { color: var(--ink); margin-top: 14px; }
.file-empty p { margin: 6px 0 0; font-size: .84rem; }

.dialog-backdrop { position: fixed; inset: 0; background: rgba(5,20,31,.72); display: grid; place-items: center; z-index: 100; padding: 20px; }
.dialog { width: min(520px, 100%); background: var(--paper); padding: 28px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.dialog h2 { font: 400 2rem Georgia, serif; margin: 0 0 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--navy); color: white; padding: 13px 17px; box-shadow: var(--shadow); z-index: 200; }
.hidden { display: none !important; }

@media (max-width: 1180px) {
  .home-layout { grid-template-columns: 1fr; }
  .bookmark-panel { position: static; max-height: none; }
  .bookmark-list { max-height: none; }
  .quick-card { min-height: 155px; }
  .core-service .quick-card { min-height: 96px; }
}

@media (max-width: 930px) {
  .home-layout { grid-template-columns: 1fr; }
  .bookmark-panel { position: static; max-height: none; }
  .bookmark-list { max-height: none; }
}

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 34vh; padding: 28px; }
  .auth-brand h1 { font-size: 3rem; margin: 58px 0 12px; }
  .auth-note { font-size: .94rem; }
  .auth-panel { padding: 36px 24px 56px; }
  .shell { display: block; padding-bottom: 76px; }
  .sidebar { height: auto; position: static; padding: 18px 20px; }
  .sidebar .brand-mark { padding: 0; border: 0; }
  .sidebar-bottom { position: absolute; top: 20px; right: 18px; border: 0; margin: 0; padding: 0; }
  .sidebar-bottom .user-meta { display: none; }
  .sidebar-bottom .logout { margin: 0; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); margin: 0; background: var(--navy); padding: 8px 5px; box-shadow: 0 -8px 30px rgba(0,0,0,.15); }
  .nav button { display: block; text-align: center; font-size: .72rem; padding: 11px 4px; }
  .nav button.active::before { margin: 0 auto 6px; display: block; }
  .topbar { height: 64px; padding: 0 20px; }
  .network-pill { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 26px 20px; }
  .greeting { align-items: start; }
  .files-heading { display: grid; }
  .file-heading-actions { margin-top: 18px; }
  .file-list-head { display: none; }
  .file-item { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 13px 14px; }
  .file-size, .file-created { display: none; }
  .network-heading { display: grid; }
  .network-actions { justify-content: start; margin-top: 18px; }
  .date { display: none; }
  .core-summary { gap: 0; }
  .core-service-actions { opacity: 1; }
  .quick-grid, .personal-grid { grid-template-columns: 1fr; }
  .home-primary .quick-grid { grid-template-columns: 1fr; }
  .bookmark-list { display: block; }
  .bookmark-panel > header { padding: 19px 16px 15px; }
  .bookmark-category { padding-inline: 8px; }
  .bookmark-actions { display: flex; position: static; padding-right: 5px; }
  .bookmark-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .quick-card { min-height: 142px; }
  .core-service .quick-card { min-height: 92px; }
  .section-head { margin-top: 38px; }
  .admin-users-head { margin-top: 0; }
}

@media (max-width: 420px) {
  .content { padding: 22px 14px; }
  .topbar { padding-inline: 14px; }
  .network-pill { display: none; }
  .greeting h2 { font-size: clamp(2rem, 12vw, 3rem); }
  .section-head { align-items: start; flex-direction: column; }
  .section-head .button { width: 100%; }
  .network-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .network-actions .button { width: 100%; }
  .file-heading-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .file-heading-actions .button { width: 100%; }
  .file-toolbar { align-items: stretch; flex-direction: column; }
  .file-sort { justify-content: space-between; }
  .file-sort select { flex: 1; }
  .file-drop { justify-content: flex-start; padding: 15px; }
  .file-item { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 13px 12px; }
  .file-actions { gap: 0; }
  .icon-button { padding: 7px 5px; font-size: .7rem; }
  .file-type-icon { width: 32px; height: 38px; }
  .dialog { padding: 22px 18px; max-height: calc(100vh - 24px); overflow: auto; }
}

@media (min-width: 1800px) {
  .content { padding-inline: clamp(54px, 5vw, 96px); }
  .home-layout { grid-template-columns: minmax(400px, .72fr) minmax(840px, 1.55fr); }
  .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-primary .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
