/* ===================================================
   DATA HUB ION CITY - 16 MỤC 2 CẤP DIRECTORY SYSTEM
   Theme: ION CITY Mint Spicy (#70892E) • Mallard Green (#203E17) • Bright Cream (#FFFED9)
   Typography: Plus Jakarta Sans & Manrope (Clean Geometric Sans)
   Strict Scale: 3 Tokens Only (--fs-lg, --fs-md, --fs-sm)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* ===================================================
     STRICT TYPOGRAPHY SYSTEM (3 CẤP ĐỘ RÕ RÀNG)
     =================================================== */
  --fs-lg: 15px;   /* Level 1: Tiêu đề 16 Thư mục Mẹ & Brand Title */
  --fs-md: 13.5px; /* Level 2: Tên tài liệu con, Nút bấm, Ô tìm kiếm */
  --fs-sm: 12px;   /* Level 3: Badge số lượng, Pill định dạng, Subtext */
  
  --lh-lg: 1.4;
  --lh-md: 1.5;
  --lh-sm: 1.4;

  /* Font Family - Ultra Legible Modern Sans */
  --font-main: 'Plus Jakarta Sans', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Palette ION CITY Chuẩn Brand Guideline */
  --mint-spicy: #70892E;            /* Màu chủ đạo chính */
  --mint-spicy-light: #8BA838;
  --mallard-green: #203E17;          /* Màu xanh Mallard chuẩn nhận diện */
  --mallard-green-deep: #12240D;
  --mallard-green-darkest: #0A1608;

  --bright-cream: #FFFED9;           /* Màu kem sáng kim loại */
  --bright-cream-bright: #FFFFF0;
  --bright-cream-soft: rgba(255, 254, 217, 0.85);

  --glass-border: rgba(255, 254, 217, 0.22);
  --glass-border-hover: rgba(255, 254, 217, 0.6);

  --glass-surface: rgba(24, 48, 18, 0.78);
  --glass-surface-elevated: rgba(32, 62, 23, 0.92);
  --glass-blur: blur(16px) saturate(180%);

  --text-white: #FFFFFF;
  --text-cream: #FFFED9;
  --text-muted: #A8C896;
  --text-soft: #EEF6E8;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-glass: 0 8px 24px rgba(0, 20, 10, 0.35), inset 0 1px 0 rgba(255, 254, 217, 0.2);
  --shadow-glass-hover: 0 14px 40px rgba(0, 15, 8, 0.5), 0 0 16px rgba(255, 254, 217, 0.15);
  --shadow-mint: 0 4px 15px rgba(112, 137, 46, 0.35);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Strict Mobile Scaling */
@media (max-width: 900px) {
  :root {
    --fs-lg: 14px;
    --fs-md: 13px;
    --fs-sm: 11.5px;
  }
}

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

