/**
 * VATECH Asia Customer Portal Custom Component Styles
 * Apple Minimalist Design System Harmonized with Official VATECH Red (#db072f)
 */

/* ==========================================================================
   Apple-Style Minimalist Sidebar Shell
   ========================================================================== */
.sidebar {
  width: 250px;
  min-width: 250px;
  background-color: var(--color-sidebar-bg, #fbfbfd) !important;
  color: var(--color-sidebar-text, #48484a);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1040;
  box-shadow: none;
  border-right: 1px solid var(--color-sidebar-border, rgba(0, 0, 0, 0.08));
  transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}

.sidebar-scrollable::-webkit-scrollbar {
  width: 4px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

/* Sidebar Brand Header */
.sidebar-brand-header {
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-sidebar-border, rgba(0, 0, 0, 0.08));
  background-color: var(--color-sidebar-header-bg, #ffffff);
}

.sidebar-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-brand-logo {
  height: 20px;
  width: auto;
}

.sidebar-brand-badge {
  background: var(--color-brand-red-subtle, rgba(219, 7, 47, 0.08));
  color: var(--color-brand-red-hover, #b80526);
  font-family: var(--font-body, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-pill, 9999px);
}

/* Nav Group Section Labels */
.sidebar-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, #59595e);
  padding: 16px 12px 6px;
}

.sidebar-group-label:first-child {
  padding-top: 14px;
}

/* Sidebar Nav Links */
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-md, 8px);
  color: var(--color-sidebar-text, #48484a) !important;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease-out;
  border-left: none;
}

.sidebar .nav-link i {
  width: 18px;
  font-size: 14px;
  text-align: center;
  color: var(--color-text-muted, #59595e);
  transition: all 0.15s ease-out;
}

.sidebar .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text-primary, #1d1d1f) !important;
}

.sidebar .nav-link:hover i {
  color: var(--color-text-primary, #1d1d1f);
}

.sidebar .nav-link.active,
.sidebar .nav-link.is-active {
  background: var(--color-brand-red-subtle, rgba(219, 7, 47, 0.08)) !important;
  color: var(--color-brand-red, #db072f) !important;
  font-weight: 600;
}

.sidebar .nav-link.active i,
.sidebar .nav-link.is-active i {
  color: var(--color-brand-red, #db072f) !important;
}

.sidebar-badge {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text-secondary, #48484a);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-pill, 9999px);
  margin-left: auto;
  line-height: 1.2;
}

.sidebar .nav-link.active .sidebar-badge {
  background: var(--color-brand-red, #db072f);
  color: #ffffff;
}

/* ==========================================================================
   Desktop Sidebar Directory Tree
   ========================================================================== */
.sidebar-directory-tree {
  margin: 4px 8px 10px 14px;
  padding-left: 8px;
  border-left: 1.5px solid var(--color-sidebar-border, rgba(0, 0, 0, 0.08));
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-directory-tree.is-collapsed .sidebar-tree-scroll {
  display: none;
}

.sidebar-directory-tree.is-collapsed .sidebar-tree-collapse-btn i {
  transform: rotate(-90deg);
}

.sidebar-tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 6px;
}

.sidebar-tree-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ap-text-tertiary, #59595e);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-tree-collapse-btn {
  background: transparent;
  border: none;
  color: var(--ap-text-quaternary, #6e6e73);
  font-size: 11px;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-tree-collapse-btn:hover {
  color: var(--ap-text-primary, #1d1d1f);
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-tree-collapse-btn i {
  transition: transform 0.2s ease;
}

.sidebar-tree-scroll {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-tree-node-wrap {
  margin-bottom: 1px;
}

.sidebar-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--ap-text-secondary, #6e6e73);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-out;
  user-select: none;
  text-decoration: none;
  position: relative;
}

.sidebar-tree-row:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ap-text-primary, #1d1d1f);
}
[data-bs-theme="dark"] .sidebar-tree-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-tree-row.active {
  background: rgba(219, 7, 47, 0.08);
  color: var(--color-brand-red, #db072f);
  font-weight: 600;
}

.sidebar-tree-row.active::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--color-brand-red, #db072f);
  border-radius: 9999px;
}

.sidebar-tree-row .tree-toggle-caret {
  width: 14px;
  height: 14px;
  font-size: 9px;
  color: var(--ap-text-quaternary, #aeaeb2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
}

.sidebar-tree-row .tree-toggle-caret:hover {
  color: var(--ap-text-primary, #1d1d1f);
}

.sidebar-tree-row .tree-toggle-caret.open {
  transform: rotate(90deg);
}

.sidebar-tree-row .tree-toggle-caret.placeholder {
  visibility: hidden;
}

.sidebar-tree-row .tree-folder-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: #ffc107;
}

.sidebar-tree-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-tree-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ap-text-tertiary, #59595e);
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 5px;
  border-radius: 9999px;
  margin-left: auto;
  flex-shrink: 0;
}
[data-bs-theme="dark"] .sidebar-tree-badge {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-tree-row.active .sidebar-tree-badge {
  background: var(--color-brand-red, #db072f);
  color: #ffffff;
}

.sidebar-tree-subchildren {
  padding-left: 14px;
  margin-top: 1px;
  display: none;
  border-left: 1px dashed rgba(0, 0, 0, 0.08);
  margin-left: 10px;
}

.sidebar-tree-subchildren.open {
  display: block;
}

/* Sidebar Footer User Card */
.sidebar-footer {
  border-top: 1px solid var(--color-sidebar-border, rgba(0, 0, 0, 0.08));
  padding: 14px 16px;
  background-color: var(--color-sidebar-header-bg, #ffffff);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d1d1f 0%, #424245 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, sans-serif);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.25;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary, #1d1d1f);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-user-role {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted, #59595e);
  text-transform: capitalize;
}

.sidebar-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sidebar-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text-secondary, #48484a);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid var(--color-card-border, rgba(0, 0, 0, 0.08));
}

.sidebar-action-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-text-primary, #1d1d1f);
}

.sidebar-action-btn--logout:hover {
  background: rgba(219, 7, 47, 0.08);
  color: var(--color-brand-red, #db072f);
  border-color: rgba(219, 7, 47, 0.2);
}

/* Sidebar Toggle Mechanics (Responsive & Desktop) */
.sidebar.toggled {
  margin-left: -250px;
}

@media (max-width: 991px) {
  .sidebar {
    margin-left: -250px;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1045;
    box-shadow: var(--shadow-modal);
  }
  .sidebar.show {
    margin-left: 0;
  }
}

/* ==========================================================================
   Frosted Glass Topbar
   ========================================================================== */
.topbar {
  height: 60px;
  background: var(--color-topbar-bg, rgba(255, 255, 255, 0.82));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-topbar-border, rgba(0, 0, 0, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-header);
}

.topbar-toggle-btn {
  background: transparent;
  border: 1px solid var(--color-topbar-border, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-sm, 6px);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #48484a);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text-primary, #1d1d1f);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.topbar-crumb-prefix {
  font-weight: 500;
  color: var(--color-text-muted, #59595e);
}

.topbar-crumb-sep {
  font-size: 9px;
  color: var(--color-text-light, #6e6e73);
}

.topbar-crumb-current {
  font-weight: 600;
  color: var(--color-text-primary, #1d1d1f);
}

.topbar-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-secondary, #48484a);
  background: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-pill, 9999px);
  border: 1px solid var(--color-card-border, rgba(0, 0, 0, 0.08));
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-green, #34c759);
  box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.25);
  display: inline-block;
}

/* ==========================================================================
   Environment Banner
   ========================================================================== */
.env-banner {
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  z-index: 1060;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.env-banner-staging {
  background-color: #d97706; /* Amber */
  color: #ffffff;
}

.env-banner-review {
  background-color: #15803d; /* Vibrant Green for Reviews & Approvals */
  color: #ffffff;
}

.env-banner-development {
  background-color: #0071e3; /* Modern Blue */
  color: #ffffff;
}

/* ==========================================================================
   Dashboard Metrics & Minimalist Stat Cards
   ========================================================================== */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--color-card-border, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-lg, 12px);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease-apple, ease), box-shadow 0.25s var(--ease-apple, ease);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.stat-card-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #59595e);
  margin-bottom: 4px;
}

.stat-card-value {
  font-family: var(--font-display, sans-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary, #1d1d1f);
  line-height: 1.1;
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md, 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-icon--red {
  background: rgba(219, 7, 47, 0.08);
  color: var(--color-brand-red, #db072f);
}

.stat-icon--green {
  background: rgba(52, 199, 89, 0.1);
  color: var(--color-brand-green, #34c759);
}

.stat-icon--blue {
  background: rgba(0, 113, 227, 0.1);
  color: var(--color-brand-blue, #0071e3);
}

.stat-icon--amber {
  background: rgba(255, 149, 0, 0.1);
  color: var(--color-brand-orange, #ff9500);
}

/* ==========================================================================
   Folder Cards (Apple Finder Style)
   ========================================================================== */
.folder-card {
  background: #ffffff;
  border: 1px solid var(--color-card-border, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-lg, 12px);
  transition: all 0.25s var(--ease-apple, ease);
  text-decoration: none;
  color: inherit;
}

.folder-card:hover {
  transform: translateY(-2px);
  border-color: rgba(219, 7, 47, 0.25);
  box-shadow: 0 6px 20px rgba(219, 7, 47, 0.08);
}

.folder-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(219, 7, 47, 0.08);
  color: var(--color-brand-red, #db072f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.15s ease-out;
}

.folder-card:hover .folder-icon-wrapper {
  background: var(--color-brand-red, #db072f);
  color: #ffffff;
}

/* ==========================================================================
   Filter Toolbar & Search Bars
   ========================================================================== */
.filter-toolbar {
  background: #ffffff;
  border: 1px solid var(--color-card-border, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-lg, 12px);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

/* Code Pills */
.type-code {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted, #59595e);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Breadcrumbs */
.breadcrumb {
  margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--color-text-light, #6e6e73);
  font-size: 11px;
}

.breadcrumb-item a {
  color: var(--color-text-secondary, #48484a);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.breadcrumb-item a:hover {
  color: var(--color-brand-red, #db072f);
}

.breadcrumb-item.active {
  color: var(--color-text-primary, #1d1d1f);
  font-weight: 600;
}

/* ==========================================================================
   Authentication Views Shell
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 25%, #1d1d1f 0%, #0b1120 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.auth-card-body {
  padding: 36px 40px;
}

.auth-card-footer {
  background: var(--color-sidebar-bg, #fbfbfd);
  border-top: 1px solid var(--color-card-border, rgba(0, 0, 0, 0.08));
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--color-text-muted, #59595e);
}

.auth-logo-badge {
  display: inline-block;
  padding: 12px 24px;
  background: #ffffff;
  border-radius: var(--radius-md, 8px);
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

/* ==========================================================================
   Apple-Style Two-Pane File Explorer & Directory Tree System
   ========================================================================== */
:root {
  --ap-border: rgba(0, 0, 0, 0.08);
  --ap-border-subtle: rgba(0, 0, 0, 0.04);
  --ap-card-bg: #ffffff;
  --ap-bg: #f5f5f7;
  --ap-sidebar-bg: #fbfbfd;
  --ap-text-primary: #1d1d1f;
  --ap-text-secondary: #48484a;
  --ap-text-tertiary: #59595e;
  --ap-text-quaternary: #6e6e73;
  --vt-red: #db072f;
  --vt-red-hover: #b80526;
  --vt-red-glow: rgba(219, 7, 47, 0.25);
  --vt-red-subtle: rgba(219, 7, 47, 0.08);
  --color-folder-yellow: #ffc107;
  --color-folder-yellow-subtle: rgba(255, 193, 7, 0.12);
  --tr-smooth: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --tr-quick: all 0.15s ease-out;
}

[data-bs-theme="dark"] {
  --ap-border: rgba(255, 255, 255, 0.12);
  --ap-border-subtle: rgba(255, 255, 255, 0.06);
  --ap-card-bg: #1c1c1e;
  --ap-bg: #000000;
  --ap-sidebar-bg: #161618;
  --ap-text-primary: #f5f5f7;
  --ap-text-secondary: #a1a1a6;
  --ap-text-tertiary: #86868b;
  --ap-text-quaternary: #636366;
}

.explorer-frame {
  display: flex;
  background: var(--ap-card-bg);
  border: 1px solid var(--ap-border);
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  min-height: 720px;
  position: relative;
}

/* Left Panel: Directory Tree */
.explorer-tree-panel {
  width: 280px;
  min-width: 280px;
  border-right: 1px solid var(--ap-border);
  background: var(--ap-sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  z-index: 10;
}

.explorer-tree-panel.collapsed {
  margin-left: -280px;
  opacity: 0;
  pointer-events: none;
}

.tree-panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--ap-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tree-panel-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ap-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-panel-close-btn {
  background: none;
  border: none;
  color: var(--ap-text-tertiary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--tr-quick);
}

.tree-panel-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ap-text-primary);
}

.tree-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.tree-node-wrap {
  margin-bottom: 2px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ap-text-secondary);
  cursor: pointer;
  transition: var(--tr-quick);
  user-select: none;
  text-decoration: none;
}

.tree-row:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ap-text-primary);
}

.tree-row.active {
  background: var(--vt-red-subtle);
  color: var(--vt-red);
  font-weight: 600;
}

.tree-toggle-caret {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--ap-text-quaternary);
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.tree-toggle-caret:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ap-text-primary);
}

.tree-toggle-caret.open {
  transform: rotate(90deg);
}

.tree-toggle-caret.placeholder {
  visibility: hidden;
  pointer-events: none;
}

.tree-folder-icon {
  font-size: 14px;
  color: var(--color-folder-yellow, #ffc107);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  transition: var(--tr-quick);
}

.tree-row.active .tree-folder-icon {
  color: var(--color-folder-yellow, #ffc107);
}

.tree-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-count-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--ap-text-tertiary);
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 7px;
  border-radius: 9999px;
}

.tree-row.active .tree-count-pill {
  background: rgba(219, 7, 47, 0.12);
  color: var(--vt-red);
}

.tree-subchildren {
  display: none;
  padding-left: 20px;
  margin-top: 2px;
}

.tree-subchildren.open {
  display: block;
}

/* Right Panel: Explorer Main Content */
.explorer-content-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ap-card-bg);
}

.explorer-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--ap-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--ap-card-bg);
  flex-wrap: wrap;
}

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

.explorer-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.explorer-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.crumb-item {
  color: var(--ap-text-secondary);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--tr-quick);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.crumb-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ap-text-primary);
}

.crumb-item.current {
  font-weight: 700;
  color: var(--ap-text-primary);
  cursor: default;
  background: transparent;
}

.crumb-sep {
  font-size: 9px;
  color: var(--ap-text-quaternary);
}

/* ==========================================================================
   Interactive Breadcrumbs with Mobile Directory Tree Expander
   ========================================================================== */
.explorer-breadcrumbs-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.explorer-breadcrumbs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 8px;
  background: var(--ap-card-bg, #ffffff);
  border: 1px solid var(--ap-border-subtle, rgba(0, 0, 0, 0.06));
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease-out;
}

.explorer-breadcrumbs-bar:hover {
  border-color: var(--ap-border, rgba(0, 0, 0, 0.16));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.breadcrumb-tree-expander-btn {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ap-text-secondary, #6e6e73);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease-out;
}
[data-bs-theme="dark"] .breadcrumb-tree-expander-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.breadcrumb-tree-expander-btn:hover {
  background: rgba(219, 7, 47, 0.08);
  color: var(--color-brand-red, #db072f);
  border-color: rgba(219, 7, 47, 0.22);
}

.breadcrumb-tree-expander-btn .expander-chevron {
  font-size: 9px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.explorer-breadcrumbs-bar.is-expanded .breadcrumb-tree-expander-btn {
  background: rgba(219, 7, 47, 0.08);
  color: var(--color-brand-red, #db072f);
  border-color: rgba(219, 7, 47, 0.22);
}

.explorer-breadcrumbs-bar.is-expanded .breadcrumb-tree-expander-btn .expander-chevron {
  transform: rotate(180deg);
}

/* Mobile Breadcrumbs Tree Dropdown */
.mobile-breadcrumb-tree-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 330px;
  max-width: 92vw;
  max-height: 480px;
  background: var(--ap-card-bg, #ffffff);
  border: 1px solid var(--ap-border, rgba(0, 0, 0, 0.08));
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  z-index: 1060;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: mobileTreeSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mobileTreeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mobile-breadcrumb-tree-dropdown.show {
  display: flex;
}

.mobile-breadcrumb-tree-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1055;
  display: none;
}

.mobile-breadcrumb-tree-backdrop.show {
  display: block;
}

.mobile-tree-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ap-border-subtle, rgba(0, 0, 0, 0.04));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ap-sidebar-bg, #fbfbfd);
}

.mobile-tree-header-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ap-text-tertiary, #59595e);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-tree-close-btn {
  background: transparent;
  border: none;
  color: var(--ap-text-tertiary, #59595e);
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-out;
}

.mobile-tree-close-btn:hover {
  color: var(--ap-text-primary, #1d1d1f);
  background: rgba(0, 0, 0, 0.05);
}

.mobile-tree-search-bar {
  padding: 8px 14px;
  border-bottom: 1px solid var(--ap-border-subtle, rgba(0, 0, 0, 0.04));
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ap-card-bg, #ffffff);
}

.mobile-tree-search-bar input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  width: 100%;
  color: var(--ap-text-primary, #1d1d1f);
}

.mobile-tree-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 18px;
  max-height: 380px;
}

.mobile-tree-node-wrap {
  margin-bottom: 2px;
}

.mobile-tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px; /* Apple 44pt touch guideline */
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--ap-text-primary, #1d1d1f);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-out;
  margin-bottom: 2px;
  user-select: none;
  position: relative;
  text-decoration: none;
}

.mobile-tree-row:hover,
.mobile-tree-row:active {
  background: rgba(0, 0, 0, 0.04);
}
[data-bs-theme="dark"] .mobile-tree-row:hover,
[data-bs-theme="dark"] .mobile-tree-row:active {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-tree-row.active {
  background: rgba(219, 7, 47, 0.08);
  color: var(--color-brand-red, #db072f);
  font-weight: 600;
}

.mobile-tree-row.active::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  background: var(--color-brand-red, #db072f);
  border-radius: 9999px;
}

.mobile-tree-row .tree-folder-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  color: #ffc107;
  flex-shrink: 0;
}

.mobile-tree-row .tree-toggle-caret {
  width: 28px;
  height: 28px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ap-text-quaternary, #6e6e73);
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
}

.mobile-tree-row .tree-toggle-caret.open {
  transform: rotate(90deg);
}

.mobile-tree-row .tree-toggle-caret.placeholder {
  visibility: hidden;
}

.mobile-tree-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-tree-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ap-text-tertiary, #59595e);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}
[data-bs-theme="dark"] .mobile-tree-badge {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-tree-row.active .mobile-tree-badge {
  background: var(--color-brand-red, #db072f);
  color: #ffffff;
}

.mobile-tree-subchildren {
  padding-left: 16px;
  margin-top: 2px;
  margin-bottom: 4px;
  border-left: 1.5px dashed rgba(0, 0, 0, 0.08);
  margin-left: 20px;
  display: none;
}

.mobile-tree-subchildren.open {
  display: block;
}

/* Folder Hero Banner */
.folder-hero-banner {
  padding: 20px 24px;
  border-bottom: 1px solid var(--ap-border-subtle);
  background: linear-gradient(180deg, var(--ap-bg) 0%, var(--ap-card-bg) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.folder-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.folder-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-folder-yellow-subtle, rgba(255, 193, 7, 0.12));
  color: var(--color-folder-yellow, #ffc107);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}

.folder-hero-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ap-text-primary);
  margin-bottom: 2px;
}

.folder-hero-desc {
  font-size: 12.5px;
  color: var(--ap-text-secondary);
  margin-bottom: 0;
}

/* Subfolders Shelf */
.subfolders-shelf {
  padding: 16px 24px;
  border-bottom: 1px solid var(--ap-border-subtle);
  background: var(--ap-card-bg);
}

.subfolders-shelf-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ap-text-tertiary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subfolders-shelf-title i {
  color: var(--color-folder-yellow, #ffc107);
}

.subfolder-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.subfolder-chip {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--ap-border);
  background: var(--ap-card-bg);
  cursor: pointer;
  transition: var(--tr-quick);
  text-decoration: none;
  color: inherit;
  min-height: 94px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.subfolder-chip:hover {
  border-color: rgba(255, 193, 7, 0.5);
  background: rgba(255, 193, 7, 0.06);
  box-shadow: 0 6px 18px rgba(255, 193, 7, 0.12);
  transform: translateY(-2px);
}

.subfolder-chip i {
  font-size: 34px;
  color: var(--color-folder-yellow, #ffc107);
  flex-shrink: 0;
}

.subfolder-chip-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--ap-text-primary);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.subfolder-chip-count {
  font-size: 13px;
  color: var(--ap-text-tertiary);
  margin-top: 4px;
}

/* Main Content Body */
.explorer-view-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* Apple Finder Style Cards */
.resource-card-apple {
  background: var(--ap-card-bg);
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  padding: 18px;
  transition: var(--tr-smooth);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.resource-card-apple:hover {
  border-color: var(--vt-red-glow);
  box-shadow: 0 8px 24px rgba(219, 7, 47, 0.08);
  transform: translateY(-2px);
}

.res-type-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.res-type--exe { background: rgba(52, 199, 89, 0.12); color: #34c759; }
.res-type--zip { background: rgba(0, 122, 255, 0.12); color: #007aff; }
.res-type--pdf { background: rgba(255, 59, 48, 0.12); color: #ff3b30; }
.res-type--video { background: rgba(175, 82, 222, 0.12); color: #af52de; }

.res-code-badge {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--ap-text-secondary);
}

.card-info-icon {
  background: transparent;
  border: none;
  padding: 6px;
  margin: -4px -4px 0 0;
  color: var(--ap-text-tertiary, #8e8e93);
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
}

.card-info-icon:hover,
.card-info-icon:focus-visible {
  color: var(--vt-red, #db072f);
  transform: scale(1.15);
  outline: none;
}

.res-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--ap-text-primary);
  margin-top: 4px;
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.table-res-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--ap-text-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.res-desc {
  font-size: 13px;
  color: var(--ap-text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.res-card-meta {
  padding-top: 14px;
  border-top: 1px solid var(--ap-border-subtle);
}

.res-card-action .btn {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(219, 7, 47, 0.2);
  transition: var(--tr-quick);
}

.res-card-action .btn:hover {
  box-shadow: 0 4px 14px rgba(219, 7, 47, 0.35);
  transform: translateY(-1px);
}

.res-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--ap-border-subtle);
  font-size: 11.5px;
  color: var(--ap-text-tertiary);
}

/* Explorer Table View */
.ap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ap-table thead th {
  background: var(--ap-sidebar-bg);
  color: var(--ap-text-tertiary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ap-border);
  white-space: nowrap;
}

.ap-table tbody tr {
  transition: var(--tr-quick);
  cursor: pointer;
}

.ap-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.ap-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ap-border-subtle);
  font-size: 13px;
  color: var(--ap-text-primary);
}

/* Status Bar */
.explorer-status-bar {
  padding: 10px 20px;
  border-top: 1px solid var(--ap-border);
  background: var(--ap-sidebar-bg);
  font-size: 11.5px;
  color: var(--ap-text-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Modality Filters */
.filter-chips-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-chips-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--ap-border);
  background: var(--ap-card-bg);
  color: var(--ap-text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--tr-quick);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover {
  border-color: var(--vt-red-glow);
  color: var(--ap-text-primary);
}

.filter-chip.active {
  background: var(--vt-red);
  color: #ffffff;
  border-color: var(--vt-red);
  font-weight: 600;
}

/* Quick Look Slide-over Drawer */
.quicklook-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1060;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.quicklook-overlay.show {
  display: block;
  opacity: 1;
}

.quicklook-drawer {
  position: fixed;
  top: 0;
  right: -520px;
  width: 500px;
  max-width: 90vw;
  height: 100vh;
  background: var(--ap-card-bg);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
  z-index: 1070;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.quicklook-drawer.show {
  right: 0;
}

.drawer-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--ap-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-close-btn {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ap-text-tertiary);
  transition: var(--tr-quick);
}

.drawer-close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ap-text-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px;
}

.drawer-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.spec-item {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--ap-border-subtle);
  border-radius: 8px;
}

.spec-label {
  font-size: 11px;
  color: var(--ap-text-tertiary);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.spec-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ap-text-primary);
}

/* Mobile Responsiveness (< 992px & < 768px) */
@media (max-width: 991.98px) {
  .explorer-tree-panel {
    position: fixed;
    left: -320px;
    top: 0;
    bottom: 0;
    width: 85vw;
    max-width: 320px;
    z-index: 1050;
    margin-left: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: var(--ap-card-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  }
  .explorer-tree-panel.mobile-open {
    left: 0;
  }
  .explorer-tree-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1045;
    display: none;
  }
  .explorer-tree-backdrop.show {
    display: block;
  }
  .tree-row {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13.5px;
  }
  .tree-toggle-caret {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .explorer-breadcrumbs-container {
    width: 100%;
  }
  .explorer-breadcrumbs-bar {
    width: 100%;
    justify-content: space-between;
    background: var(--ap-bg, #f5f5f7);
    border: 1px solid var(--ap-border, rgba(0, 0, 0, 0.08));
    padding: 4px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }
  .mobile-breadcrumb-tree-dropdown {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
  }
}

@media (max-width: 767.98px) {
  .explorer-toolbar {
    padding: 10px 14px;
    gap: 8px;
  }
  .explorer-toolbar-left {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .explorer-toolbar-right {
    width: 100%;
    margin-left: 0;
    display: flex;
    gap: 8px;
  }
  .explorer-toolbar-right .input-group {
    width: auto !important;
    flex: 1;
  }
  .explorer-breadcrumbs {
    flex: 1;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .explorer-breadcrumbs::-webkit-scrollbar {
    display: none;
  }
  .crumb-item {
    font-size: 12px;
    padding: 4px 6px;
  }
  .folder-hero-banner {
    padding: 14px 16px;
    gap: 10px;
  }
  .folder-hero-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .folder-hero-title {
    font-size: 16px;
  }
  .folder-hero-desc {
    font-size: 11.5px;
  }
  .subfolder-chip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .subfolder-chip {
    padding: 8px 10px;
    gap: 8px;
  }
  .subfolder-chip-title {
    font-size: 12px;
  }
  .subfolder-chip-count {
    font-size: 10.5px;
  }
  .explorer-view-body {
    padding: 14px;
  }
  .resource-card-apple {
    padding: 14px;
  }

  /* Table View Mobile Reformat: Apple iOS Inset List Cards */
  .ap-table thead {
    display: none !important;
  }
  .ap-table, .ap-table tbody, .ap-table tr, .ap-table td {
    display: block !important;
    width: 100% !important;
  }
  .ap-table tbody tr {
    background: var(--ap-card-bg);
    border: 1px solid var(--ap-border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--tr-quick);
  }
  .ap-table tbody tr:active {
    background: rgba(0, 0, 0, 0.03);
  }
  .ap-table tbody td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }
  .mobile-table-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--ap-border-subtle);
    padding-top: 10px;
    margin-top: 10px;
  }
}

/* ==========================================================================
   Welcome Landing Page Hero, Full Page Background & Search Box
   ========================================================================== */
.welcome-page-wrapper {
  position: relative;
  overflow: hidden;
  margin: -1.5rem -1.5rem -1.5rem -1.5rem;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.welcome-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/home/home-hero-bg.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 68%,
    rgba(0, 0, 0, 0.65) 84%,
    rgba(0, 0, 0, 0) 98%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 68%,
    rgba(0, 0, 0, 0.65) 84%,
    rgba(0, 0, 0, 0) 98%
  );
}

.welcome-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(245, 245, 247, 0) 0%,
    rgba(245, 245, 247, 0.08) 40%,
    rgba(245, 245, 247, 0.3) 72%,
    rgba(245, 245, 247, 0.8) 88%,
    var(--color-app-bg, #f5f5f7) 98%
  );
  pointer-events: none;
  z-index: 1;
}

.welcome-hero {
  position: relative;
  padding: clamp(60px, 8vw, 110px) 24px clamp(40px, 6vw, 70px);
  background: transparent;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.welcome-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.welcome-headline {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ap-text-primary, #1d1d1f);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

.welcome-search-form {
  margin: 0 auto;
  max-width: 680px;
  width: 100%;
}

.welcome-search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--ap-border, #d2d2d7);
  border-radius: 50px;
  padding: 6px 8px 6px 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  box-sizing: border-box;
}

.welcome-search-box:focus-within {
  border-color: var(--vt-red, #db072f);
  box-shadow: 0 0 0 4px rgba(219, 7, 47, 0.12) !important;
}

.welcome-search-icon {
  color: var(--ap-text-tertiary, #86868b);
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}

.welcome-search-input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1 1 0%;
  min-width: 0 !important;
  width: 100%;
  font-size: 15px;
  color: var(--ap-text-primary, #1d1d1f);
  padding: 8px 4px;
  text-overflow: ellipsis;
}

.welcome-search-input::placeholder {
  color: var(--ap-text-tertiary, #86868b);
  font-size: 14.5px;
  text-overflow: ellipsis;
}

.welcome-search-btn {
  border-radius: 40px;
  padding: 10px 24px;
  font-size: 14.5px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(219, 7, 47, 0.22);
  white-space: nowrap;
}

.welcome-browse-btn {
  font-size: 14.5px;
  border-color: var(--ap-border, #d2d2d7);
  background: #ffffff;
  color: var(--ap-text-primary, #1d1d1f);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.welcome-browse-btn:hover {
  background: #ffffff;
  border-color: var(--vt-red, #db072f);
  color: var(--vt-red, #db072f);
  box-shadow: 0 4px 14px rgba(219, 7, 47, 0.15);
  transform: translateY(-1px);
}

/* Announcement Cycler Component (Verbose & Spacious) */
.announcement-cycler {
  max-width: 820px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.announcement-cycler:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.15) !important;
}

.announcement-cycler-viewport {
  position: relative;
  min-height: 56px;
  overflow: hidden;
  transition: min-height 0.25s ease;
}

.announcement-cycle-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.announcement-cycle-item.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.announcement-cycle-title {
  color: var(--ap-text-primary, #1d1d1f);
  font-size: 15px;
}

.announcement-cycle-excerpt {
  color: var(--color-text-secondary, #6e6e73);
  font-size: 13.5px;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Topbar User Dropdown */
.topbar-status-pill.dropdown-toggle::after {
  display: none;
}

.topbar-user-dropdown .dropdown-menu {
  border-color: var(--color-card-border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
}

@media (max-width: 576px) {
  .welcome-page-wrapper {
    margin: -1.5rem -1rem -1.5rem -1rem;
    padding: 1rem 1rem 1.5rem 1rem;
    min-height: calc(100vh - 120px);
    overflow-x: hidden;
  }
  .welcome-hero {
    padding: 36px 8px 24px 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .welcome-hero-inner {
    width: 100%;
    max-width: 100%;
  }
  .welcome-headline {
    font-size: clamp(1.6rem, 5.5vw, 2.1rem);
  }
  .welcome-search-box {
    border-radius: 50px;
    padding: 5px 6px 5px 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .welcome-search-icon {
    font-size: 16px;
    margin-right: 8px;
  }
  .welcome-search-input {
    font-size: 13.5px;
    padding: 6px 2px;
    min-width: 0 !important;
  }
  .welcome-search-input::placeholder {
    font-size: 13px;
  }
  .welcome-search-btn {
    padding: 8px 18px;
    font-size: 13.5px;
    flex-shrink: 0;
  }
  .announcement-cycler-viewport {
    min-height: 76px;
  }
  .topbar-user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .welcome-search-box {
    padding: 4px 4px 4px 10px;
  }
  .welcome-search-icon {
    margin-right: 6px;
    font-size: 14px;
  }
  .welcome-search-btn {
    padding: 7px 12px;
    font-size: 12.5px;
  }
}
