/*
 * FileShare UI · css/layout-v2.css · POOJA TOOLS layout.
 * A navigation rail on the left, a clean top bar, breadcrumb paths, labelled tabs on top of the details,
 * and a soft selection colour. Pure CSS over the same markup and ids, so every feature keeps working.
 */
:root { --rail-w: 78px; --select: #E3EAFD; --select-soft: #EEF2FE; --select-line: #F28C28; }

/* ---------------------------------------------------------------- navigation rail */
#app-view { padding-left: var(--rail-w); }
.appbar-actions {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 30;
  display: flex !important; flex-direction: column; align-items: stretch; gap: 2px; padding: 76px 8px 12px;
  background: linear-gradient(180deg, #0F1B3D 0%, #172C69 70%, #1F3A8A 100%); box-shadow: 2px 0 12px rgba(15, 27, 61, .18);
  overflow-y: auto; overflow-x: hidden;
}
.appbar-actions::before { content: ""; position: absolute; top: 18px; left: 50%; width: 40px; height: 40px; transform: translateX(-50%);
  border-radius: 12px; background: rgba(255,255,255,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFC078' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1'/%3E%3C/svg%3E") center / 22px no-repeat; }
.appbar-actions .top-action {
  display: flex !important; flex-direction: column; align-items: center; gap: 3px; width: 100%; min-height: 54px; padding: 7px 2px;
  border: 0; border-radius: 12px; background: transparent; color: #C9D3EE; font-size: 10.5px; line-height: 1.15; cursor: pointer; position: relative;
}
.appbar-actions .top-action[hidden] { display: none !important; }
.appbar-actions .top-action .ic { width: 22px; height: 22px; color: #DCE4F7 !important; stroke: currentColor; }
.appbar-actions .top-action span { color: inherit; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-actions .top-action:hover { background: rgba(255,255,255,.1); color: #fff; }
.appbar-actions .top-action:hover .ic { color: #FFC078 !important; }
.appbar-actions .top-action:focus-visible { outline: 2px solid #FFC078; outline-offset: -2px; }
.appbar-actions .top-action::after { content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: transparent; }
.appbar-actions .top-action:hover::after { background: var(--select-line); }
.appbar-actions .badge { top: -6px; right: -10px; box-shadow: 0 0 0 2px #172C69; }
#top-profile { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); border-radius: 0 0 12px 12px; padding-top: 10px; }

/* ---------------------------------------------------------------- top bar */
.appbar { height: 64px; padding: 0 22px !important; gap: 18px; background: #fff; }
.appbar::after { height: 2px !important; bottom: -2px !important; }
.appbar .quick-search { flex: 1; max-width: 640px; width: auto; margin: 0 auto; }
.appbar .quick-search input { height: 42px; border-radius: 21px; padding-left: 20px; background: #F2F5FB; border: 1px solid #E1E7F2; font-size: 14px; }
.appbar .quick-search input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .1); }
.tenant-chip { border-radius: 20px; }

/* ---------------------------------------------------------------- workspace */
.workspace { background: #EDF1F8 !important; }
.leftpanel .side-tabs, .leftpanel .tabs { border-radius: 10px; }
.toolbar { gap: 8px; padding: 10px 14px !important; background: #fff; border-bottom: 1px solid #EEF1F6; }
.toolbar .tool { height: 34px; border-radius: 17px !important; border: 1px solid #DDE3EE !important; background: #fff !important; padding: 0 14px !important; gap: 6px; }
.toolbar .tool:hover { border-color: var(--brand) !important; background: #F4F7FD !important; }
.toolbar .tool[data-act="upload"] { background: var(--grad) !important; color: #fff !important; border-color: transparent !important; }
.toolbar .tool[data-act="upload"] .ic { color: #fff !important; }
.toolbar-hint { color: #8A96AD; font-size: 12px; }

/* breadcrumb path */
.list-title { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; font-weight: 500; }
.crumb { padding: 3px 9px; border-radius: 12px; background: #F2F5FB; color: #42506B; font-size: 12.5px; }
.crumb-root { background: transparent; color: #8A96AD; padding-left: 0; }
.crumb-last { background: #E3EAFD; color: var(--brand-deep); font-weight: 600; }
.crumb-sep { color: #B3BDCF; margin: 0 2px; }

/* document list: airy rows, soft selection with a saffron edge (not the classic yellow bar) */
.grid tbody tr td { border-bottom-color: #F0F3F8 !important; }
.grid tbody tr:hover td { background: #F6F8FD !important; }
.grid tbody tr.selected td, .grid tbody tr[aria-selected="true"] td { background: var(--select) !important; }
.grid tbody tr.selected td:first-child, .grid tbody tr[aria-selected="true"] td:first-child { box-shadow: inset 4px 0 0 var(--select-line); }
.grid thead th { background: #F7F9FC !important; color: #5B6782 !important; font-weight: 600 !important; text-transform: uppercase; font-size: 11.5px !important; letter-spacing: .04em; }
.tree .trow.selected { background: var(--select) !important; box-shadow: inset 3px 0 0 var(--select-line) !important; border-radius: 8px; }
.tree .trow:hover { border-radius: 8px; }

/* details: labelled tabs on top instead of an icon column */
.details { display: flex !important; flex-direction: column; }
.dtabs { flex-direction: row !important; flex-wrap: wrap; gap: 4px !important; padding: 8px 12px 0 !important; border-right: 0 !important; border-bottom: 1px solid #E6EAF2; background: #fff; }
.dtab { width: auto !important; height: 34px !important; display: inline-flex !important; align-items: center; gap: 6px; padding: 0 12px !important;
  border: 0 !important; border-radius: 8px 8px 0 0 !important; color: #5B6782; font-size: 12.5px; }
.dtab .ic { width: 16px; height: 16px; }
.dtab:hover { background: #F4F7FD !important; }
.dtab[aria-selected="true"] { background: #fff !important; color: var(--brand-deep); font-weight: 600; box-shadow: inset 0 -3px 0 var(--select-line); }
.dtab-label { white-space: nowrap; }
.details-body { flex: 1; }

/* preview header in brand navy */
.preview-bar, .preview-head { background: #0F1B3D !important; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1000px) {
  :root { --rail-w: 60px; }
  .appbar-actions .top-action span:not(.ic-wrap):not(.badge) { display: none; }
  .appbar-actions { padding-top: 70px; }
}

/* keep the path and the tabs on one line when space is short */
.list-title { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; min-width: 0; max-width: 45%; }
.dtabs { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: thin; }
.dtab { flex: none; }