body {
  font-family: var(--font-main);
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  background-color: #162C11;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(112, 137, 46, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(255, 254, 217, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #0D1C0B 0%, #1A3513 35%, #0F200D 100%);
  background-attachment: fixed;
  color: var(--text-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
}

/* Subtle Architectural Grid Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(rgba(255, 254, 217, 0.06) 1px, transparent 1px),
    linear-gradient(to right, rgba(112, 137, 46, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(112, 137, 46, 0.04) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, .brand-text h1, .folder-title-text, .footer-logo-title {
  font-family: var(--font-main);
  font-weight: 800;
  letter-spacing: -0.015em;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  font-size: var(--fs-md);
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--mallard-green-darkest);
}
::-webkit-scrollbar-thumb {
  background: var(--mint-spicy);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--bright-cream);
}

/* ===================================================
   HEADER (TINH GỌN • DATA HUB ION CITY)
   =================================================== */
.tuta-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 8, 0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-link {
  display: flex;
  align-items: center;
}

.brand-logo-img {
  height: 35px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.brand-divider {
  width: 1px;
  height: 26px;
  background: var(--glass-border);
  opacity: 0.6;
}

.brand-text {
  display: flex;
  align-items: center;
}

.brand-sub-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--bright-cream);
  text-transform: uppercase;
  background: rgba(112, 137, 46, 0.35);
  border: 1px solid var(--glass-border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.brand-main-title {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-white);
  text-transform: uppercase;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-sync,
.btn-header-drive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  height: 30px;
  font-size: var(--fs-sm);
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-header-sync {
  background: rgba(112, 137, 46, 0.25);
  border: 1px solid var(--glass-border);
  color: var(--bright-cream);
}

.btn-header-sync:hover {
  background: rgba(112, 137, 46, 0.45);
  border-color: var(--bright-cream);
  color: var(--text-white);
}

.btn-header-sync.syncing i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.btn-header-drive {
  background: linear-gradient(135deg, var(--mint-spicy) 0%, #8BA838 100%);
  border: 1px solid rgba(255, 254, 217, 0.3);
  color: var(--text-white);
}

.btn-header-drive:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(112, 137, 46, 0.4);
}

/* ===================================================
   MAIN CONTAINER
   =================================================== */
.datahub-main-container {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Search Box */
.search-controls-wrapper {
  margin-bottom: 20px;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--glass-surface);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 4px 14px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
}

.search-input-box:focus-within {
  border-color: var(--bright-cream);
  box-shadow: 0 0 16px rgba(255, 254, 217, 0.2), var(--shadow-glass);
  background: var(--glass-surface-elevated);
}

.search-icon {
  font-size: var(--fs-md);
  color: var(--bright-cream);
  margin-right: 10px;
}

.mindmap-search-input {
  width: 100%;
  height: 38px;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: var(--fs-md);
  color: var(--text-white);
}

.mindmap-search-input::placeholder {
  color: var(--text-muted);
  font-size: var(--fs-md);
}

.btn-clear-search {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  padding: 4px 8px;
  display: none;
}

.btn-clear-search:hover {
  color: var(--text-white);
}

/* ===================================================
   16 CATEGORIES DIRECTORY (ACCORDION CẤP 1 -> CẤP 2)
   =================================================== */
.royal-directory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.royal-folder-card {
  background: var(--glass-surface);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
  overflow: hidden;
}

.royal-folder-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glass-hover);
  background: var(--glass-surface-elevated);
}

.royal-folder-card.open {
  border-color: var(--bright-cream);
  background: var(--glass-surface-elevated);
  box-shadow: 0 10px 30px rgba(0, 15, 8, 0.5), 0 0 14px rgba(255, 254, 217, 0.15);
}

