/*
 * documents-redesign.css
 * Supplementary .dms-* styles for Documents file-manager redesign.
 * Extends barantum.css (.brtm-*) design-system tokens.
 * Loaded globally; scoped via .dms-* prefix to avoid collisions.
 */

/* ── file-type color tokens ── */
:root {
  --ft-pdf:   #e5484d;
  --ft-doc:   #1b6fbe;
  --ft-xls:   #16a34a;
  --ft-ppt:   #ea7117;
  --ft-img:   #8b5cf6;
  --ft-zip:   #d97706;
  --ft-vid:   #0ea5e9;
  --ft-aud:   #db2777;
  --ft-txt:   #64748b;
  --ft-other: #7c8aa0;
}

.dms-hidden { display: none !important; }

/* ══ sub-bar (breadcrumb + toolbar below topbar) ══ */
.dms-subbar {
  height: 52px; flex: 0 0 52px; display: flex; align-items: center;
  gap: 10px; padding: 0 20px;
  background: var(--card-bg); border-bottom: 1px solid var(--border);
}
.dms-subbar .ttl {
  font-size: 15px; font-weight: 700; color: var(--text-main);
  display: flex; align-items: center; gap: 9px;
}
.dms-subbar .ttl .pill {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border-radius: 20px; padding: 2px 9px;
}
.dms-sp { flex: 1; }
.dms-viewtog {
  display: flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden;
}
.dms-viewtog button {
  width: 34px; height: 32px; display: grid; place-items: center;
  color: var(--text-light); font-size: 16px; background: #fff;
  cursor: pointer; border: none; transition: .12s;
}
.dms-viewtog button.active { background: var(--primary); color: #fff; }
.dms-viewtog button:not(.active):hover { background: var(--surface); color: var(--text-main); }

/* ══ left-rail CTA + navigation ══ */
.dms-cta { padding: 14px 14px 6px; display: flex; gap: 8px; }
.dms-upload-btn {
  flex: 1; height: 40px; border-radius: 9px; background: var(--primary); color: #fff;
  font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; border: none; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: .14s;
}
.dms-upload-btn:hover { background: var(--primary-dark); }
.dms-newfold-btn {
  width: 40px; flex: 0 0 40px; height: 40px; border-radius: 9px;
  background: var(--surface); color: var(--text-2); font-size: 18px;
  display: grid; place-items: center; border: none; cursor: pointer; transition: .14s;
}
.dms-newfold-btn:hover { background: #e8eef6; color: var(--text-main); }
.dms-railpad { padding: 6px 12px 14px; }
.dms-nav {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: .12s;
}
.dms-nav i { font-size: 17px; color: var(--text-light); width: 18px; text-align: center; }
.dms-nav:hover { background: var(--surface); }
.dms-nav.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.dms-nav.active i { color: var(--primary); }
.dms-nav .ct {
  margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text-light);
  background: var(--surface); border-radius: 20px; padding: 1px 8px;
  min-width: 22px; text-align: center;
}
.dms-nav.active .ct { background: #fff; color: var(--primary); }
.dms-seclabel {
  font-size: 9.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: #b0bcc9; padding: 14px 12px 5px;
  display: flex; align-items: center; justify-content: space-between;
}
.dms-seclabel button {
  font-size: 14px; color: #b0bcc9; width: 20px; height: 20px;
  border-radius: 5px; border: none; background: none; cursor: pointer;
}
.dms-seclabel button:hover { background: var(--surface); color: var(--text-2); }
.dms-modlist .dms-nav { font-size: 13px; padding: 7px 12px; }
.dms-modlist .dms-nav i { font-size: 15px; }
.dms-folder-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--text-2); transition: .12s;
}
.dms-folder-row:hover { background: var(--surface); }
.dms-folder-row i { color: var(--ft-doc); font-size: 16px; }
.dms-folder-row .ct { margin-left: auto; font-size: 11px; color: #b0bcc9; }
.dms-storage { border-top: 1px solid var(--border); padding: 14px 16px; }
.dms-storage .lbl {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-2); margin-bottom: 7px;
}
.dms-storage .lbl b { color: var(--text-main); }
.dms-meter { height: 7px; border-radius: 6px; background: #eef2f7; overflow: hidden; }
.dms-meter span {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--primary), #3f93de);
}
.dms-storage .sub { font-size: 11px; color: #b0bcc9; margin-top: 7px; }

/* ══ main canvas ══ */
.dms-canvas {
  flex: 1; overflow-y: auto; padding: 18px 22px 40px; background: var(--surface);
}
.dms-sech {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted); margin: 4px 2px 13px; display: flex; align-items: center; gap: 8px;
}
.dms-sech .n { color: var(--text-light); font-weight: 600; }

