/* «خزنة المستندات» (vault.js) — container .vlt */
.vlt { display: flex; flex-direction: column; gap: 1rem; }
.vlt-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vlt-hero { flex: 1; display: flex; align-items: center; gap: .85rem; background: var(--dark); color: #fff; border-radius: 14px; padding: .9rem 1.1rem; min-width: 260px; }
.vlt-hero > .ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--grad); color: var(--dark); flex: none; }
.vlt-hero b { display: block; font-size: 1.02rem; }
.vlt-hero small { color: #c9ced8; font-size: .82rem; line-height: 1.6; }
/* Company tabs (owner 2026-11-25: «الذهبية العالمية» / «جيتا») — above the tiles; everything below is that company's */
.vlt-cos { display: flex; gap: .5rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.vlt-co { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .92rem; color: var(--ink); padding: .5rem .9rem; border-radius: 12px; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.vlt-co > .ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--bg); color: var(--muted); transition: background .18s, color .18s; }
.vlt-co small { font-size: .76rem; font-weight: 800; color: var(--muted); background: var(--bg); border-radius: 999px; padding: .05rem .5rem; min-width: 1.7rem; text-align: center; font-variant-numeric: tabular-nums; }
.vlt-co:hover { border-color: var(--dark); }
.vlt-co:focus-visible { outline: 2px solid var(--dark); outline-offset: 2px; }
.vlt-co.is-on { background: var(--dark); border-color: var(--dark); color: #fff; }
.vlt-co.is-on > .ic { background: var(--grad); color: var(--dark); }
.vlt-co.is-on small { background: #fff; color: var(--dark); }
.vlt-copick { display: flex; gap: .5rem; flex-wrap: wrap; }
.vlt-copick__o { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .8rem; cursor: pointer; font-weight: 700; transition: border-color .18s, background .18s; }
.vlt-copick__o:has(input:checked) { border-color: var(--dark); background: color-mix(in srgb, var(--dark) 7%, #fff); }
.vlt-copick__o:focus-within { outline: 2px solid var(--dark); outline-offset: 1px; }
.vlt-viewers { display: flex; flex-wrap: wrap; gap: .4rem; }
.vlt-viewers__o { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; cursor: pointer; transition: border-color .18s, background .18s; }
.vlt-viewers__o:has(input:checked) { border-color: var(--dark); background: color-mix(in srgb, var(--dark) 7%, #fff); }
.vlt-viewers__o:focus-within { outline: 2px solid var(--dark); outline-offset: 1px; }
/* Sections rail (vault-layout.js) beside the list; each category has its own colour --c */
.vlt [data-cat] { --c: #8a5a2b; } /* sections the owner added himself (C1, C2 …) */
.vlt [data-cat=ALL] { --c: var(--dark); }
.vlt-catadd { border-top: 1px dashed var(--line); margin-top: .2rem; padding-top: .3rem; }
.vlt-cat--add { color: var(--muted); justify-content: center; }
.vlt-cat--add:hover, .vlt-cat--add:focus-visible { color: var(--ink); background: var(--bg); }
.vlt-newcat { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .3rem; }
.vlt-newcat input { flex: 1 1 9rem; min-width: 0; font: inherit; font-size: .87rem; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 9px; }
.vlt-newcat input:focus { outline: 2px solid var(--dark); outline-offset: 0; }
.vlt-newcat .vlt-err { flex-basis: 100%; }
.vlt-ncat { font-size: .8rem; margin-inline-start: .4rem; }
#vlt_ncat .vlt-newcat { padding: .35rem 0 0; }
.vlt-more { display: inline-block; margin-block: .1rem .45rem; font-weight: 700; }
.vlt [data-cat=COMPANY] { --c: #475569; }
.vlt [data-cat=AVIATION] { --c: #1d6fd1; }
.vlt [data-cat=SUPPLIERS] { --c: #c2410c; }
.vlt [data-cat=HOTELS] { --c: #7c4dcc; }
.vlt [data-cat=FINANCE] { --c: #15803d; }
.vlt [data-cat=TECH] { --c: #0f7c86; }
.vlt [data-cat=PERSONAL] { --c: #be3a6d; }
.vlt [data-cat=OTHER] { --c: #6b7280; }
.vlt-body { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.vlt-main { min-width: 0; display: flex; flex-direction: column; gap: 1rem; scroll-margin-top: .75rem; }
.vlt-cats { position: sticky; top: .75rem; display: flex; flex-direction: column; gap: .15rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .45rem; box-shadow: var(--shadow); }
.vlt-cat { display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; background: none; font: inherit; font-size: .87rem; font-weight: 700; color: var(--ink); padding: .45rem .5rem; border-radius: 10px; cursor: pointer; text-align: start; transition: background .18s, color .18s; }
.vlt-cat > .ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); flex: none; transition: background .18s, color .18s; }
.vlt-cat__l { flex: 1; min-width: 0; line-height: 1.35; }
.vlt-cat small { font-size: .76rem; font-weight: 800; color: var(--muted); background: var(--bg); border-radius: 999px; padding: .05rem .5rem; min-width: 1.7rem; text-align: center; font-variant-numeric: tabular-nums; }
.vlt-cat__w { font-style: normal; font-size: .7rem; font-weight: 800; color: #fff; background: var(--st-expired); border-radius: 999px; padding: .02rem .42rem; }
.vlt-cat:hover { background: var(--bg); }
.vlt-cat:focus-visible { outline: 2px solid var(--c); outline-offset: 1px; }
.vlt-cat.is-on { background: color-mix(in srgb, var(--c) 9%, #fff); color: var(--c); box-shadow: inset -3px 0 0 var(--c); }
.vlt-cat.is-on > .ic { background: var(--c); color: #fff; }
.vlt-cat.is-on small { background: #fff; color: var(--c); }
.vlt-cat[data-empty]:not(.is-on) { opacity: .5; }
.vlt-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.vlt-bar input[type=search] { flex: 1 1 240px; min-width: 0; height: 42px; border: 1.5px solid var(--line); border-radius: 10px; padding-inline: .85rem; font: inherit; background: #fff; }
.vlt-bar input[type=search]:focus { outline: none; border-color: var(--orange); }
.vlt-sel { display: inline-flex; align-items: center; gap: .3rem; height: 42px; border: 1.5px solid var(--line); border-radius: 10px; padding-inline: .6rem .3rem; background: #fff; color: var(--muted); flex: none; transition: border-color .18s; }
.vlt-sel select { border: 0; background: none; font: inherit; font-weight: 700; font-size: .85rem; color: var(--ink); height: 100%; cursor: pointer; max-width: 190px; }
.vlt-sel select:focus { outline: none; }
.vlt-sel:focus-within, .vlt-sel:hover { border-color: var(--orange); }
.vlt-list { display: flex; flex-direction: column; gap: 1.6rem; }
.vlt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .9rem; align-items: start; }
.vlt-sec__h { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: 0 0 .85rem; font-size: 1.06rem; color: var(--ink); padding-bottom: .55rem; border-bottom: 2px solid color-mix(in srgb, var(--c) 22%, var(--line)); }
.vlt-sec__i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--c); color: #fff; flex: none; }
.vlt-sec__h small { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 999px; padding: .08rem .6rem; }
.vlt-party + .vlt-party { margin-top: 1.1rem; }
.vlt-party__h { display: flex; align-items: center; gap: .4rem; margin: 0 0 .55rem; font-size: .9rem; font-weight: 800; color: var(--ink); }
.vlt-party__h .ic { color: var(--c); }
.vlt-party__h.is-rest { color: var(--muted); }
.vlt-party__h small { font-size: .74rem; font-weight: 700; color: var(--muted); }
/* the table needs the full width: the sections rail becomes a row above it */
.vlt-body.is-wide { grid-template-columns: 1fr; }
.vlt-body.is-wide .vlt-cats { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: thin; }
.vlt-body.is-wide .vlt-cat { width: auto; flex: none; white-space: nowrap; }
.vlt-body.is-wide .vlt-cat.is-on { box-shadow: inset 0 -3px 0 var(--c); }
@media (max-width: 900px) {
  .vlt-body { grid-template-columns: 1fr; }
  .vlt-cats { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: thin; }
  .vlt-cat { width: auto; flex: none; white-space: nowrap; }
  .vlt-cat.is-on { box-shadow: inset 0 -3px 0 var(--c); }
}
.vlt-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .55rem; min-width: 0; transition: border-color .18s; }
.vlt-card:hover { border-color: #d5d9e1; }
.vlt-card__h { display: flex; flex-wrap: wrap; gap: .5rem .7rem; align-items: flex-start; }
.vlt-kico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: #fff4e5; color: var(--orange-d); }
.vlt-kico[data-kind=AGREEMENT] { background: #e8f6fc; color: var(--blue-d); }
.vlt-kico[data-kind=OFFICIAL] { background: #ecfdf3; color: var(--green); }
.vlt-kico[data-kind=LICENSE] { background: #f1f2f6; color: var(--dark); }
.vlt-kico[data-kind=CERT] { background: #fef8e1; color: #a16207; }
.vlt-kico[data-kind=FORM] { background: #f3edfd; color: #7c4dcc; }
.vlt-card__t { flex: 1 1 calc(100% - 50px); min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.vlt-card__t b { flex-basis: 100%; font-size: .98rem; overflow-wrap: anywhere; }
.vlt-kind { font-size: .74rem; font-weight: 800; background: var(--bg); border-radius: 999px; padding: .1rem .55rem; color: var(--muted); }
.vlt-del { color: var(--red); }
.vlt-notes { margin: 0; font-size: .85rem; line-height: 1.7; color: var(--ink); white-space: pre-line; }
.vlt-files { display: flex; flex-direction: column; gap: .35rem; }
.vlt-file { display: flex; align-items: center; gap: .45rem; background: var(--bg); border-radius: 10px; padding: .35rem .55rem; font-size: .84rem; min-width: 0; }
.vlt-file bdi { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.vlt-file small { color: var(--muted); flex: none; }
.vlt-file .btn { flex: none; text-decoration: none; }
.vlt-by { color: var(--muted); font-size: .76rem; }
.vlt-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2.5rem 1rem; background: #fff; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.vlt-empty b { color: var(--ink); }
.vlt-flist { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.vlt-flist > div { background: var(--bg); border-radius: 8px; padding: .3rem .55rem; display: flex; gap: .4rem; align-items: center; }
.vlt-flist > div.is-new { background: #ecfdf3; }
.vlt-flist bdi { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vlt-pick { align-self: flex-start; cursor: pointer; }
.vlt-err { color: var(--red); font-weight: 700; font-size: .88rem; min-height: 1em; }
.vlt-prog { display: grid; gap: 4px; }
.vlt-prog[hidden] { display: none; }
.vlt-prog__bar { height: 8px; border-radius: 99px; background: var(--line, #e5e7eb); overflow: hidden; }
.vlt-prog__bar i { display: block; height: 100%; width: 0; background: var(--brand, #0f766e); transition: width .2s ease; }
.vlt-prog small { color: var(--muted, #6b7280); font-variant-numeric: tabular-nums; }
.vlt-log td { font-size: .85rem; }
@media (max-width: 640px) {
  .vlt-grid { grid-template-columns: 1fr; }
  .vlt-form .frow { grid-template-columns: 1fr; }
  .vlt-file { flex-wrap: wrap; }
}

/* Status colours — expired / soon (≤30 days) / watch (≤90) / ok / none */
.vlt { --st-expired: #c62828; --st-expired-bg: #fdecec; --st-soon: #c2410c; --st-soon-bg: #fff1e6; --st-watch: #a16207; --st-watch-bg: #fef8e1;
  --st-ok: #15803d; --st-ok-bg: #eaf7ef; --st-none: #6b7280; --st-none-bg: #f1f2f6; }
[data-st=expired] { --st: var(--st-expired); --st-bg: var(--st-expired-bg); }
[data-st=soon] { --st: var(--st-soon); --st-bg: var(--st-soon-bg); }
[data-st=watch] { --st: var(--st-watch); --st-bg: var(--st-watch-bg); }
[data-st=ok] { --st: var(--st-ok); --st-bg: var(--st-ok-bg); }
[data-st=none], [data-st=all] { --st: var(--st-none); --st-bg: var(--st-none-bg); }
[data-st=all] { --st: var(--dark); }
.vlt-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.vlt-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; gap: .1rem .65rem; text-align: start;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: .75rem .9rem; cursor: pointer; font: inherit; color: var(--ink);
  box-shadow: var(--shadow); transition: border-color .18s, transform .18s, background .18s; }
.vlt-tile:hover { border-color: var(--st); transform: translateY(-1px); }
.vlt-tile.is-on { border-color: var(--st); background: var(--st-bg); }
.vlt-tile .ic { grid-row: span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--st-bg); color: var(--st); }
.vlt-tile b { font-size: 1.45rem; line-height: 1.1; color: var(--st); font-variant-numeric: tabular-nums; }
.vlt-tile span:not(.ic) { font-size: .82rem; font-weight: 700; color: var(--muted); }
.vlt-tile small { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); }
.vlt-views { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; flex: none; }
.vlt-views button { border: 0; background: none; font: inherit; font-weight: 700; font-size: .84rem; padding: .5rem .8rem; display: inline-flex; gap: .35rem; align-items: center; cursor: pointer; color: var(--muted); transition: background .18s, color .18s; }
.vlt-views button.is-on { background: var(--dark); color: #fff; }
.vlt-card { border-inline-start: 4px solid var(--st); }
.vlt-st { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 800; border-radius: 999px; padding: .12rem .6rem; background: var(--st-bg); color: var(--st); white-space: nowrap; }
.vlt-st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vlt-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .9rem; margin: 0; padding: .65rem .75rem; background: var(--bg); border-radius: 10px; }
.vlt-facts > div { min-width: 0; }
.vlt-facts > .is-wide { grid-column: 1 / -1; }
.vlt-facts dt { font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: .1rem; }
.vlt-facts dd { margin: 0; font-size: .9rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.vlt-nil { color: #b6bcc7; font-weight: 400; }
.vlt-left { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; }
.vlt-left > span { font-weight: 800; font-size: .9rem; color: var(--st); }
.vlt-left[data-st=none] > span { font-weight: 600; font-size: .8rem; }
.vlt-left small { color: var(--muted); font-size: .74rem; }
.vlt-bar2 { flex-basis: 100%; height: 6px; border-radius: 999px; background: #eceef2; overflow: hidden; }
.vlt-bar2 i { display: block; height: 100%; border-radius: inherit; background: var(--st); }
.vlt-fold summary { cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--muted); padding: .15rem 0 .35rem; }
.vlt-card__f { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem .9rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.vlt-card__a { display: inline-flex; gap: .9rem; }
.vlt-twrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow-x: auto; }
.vlt-table { width: 100%; min-width: 880px; table-layout: fixed; }
.vlt-table td[data-l=الإصدار], .vlt-table td[data-l=الانتهاء] { white-space: nowrap; }
.vlt-table td, .vlt-table th { vertical-align: middle; font-size: .86rem; white-space: normal; overflow-wrap: anywhere; padding-inline: .6rem; }
.vlt-table tbody tr { box-shadow: inset -4px 0 0 var(--st); }
.vlt-table tbody tr:hover { background: #fafbfc; }
.vlt-tleft { display: block; color: var(--st); font-size: .74rem; font-weight: 700; margin-top: .15rem; }
.vlt-tact { white-space: nowrap; }
.vlt-tact .btn { text-decoration: none; }
@media (max-width: 1100px) { .vlt-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .vlt-twrap { background: none; border: 0; box-shadow: none; }
  .vlt-table td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: .76rem; font-weight: 700; }
  .vlt-table tbody tr { box-shadow: inset -4px 0 0 var(--st), var(--shadow); }
}
@media (max-width: 640px) { .vlt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vlt-facts { grid-template-columns: 1fr 1fr; } }

/* the button style sets display, so [hidden] alone did not hide «＋ رفع مستند» for view-only users */
[data-vlt-new][hidden] { display: none; }
