/* ==========================================================================
   4U LISTAFÁCIL PRO — STYLESHEET
   Design System: Dark Futuristic Glassmorphism (4U Ecosystem)
   ========================================================================== */

:root {
  --bg-main: #070b14;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(139, 92, 246, 0.5);
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;
}

/* Base & Reset */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: #f1f5f9;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.8);
}

/* Glass Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* 4U Glowing Logo */
.brand-logo-glow {
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.45));
  transition: transform 0.3s ease, filter 0.3s ease;
}
.brand-logo-glow:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.7));
}

/* Pro Badge */
.pro-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
}

/* Drag & Drop Overlay */
#dropzoneOverlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#dropzoneOverlay.active {
  opacity: 1;
  pointer-events: auto;
}
.dropzone-box {
  width: 90%;
  max-width: 520px;
  border: 2px dashed #8b5cf6;
  border-radius: 24px;
  padding: 40px 24px;
  background: rgba(139, 92, 246, 0.08);
  text-align: center;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.25);
  animation: pulseDrop 2s infinite ease-in-out;
}
@keyframes pulseDrop {
  0%, 100% { transform: scale(1); border-color: #8b5cf6; }
  50% { transform: scale(1.02); border-color: #06b6d4; }
}

/* Toasts */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards;
}
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Category Filter Pills */
.pill-filter {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pill-filter:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.15);
}
.pill-filter.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
  color: #c4b5fd;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}
.pill-count {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 9999px;
  color: #e2e8f0;
}

/* Tabs */
.view-tab {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.view-tab:hover {
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.5);
}
.view-tab.active {
  color: #ffffff;
  background: #8b5cf6;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

/* File Table */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}
.data-table th {
  background: rgba(15, 23, 42, 0.95);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 14px;
  font-weight: 600;
  color: #94a3b8;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.data-table th:hover {
  color: #f8fafc;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}
.data-table tr:hover td {
  background: rgba(30, 41, 59, 0.5);
}

/* Tree View */
.tree-node {
  user-select: none;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
}
.tree-dir-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #f8fafc;
  transition: background 0.15s ease;
}
.tree-dir-row:hover {
  background: rgba(139, 92, 246, 0.15);
}
.tree-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #94a3b8;
  transition: background 0.15s ease;
}
.tree-file-row:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}
.tree-indent {
  display: inline-block;
  width: 20px;
  position: relative;
}
.tree-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.tree-arrow.expanded {
  transform: rotate(90deg);
}

/* Storage Bar */
.storage-progress-bar {
  height: 10px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.6);
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.storage-segment {
  height: 100%;
  transition: width 0.3s ease;
}

/* Badges */
.badge-tag {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-code { background: rgba(99, 102, 241, 0.18); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-image { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-document { background: rgba(6, 182, 212, 0.18); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-video { background: rgba(244, 63, 94, 0.18); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-audio { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-archive { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-other { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

/* Animation Spinner */
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .pill-filter {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
  .view-tab {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
}
