/* «خزنة المستندات» (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; }
.vlt-bar { display: flex; flex-direction: column; align-items: stretch; gap: .6rem; }
.vlt-bar__r { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.vlt-bar input[type=search] { flex: 1 1 260px; width: 100%; max-width: 520px; height: 42px; border: 1.5px solid var(--line); border-radius: 10px; padding-inline: .85rem; font: inherit; }
.vlt-bar input[type=search]:focus { outline: none; border-color: var(--orange); }
.vlt-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.vlt-chips small { opacity: .7; margin-inline-start: .2rem; }
.vlt-list { display: flex; flex-direction: column; gap: 1.4rem; }
.vlt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; align-items: start; }
.vlt-grp__h { display: flex; align-items: center; gap: .5rem; margin: 0 0 .65rem; font-size: 1.02rem; color: var(--ink); padding-bottom: .45rem; border-bottom: 1.5px solid var(--line); }
.vlt-grp__h .ic { color: var(--orange-d); }
.vlt-grp__h small { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 999px; padding: .05rem .55rem; }
.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-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-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; } }
