/*
 * FileShare UI · css/modern.css · the POOJA TOOLS workspace: Library with Quick access and a chevron tree,
 * two-line document rows with type badges and hover actions, a card view, an Information drawer and card-style details.
 */

/* ---------------------------------------------------------------- notice bar instead of the yellow strip */
.welcome { background: #fff !important; color: #5B6782 !important; border-bottom: 1px solid #E6EAF2 !important; font-size: 12.5px; padding: 6px 18px !important; }
.welcome b { color: var(--brand-deep); }

/* ---------------------------------------------------------------- Library: tabs, Quick access, tree */
.leftpanel { background: #fff; }
.leftpanel .tabs { background: #F3F5FA; border-radius: 10px; padding: 4px; margin: 10px; gap: 4px; display: flex; }
.leftpanel .tab { flex: 1; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: #5B6782; font-weight: 500; height: 34px; }
.leftpanel .tab[aria-selected="true"] { background: #fff !important; color: var(--brand-deep); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.leftpanel .tab .ic { width: 18px; height: 18px; }
.quick { padding: 2px 12px 0; }
.quick-title { margin: 10px 6px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A96AD; }
.quick button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: #344054; font-size: 13.5px; cursor: pointer; text-align: left; }
.quick button:hover { background: #F2F5FB; color: var(--brand-deep); }
.quick button .ic { width: 18px; height: 18px; color: #6B7A99; }
#search-panel:not([hidden]) ~ .quick, .leftpanel:has(#search-panel:not([hidden])) .quick { display: none; }
.tree { padding: 0 8px 20px 10px !important; }
.tree .trow { height: 34px; border-radius: 8px; padding: 0 6px; gap: 6px; }
.tree .trow .tlabel { font-size: 13.5px; color: #26324A; }
.tree .trow.root .tlabel { font-weight: 600; }
.tree .fic { width: 20px !important; height: 20px !important; }
.tree .tog { width: 20px; height: 20px; border: 0 !important; background: transparent !important; color: #8A96AD; display: grid; place-items: center; padding: 0; font-size: 0; }
.tree .tog .chev { width: 14px; height: 14px; transition: transform .15s; }
.tree .tog.open .chev { transform: rotate(90deg); color: var(--brand); }
.tree .tog.leaf .chev { visibility: hidden; }
.tree ul[role="group"] > li::before, .tree ul[role="group"] > li::after { border-color: #E3E8F2 !important; }

/* ---------------------------------------------------------------- document list: two-line rows, badges, hover actions */
.grid tbody tr td { height: 54px; }
.grid td.ftd { width: 52px; }
.ftype { display: inline-grid; place-items: center; width: 34px; height: 40px; border-radius: 7px; font: 700 10px/1 Roboto, sans-serif; letter-spacing: .03em;
  color: #fff; background: #8A96AD; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); position: relative; }
.ftype::after { content: ""; position: absolute; top: 0; right: 0; width: 9px; height: 9px; background: rgba(255,255,255,.45); border-bottom-left-radius: 4px; }
.ft-pdf { background: #E5484D; } .ft-doc { background: #2F6FED; } .ft-xls { background: #1E9E5A; } .ft-ppt { background: #E8731A; }
.ft-img { background: #8B5CF6; } .ft-cad { background: #0EA5A4; } .ft-zip { background: #6B7280; } .ft-mail { background: #0B63B5; } .ft-media { background: #D9467A; }
.grid td.left { position: relative; }
.tcell { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 150px; }
.tcell .ttl { font-weight: 500; color: #1D2939; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcell .tmeta { font-size: 11.5px; color: #8A96AD; }
.row-acts { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.grid tbody tr:hover .row-acts, .grid tbody tr.selected .row-acts { opacity: 1; }
.row-acts button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #fff; color: #5B6782; cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.row-acts button:hover { color: var(--brand); background: #EEF2FE; }
.row-acts .ic { width: 16px; height: 16px; }

/* view switch and info toggle */
.viewsw { display: inline-flex; gap: 2px; background: #F3F5FA; border-radius: 9px; padding: 3px; margin-left: 8px; }
.viewsw button { width: 30px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #6B7A99; cursor: pointer; display: grid; place-items: center; }
.viewsw button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(16,24,40,.14); }
.viewsw .ic { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- card view (same rows, laid out as cards) */
.grid-wrap.cards .grid { display: block; }
.grid-wrap.cards .grid thead { display: none; }
.grid-wrap.cards .grid tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 14px; }
.grid-wrap.cards .grid tbody tr { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; position: relative; min-height: 168px; padding: 16px 14px 12px;
  background: #fff; border: 1px solid #E6EAF2; border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.05); cursor: pointer; }
.grid-wrap.cards .grid tbody tr:hover { border-color: #C9D5F5; box-shadow: 0 6px 18px rgba(31,58,138,.12); }
.grid-wrap.cards .grid tbody tr.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15); }
.grid-wrap.cards .grid tbody td { display: none; height: auto; border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
.grid-wrap.cards .grid tbody td.ftd, .grid-wrap.cards .grid tbody td.left, .grid-wrap.cards .grid tbody td.status-col { display: block; width: 100%; }
.grid-wrap.cards .ftype { width: 48px; height: 58px; font-size: 12px; border-radius: 9px; }
.grid-wrap.cards .tcell { padding-right: 0; }
.grid-wrap.cards .tcell .ttl { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.grid-wrap.cards .grid tbody td.status-col { order: 3; text-align: left; }
.grid-wrap.cards .row-acts { position: static; transform: none; opacity: 1; margin-top: 6px; }
.grid-wrap.cards .grid tbody td.left { position: static; }

/* details: label-over-value cards instead of a two-column grey table */
.details-body table.kv { display: block; width: 100%; border: 0 !important; }
.details-body table.kv tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.details-body table.kv tr { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; background: #fff; border: 1px solid #EDF0F6; border-radius: 10px; min-width: 0; }
.details-body table.kv th { padding: 0 !important; border: 0 !important; background: none !important; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8A96AD; text-align: left; width: auto !important; }
.details-body table.kv td { padding: 0 !important; border: 0 !important; background: none !important; font-size: 13px; color: #26324A; word-break: break-word; }
.details-body table.kv tr:has(input), .details-body table.kv tr:has(textarea), .details-body table.kv tr:has(select) { grid-column: 1 / -1; }
.details-body { background: #FBFCFE; }

/* Library column: tabs, Quick access, then the tree takes the rest */
.leftpanel { display: flex !important; flex-direction: column; min-height: 0; }
.leftpanel > .tabs, .leftpanel > .quick { flex: none; }
.leftpanel > .tree, .leftpanel > .search-panel { flex: 1 1 auto; min-height: 0; overflow: auto; }
.leftpanel > :not(.tabs):not(.quick):not(.tree):not(.search-panel) { flex: none; }
.leftpanel:has(#search-panel:not([hidden])) > .quick { display: none; }

/* preview open: type, uploader and size are already in the line under the title, so their columns step aside */
.workspace.has-preview .grid-wrap:not(.cards) .grid tr > :nth-child(6),
.workspace.has-preview .grid-wrap:not(.cards) .grid tr > :nth-child(8),
.workspace.has-preview .grid-wrap:not(.cards) .grid tr > :nth-child(10) { display: none; }

/* the middle column never scrolls sideways; its bars wrap instead of pushing the content out */
.center { min-width: 0; overflow-x: clip !important; }
.center > * { min-width: 0; }
.listbar { flex-wrap: wrap; row-gap: 6px; min-width: 0; }
.toolbar { flex-wrap: wrap; row-gap: 6px; }
.workspace.has-preview .toolbar-hint { display: none; }

/* property cards always fit the width of the panel under the list */
.details-body { overflow-x: hidden; box-sizing: border-box; }
.details-body table.kv { width: 100%; max-width: 100%; box-sizing: border-box; }
.details-body table.kv tbody { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); }