/* ── folders grid ── */
.dms-folders {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px;
}
.dms-fold {
  display: flex; align-items: center; gap: 12px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px;
  cursor: pointer; transition: .14s; box-shadow: var(--shadow-sm);
}
.dms-fold:hover {
  border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px);
}
.dms-fold .ic {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary); font-size: 20px; flex: 0 0 38px;
}
.dms-fold .nm {
  font-size: 13.5px; font-weight: 600; color: var(--text-main);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dms-fold .mt { font-size: 11.5px; color: #b0bcc9; margin-top: 2px; }
.dms-fold .more {
  margin-left: auto; color: #b0bcc9; font-size: 18px; width: 26px; height: 26px;
  border-radius: 7px; border: none; background: none; cursor: pointer;
}
.dms-fold .more:hover { background: var(--surface); color: var(--text-main); }

/* ── files grid ── */
.dms-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(198px, 1fr)); gap: 14px;
}
.dms-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 13px;
  overflow: hidden; cursor: pointer; transition: .14s; position: relative;
  box-shadow: var(--shadow-sm);
}
.dms-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dms-card.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.dms-thumb {
  height: 126px; display: grid; place-items: center; position: relative;
  background: var(--surface); overflow: hidden;
}
.dms-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dms-ftype {
  width: 54px; height: 66px; border-radius: 8px; background: #fff;
  box-shadow: var(--shadow-sm); display: grid; place-items: center; position: relative;
}
.dms-ftype i { font-size: 30px; }
.dms-ftype .ext {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; font-weight: 800; letter-spacing: .04em; color: #fff;
  border-radius: 4px; padding: 2px 6px; text-transform: uppercase;
}
.dms-chk {
  position: absolute; top: 9px; left: 9px; width: 20px; height: 20px;
  border-radius: 6px; border: 1.5px solid var(--border); background: #fff;
  display: grid; place-items: center; opacity: 0; transition: .12s; z-index: 3;
}
.dms-chk i { font-size: 13px; color: #fff; opacity: 0; }
.dms-card:hover .dms-chk,
.dms-card.sel .dms-chk { opacity: 1; }
.dms-card.sel .dms-chk { background: var(--primary); border-color: var(--primary); }
.dms-card.sel .dms-chk i { opacity: 1; }
.dms-star {
  position: absolute; top: 9px; right: 9px; font-size: 16px; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.25); opacity: 0; z-index: 3; transition: .12s; cursor: pointer;
}
.dms-card:hover .dms-star,
.dms-star.on { opacity: 1; }
.dms-star.on { color: #f5b914; text-shadow: none; }
.dms-cbody { padding: 11px 12px 12px; }
.dms-cname {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-main); overflow: hidden;
}
.dms-cname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dms-cmeta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #b0bcc9; }
.dms-cmeta .d { width: 3px; height: 3px; border-radius: 50%; background: #b0bcc9; }
.dms-cfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.dms-cmore {
  color: #b0bcc9; font-size: 18px; width: 28px; height: 28px;
  border-radius: 7px; border: none; background: none; cursor: pointer;
}
.dms-cmore:hover { background: var(--surface); color: var(--text-main); }
.dms-share {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .03em;
}
.dms-share.pub { background: #dcfce7; color: #15803d; }
.dms-share.prv { background: var(--surface); color: var(--text-muted); }

/* ── list / table ── */
.dms-table { width: 100%; border-collapse: collapse; }
.dms-table thead th {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted); text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface); white-space: nowrap;
}
.dms-table thead th.r,
.dms-table tbody td.r { text-align: right; }
.dms-table tbody td {
  padding: 11px 16px; border-bottom: 1px solid #eef2f7;
  font-size: 13px; color: var(--text-2); vertical-align: middle;
}
.dms-table tbody tr { cursor: pointer; transition: .1s; }
.dms-table tbody tr:hover { background: var(--row-hover); }
.dms-table tbody tr:last-child td { border-bottom: none; }
.dms-tname { display: flex; align-items: center; gap: 11px; font-weight: 600; color: var(--text-main); }
.dms-tic {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; font-size: 17px; flex: 0 0 34px;
}
.dms-rowmore {
  color: #b0bcc9; font-size: 18px; width: 30px; height: 30px;
  border-radius: 7px; border: none; background: none; cursor: pointer;
}
.dms-rowmore:hover { background: var(--surface); color: var(--text-main); }
.dms-cell-chk {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--border); display: inline-grid; place-items: center; vertical-align: middle;
}