/* Header Thư mục Mẹ (Cấp 1) */
.folder-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.folder-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.folder-icon-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, var(--mint-spicy) 0%, #4D611D 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bright-cream);
  font-size: var(--fs-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.folder-title-text {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.folder-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.folder-count-badge {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--bright-cream);
  background: rgba(112, 137, 46, 0.35);
  border: 1px solid var(--glass-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.folder-drive-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 254, 217, 0.1);
  border: 1px solid rgba(255, 254, 217, 0.38);
  color: var(--bright-cream);
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.folder-drive-btn:hover,
.folder-drive-btn:focus-visible {
  background: var(--bright-cream);
  color: var(--ion-deep-green, #122614);
  border-color: var(--bright-cream);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.folder-drive-btn i {
  font-size: 0.72rem;
  opacity: 0.9;
}

.folder-drive-btn-label-short {
  display: none;
}

@media (max-width: 576px) {
  .folder-header-bar {
    gap: 8px;
  }
  .folder-title-group {
    gap: 8px;
  }
  .folder-meta-right {
    gap: 6px;
  }
  .folder-count-badge {
    padding: 2px 6px;
  }
  .folder-drive-btn {
    padding: 3px 7px;
    gap: 4px;
  }
  .folder-drive-btn-label-full {
    display: none;
  }
  .folder-drive-btn-label-short {
    display: inline;
  }
}

.folder-chevron-icon {
  font-size: var(--fs-sm);
  color: var(--bright-cream);
  transition: transform var(--transition);
}

.royal-folder-card.open .folder-chevron-icon {
  transform: rotate(180deg);
}

/* Thân Thư mục Con (Cấp 2) */
.folder-items-body {
  display: none;
  padding: 0 14px 12px;
  border-top: 1px solid rgba(255, 254, 217, 0.1);
}

.royal-folder-card.open .folder-items-body {
  display: block;
}

.folder-checklist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

/* Từng Hàng Tài Liệu Con */
.folder-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(10, 26, 12, 0.65);
  border: 1px solid rgba(255, 254, 217, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: var(--fs-md);
  font-weight: 600;
  transition: var(--transition);
  gap: 10px;
}

.folder-link-item:hover {
  background: rgba(112, 137, 46, 0.3);
  border-color: var(--bright-cream);
  color: var(--text-white);
  transform: translateX(3px);
}

.folder-link-item.pending {
  background: rgba(10, 26, 12, 0.4);
  border-color: rgba(245, 158, 11, 0.25);
  cursor: pointer;
}

.folder-link-item.pending:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: #FBBF24;
  transform: none;
}

.item-left-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.item-type-icon {
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.item-type-icon.pdf { color: #EF4444; }
.item-type-icon.image { color: #38BDF8; }
.item-type-icon.video { color: #EC4899; }
.item-type-icon.excel { color: #10B981; }
.item-type-icon.zip { color: #F59E0B; }
.item-type-icon.link { color: var(--bright-cream); }

.item-title-text {
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.item-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.item-type-pill {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--bright-cream);
  background: rgba(112, 137, 46, 0.3);
  border: 1px solid var(--glass-border);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.item-open-icon {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  transition: var(--transition);
}

.folder-link-item:hover .item-open-icon {
  color: var(--bright-cream);
  transform: translate(2px, -2px);
}

.item-status-pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #FBBF24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Empty Search State */
.empty-search-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--glass-surface);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-top: 20px;
}

.empty-icon {
  font-size: 32px;
  color: var(--bright-cream);
  margin-bottom: 10px;
}

.empty-search-state h3 {
  font-size: var(--fs-lg);
  color: var(--bright-cream);
  margin-bottom: 4px;
}

.empty-search-state p {
  font-size: var(--fs-md);
  color: var(--text-muted);
}

/* ===================================================
   TOAST NOTIFICATION (CĂN GIỮA MÀN HÌNH)
   =================================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 120px);
  background: rgba(10, 24, 12, 0.96);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--bright-cream);
  color: var(--bright-cream);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-md);
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  max-width: 90vw;
  width: max-content;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notification.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ===================================================
   FOOTER (TINH GỌN • ĐỒNG BỘ 100%)
   =================================================== */
.tuta-footer {
  background: rgba(8, 18, 9, 0.96);
  border-top: 1px solid var(--glass-border);
  padding: 24px 20px;
  text-align: center;
}
.footer-container {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}
.footer-logo-main {
  height: 28px;
  width: auto;
  object-fit: contain;
}
.footer-logo-divider {
  width: 1px;
  height: 20px;
  background: var(--glass-border);
}
.footer-logo-partner {
  height: 26px;
  width: 26px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.footer-logo-title {
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bright-cream);
  margin-bottom: 4px;
}
.footer-text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .header-container {
    padding: 8px 12px;
  }
  
  .brand-logo-img {
    height: 26px;
  }

  .brand-sub-title {
    font-size: 11px;
  }

  .brand-main-title {
    font-size: 13.5px;
  }

  .btn-header-sync,
  .btn-header-drive {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  .datahub-main-container {
    padding: 16px 12px 40px;
  }

  .folder-header-bar {
    padding: 10px 12px;
  }

  .folder-icon-box {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 13px;
  }
}

/* ===================================================
   v2 - TRẠNG THÁI ĐỒNG BỘ • KHUNG CHỜ • NHÃN "MỚI"
   =================================================== */
.sync-status-row {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: 8px;
  padding: 0 6px;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  line-height: 1;
  color: var(--text-muted);
  cursor: default;
  user-select: none;
}

.sync-status .sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-spicy-light);
  box-shadow: 0 0 6px rgba(139, 168, 56, 0.8);
  flex-shrink: 0;
}

.sync-status.is-syncing .sync-dot {
  width: 9px;
  height: 9px;
  background: transparent;
  box-shadow: none;
  border: 1.5px solid var(--text-muted);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}

.sync-status.is-error {
  color: #F5B041;
}

.sync-status.is-error .sync-dot {
  background: #F5B041;
  box-shadow: 0 0 6px rgba(245, 176, 65, 0.7);
}

.btn-header-sync:disabled {
  cursor: progress;
  opacity: 0.75;
}

/* Khung chờ lần đầu vào trang */
.skeleton-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
}

.skeleton-icon,
.skeleton-line {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 254, 217, 0.06) 25%, rgba(255, 254, 217, 0.16) 50%, rgba(255, 254, 217, 0.06) 75%);
  background-size: 200% 100%;
  animation: dhShimmer 1.3s ease-in-out infinite;
}

.skeleton-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.skeleton-line {
  height: 12px;
}

@keyframes dhShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Nhãn "MỚI" cho tài liệu vừa có trên Drive */
.badge-new {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--bright-cream);
  color: var(--mallard-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.badge-new-folder {
  margin-left: 0;
  margin-right: 0;
}

.folder-link-item.is-fresh {
  animation: dhFreshPulse 2s ease-out 1;
}

@keyframes dhFreshPulse {
  0% { box-shadow: inset 0 0 0 1.5px var(--bright-cream), 0 0 14px rgba(255, 254, 217, 0.45); }
  100% { box-shadow: inset 0 0 0 1.5px transparent, 0 0 0 rgba(255, 254, 217, 0); }
}

@media (max-width: 640px) {
  .sync-status-row {
    justify-content: center;
    margin-top: 6px;
  }
  .sync-status {
    font-size: 11px;
  }
}

/* ===================================================
   DATAHUB v3.0 — MULTI-LEVEL EXPLORER MODAL & DEEP-LINK
   =================================================== */
.item-action-icon-btn,
.folder-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bright-cream);
  background: rgba(255, 254, 217, 0.10);
  border: 1px solid rgba(255, 254, 217, 0.28);
  transition: var(--transition);
  flex-shrink: 0;
}
.item-action-icon-btn {
  width: 28px;
  padding: 0;
}
.item-action-icon-btn:hover,
.folder-copy-btn:hover {
  background: var(--bright-cream);
  color: var(--mallard-green);
  border-color: var(--bright-cream);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 254, 217, 0.25);
}

.item-drive-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 254, 217, 0.16);
  transition: var(--transition);
  flex-shrink: 0;
}
.item-drive-mini-btn:hover {
  color: var(--bright-cream);
  border-color: var(--bright-cream);
  background: rgba(255, 254, 217, 0.14);
}

