:root {
  color-scheme: light;
  --brand-900: #071a35;
  --brand-800: #0d284f;
  --brand-600: #18498a;
  --brand-400: #3b82f6;
  --brand-200: #cfe0ff;
  --accent-amber: #fecf56;
  --accent-mint: #5ae6c7;
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.75);
  --glass: rgba(255, 255, 255, 0.45);
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --danger: #ef4e4e;
  --success: #15c47e;
  --shadow-soft: 0 12px 40px rgba(7, 26, 53, 0.12);
  --shadow-card: 0 20px 50px rgba(7, 26, 53, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 6px;
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: inherit;
  background: radial-gradient(circle at top, #ebf2ff, #f5f7fb 55%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

body,
button,
input,
select,
textarea,
table,
th,
td,
label,
.btn,
.nav-item {
  font-family: inherit;
}

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

a:not(.btn):hover,
a:not(.btn):focus {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  background: linear-gradient(180deg, var(--brand-900), var(--brand-800));
  color: #fff;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  z-index: 10;
  transform: translateX(0);
  transition: transform var(--transition-base);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 55%);
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
}

.logo-img {
  width: 160px;
  height: auto;
  display: block;
  opacity: 1;
  transition: none;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
  transition:
    transform var(--transition-base),
    background var(--transition-base),
    color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-item:hover {
  transform: translateX(4px);
  color: #fff;
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.user-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.user-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 60%);
  pointer-events: none;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background var(--transition-base),
    transform var(--transition-base);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.logout-btn svg {
  flex-shrink: 0;
}

.main-content {
  margin-left: 280px;
  padding: 8px clamp(16px, 2.5vw, 32px) 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  font-weight: 700;
  color: var(--brand-900);
}

.page-subtitle {
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

.cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.glass-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  backdrop-filter: blur(26px);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

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

.stat-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto auto -40px -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 70%);
  transform: rotate(25deg);
}

.stat-card .label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.trend-up {
  color: var(--success);
}

.trend-down {
  color: var(--danger);
}

.chart-card {
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.chart-card .section-title {
  margin-bottom: 4px;
}

.chart-card .page-subtitle {
  margin-top: 0;
  margin-bottom: 12px;
}

#uploadsChart,
#trafficChart {
  width: 100%;
  height: 300px;
  max-height: 300px;
  overflow: hidden;
  position: relative;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.table-wrap {
  overflow: hidden;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-alt);
  table-layout: auto;
}

thead {
  background: rgba(7, 26, 53, 0.04);
}

th,
td {
  text-align: left;
  padding: 16px 20px;
  font-size: 0.92rem;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(7, 26, 53, 0.04);
}

th:last-child,
td:last-child {
  text-align: right;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand-600);
}

.badge.success {
  background: rgba(21, 196, 126, 0.15);
  color: var(--success);
}

.badge.danger {
  background: rgba(239, 78, 78, 0.15);
  color: var(--danger);
}

.table-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.table-text {
  display: inline-block;
  max-width: clamp(160px, 22vw, 320px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.badge-truncate {
  min-width: 0;
  max-width: clamp(140px, 18vw, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-content: center;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

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

.page-link {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--brand-800);
  background: rgba(7, 26, 53, 0.03);
  transition:
    background var(--transition-base),
    color var(--transition-base);
}

.page-link:hover {
  background: rgba(7, 26, 53, 0.08);
}

.page-link.active {
  background: var(--brand-600);
  color: #fff;
  border-color: transparent;
}

.page-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  cursor: pointer;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  box-sizing: border-box;
  text-decoration: none;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand-600), var(--brand-400));
  color: #fff;
  box-shadow: 0 12px 24px rgba(24, 73, 138, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(7, 26, 53, 0.08);
  color: var(--brand-800);
}

.btn-danger {
  background: rgba(239, 78, 78, 0.15);
  color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: inherit;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  transition:
    border var(--transition-base),
    box-shadow var(--transition-base);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: radial-gradient(circle at 20% 20%, rgba(58, 133, 255, 0.18), transparent 45%), radial-gradient(circle at 80% 0%, rgba(90, 230, 199, 0.22), transparent 40%), var(--bg);
}

.auth-box {
  width: min(420px, 100%);
  padding: 40px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(7, 26, 53, 0.08);
  animation: floatIn 480ms ease forwards;
}

.auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-800);
  margin-bottom: 24px;
}

.auth-box .btn {
  width: 100%;
}

.auth-meta {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 24px;
}

.not-found-shell {
  width: 100%;
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 64px);
}

.not-found-shell--in-app {
  min-height: calc(100vh - 120px);
}

.main-content > .not-found-shell {
  flex: 1;
}

.not-found-card {
  width: min(520px, 100%);
  text-align: center;
  padding: clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.not-found-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 15px 35px rgba(24, 73, 138, 0.25);
}

.not-found-code {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--brand-800);
  margin: 0;
}

.not-found-title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  margin: 0;
  color: var(--brand-900);
}

.not-found-message {
  margin: 0;
  color: var(--muted);
}

.not-found-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
  align-items: center;
}