/* ── inline toolbar (cari + tampilan) — dipakai tab Lampiran modul detail ── */
.dms-atx-bar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 14px;
}
.dms-atx-search { position: relative; flex: 1 1 180px; min-width: 160px; max-width: 320px; }
.dms-atx-search i {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--text-light); pointer-events: none;
}
.dms-atx-search input {
  width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 26px 0 30px; font-size: 12.5px; font-family: inherit;
  color: var(--text-main); background: #fff; outline: none;
}
.dms-atx-search input:focus { border-color: var(--primary); }
.dms-atx-search .clr {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--text-light); cursor: pointer;
  font-size: 11px; padding: 3px; display: none;
}
.dms-atx-search.has-value .clr { display: block; }

/* ── selection toolbar ── */
.dms-seltb {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #18233A; color: #fff; border-radius: 13px;
  box-shadow: 0 12px 40px rgba(15,30,60,.3);
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px 8px 16px; z-index: 30; animation: dmsUp .2s ease;
}
@keyframes dmsUp {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.dms-seltb .cnt { font-size: 13px; font-weight: 600; margin-right: 8px; }
.dms-seltb button {
  height: 34px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500;
  color: #dbe6f5; display: inline-flex; align-items: center; gap: 7px;
  border: none; background: none; cursor: pointer; transition: .12s;
}
.dms-seltb button:hover { background: rgba(255,255,255,.13); color: #fff; }
.dms-seltb button.danger:hover { background: rgba(225,29,72,.35); color: #fff; }
.dms-seltb .x {
  width: 34px; padding: 0; justify-content: center; font-size: 18px;
  margin-left: 4px; border-left: 1px solid rgba(255,255,255,.16);
  border-radius: 0 8px 8px 0;
}

/* ── detail dock (fixed right, push layout) ── */
.dms-dock {
  position: fixed; top: 56px; right: 0; bottom: 0; width: 400px;
  background: var(--card-bg); border-left: 1px solid var(--border);
  box-shadow: -8px 0 30px rgba(20,40,80,.08); z-index: 120;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
}
.dms-dock.open { transform: translateX(0); }
.brtm-main-content { transition: margin-right .26s cubic-bezier(.4,0,.2,1); }

/* resize handles */
.dms-railhandle {
  width: 6px; flex: 0 0 6px; cursor: col-resize;
  background: transparent; transition: background .12s; position: relative; z-index: 5;
}
.dms-railhandle:hover,
.dms-railhandle.drag { background: var(--primary-light); }
.dms-dockhandle {
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  cursor: col-resize; background: transparent; transition: background .12s; z-index: 130;
}
.dms-dockhandle:hover,
.dms-dockhandle.drag { background: var(--primary-light); }
body.dms-resizing { user-select: none; cursor: col-resize; }
body.dms-resizing .dms-dock,
body.dms-resizing .brtm-main-content { transition: none; }

/* dock preview thumbnail */
.dms-prev {
  margin: 16px; height: 196px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden; position: relative; cursor: zoom-in;
}
.dms-prev img { width: 100%; height: 100%; object-fit: cover; }
.dms-prev-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 8px; background: rgba(15,30,60,0); color: #fff; font-size: 13px; font-weight: 600;
  opacity: 0; transition: .15s;
}
.dms-prev-hint i { font-size: 18px; }
.dms-prev:hover .dms-prev-hint { opacity: 1; background: rgba(15,30,60,.42); }

/* dock header info */
.dms-dock-fname {
  padding: 0 18px; font-size: 16px; font-weight: 700; color: var(--text-main);
  display: flex; align-items: center; gap: 9px;
}
.dms-dock-sub { padding: 4px 18px 0; font-size: 12.5px; color: var(--text-muted); }
.dms-dock-acts { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); }

/* ── media / document viewer (lightbox) ── */
.dms-viewer {
  position: fixed; inset: 0; background: rgba(13,18,28,.95); z-index: 2000;
  display: none; flex-direction: column; animation: dmsFade .15s ease;
}
.dms-viewer.open { display: flex; }
@keyframes dmsFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.dms-viewer-top {
  height: 58px; flex: 0 0 58px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.dms-viewer-top .ft { display: flex; align-items: center; gap: 11px; min-width: 0; }
.dms-viewer-top .ft .ic {
  width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.12);
  display: grid; place-items: center; font-size: 17px; flex: 0 0 34px;
}
.dms-viewer-top .ft .nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dms-viewer-top .ft .sub { font-size: 11.5px; color: rgba(255,255,255,.6); }
.dms-viewer-top .acts { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.dms-vbtn {
  height: 36px; min-width: 36px; padding: 0 11px; border-radius: 8px; color: #dbe6f5;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 500; border: none; background: none; cursor: pointer; transition: .12s;
}
.dms-vbtn:hover { background: rgba(255,255,255,.14); color: #fff; }
.dms-vbtn.solid { background: var(--primary); color: #fff; }
.dms-vbtn.solid:hover { background: var(--primary-dark); }
.dms-vzoom { font-size: 12.5px; color: rgba(255,255,255,.75); min-width: 46px; text-align: center; }
.dms-vsep { width: 1px; height: 22px; background: rgba(255,255,255,.18); margin: 0 4px; }
.dms-viewer-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  overflow: auto; padding: 24px 76px; position: relative;
}
.dms-viewer-stage img {
  max-width: 100%; max-height: 100%; border-radius: 6px;
  box-shadow: 0 20px 70px rgba(0,0,0,.55); background: #fff;
  transition: transform .15s; transform-origin: center;
}
.dms-viewer-frame {
  width: 100%; height: 100%; max-width: 1000px; border: none; border-radius: 6px;
  background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.55);
}
.dms-viewer-media {
  max-width: 100%; max-height: 100%; border-radius: 6px;
  box-shadow: 0 20px 70px rgba(0,0,0,.55); background: #000;
}
.dms-viewer-audio { width: min(560px, 80%); }
.dms-viewer-msg {
  color: rgba(255,255,255,.72); font-size: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.dms-spin { display: inline-block; animation: dms-spin 1s linear infinite; }
@keyframes dms-spin { to { transform: rotate(360deg); } }
.dms-viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center;
  font-size: 22px; border: none; cursor: pointer; transition: .12s; z-index: 2;
}
.dms-viewer-nav:hover { background: rgba(255,255,255,.24); }
.dms-viewer-nav.prev { left: 18px; }
.dms-viewer-nav.next { right: 18px; }
.dms-vpage {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.5); color: #fff; font-size: 12px; padding: 5px 13px; border-radius: 20px;
}
.dms-viewer-foot {
  flex: 0 0 78px; display: flex; align-items: center; justify-content: center;
  gap: 9px; padding: 0 18px 14px;
}
.dms-vthumb {
  width: 52px; height: 52px; border-radius: 8px; overflow: hidden; border: 2px solid transparent;
  cursor: pointer; background: rgba(255,255,255,.08); display: grid; place-items: center;
  color: #fff; opacity: .65; transition: .12s;
}
.dms-vthumb:hover { opacity: 1; }
.dms-vthumb.active { border-color: var(--primary); opacity: 1; }
.dms-vthumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── form fields (own label styling) ── */
.dms-field { margin-bottom: 14px; }
.dms-field:last-child { margin-bottom: 0; }
.dms-field > label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  margin-bottom: 6px; text-transform: none; letter-spacing: 0;
}
.dms-field > label .req { color: #e11d48; margin-left: 1px; }
.dms-field > .hint { font-size: 11px; color: var(--text-light); margin-top: 5px; }

/* ── dropzone ── */
.dms-drop {
  border: 1.5px dashed var(--border); border-radius: 12px; padding: 20px 18px;
  text-align: center; background: var(--surface); transition: .15s; cursor: pointer;
}
.dms-drop:hover { border-color: var(--primary); background: var(--primary-light); }
.dms-drop .ic {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary-light);
  color: var(--primary); display: grid; place-items: center; font-size: 20px; margin: 0 auto 9px;
}
.dms-drop .t { font-size: 13px; font-weight: 600; color: var(--text-main); }
.dms-drop .t b { color: var(--primary); }
.dms-drop .s { font-size: 11.5px; color: #b0bcc9; margin-top: 4px; }
.dms-uplist { margin-top: 11px; display: flex; flex-direction: column; gap: 8px; }
.dms-uprow {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.dms-uprow .ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; font-size: 16px; flex: 0 0 32px;
}
.dms-uprow .nm { font-size: 13px; font-weight: 600; color: var(--text-main); }
.dms-uprow .pg { height: 5px; border-radius: 5px; background: #eef2f7; overflow: hidden; margin-top: 6px; }
.dms-uprow .pg span { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.dms-uprow .sz { font-size: 11px; color: #b0bcc9; white-space: nowrap; }
.dms-uprow .rm {
  color: #b0bcc9; font-size: 17px; width: 28px; height: 28px;
  border-radius: 7px; border: none; background: none; cursor: pointer;
}
.dms-uprow .rm:hover { background: #fdecef; color: var(--ft-pdf); }
.dms-uprow .rm:disabled { opacity: 0.4; cursor: not-allowed; }
.dms-uprow.err { border-color: var(--ft-pdf); }
.dms-uprow.done { border-color: #bbe6cb; background: #f6fcf8; }
.dms-uprow-ok { color: #16a34a; font-size: 18px; flex: 0 0 auto; }

/* list header (count + clear all) */
.dms-uplist-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 9px; font-size: 12.5px; font-weight: 600; color: var(--text-2, #516079);
}
.dms-clearall {
  border: none; background: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ft-pdf);
  padding: 2px 4px; border-radius: 6px;
}
.dms-clearall:hover { background: #fdecef; }
.dms-clearall:disabled { opacity: 0.4; cursor: not-allowed; }

/* add-more button (slim, replaces big dropzone once files staged) */
.dms-addmore {
  width: 100%; margin-top: 10px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; border-radius: 10px; cursor: pointer;
  border: 1.5px dashed var(--border, #d8e0ea); background: #fbfdff;
  font-size: 13px; font-weight: 600; color: var(--primary, #1b6fbe);
  transition: background .15s, border-color .15s;
}
.dms-addmore:hover { background: var(--primary-light, #eaf4fc); border-color: var(--primary, #1b6fbe); }
.dms-addmore:disabled { opacity: 0.5; cursor: not-allowed; }
.dms-uprow .pg span.indeterminate {
  width: 40% !important;
  animation: dmsUpPg 1.2s ease-in-out infinite;
}
@keyframes dmsUpPg {
  0%   { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* ── sharing segmented control ── */
.dms-seg { display: flex; gap: 10px; }
.dms-seg label {
  flex: 1; border: 1.5px solid var(--border); border-radius: 11px; padding: 12px 13px;
  cursor: pointer; display: flex; gap: 11px; align-items: flex-start; transition: .13s;
  text-transform: none; letter-spacing: normal;
}
.dms-seg label:hover { border-color: var(--primary); }
.dms-seg label.pick { border-color: var(--primary); background: var(--primary-light); }
.dms-seg .form-check-input { position: static; margin: 2px 0 0; flex: 0 0 auto; cursor: pointer; }
.dms-seg .si {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; font-size: 18px; flex: 0 0 34px;
}
.dms-seg .st b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-main); }
.dms-seg .st span { font-size: 11.5px; color: var(--text-muted); }

/* ── full-page states ── */
.dms-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px; min-height: 58vh;
}
.dms-state .ill {
  width: 104px; height: 104px; border-radius: 50%; background: var(--primary-light);
  color: var(--primary); display: grid; place-items: center;
  font-size: 48px; margin-bottom: 20px;
}
.dms-state.err .ill { background: #fdecef; color: var(--ft-pdf); }
.dms-state .t { font-size: 18px; font-weight: 700; color: var(--text-main); }
.dms-state .s { font-size: 13.5px; color: var(--text-muted); margin-top: 8px; max-width: 380px; line-height: 1.55; }
.dms-state .acts { margin-top: 22px; display: flex; gap: 10px; }

/* ── skeleton loading ── */
.dms-skgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(198px, 1fr)); gap: 14px; }
.dms-sk { background: var(--card-bg); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.dms-sk .sh { height: 126px; }
.dms-sk .sb { padding: 12px; }
.dms-sk .ln { height: 11px; border-radius: 6px; margin-bottom: 8px; }
.dms-shimmer {
  background: linear-gradient(90deg, #eef2f7 25%, #e2e8f1 37%, #eef2f7 63%);
  background-size: 400% 100%; animation: dmsShim 1.3s ease infinite;
}
@keyframes dmsShim {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ── context menu ── */
.dms-menu {
  position: fixed; background: #fff; border: 1px solid var(--border);
  border-radius: 11px; box-shadow: var(--shadow-md); padding: 6px;
  min-width: 188px; z-index: 200;
}
.dms-menu button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px;
  border-radius: 8px; font-size: 13px; color: var(--text-2); text-align: left;
  border: none; background: none; cursor: pointer;
}
.dms-menu button:hover { background: var(--surface); color: var(--text-main); }
.dms-menu button i { font-size: 16px; color: var(--text-light); width: 18px; }
.dms-menu button.danger,
.dms-menu button.danger i { color: var(--ft-pdf); }
.dms-menu .sep { height: 1px; background: #eef2f7; margin: 5px 0; }

/* ── topbar search (inside brtm-topbar) ── */
.dms-topsearch { position: relative; width: 420px; }
.dms-topsearch i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,.7); font-size: 15px;
}
.dms-topsearch input {
  width: 100%; height: 34px; border: none; border-radius: 7px;
  background: rgba(255,255,255,.16); color: #fff;
  padding: 0 12px 0 34px; font-size: 13px; outline: none;
}
.dms-topsearch input::placeholder { color: rgba(255,255,255,.7); }
.dms-topsearch input:focus { background: rgba(255,255,255,.24); }

/* ── modal form controls (own – barantum.css scopes .brtm-modal-* under .brtm-chat-page only) ── */
.dms-inp, .dms-sel, .dms-ta {
  width: 100%; border: 1.5px solid #e3e8ef; border-radius: 8px;
  padding: 9px 12px; font-size: 13.5px; color: #1a2234;
  outline: none; background: #fff; font-family: inherit;
}
.dms-inp:focus, .dms-sel:focus, .dms-ta:focus { border-color: var(--primary); }
.dms-sel { cursor: pointer; }
.dms-ta { resize: vertical; min-height: 80px; }
/* Bootstrap form controls: standalone (direct-child) controls in a field must fill width.
   Op-select + input rows are nested in a flex wrapper and keep their own sizing. */
.dms-field > .form-control,
.dms-field > .custom-select { width: 100%; }
.dms-btn-primary {
  padding: 9px 18px; border-radius: 8px; border: none; background: var(--primary);
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
}
.dms-btn-primary:hover { background: var(--primary-dark); }
.dms-btn-cancel {
  padding: 9px 18px; border-radius: 8px; border: 1px solid #e3e8ef;
  background: #fff; color: var(--text-2); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.dms-btn-cancel:hover { background: #f4f7fd; }

/* ── modal body / footer (bypass barantum.css duplicate defs) ── */
.brtm-modal-box { padding: 0; }
.dms-mbody {
  flex: 1; overflow: auto; padding: 18px 20px; background: #fff; display: block;
}
.dms-mfoot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border); flex-shrink: 0;
}

/* ── confirm modal icon ── */
.dms-conf-ic {
  width: 62px; height: 62px; border-radius: 50%; background: #fdecef;
  color: var(--ft-pdf); display: grid; place-items: center; font-size: 28px; margin: 0 auto 16px;
}

/* Rail modul Documents disembunyikan di layar sempit.
   DULU memakai .brtm-sidebar TELANJANG -- padahal itu kelas BERSAMA yang
   dipakai rail kiri/kanan halaman detail modul lain, dan file ini termuat
   global. Akibatnya SEMUA .brtm-sidebar di seluruh app ikut hilang di bawah
   1100px. Sekarang dipersempit ke kelas milik modul ini sendiri. */
@media (max-width: 1100px) {
  .dms-rail { display: none; }
}