.folder-link-item.is-folder-trigger {
  cursor: pointer;
}

/* Explorer Overlay & Sheet */
.explorer-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 14, 4, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
.explorer-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.explorer-modal-sheet {
  width: 100%;
  max-width: 1020px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(24, 48, 18, 0.98) 0%, rgba(12, 26, 9, 0.99) 100%);
  border: 1.5px solid rgba(255, 254, 217, 0.36);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 254, 217, 0.25);
  overflow: hidden;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}
.explorer-modal-overlay.open .explorer-modal-sheet {
  transform: translateY(0) scale(1);
}

/* Explorer Header Bar */
.explorer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(10, 22, 8, 0.88);
  border-bottom: 1px solid rgba(255, 254, 217, 0.18);
  flex-shrink: 0;
}

.explorer-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.btn-explorer-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 254, 217, 0.10);
  border: 1px solid rgba(255, 254, 217, 0.28);
  color: var(--bright-cream);
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.btn-explorer-back:hover {
  background: var(--bright-cream);
  color: var(--mallard-green);
}

.explorer-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.crumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb-btn:hover {
  background: rgba(255, 254, 217, 0.12);
  color: var(--bright-cream);
}
.crumb-btn.active {
  color: var(--bright-cream);
  font-weight: 800;
  background: rgba(255, 254, 217, 0.10);
  cursor: default;
}
.crumb-sep {
  color: rgba(255, 254, 217, 0.35);
  font-size: 10px;
}