.alert-error {
  background: rgba(239, 78, 78, 0.12);
  color: var(--danger);
}

.alert-success {
  background: rgba(21, 196, 126, 0.12);
  color: var(--success);
}

.alert-warning {
  background: rgba(254, 207, 86, 0.15);
  color: #b45309;
  border: 1px solid rgba(254, 207, 86, 0.3);
}

@media (max-width: 1080px) {
  .sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
  }

  .main-content {
    margin-left: 0;
    padding-top: 20px;
  }

  .shell {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .sidebar {
    position: relative;
    width: 100%;
    max-width: none;
  }

  .main-content {
    padding: 16px 16px 28px;
  }

  .glass-card {
    padding: 20px;
  }

  .table-wrap {
    overflow-x: auto;
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.loading-bar {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.loading-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmer 1.25s infinite;
}

#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 32px rgba(7, 26, 53, 0.2);
  border: 1px solid var(--border);
  backdrop-filter: blur(26px);
  animation: slideInLeft 0.3s ease-out;
  min-width: 280px;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

.toast.toast-info {
  border-left: 4px solid var(--brand-400);
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-info .toast-icon {
  color: var(--brand-400);
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.toast-message {
  font-size: 0.85rem;
  color: var(--muted);
}

.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-base);
  font-size: 18px;
}

.toast-close:hover {
  color: var(--text);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

.toast.toast-exit {
  animation: slideOutLeft 0.3s ease-out forwards;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 26, 53, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 540px;
  width: 90%;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-900);
  margin-top: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-base);
}

.modal-close:hover {
  color: var(--text);
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  background: rgba(7, 26, 53, 0.02);
  transition: all var(--transition-base);
  cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--brand-400);
  background: rgba(59, 130, 246, 0.05);
}

.upload-area-icon {
  font-size: 48px;
  color: var(--brand-400);
  margin-bottom: 16px;
}

.upload-area-text {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-area-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.file-input {
  display: none;
}

.spinner {
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--brand-400);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

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

@keyframes copyPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.btn-copy.copied {
  animation: copyPulse 0.3s ease;
}

.nav-item i {
  width: 20px;
  text-align: center;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 26, 53, 0.6);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.dialog-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.dialog {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 24px 48px rgba(7, 26, 53, 0.3);
  border: 1px solid var(--border);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-base);
}

.dialog-overlay.active .dialog {
  transform: scale(1) translateY(0);
}

.dialog-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.dialog-icon.confirm {
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand-400);
}

.dialog-icon.alert {
  background: rgba(239, 78, 78, 0.12);
  color: var(--danger);
}

.dialog-icon.info {
  background: rgba(21, 196, 126, 0.12);
  color: var(--success);
}

.dialog-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-900);
  margin-bottom: 12px;
}

.dialog-message {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.dialog-actions .btn {
  min-width: 100px;
}

.breadcrumb-nav {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.folder-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.breadcrumb-item {
  color: var(--brand-600);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition:
    background var(--transition-base),
    color var(--transition-base);
}

.breadcrumb-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--brand-400);
}

.breadcrumb-item.active {
  color: var(--text);
  font-weight: 600;
  pointer-events: none;
}

.breadcrumb-separator {
  color: var(--muted);
  font-size: 0.75rem;
}

.folders-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.folder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-base);
}

.folder-card:hover {
  border-color: var(--brand-400);
  background: rgba(59, 130, 246, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(7, 26, 53, 0.1);
}

.folder-card-content {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  flex: 1;
}

.folder-card-icon {
  color: var(--brand-400);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.folder-card-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.folder-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.folder-card:hover .folder-actions {
  opacity: 1;
}

.folder-actions .btn {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.folder-actions .btn i {
  font-size: 0.85rem;
}

.no-folders-message {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

#moveFileDestination {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

#moveFileDestination:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

.move-file-description {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.file-row {
  cursor: grab;
  transition:
    opacity var(--transition-base),
    background var(--transition-base);
}

.file-row:active {
  cursor: grabbing;
}

.file-row.dragging {
  opacity: 0.5;
  background: rgba(59, 130, 246, 0.1);
}

.drop-target {
  transition: all var(--transition-base);
}

.drop-target.drop-highlight {
  box-shadow: 0 0 0 2px var(--brand-400);
}

.drop-target.drop-over {
  background: rgba(59, 130, 246, 0.15) !important;
  transform: scale(1.02);
  box-shadow:
    0 0 0 2px var(--brand-400),
    0 4px 12px rgba(59, 130, 246, 0.2);
}

.breadcrumb-item.drop-target.drop-over {
  background: rgba(59, 130, 246, 0.2) !important;
  border-radius: var(--radius-sm);
}

.folder-card.drop-over .folder-card-icon {
  color: var(--brand-600);
  transform: scale(1.1);
}

@media (max-width: 1200px) {
  .folders-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .folders-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .folders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .folders-grid {
    grid-template-columns: 1fr;
  }

  .folder-actions {
    opacity: 1;
  }

  .folder-breadcrumb {
    font-size: 0.85rem;
  }

  .breadcrumb-item {
    padding: 2px 6px;
  }
}
