/* SKMI Drive — Aero + Metro + Fluent (clean) */

* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --glass: rgba(255,255,255,.72);
  --border: rgba(255,255,255,.55);
  --blue: #2d89ef;
  --teal: #00aba9;
  --red: #e81123;
  --yellow: #f2c811;
  --green: #107c10;
  --orange: #d83b01;
  --purple: #6b69d6;
  --surface: #fff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --hover: rgba(0,103,192,.08);
  --active: rgba(0,103,192,.14);
  --r: 8px;
  --t: 180ms cubic-bezier(.1,.9,.2,1);
}

html, body {
  height:100%;
  font-family:'Roboto',sans-serif;
  background: linear-gradient(145deg,#e8f0fe 0%,#d2e3fc 45%,#c5d8f8 100%);
  color:var(--text);
  overflow:hidden;
}

/* Scrollbar */
.custom-scroll { overflow-y:auto; scrollbar-width:thin; scrollbar-color:rgba(0,103,192,.35) transparent; }
.custom-scroll::-webkit-scrollbar { width:7px; }
.custom-scroll::-webkit-scrollbar-track { background:transparent; }
.custom-scroll::-webkit-scrollbar-thumb {
  background:rgba(0,103,192,.3);
  border-radius:8px;
  border:2px solid transparent;
  background-clip:content-box;
}
.custom-scroll::-webkit-scrollbar-thumb:hover { background:rgba(0,103,192,.55); background-clip:content-box; }

/* App */
.app { display:flex; height:100vh; width:100vw; }

/* ===== SIDEBAR ===== */
.sidebar {
  width:220px;
  background:var(--glass);
  backdrop-filter:blur(24px) saturate(1.3);
  -webkit-backdrop-filter:blur(24px) saturate(1.3);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  flex-shrink:0;
  overflow: visible;
  z-index: 100;
}

.brand {
  height:60px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  flex-shrink:0;
}
.brand img {
  height:44px;
  width:auto;
  max-width:196px;
  object-fit:contain;
  display:block;
}

/* Tombol Baru digeser ke blok Quick Action */

/* Nav */
.nav { flex:1; overflow-y:auto; padding:4px 0; scrollbar-width:none; }
.nav::-webkit-scrollbar { display:none; }
.nav-section { margin-bottom:4px; }

.nav-item {
  display:flex;
  align-items:center;
  gap:12px;
  height:40px;
  margin:1px 8px;
  padding:0 12px 0 14px;
  border-radius:var(--r);
  font-size:13.5px;
  color:var(--muted);
  text-decoration:none;
  position:relative;
  transition:background var(--t), color var(--t);
}
.nav-item::before {
  content:'';
  position:absolute;
  left:0; top:50%;
  width:3px; height:0;
  background:var(--blue);
  border-radius:0 2px 2px 0;
  transform:translateY(-50%);
  transition:height var(--t);
}
.nav-item:hover { background:var(--hover); color:var(--text); }
.nav-item.active {
  background:var(--active);
  color:var(--blue);
  font-weight:500;
}
.nav-item.active::before { height:55%; }

/* Ikon nav — CSS shape, ukuran tetap */
.nav-ico {
  width:20px;
  height:20px;
  flex-shrink:0;
  display:block;
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
}
.ico-home  { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232d89ef'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E"); }
.ico-trash { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e81123'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E"); }
.ico-star  { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f2c811'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E"); }
.ico-user  { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300aba9'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M12 14c-4.42 0-8 1.79-8 4v2h16v-2c0-2.21-3.58-4-8-4z'/%3E%3C/svg%3E"); }
/* ikon Bagikan Ke Saya */
.ico-share { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300aba9'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E"); }
.ico-shield{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b69d6'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z'/%3E%3C/svg%3E"); }
.ico-storage{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232d89ef'%3E%3Cpath d='M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z'/%3E%3C/svg%3E"); }

.nav-divider { height:1px; background:rgba(0,0,0,.07); margin:8px 14px; }
.nav-caption { font-size:11px; font-weight:500; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; padding:2px 16px 4px; }

/* ===== MAIN ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.topbar {
  height:60px;
  display:flex;
  align-items:center;
  padding:0 16px;
  gap:12px;
  background:var(--glass);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.search {
  flex:1;
  max-width:640px;
  height:38px;
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(0,0,0,.06);
  border-radius:19px;
  padding:0 14px;
  transition:border-color var(--t);
}
.search:focus-within { border-color:var(--blue); background:#fff; }
.search-ico {
  width:18px; height:18px; flex-shrink:0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c5c5c'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.search input {
  flex:1; border:none; outline:none; background:transparent;
  font:14px 'Roboto',sans-serif; color:var(--text);
}
.search input::placeholder { color:#9aa0a6; }

.top-actions { display:flex; align-items:center; gap:2px; margin-left:auto; }
.avatar {
  width:32px; height:32px; border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--teal));
  color:#fff; font-size:12px; font-weight:500;
  display:flex; align-items:center; justify-content:center;
  margin-left:6px; cursor:pointer;
}

/* Toolbar */
.toolbar {
  display:flex; align-items:center; gap:6px;
  padding:10px 18px 6px; flex-shrink:0;
  flex-wrap:wrap;
}
.chip-row {
  display:flex; align-items:center; gap:6px;
  flex-wrap:wrap;
}
.chip {
  display:inline-flex; align-items:center;
  padding:5px 12px; border-radius:14px;
  font-size:12.5px; color:var(--muted);
  text-decoration:none; border:1px solid transparent;
  transition:background var(--t), color var(--t);
}
.chip:hover { background:var(--hover); color:var(--text); }
.chip.active {
  background:var(--active); color:var(--blue); font-weight:500;
  border-color:rgba(0,103,192,.18);
}

/* Content */
.content { flex:1; padding:6px 14px 20px; min-height:0; }

.file-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
  gap:10px;
}

.file-card {
  background:var(--surface);
  border:1px solid rgba(0,0,0,.06);
  border-radius:10px;
  padding:14px 12px 10px;
  cursor:pointer;
  transition:transform var(--t), border-color var(--t), background var(--t);
  position:relative;
  overflow:hidden;
}
.file-card:hover {
  background:#f8faff;
  border-color:rgba(45,137,239,.22);
  transform:translateY(-2px);
}
.file-card::after {
  content:'';
  position:absolute; top:0; left:0; right:0; height:35%;
  background:linear-gradient(180deg,rgba(255,255,255,.3),transparent);
  pointer-events:none; opacity:0;
  transition:opacity var(--t);
}
.file-card:hover::after { opacity:1; }

.file-preview {
  height:56px;
  display:flex; align-items:center; justify-content:center;
  position:relative; margin-bottom:8px;
}
.file-icon { width:36px; height:36px; transition:transform var(--t); }
.file-card:hover .file-icon { transform:scale(1.08) translateY(-1px); }
.star-badge {
  position: absolute;
  top: 2px;
  left: 8px;
  right: auto;
  color: var(--yellow);
  font-size: 14px;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.file-info { text-align:center; }
.file-name {
  font-size:12.5px; font-weight:500;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.file-meta { font-size:11px; color:var(--muted); margin-top:2px; }

.file-actions {
  display:flex; justify-content:center; gap:4px;
  margin-top:8px;
  opacity:0; transform:translateY(3px);
  transition:opacity var(--t), transform var(--t);
}
.file-card:hover .file-actions { opacity:1; transform:translateY(0); }
.act {
  width:26px; height:26px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%; font-size:12px; color:var(--muted);
  text-decoration:none; transition:background var(--t), color var(--t);
}
.act:hover { background:var(--hover); color:var(--text); }
.act.restore:hover { color:var(--blue); }
.act.danger:hover { color:var(--red); background:rgba(232,17,35,.08); }

.empty-state, .panel {
  text-align:center; padding:48px 16px; color:var(--muted);
}
.panel {
  max-width:440px; margin:32px auto; text-align:left;
  background:var(--surface); border-radius:10px; padding:28px;
  border:1px solid rgba(0,0,0,.06);
}
.panel h2 { margin-bottom:12px; color:var(--text); font-weight:500; }
.panel .muted { color:var(--muted); margin-top:10px; font-size:13px; }

/* Modal — Hybrid Windows (Vista Aero glass + Win8 zoom + Win11 soft depth) */
.modal {
  position:fixed; inset:0;
  background:rgba(0,20,40,.38);
  display:flex; align-items:center; justify-content:center;
  z-index:100;
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  animation: winModalBg .28s cubic-bezier(.16,1,.3,1) both;
}
.modal[hidden] { display: none !important; }
.modal-box {
  background: rgba(255,255,255,.92);
  border-radius: 14px;
  padding:22px; width:90%; max-width:360px;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow:
    0 0 0 1px rgba(0,40,100,.06),
    0 12px 40px rgba(0,30,80,.22),
    0 2px 8px rgba(0,0,0,.08);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  animation: winModalIn .32s cubic-bezier(.16,1,.3,1) both;
  transform-origin: center center;
}
.modal-box h3 { margin-bottom:14px; font-weight:500; font-size:16px; }
.modal-box label { display:block; font-size:12.5px; color:var(--muted); margin-bottom:10px; }
.modal-box input, .modal-box select {
  width:100%; margin-top:4px; padding:8px 11px;
  border:1px solid #ddd; border-radius:var(--r);
  font:14px 'Roboto',sans-serif; outline:none;
  transition:border-color var(--t), box-shadow var(--t);
}
.modal-box input:focus, .modal-box select:focus {
  border-color:var(--blue);
  box-shadow: 0 0 0 3px rgba(45,137,239,.18);
}
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.btn-cancel, .btn-primary {
  padding:7px 16px; border-radius:18px;
  font:500 13px 'Roboto',sans-serif; cursor:pointer; border:none;
  transition:background var(--t), transform var(--t), box-shadow var(--t);
}
.btn-cancel { background:transparent; color:var(--muted); }
.btn-cancel:hover { background:rgba(0,0,0,.05); }
.btn-primary { background:var(--blue); color:#fff; }
.btn-primary:hover { background:#1b6fd4; box-shadow: 0 4px 14px rgba(45,137,239,.35); }
.btn-primary:active { transform:scale(.97); }

/* Animasi Hybrid Windows (Vista fade/blur + Win8 zoom/slide + Win11 soft) */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes winModalBg {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes winModalIn {
  from { opacity: 0; transform: scale(.88) translateY(16px); filter: blur(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes winPopupIn {
  from { opacity: 0; transform: translateY(-10px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes winSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes winZoomIn {
  from { opacity: 0; transform: scale(.82); }
  to   { opacity: 1; transform: scale(1); }
}
.fade-in { animation:fadeUp .28s cubic-bezier(.16,1,.3,1) both; }
.win-popup-in { animation: winPopupIn .26s cubic-bezier(.16,1,.3,1) both; }
.win-slide-in { animation: winSlideIn .24s cubic-bezier(.16,1,.3,1) both; }
.win-zoom-in  { animation: winZoomIn  .28s cubic-bezier(.16,1,.3,1) both; }

@media (max-width:700px) {
  .sidebar { width:64px; }
  .nav-label, .btn-new span:last-child, .nav-caption { display:none; }
  .brand img { max-width:40px; }
}

/* ===== Quick Action Menu (Aero + Metro + Fluent) ===== */
/* .qa-wrap / .btn-new / .btn-new-icon dipindahkan ke sidebar.php */

.qa-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 280px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 12px;
  padding: 6px;
  z-index: 9999; /* di depan (forward) semua konten */
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top center;
  transition:
    opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.qa-menu.qa-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.qa-menu[hidden] { display: none !important; }
.qa-menu.qa-open[hidden] { display: block !important; }

.qa-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: background 160ms ease;
}
.qa-item:hover { background: var(--hover); }

.qa-ico {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.ico-folder-add {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f2c811'%3E%3Cpath d='M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z'/%3E%3C/svg%3E");
}
.ico-file-up {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232d89ef'%3E%3Cpath d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11 8 15.01z'/%3E%3C/svg%3E");
}
.ico-folder-up {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300aba9'%3E%3Cpath d='M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10zM8 13.01l1.41 1.41L11 12.84V17h2v-4.16l1.59 1.59L16 13.01 12.01 9 8 13.01z'/%3E%3C/svg%3E");
}

.qa-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qa-title { font-size: 13.5px; font-weight: 500; line-height: 1.2; }
.qa-desc { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

.modal[hidden] { display: none !important; }




/* ===== Breadcrumb pill (Aero + Metro + Fluent, no shadow) ===== */
.bc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 6px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  font-size: 13px;
  color: var(--muted);
}
.bc-home {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: background var(--t), transform var(--t);
}
.bc-home:hover {
  background: #1b6fd4;
  transform: scale(1.05);
}
.bc-home:active { transform: scale(0.96); }
.bc-sep {
  color: rgba(0,0,0,0.28);
  font-size: 14px;
  line-height: 1;
  user-select: none;
}
.bc-current {
  color: var(--text);
  font-weight: 500;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.file-open {
  text-decoration: none;
  color: inherit;
}
.file-card a.file-open { display: block; }
.file-list .col-name a.file-open {
  display: inline;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Upload progress dialog (Aero + Metro + Fluent) ===== */
.up-dialog {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 12px;
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 240ms cubic-bezier(0.16,1,0.3,1), transform 240ms cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.up-dialog.up-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.up-dialog[hidden] { display: none !important; }
.up-dialog.up-show[hidden] { display: block !important; }

.up-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.up-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.up-head-actions { display: flex; gap: 2px; }
.up-btn {
  width: 28px; height: 28px;
  border: none; background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  transition: background var(--t);
}
.up-btn:hover { background: var(--hover); }

.up-body { padding: 10px 16px 14px; transition: max-height 220ms ease, opacity 180ms ease; }
.up-body.up-collapsed { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }

.up-status {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.up-bar {
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.up-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 2px;
  transition: width 120ms linear;
}

.up-list {
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.up-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.up-item:last-child { border-bottom: none; }
.up-ico {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 3px;
  background: var(--teal);
  opacity: 0.85;
}
.up-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.up-pct {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--muted);
  min-width: 28px;
  text-align: right;
}
.up-item.up-done .up-pct { color: var(--green, #107c10); font-weight: 500; }
.up-item.up-fail .up-pct { color: var(--red); }

/* ===== Toolbar kanan: sort + view toggle ===== */
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.sort-select {
  height: 32px;
  padding: 0 28px 0 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.85);
  font: 13px 'Roboto', sans-serif;
  color: var(--text);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%235c5c5c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--t), background var(--t);
}
.sort-select:hover, .sort-select:focus {
  border-color: rgba(45,137,239,.35);
  background-color: #fff;
}

/* ----- Dropdown kustom untuk select urutan (dibuat oleh JS di sidebar.php) ----- */
.toolbar { position: relative !important; z-index: 20 !important; }
.sort-dd { position: relative !important; display: flex !important; align-items: center !important; }
.sort-dd > select.sort-select { display: none !important; }   /* select asli disembunyikan, tetap dipakai sebagai sumber data */

.sort-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 32px !important;
  padding: 0 12px 0 14px !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.85) !important;
  font: 13px 'Roboto', sans-serif !important;
  color: var(--text) !important;
  cursor: pointer !important;
  outline: none !important;
  transition: border-color var(--t), background var(--t), box-shadow var(--t) !important;
}
.sort-btn:hover,
.sort-dd.open .sort-btn { border-color: rgba(45,137,239,.4) !important; background: #fff !important; }
.sort-btn:focus-visible { box-shadow: 0 0 0 3px rgba(45,137,239,.22) !important; }
.sort-chev { color: var(--muted) !important; transition: transform 220ms cubic-bezier(.16,1,.3,1) !important; }
.sort-dd.open .sort-chev { transform: rotate(180deg) !important; }

.sort-menu {
  position: absolute !important;
  top: calc(100% + 2px) !important;
  right: 0 !important;
  min-width: 150px !important;
  padding: 6px !important;
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  border: 1px solid rgba(255,255,255,.65) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 28px rgba(0,40,100,.16), 0 1px 3px rgba(0,0,0,.06) !important;
  z-index: 9999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-6px) scale(.97) !important;
  transform-origin: top right !important;
  transition:
    opacity 180ms cubic-bezier(.16,1,.3,1),
    transform 180ms cubic-bezier(.16,1,.3,1),
    visibility 0s linear 180ms !important;
}
.sort-dd.open .sort-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  transition-delay: 0s !important;
}
.sort-opt {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  font: 13px 'Roboto', sans-serif !important;
  color: var(--text) !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: background var(--t), color var(--t) !important;
}
.sort-opt:hover { background: var(--hover) !important; }
.sort-opt .sort-check { opacity: 0 !important; }
.sort-opt.active { color: var(--blue) !important; font-weight: 500 !important; background: var(--active) !important; }
.sort-opt.active .sort-check { opacity: 1 !important; }

.view-toggle {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 2px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  gap: 0;
}
.view-btn {
  width: 32px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  transition: background var(--t), color var(--t);
}
.view-btn:hover { background: var(--hover); color: var(--text); }
.view-btn.active {
  background: var(--active);
  color: var(--blue);
  font-weight: 500;
}

/* ===== List view (Fluent + Metro, no shadow) ===== */
.file-list {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 12px;
  overflow: hidden;
}
.file-list-head,
.file-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 120px 140px 100px 110px;   /* nama | pemilik | status | diubah | ukuran | aksi */
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 44px;
}
.file-list-head {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.45);
}
.file-list-row {
  border-bottom: 1px solid rgba(0,0,0,.04);
  transition: background var(--t);
}
.file-list-row:last-child { border-bottom: none; }
.file-list-row:hover { background: var(--hover); }

.file-list .col-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text);
}
.file-list .col-name .file-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.file-list .col-name span,
.file-list .col-name a.file-open {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-list .col-date,
.file-list .col-size {
  font-size: 12.5px;
  color: var(--muted);
}
.file-list .col-act {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  opacity: 0.35;
  transition: opacity var(--t);
}
.file-list-row:hover .col-act { opacity: 1; }
.star-badge-inline {
  color: var(--yellow);
  font-size: 12px;
  flex-shrink: 0;
}

/* Pemilik & Status (section/pemilik/pemilik.php) */
.file-list .col-meta { display: contents; }   /* desktop: pemilik & status = kolom sendiri-sendiri */
.pms-owner { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--text); }
.pms-av {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-size: 10px; font-weight: 500;
}
.pms-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pms-status { --ik: #107c10; display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pms-status.pms-private { --ik: #e8710a; }
.pms-status.pms-restricted { --ik: #2d89ef; }
.pms-ico { width: 16px; height: 16px; flex-shrink: 0; fill: var(--ik); }
.pms-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(0,0,0,.06); text-align: left; }
.pms-foot .pms-owner { flex: 1; font-size: 11.5px; }
.pms-foot .pms-av { width: 20px; height: 20px; font-size: 9px; }
.pms-foot .pms-status { flex-shrink: 0; font-size: 11.5px; }
.pms-foot .pms-ico { width: 14px; height: 14px; }

@media (max-width: 1100px) {
  .file-list-head, .file-list-row { grid-template-columns: minmax(0, 1fr) 140px 110px 90px 110px; }   /* kolom Diubah disembunyikan */
  .file-list .col-date,
  .file-list-head .col-date { display: none; }
}
@media (max-width: 720px) {
  .file-list-head, .file-list-row {
    grid-template-columns: minmax(0, 1fr) 76px 36px;   /* nama | ukuran | titik tiga (kanan) */
  }
  .file-list-head .col-owner,
  .file-list-head .col-status { display: none; }
  /* mobile: pemilik & status disatukan di satu baris tepat di bawah nama file */
  .file-list-row {
    grid-template-areas: "name size act" "meta meta act";
    padding-top: 8px; padding-bottom: 8px; row-gap: 7px;   /* jarak nama file ↔ pemilik/status */
  }
  .file-list-row .col-name { grid-area: name; }
  .file-list-row .col-size { grid-area: size; }
  .file-list-row .col-act  { grid-area: act; }
  .file-list-row .col-meta {
    grid-area: meta; display: flex; align-items: center; gap: 14px; min-width: 0;
    padding-left: 76px;   /* = kotak centang 28 + jarak 16 + ikon 22 + jarak 10 → sejajar dengan awal nama file */
  }
  .file-list-row .col-owner { min-width: 0; flex: 0 1 auto; }
  .file-list-row .col-status { flex-shrink: 0; }
  .toolbar-right { width: 100%; justify-content: flex-end; }
}

/* ===== File quick menu (⋮) — Aero + Metro + Fluent, no shadow ===== */
.file-card-top {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  opacity: 0;
  transition: opacity var(--t);
}
.file-card:hover .file-card-top,
.file-card-top:focus-within { opacity: 1; }

.file-menu-wrap { position: relative; display: inline-flex; }
.file-more {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), color var(--t);
}
.file-more:hover,
.file-menu-wrap.open .file-more {
  background: var(--active);
  color: var(--blue);
}

.file-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0,40,100,.05),
    0 10px 32px rgba(0,30,80,.16),
    0 2px 6px rgba(0,0,0,.06);
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-8px) scale(0.94);
  transform-origin: top right;
  transition:
    opacity 220ms cubic-bezier(0.16,1,0.3,1),
    transform 220ms cubic-bezier(0.16,1,0.3,1),
    filter 220ms cubic-bezier(0.16,1,0.3,1);
  filter: blur(2px);
}
.file-menu-wrap.open .file-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.file-menu[hidden] { display: none !important; }
.file-menu-wrap.open .file-menu[hidden] { display: flex !important; }

.file-menu-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: 13.5px 'Roboto', sans-serif;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.file-menu-item:hover { background: var(--hover); }
.file-menu-item.danger { color: var(--red); }
.file-menu-item.danger:hover { background: rgba(232,17,35,.08); }

.file-list .col-act {
  opacity: 1;
  justify-content: flex-end;
}
.file-list .file-more {
  background: transparent;
}
.file-list-row:hover .file-more {
  background: rgba(255,255,255,.9);
}

.date-full {
  display: block;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.85;
  margin-top: 1px;
}
.file-card { position: relative; }

/* STAR BADGE LEFT — jangan nabrak tombol ⋮ di kanan */
.file-card .star-badge,
.file-preview .star-badge {
  position: absolute !important;
  top: 2px !important;
  left: 8px !important;
  right: auto !important;
  z-index: 2 !important;
}

/* ===== Profile menu (avatar) — gaya sama dropdown sort ===== */
.profile-dd { position: relative; margin-left: 6px; }
.profile-btn.avatar {
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.profile-btn.avatar[aria-expanded="true"] {
  box-shadow: 0 0 0 3px rgba(45,137,239,.22);
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  padding: 8px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 14px;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition:
    opacity 180ms cubic-bezier(0.16,1,0.3,1),
    transform 180ms cubic-bezier(0.16,1,0.3,1),
    visibility 0s linear 180ms;
  pointer-events: none;
}
.profile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}
.profile-menu[hidden] {
  display: block !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.profile-menu.open[hidden] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
}
.profile-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-meta { min-width: 0; }
.profile-name {
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-email {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-sep {
  height: 1px; background: rgba(0,0,0,.07);
  margin: 2px 6px 6px;
}
.profile-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: none; border-radius: 10px;
  background: transparent;
  font: 13.5px 'Roboto', sans-serif;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease;
}
.profile-item:hover { background: var(--hover); }
.profile-item-ico {
  width: 20px; text-align: center; color: var(--muted); font-size: 14px;
}

/* ===== Search auto-complete (Aero + Metro + Fluent) ===== */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 640px;
  z-index: 50;
}
.search-wrap .search {
  max-width: none;
  width: 100%;
  position: relative;
}
.search-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t), color var(--t);
}
.search-clear:hover { background: var(--hover); color: var(--text); }
.search-clear[hidden] { display: none !important; }

.search-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 14px;
  padding: 6px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition:
    opacity 180ms cubic-bezier(0.16,1,0.3,1),
    transform 180ms cubic-bezier(0.16,1,0.3,1),
    visibility 0s linear 180ms;
  pointer-events: none;
  scrollbar-width: thin;
}
.search-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}
.search-panel[hidden] {
  display: block !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.search-panel.open[hidden] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sg-section { margin-bottom: 4px; }
.sg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.sg-clear-all {
  border: none;
  background: transparent;
  color: var(--blue);
  font: 12px 'Roboto', sans-serif;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  padding: 2px 6px;
  border-radius: 6px;
}
.sg-clear-all:hover { background: var(--hover); }

.sg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 140ms ease;
  text-align: left;
  border: none;
  background: transparent;
  font: 13.5px 'Roboto', sans-serif;
  color: var(--text);
}
.sg-row:hover { background: var(--hover); }

.sg-ico {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  opacity: .9;
}
.sg-ico.sg-hist {
  background: transparent !important;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sg-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sg-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-sub {
  font-size: 11.5px;
  color: var(--muted);
}
.sg-del {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}
.sg-row:hover .sg-del { opacity: 1; }
.sg-del:hover { background: rgba(232,17,35,.1); color: var(--red); }

.sg-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.search-wrap.is-open .search {
  border-color: var(--blue);
  background: #fff;
}