.explorer-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-explorer-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--bright-cream);
  color: var(--mallard-green);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(255, 254, 217, 0.25);
}
.btn-explorer-copy:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
}

.btn-explorer-drive {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 254, 217, 0.22);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}
.btn-explorer-drive:hover {
  border-color: var(--bright-cream);
  color: var(--bright-cream);
  background: rgba(255, 254, 217, 0.12);
}

.btn-explorer-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 254, 217, 0.2);
  color: var(--text-white);
  font-size: 14px;
}
.btn-explorer-close:hover {
  background: rgba(231, 76, 60, 0.85);
  border-color: rgba(231, 76, 60, 1);
}

/* Explorer Title Banner */
.explorer-title-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(90deg, rgba(112, 137, 46, 0.35) 0%, rgba(24, 48, 18, 0.35) 100%);
  border-bottom: 1px solid rgba(255, 254, 217, 0.16);
  flex-shrink: 0;
}
.explorer-title-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.explorer-folder-badge {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 254, 217, 0.22), rgba(112, 137, 46, 0.32));
  border: 1.5px solid rgba(255, 254, 217, 0.5);
  color: var(--bright-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.explorer-title-texts {
  min-width: 0;
}
.explorer-current-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--bright-cream);
  line-height: 1.3;
  word-break: break-word;
}
.explorer-current-meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Explorer Body */
.explorer-modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.explorer-section-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.explorer-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mint-spicy-light);
}

/* Sub-folders Grid (Symbolic Folder Cards) */
.explorer-subfolder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 11px;
}

.explorer-subfolder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(32, 62, 23, 0.72);
  border: 1px solid rgba(255, 254, 217, 0.22);
  cursor: pointer;
  transition: var(--transition);
}
.explorer-subfolder-card:hover {
  background: rgba(50, 92, 34, 0.92);
  border-color: var(--bright-cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.subfolder-card-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.subfolder-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(255, 254, 217, 0.12);
  border: 1px solid rgba(255, 254, 217, 0.32);
  color: var(--bright-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.subfolder-card-info {
  min-width: 0;
  flex: 1;
}

.subfolder-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.35;
  word-break: break-word;
}
.explorer-subfolder-card:hover .subfolder-card-title {
  color: var(--bright-cream);
}

.subfolder-card-sub {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.subfolder-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* Final Files List */
.explorer-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explorer-empty-box {
  text-align: center;
  padding: 36px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 254, 217, 0.25);
  color: var(--text-muted);
}
.explorer-empty-box i {
  font-size: 28px;
  color: var(--bright-cream);
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  .explorer-modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }
  .explorer-modal-sheet {
    max-height: 92vh;
    border-radius: 16px 16px 12px 12px;
  }
  .explorer-modal-header {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .explorer-title-banner {
    padding: 12px 14px;
  }
  .explorer-modal-body {
    padding: 14px 12px 18px;
  }
  .explorer-subfolder-grid {
    grid-template-columns: 1fr;
  }
  .btn-explorer-drive .drive-btn-text,
  .folder-copy-btn .copy-btn-label {
    display: none;
  }
  .folder-copy-btn {
    width: 28px;
    padding: 0;
  }
}
