/* Clean professional file transfer app styles */
:root {
  color-scheme: dark;
  color: #e2e8f0;
  background: #020617;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}


/* User file list - desktop only (min-width: 769px) */
@media (min-width: 769px) {
  #userFilesBody .file-list-item {
    grid-template-columns: 40px 2fr 1fr 1fr 120px !important;
  }

  /* Hide mobile popup completely on desktop */
  .user-file-action-popup,
  .user-file-action-popup-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* Professional select dropdown styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

select option {
  background-color: #1e293b;
  color: #111827;
  padding: 0.5rem 1rem;
}

select option:hover,
select option:focus {
  background-color: #334155;
  color: #ffffff;
}

select option:checked {
  background-color: #3b82f6;
  color: #ffffff;
}

/* Webkit scrollbar for select dropdowns */
select::-webkit-scrollbar {
  width: 8px;
}

select::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 4px;
}

select::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

select::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at top, rgba(var(--color-primary-rgb, 59, 130, 246), 0.12) 0%, transparent 35%),
              linear-gradient(180deg, #0a0f1e 0%, #111827 100%);
  color: #e2e8f0;
}

html {
  overflow-x: hidden;
}

/* Admin pages use light background */
body.admin-theme {
  background: #f8fafc;
  color: #212837;
}

button,
a {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.error-page-body .app-shell {
  min-height: auto;
  display: block;
  width: 100%;
  padding: 40px 20px;
  max-width: 100%;
}

/* Error page centering */
.main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* يملأ الشاشة بالكامل */
}

/* Error page direct centering (for pages without main-content wrapper) */
body.error-page-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, rgba(var(--color-primary-rgb, 59, 130, 246), 0.12) 0%, transparent 35%),
              linear-gradient(180deg, #0a0f1e 0%, #111827 100%);
}

body.error-page-body .app-shell {
  min-height: auto;
  display: block;
  width: 100%;
  padding: 40px 20px;
}

.error-page {
  width: 100%;
  max-width: 100%;
}

.site-header {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 24px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
}

.site-footer {
  width: 100%;
  max-width: 1250px;
  margin: 84px auto 24px;
  padding: 24px 20px;
  overflow: visible;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.site-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-logo span {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: radial-gradient(circle, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(2px, 0.55vw, 8px);
  overflow: visible;
}

.nav-links a {
  min-height: 38px;
  padding: 8px 9px;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 550;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-links form {
  margin: 0;
}

.nav-link-button {
  background: transparent;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 550;
  padding: 8px 9px;
}

.nav-link-button:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.1);
}

.nav-links a:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.1);
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  background: transparent;
  color: #cbd5e1;
  min-height: 38px;
  padding: 8px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 550;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-dropdown-toggle:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.1);
}

.nav-dropdown-arrow {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown:focus-within .nav-dropdown-arrow,
.nav-dropdown.is-open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 176px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 140ms ease, visibility 140ms ease, transform 140ms ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  min-height: 40px;
  padding: 10px 14px;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 0.88rem;
}

.nav-dropdown-menu a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #ffffff;
}

.nav-dropdown-menu a:focus-visible {
  outline: 2px solid var(--color-primary-light, #60a5fa);
  outline-offset: -2px;
  background: rgba(59, 130, 246, 0.12);
  color: #ffffff;
}

.nav-dropdown-menu a::after {
  display: none;
}

@media (min-width: 769px) and (max-width: 960px) {
  .site-header {
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .site-header .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-header .nav-links {
    position: absolute;
    top: calc(100% - 4px);
    right: 16px;
    z-index: 1000;
    display: none;
    width: min(360px, calc(100vw - 32px));
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
  }

  .site-header .nav-links.menu-active-state {
    display: flex;
  }

  .site-header .nav-links > a,
  .site-header .nav-links > form,
  .site-header .nav-dropdown,
  .site-header .nav-dropdown-toggle {
    width: 100%;
  }

  .site-header .nav-links > a,
  .site-header .nav-links > form > button,
  .site-header .nav-dropdown-toggle {
    min-height: 42px;
    justify-content: flex-start;
    padding: 10px 12px;
    text-align: left;
  }

  .site-header .nav-dropdown-toggle .nav-dropdown-arrow {
    margin-left: auto;
  }

  .site-header .nav-dropdown-menu,
  .site-header .nav-dropdown:hover .nav-dropdown-menu,
  .site-header .nav-dropdown:focus-within .nav-dropdown-menu,
  .site-header .nav-dropdown:not(.is-open) .nav-dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: 4px 0 0;
    padding: 4px;
    transform: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
  }

  .site-header .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
  }
}

.hero-block {
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.landing-flow {
  display: grid;
  gap: 42px;
}

.landing-intro {
  max-width: 980px;
}

.upload-studio {
  max-width: 780px;
  padding: 32px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.upload-studio h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.upload-studio .upload-card {
  margin-top: 14px;
}

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1.25fr 1fr;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin: 0;
  line-height: 0.95;
  color: #f8fafc;
}

.guest-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(var(--color-primary-rgb, 59, 130, 246), 0.35), transparent 52%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72));
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.2);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

.guest-hero .feature-card-hover {
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.guest-hero .feature-card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.5);
  background-color: rgba(255, 255, 255, 0.14);
}

.hero-copy {
  max-width: 640px;
  font-size: 1.05rem;
  color: #cbd5e1;
  margin: 24px 0 0;
}

.primary-action {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--color-primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 20px rgba(var(--color-primary-rgb, 59, 130, 246), 0.25);
  transition: all 0.2s ease;
}

.primary-action:hover {
  background: var(--color-primary-dark);
}

.feature-cards {
  display: grid;
  gap: 20px;
  margin-top: 40px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  padding: 28px;
  width: 100%;
}

.feature-card h3 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 1.15rem;
}

.feature-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-primary-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  margin-bottom: 18px;
}

.hero-visual {
  min-height: 440px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(var(--color-primary-rgb, 59, 130, 246),0.15), rgba(15,23,42,0.95));
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  place-items: center;
  padding: 32px;
}

.hero-visual .visual-card {
  width: 100%;
  max-width: 360px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}

.hero-visual .visual-card h4 {
  margin: 0 0 18px;
}

.upload-card {
  margin-top: 24px;
  padding: 24px 28px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: 75%;
  margin: 0 auto;
}

.upload-card p {
  margin: 0;
  color: #cbd5e1;
}

.upload-limit-notice {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--color-primary-rgb, 56, 189, 248), 0.25);
  background: rgba(var(--color-primary-rgb, 14, 116, 144), 0.14);
  color: #dbeafe;
}

.upload-limit-notice strong {
  color: #f8fafc;
}

.upload-zone {
  margin-top: 24px;
  border-radius: 24px;
  border: 2px dashed rgba(148, 163, 184, 0.4);
  padding: 36px;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-zone:hover {
  border-color: var(--color-primary-light);
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.08);
}

.upload-zone input {
  display: none;
}

.upload-zone strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.upload-zone small {
  display: block;
  color: #94a3b8;
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-top: 22px;
}

.action-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.action-group a,
.action-group button,
.action-group form > button {
  min-height: 38px;
  min-width: 110px;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

.action-group a:hover,
.action-group button:hover,
.action-group form > button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-color: rgba(var(--color-primary-rgb), 0.5);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.action-group .primary-action {
  margin-top: 0;
}

.action-group.actions-medium a,
.action-group.actions-medium button,
.action-group.actions-medium form > button {
  min-height: 38px;
  min-width: 38px;
  padding: 12px 20px;
}

.action-group.actions-compact a,
.action-group.actions-compact button,
.action-group.actions-compact form > button {
  min-height: 38px;
  min-width: 108px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.upload-actions button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

.upload-actions button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-color: rgba(var(--color-primary-rgb), 0.5);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.upload-actions button.secondary {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.upload-actions button.secondary:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.3);
}

.status-box {
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.18);
  min-height: 72px;
}

.status-box p {
  margin: 0;
}

/* Upload Progress Bar */
.upload-progress-bar {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.25);
  animation: fadeIn 0.3s ease-out;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.progress-filename {
  color: #e2e8f0;
  font-weight: 500;
  word-break: break-word;
  max-width: 70%;
}

.progress-percent {
  color: var(--color-primary-light);
  font-weight: 700;
  font-size: 0.95rem;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: 4px;
  transition: width 0.3s ease-out;
  box-shadow: 0 0 10px rgba(var(--color-primary-rgb, 59, 130, 246), 0.5);
}

.file-list {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  overflow-x: visible;
}

.file-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  transition: all 0.2s ease;
  width: 100%;
  overflow: visible;
}

.file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.2);
}

.file-card .file-info {
  flex: 1;
  min-width: 0;
  max-width: 60%;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-card .file-type-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-card .file-type-icon svg {
  width: 20px;
  height: 20px;
  color: #94a3b8;
}

.file-card strong {
  display: block;
  color: #ffffff;
  margin-bottom: 6px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  font-size: 0.95rem;
  font-weight: 600;
}

.file-card span {
  color: #94a3b8;
  font-size: 0.85rem;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.file-actions button.guest-qr-btn {
  background: rgb(251 146 60 / 0%);
  border-color: #78787845;
  color: #ffffff;
}

.file-actions button.guest-rename-btn {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.25);
  color: #c4b5fd;
}

.file-actions button.guest-rename-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.file-actions button:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.expiry-info {
  color: #94a3b8;
  font-weight: 500;
}

.expiry-warning {
  color: #fca5a5;
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

.expiry-expired {
  color: #ef4444;
  font-weight: 700;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.delete-file-btn {
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 36px;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  transition: all 0.2s ease;
}

.delete-file-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.danger-link-button {
  background: transparent;
  color: #ef4444;
  padding: 0;
  margin-left: 12px;
}

.download-layout {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.download-page-cta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-page-cta p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.download-page-cta .secondary-action {
  padding: 10px 16px;
}

.download-shell {
  display: flex;
  gap: 22px;
  grid-template-columns: 1.3fr 0.7fr;
  flex-wrap: wrap;
  flex-direction: column-reverse;
}

.download-timer {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgb(108 69 75 / 24%);
  background: rgb(22 31 48);
  color: #dbeafe;
}

.secondary-action {
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  background: rgb(45 174 137 / 50%);
  color: #f8fafc;
}

.download-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.download-actions > a,
.download-actions > button,
.download-actions > form {
  width: 100%;
  margin: 0;
}

.download-actions > a,
.download-actions > button,
.download-actions > form > button {
  min-height: 46px;
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

.download-actions > a:hover,
.download-actions > button:hover,
.download-actions > form > button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-color: rgba(var(--color-primary-rgb), 0.5);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.disabled-action {
  pointer-events: none;
  opacity: 0.6;
  filter: grayscale(0.35);
}

.download-ad {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.94);
  padding: 24px;
  margin: 0 auto;
  width: 75%;
}

.download-ad h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.35rem;
}

.download-ad p {
  margin: 12px 0 0;
  color: #cbd5e1;
}

.ad-cta {
  margin-top: 18px;
  display: inline-flex;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.16);
  color: #ffffff;
  text-decoration: none;
}

.admin-panel,
.user-panel {
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.panel-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 320px;
}

.panel-card {
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.panel-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.panel-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-menu > a {
  display: flex;
  align-items: center;
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(148, 163, 184, 0.06);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.panel-menu > a:hover {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.15);
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.3);
  transform: translateX(4px);
}

.panel-menu > form {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.panel-menu > form button {
  flex: 1;
  text-align: center;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
  transition: all 0.2s ease;
  cursor: pointer;
}

.panel-menu > form button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-color: rgba(var(--color-primary-rgb), 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.3);
}


.file-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* File List (Div-based) */
.file-list {
    width: 100%;
    background: rgb(245 247 250);
    overflow: hidden;
}

.file-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f5f7fa;
  border-bottom: 1px solid #dae0ec;
  font-weight: 600;
  font-size: 0.85rem;
  color: #212837;
}

.file-list-select {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-list-name {
  flex: 0 300px;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #212837;
}

.file-list-owner {
  flex: 0 0 124px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #212837;
}

.file-list-size {
  flex: 0 0 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #212837;
}

.file-list-downloads {
  flex: 0 0 80px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #212837;
}

.file-list-actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  font-size: 0.85rem;
  font-weight: 600;
  color: #212837;
  flex-direction: row-reverse;
}

.sort-header-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: #212837;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.sort-header-btn:hover {
  color: #1f6bff;
}

.sort-header-btn .sort-indicator {
  font-size: 0.75rem;
  opacity: 0.6;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  width: 100%;
}

.file-list-item:last-child {
  border-bottom: none;
}

.file-list-empty {
  padding: 32px;
  text-align: center;
  color: #94a3b8;
}

#adminFilesBody {
  overflow: hidden;
}

.file-list-item .file-list-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-name {
  font-weight: 500;
  color: #1f6bff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  min-width: fit-content;
  align-items: center;
}

.file-actions-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #dae0ec;
  background: #f5f7fa;
  color: #212837;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.file-actions-btn:hover {
  background: #e8ebf0;
  border-color: #cbd5e0;
  transform: translateY(-1px);
}

/* User List (Div-based) */
.user-list {
  width: 100%;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.user-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-weight: 600;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.user-list-id {
  flex: 0 0 60px;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.user-list-name {
  flex: 0 0 200px;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.user-list-email {
  flex: 1;
  min-width: 0;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.user-list-role {
  flex: 0 0 100px;
}

.user-list-actions {
  flex: 0 0 100px;
  display: flex;
  justify-content: flex-end;
}

.user-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background 0.2s ease;
}

.user-list-item:hover {
  background: rgba(30, 41, 59, 0.5);
}

.user-list-item:last-child {
  border-bottom: none;
}

/* Reports List (Div-based) */
.reports-list {
  width: 100%;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.reports-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-weight: 600;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.reports-list-time {
  flex: 0 0 150px;
  color: #e2e8f0;
  font-size: 0.85rem;
  word-break: break-word;
}

.reports-list-action {
  flex: 0 0 150px;
  color: #e2e8f0;
  font-size: 0.85rem;
  word-break: break-word;
}

.reports-list-actor {
  flex: 0 0 200px;
  color: #e2e8f0;
  font-size: 0.85rem;
  word-break: break-word;
}

.reports-list-ip {
  flex: 0 0 120px;
  color: #e2e8f0;
  font-size: 0.85rem;
  word-break: break-word;
}

.reports-list-details {
  flex: 1;
  min-width: 0;
  color: #e2e8f0;
  font-size: 0.85rem;
  word-break: break-word;
}

.reports-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background 0.2s ease;
}

.reports-list-item:hover {
  background: rgba(30, 41, 59, 0.5);
}

.reports-list-item:last-child {
  border-bottom: none;
}

.reports-list-empty {
  padding: 32px;
  text-align: center;
  color: #94a3b8;
}

/* Expiry Styles */
.expiry-info {
  color: #10b981;
  font-size: 0.75rem;
}

.expiry-warning {
  color: #f59e0b;
  font-size: 0.75rem;
}

.expiry-expired {
  color: #ef4444;
  font-size: 0.75rem;
}

.table-tools {
  margin: 20px 0 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.table-tools input,
.table-tools select {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.table-tools input:focus,
.table-tools select:focus {
  outline: none;
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), 0.1);
}

.file-table th,
.file-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.file-table th {
  color: var(--color-primary-light);
  background: rgba(15, 23, 42, 0.99);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sort-header-btn {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sort-header-btn .sort-indicator {
  font-size: 0.8rem;
  opacity: 0.6;
}

.sort-header-btn.is-active {
  color: #7dd3fc;
}

.sort-header-btn.is-active .sort-indicator {
  opacity: 1;
}

.sort-header-btn[data-direction="asc"] .sort-indicator {
  content: "";
}

.sort-header-btn[data-direction="asc"] .sort-indicator::before {
  content: "↑";
}

.sort-header-btn[data-direction="asc"] .sort-indicator {
  font-size: 0;
}

.sort-header-btn[data-direction="desc"] .sort-indicator {
  font-size: 0;
}

.sort-header-btn[data-direction="desc"] .sort-indicator::before {
  content: "↓";
  font-size: 0.8rem;
}

.file-table tr:last-child td {
  border-bottom: none;
}

.file-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
  transition: background 0.2s ease;
}

.file-table td {
  color: #e2e8f0;
  font-size: 0.9rem;
}

.dashboard-file-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-file-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(80px, 1fr));
  gap: 6px;
  max-width: 180px;
}

.admin-file-actions > a,
.admin-file-actions > button,
.admin-file-actions > form,
.admin-file-actions > form > button {
  width: 100%;
}

.admin-file-actions > a,
.admin-file-actions > button,
.admin-file-actions > form > button {
  min-height: 32px;
  padding: 8px 12px;
  font-size: 0.8rem;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.admin-file-actions .action-with-icon {
  gap: 5px;
}

.admin-file-actions .action-icon {
  width: 14px;
  height: 14px;
}

.admin-file-actions .action-icon svg {
  width: 14px;
  height: 14px;
}

.dashboard-file-actions > a,
.dashboard-file-actions > button,
.dashboard-file-actions .inline-rename-form > button {
  border-radius: 6px;
  padding: 6px 10px;
  min-height: 32px;
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.action-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.action-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-file-actions > a {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.15);
  color: var(--color-primary-light);
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.25);
}

.dashboard-file-actions > a:hover {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.25);
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.4);
}

.dashboard-file-actions > button {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.dashboard-file-actions > button:hover {
  background: rgba(148, 163, 184, 0.25);
  border-color: rgba(148, 163, 184, 0.3);
}

/* Batch Delete Button */
.batch-delete-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.batch-delete-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* File Actions Container - Override for consistent styling */
.file-actions-container {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.file-actions-container a,
.file-actions-container button {
  padding: 8px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  min-height: 36px !important;
}

.file-actions-container a svg,
.file-actions-container button svg {
  width: 20px !important;
  height: 20px !important;
}

/* File Checkboxes */
.file-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

#selectAllFiles {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
}
.admin-share-btn {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.25) !important;
}

.admin-share-btn:hover {
  background: rgba(34, 197, 94, 0.4) !important;
  border-color: rgba(34, 197, 94, 0.6) !important;
}

.admin-rename-toggle-btn {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.15) !important;
  color: var(--color-primary-light) !important;
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.25) !important;
}

.admin-rename-toggle-btn:hover {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.4) !important;
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.6) !important;
}

.admin-rename-btn {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.15) !important;
  color: var(--color-primary-light) !important;
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.25) !important;
}

.admin-rename-btn:hover {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.4) !important;
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.6) !important;
}

.admin-delete-btn {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.admin-delete-btn:hover {
  background: rgba(239, 68, 68, 0.4) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

.dashboard-file-actions .rename-toggle-btn {
  background: rgba(var(--color-primary-rgb, 56, 189, 248), 0.2);
  color: var(--color-primary-light);
}

.inline-rename-form {
  display: none;
  align-items: center;
  gap: 8px;
}

.inline-rename-form.is-open {
  display: inline-flex;
}

.admin-file-actions .inline-rename-form.is-open {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto auto;
  width: 100%;
}

.admin-file-actions .inline-rename-form .rename-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.admin-file-actions .inline-rename-form .rename-input-base {
  flex: 1;
  min-height: 24px;
  padding: 6px 8px;
  font-size: 0.74rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
}

.admin-file-actions .inline-rename-form .rename-extension {
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.inline-rename-form input {
  width: 180px;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  padding: 8px 10px;
}

.inline-rename-form button {
  background: rgba(56, 189, 248, 0.2);
  color: #e0f2fe;
}

.inline-rename-form .rename-cancel-btn {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.dashboard-file-actions .danger-link-button {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  margin-left: 0;
  padding: 8px 12px;
}

.admin-file-actions .danger-link-button {
  grid-column: 1 / -1;
}

.dashboard-file-actions .danger-link-button:hover {
  background: rgba(239, 68, 68, 0.32);
}

.file-actions .delete-file-btn.action-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 80px;
  transform: translateX(-50%);
  padding: 14px 20px;
  background: rgba(34, 197, 94, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 10px;
  color: #fff;
  display: none;
  z-index: 10000;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: slideDown 0.3s ease-out forwards;
  max-width: 90%;
  word-break: break-word;
  backdrop-filter: blur(10px);
}

.toast-popup {
  position: fixed;
  padding: 14px 20px;
  background: rgba(34, 197, 94, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 10px;
  color: #fff;
  display: none;
  z-index: 10000;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-width: 90%;
  word-break: break-word;
  backdrop-filter: blur(10px);
}

.toast-popup.visible-toast {
  display: block;
  animation: slideDown 0.3s ease-out forwards;
}

.toast-popup.state-error {
  background: rgba(239, 68, 68, 0.95);
  border-color: rgba(239, 68, 68, 0.4);
}

.toast-popup.state-info {
  background: rgba(59, 130, 246, 0.95);
  border-color: rgba(59, 130, 246, 0.4);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.toast-message {
  flex: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

.toast.hiding {
  animation: slideUp 0.3s ease-in forwards;
}

.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid;
}

.alert-success {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.15);
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.3);
  color: var(--color-primary-light);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.3);
  color: #fde047;
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 70;
}

.confirm-modal.is-open {
  display: flex;
}

.confirm-dialog {
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.98);
  padding: 20px;
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(10px);
}

.confirm-dialog h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.1rem;
}

.confirm-dialog p {
  margin: 12px 0 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.confirm-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-actions button {
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.confirm-no {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.confirm-yes {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

.confirm-yes:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-color: rgba(var(--color-primary-rgb), 0.5);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

@media (max-width: 960px) {
  .hero-grid,
  .panel-grid,
  .feature-cards,
  .download-shell {
    grid-template-columns: 1fr;
  }

  .table-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero-block,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-links {
    gap: 16px;
  }

  .download-actions {
    grid-template-columns: 1fr;
  }

  .download-page-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .inline-rename-form {
    width: 100%;
  }

  .inline-rename-form input {
    flex: 1;
    width: auto;
  }

  .admin-file-actions {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .admin-file-actions .inline-rename-form.is-open {
    grid-template-columns: 1fr;
  }

  /* Dashboard File Actions Mobile (User Panel) */
  .dashboard-file-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .dashboard-file-actions > a,
  .dashboard-file-actions > button,
  .dashboard-file-actions .inline-rename-form > button {
    width: 100%;
    min-height: 40px;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .dashboard-file-actions .action-icon {
    width: 14px;
    height: 14px;
  }

  .dashboard-file-actions .action-icon svg {
    width: 14px;
    height: 14px;
  }

  .dashboard-file-actions .inline-rename-form {
    width: 100%;
  }

  .dashboard-file-actions .inline-rename-form input {
    flex: 1;
    min-height: 40px;
  }
}

/* Delete Modal Styles */
.delete-modal {
  max-width: 420px;
}

.delete-modal-content {
  margin-bottom: 20px;
  text-align: center;
}

.delete-modal-filename {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  word-break: break-word;
  margin: 0 0 12px 0;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border-left: 3px solid rgba(239, 68, 68, 0.4);
}

.delete-modal-warning {
  font-size: 14px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

.delete-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.delete-modal-cancel,
.delete-modal-confirm {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.delete-modal-cancel {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

.delete-modal-cancel:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.2);
}

.delete-modal-confirm {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
}

.delete-modal-confirm:hover:not(:disabled) {
  background: rgba(239, 68, 68, 1);
  transform: translateY(-1px);
}

.delete-modal-cancel:disabled,
.delete-modal-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Rename Modal Styles */
.rename-modal .share-modal-header {
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.rename-modal-content {
  padding: 24px;
  text-align: left;
}

.rename-modal-label {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 8px 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rename-modal-current {
  font-size: 15px;
  color: #cbd5e1;
  margin: 0;
  font-weight: 500;
  word-break: break-all;
}

.rename-modal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 10px;
  border: 1px solid rgba(var(--color-primary-rgb, 56, 189, 248), 0.2);
}

.rename-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e0f2fe;
  font-size: 14px;
  padding: 0;
  outline: none;
  font-family: monospace;
}

.rename-modal-input::placeholder {
  color: #64748b;
}

.rename-modal-extension {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.rename-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 24px 24px 24px;
}

.rename-modal-cancel,
.rename-modal-confirm {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.rename-modal-cancel {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

.rename-modal-cancel:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.2);
}

.rename-modal-confirm {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.85);
  color: #ffffff;
}

.rename-modal-confirm:hover:not(:disabled) {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 1);
  transform: translateY(-1px);
}

.rename-modal-cancel:disabled,
.rename-modal-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Guest Page File Cards */
.file-card {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  min-height: auto;
  height: auto;
  direction: ltr;
  text-align: left;
}

.file-card .file-info {
  flex: 1;
  margin-left: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-card .file-name {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

/* Hide file actions box on desktop */
.file-card-actions-box {
  display: none !important;
}

.file-card .file-meta {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: #94a3b8;
}

.file-card .file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.file-card .file-actions a,
.file-card .file-actions button,
.file-card .guest-file-actions a,
.file-card .guest-file-actions button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.file-card .file-actions a svg,
.file-card .file-actions button svg,
.guest-file-actions a svg,
.guest-file-actions button svg {
  width: 18px;
  height: 18px;
}

.file-card .file-actions a span,
.file-card .file-actions button span {
  display: none;
}

/* Download button - Blue */
.file-card .file-actions a {
  background: #254b8aa1;
  color: white;
}

.file-card .file-actions a:hover {
  background: #1a52ce70;
}

/* Share button - Green */
.file-card .file-actions .copy-link-btn {
  background: #0c7f5987;
  color: white;
}

.file-card .file-actions .copy-link-btn:hover {
  background: #06865e99;
}

/* Delete button - Red */
.file-card .file-actions .guest-delete-btn,
.guest-file-actions .guest-delete-btn {
  background: #ef444461;
  color: white;
}

.file-card .file-actions .guest-delete-btn:hover,
.guest-file-actions .guest-delete-btn:hover {
  background: #dc2d2661;
}

/* Rename button - Purple */
.file-card .file-actions .guest-rename-btn,
.guest-file-actions .guest-rename-btn {
  background: #a855f761;
  color: white;
}

.file-card .file-actions .guest-rename-btn:hover,
.guest-file-actions .guest-rename-btn:hover {
  background: #9333ea61;
}

/* Hide file actions on mobile - use popup instead */
@media (max-width: 768px) {
    .file-card .file-actions,
    .file-card .guest-file-actions {
        display: none !important;
    }

    .file-card {
        cursor: pointer;
    }

    .file-card .file-info {
        display: none !important;
    }
}

/* Homepage Buttons */
.homepage-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: white;
  color: var(--color-primary, #3b82f6);
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.homepage-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.homepage-btn svg {
  width: 20px;
  height: 20px;
}

/* Earnings Settings Styles */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .settings-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.settings-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-card-header-content {
  flex: 1;
}

.settings-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.settings-card-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
}

.settings-card-actions {
  display: flex;
  gap: 0.5rem;
}

.settings-card-body {
  padding: 1.5rem;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #111827;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
}

.action-card:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-2px);
}

.action-card-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #3b82f6;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.action-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.action-card-description {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Countries Table Styles */
.countries-table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.countries-table {
  width: 100%;
  border-collapse: collapse;
}

.countries-table thead {
  background: #f9fafb;
}

.countries-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
}

.countries-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.countries-table tbody tr:last-child td {
  border-bottom: none;
}

.countries-table tbody tr:hover {
  background: #f9fafb;
}

.country-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 1.5rem;
  background: #f3f4f6;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
}

.country-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.country-code {
  font-size: 0.75rem;
  font-family: monospace;
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  color: #6b7280;
}

.rate-input {
  width: 100px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  text-align: right;
}

.rate-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.toggle-switch--small {
  transform: scale(0.875);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Withdrawals Table Styles */
.withdrawals-table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.withdrawals-table {
  width: 100%;
  border-collapse: collapse;
}

.withdrawals-table thead {
  background: #f9fafb;
}

.withdrawals-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
}

.withdrawals-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.withdrawals-table tbody tr:last-child td {
  border-bottom: none;
}

.withdrawals-table tbody tr:hover {
  background: #f9fafb;
}

.withdrawal-id {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.user-email {
  font-size: 0.75rem;
  color: #6b7280;
}

.withdrawal-amount {
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
}

.payment-method {
  font-size: 0.875rem;
  color: #374151;
}

.payment-details-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-family: monospace;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
  text-transform: capitalize;
}

.status-badge--pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge--approved {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge--rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge--paid {
  background: #d1fae5;
  color: #065f46;
}

.withdrawal-date {
  font-size: 0.75rem;
  color: #6b7280;
}

.withdrawal-actions {
  display: flex;
  gap: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: #f3f4f6;
  color: #9ca3af;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* User Earnings Styles */
.earnings-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .earnings-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.earnings-stat-card {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  text-align: center;
}

.earnings-stat-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.earnings-stat-icon--success {
  background: #d1fae5;
  color: #059669;
}

.earnings-stat-icon--primary {
  background: #dbeafe;
  color: #2563eb;
}

.earnings-stat-icon--info {
  background: #e0e7ff;
  color: #4f46e5;
}

.earnings-stat-icon--warning {
  background: #fef3c7;
  color: #d97706;
}

.earnings-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}

.earnings-stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.earnings-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.earnings-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.earnings-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.earnings-card-body {
  padding: 1.5rem;
}

.insufficient-balance {
  text-align: center;
  padding: 2rem;
}

.insufficient-balance-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: #fef3c7;
  color: #d97706;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.insufficient-balance-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.insufficient-balance-text {
  font-size: 0.875rem;
  color: #6b7280;
}

.earnings-table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.earnings-table {
  width: 100%;
  border-collapse: collapse;
}

.earnings-table thead {
  background: #f9fafb;
}

.earnings-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
}

.earnings-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.earnings-table tbody tr:last-child td {
  border-bottom: none;
}

.earnings-table tbody tr:hover {
  background: #f9fafb;
}

.file-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.downloads-count {
  font-size: 0.875rem;
  color: #6b7280;
}

.earnings-amount {
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
}

.earnings-date {
  font-size: 0.75rem;
  color: #6b7280;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 0.75rem;
}

.info-card--warning {
  background: #fef3c7;
  border-color: #fcd34d;
}

.info-card-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fcd34d;
  color: #92400e;
  border-radius: 0.5rem;
}

.info-card-content {
  flex: 1;
}

.info-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.25rem;
}

.info-card-description {
  font-size: 0.875rem;
  color: #92400e;
  margin: 0;
}

/* ==========================================================================
   Professional polish layer — refined, Fileport-inspired minimal upload UI
   ========================================================================== */
.upload-card {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 24px 60px -20px rgba(var(--color-primary-rgb, 59, 130, 246), 0.25);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.upload-zone {
  border-radius: 20px;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
}

.upload-zone:hover {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgba(var(--color-primary-rgb, 59, 130, 246), 0.15);
}

.upload-actions button {
  transition: filter 0.15s ease, transform 0.15s ease;
  border-radius: 12px;
}

.upload-actions button:hover {
  filter: brightness(1.1);
}

.upload-actions button:active {
  transform: translateY(1px);
}

.site-logo strong {
  letter-spacing: -0.01em;
}

::selection {
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.3);
}

:root {
  --surface-base: #0b1220;
  --surface-raised: #111b2d;
  --surface-card: #142033;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --text-muted: #9aa9bd;
  --shadow-card: 0 20px 56px rgba(2, 6, 23, 0.28);
}

body {
  background:
    radial-gradient(ellipse at 50% -12%, rgba(var(--color-primary-rgb, 59, 130, 246), 0.11), transparent 46%),
    linear-gradient(180deg, var(--surface-base) 0%, var(--surface-raised) 100%);
  color: #e8eef6;
}

.main-content {
  display: block;
  flex: 1;
  min-height: 0;
}

.error-page-body .main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-page .app-shell {
  min-height: 100vh;
}

.auth-page .main-content {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 36px 20px;
}

.auth-page .main-content > .w-full.max-w-md {
  width: min(100%, 448px);
  margin: 0 auto;
}

.site-header {
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-footer {
  margin-top: 56px;
  background: rgba(15, 23, 42, 0.58);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: #f8fafc;
}

.guest-home .main-content {
  padding-bottom: 24px;
}

.guest-home .guest-hero {
  isolation: isolate;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.2);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% -30%, rgba(var(--color-primary-rgb, 59, 130, 246), 0.24), transparent 66%),
    linear-gradient(145deg, var(--surface-card) 0%, var(--surface-base) 62%, var(--surface-raised) 100%);
  box-shadow: var(--shadow-card);
}

.guest-home .guest-hero h1 {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(2.6rem, 5vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.guest-home .guest-hero > p {
  max-width: 680px;
  line-height: 1.75;
  color: #b7c4d5;
}

.guest-home .guest-hero .homepage-btn {
  min-height: 48px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(var(--color-primary-rgb, 59, 130, 246), 0.24);
}

.guest-home .guest-hero .feature-card-hover {
  min-height: 100%;
  border-color: rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(15, 27, 44, 0.74);
  text-align: left;
}

.guest-home .guest-hero .feature-card-hover:hover {
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.42);
  background: rgba(20, 34, 54, 0.94);
}

.guest-home .bg-slate-800\/50,
.upload-page .bg-slate-800\/50,
.dashboard-page .bg-slate-800\/50 {
  border-color: var(--border-subtle);
  background-color: rgba(17, 27, 45, 0.84);
  box-shadow: 0 14px 42px rgba(2, 6, 23, 0.18);
}

.guest-home #upload-studio {
  border-radius: 22px;
}

.guest-home #upload-studio .upload-zone,
.upload-page .upload-zone {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: rgba(9, 16, 29, 0.48);
}

.guest-home #upload-studio .upload-zone:hover,
.upload-page .upload-zone:hover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.06);
}

.guest-home #upload-studio .bg-slate-700\/50 {
  border-color: rgba(148, 163, 184, 0.14);
  background-color: rgba(9, 16, 29, 0.5);
}

.upload-page .main-content > .max-w-7xl {
  padding-top: 40px;
  padding-bottom: 40px;
}

.upload-page .upload-zone {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dashboard-page .user-panel-header {
  border-color: #e5eaf1;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.045);
  backdrop-filter: blur(18px);
}

.dashboard-page .user-panel-header > div {
  width: min(100%, 1440px);
  min-height: 68px;
}

.dashboard-page .user-panel-header > div > a {
  color: #243248;
}

.dashboard-page .user-panel-header > div > a:hover {
  color: var(--color-primary);
}

.dashboard-page .user-panel-header > div > a > span:first-child {
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.16);
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.1);
}

.dashboard-page .user-panel-header #userMenuToggle,
.dashboard-page .user-panel-header #userSidebarToggle {
  border-color: #e4eaf2;
  background: #fff;
  color: #62728a;
}

.dashboard-page .user-panel-header #userMenuToggle:hover,
.dashboard-page .user-panel-header #userSidebarToggle:hover,
.dashboard-page .user-panel-header #userMenuToggle[aria-expanded="true"] {
  border-color: #d7e2f0;
  background: #eef3fa;
  color: #2f70bd;
}

.dashboard-page .user-header-account {
  min-width: 0;
  padding: 5px 12px 5px 6px;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  background: #fff;
}

.dashboard-page .user-header-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 11px;
  background: linear-gradient(145deg, #3479c9, #245b9d);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.dashboard-page .user-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-page .user-header-account-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.dashboard-page .user-header-account-name,
.dashboard-page .user-header-account-email {
  overflow: hidden;
  max-width: min(220px, 22vw);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .user-header-account-name {
  color: #243248;
  font-size: 0.82rem;
  font-weight: 650;
}

.dashboard-page .user-header-account-email {
  color: #75849a;
  font-size: 0.7rem;
}

.dashboard-page .user-dashboard-layout {
  width: min(100%, 1440px);
  max-width: none;
  padding: 28px clamp(20px, 3vw, 44px) 44px;
}

.dashboard-page .user-dashboard-columns {
  align-items: stretch;
  gap: 24px;
}

.dashboard-page .user-dashboard-sidebar {
  width: 272px;
  flex: 0 0 272px;
}

.dashboard-page .user-dashboard-main {
  min-width: 0;
}

body.dashboard-page {
  color-scheme: light;
  background: #f3f6fa;
  color: #334155;
}

.dashboard-page .main-content {
  color: #334155;
}

.dashboard-page .user-dashboard-main h1,
.dashboard-page .user-dashboard-main h2,
.dashboard-page .user-dashboard-main h3,
.dashboard-page .user-dashboard-main [class~="text-white"]:not([class*="bg-"]) {
  color: #243248 !important;
}

.dashboard-page .user-dashboard-main [class~="text-slate-100"],
.dashboard-page .user-dashboard-main [class~="text-slate-200"],
.dashboard-page .user-dashboard-main [class~="text-slate-300"] {
  color: #475569 !important;
}

.dashboard-page .user-dashboard-main [class~="text-slate-400"],
.dashboard-page .user-dashboard-main [class~="text-slate-500"] {
  color: #64748b !important;
}

.dashboard-page .user-dashboard-main :is(div, section, article, a, button)[class~="bg-slate-900/50"],
.dashboard-page .user-dashboard-main :is(div, section, article, a, button)[class~="bg-slate-800/50"],
.dashboard-page .user-dashboard-main :is(div, section, article, a, button)[class~="bg-slate-700/50"] {
  border-color: #e2e8f0;
  background-color: #fff;
  color: #334155;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.dashboard-page .user-dashboard-main > [class*="bg-gradient-to-br"] {
  border-color: #e2e8f0 !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045) !important;
}

.dashboard-page .user-dashboard-main [class*="hover:bg-slate-"]:hover {
  border-color: #bfdbfe;
  background-color: #f1f7ff !important;
}

.dashboard-page .user-dashboard-main :is(input, select, textarea)[class*="bg-slate-"] {
  border-color: #cbd5e1;
  background-color: #fff;
  color: #243248;
}

.dashboard-page .user-dashboard-main :is(input, textarea)::placeholder {
  color: #94a3b8;
}

.dashboard-page .user-dashboard-main select option {
  background: #fff;
  color: #243248;
}

.dashboard-page .user-dashboard-main table {
  color: #334155;
}

.dashboard-page .user-dashboard-main th[class*="text-slate-"] {
  color: #475569 !important;
}

.dashboard-page .user-dashboard-main tr[class*="border-slate-"] {
  border-color: #e2e8f0 !important;
}

.dashboard-page .user-dashboard-main tr[class*="hover:bg-slate-"]:hover {
  background-color: #f8fafc !important;
}

.dashboard-page #userMenuDropdown,
.dashboard-page #earningsDropdown {
  border-color: #e2e8f0;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.dashboard-page #userMenuDropdown a,
.dashboard-page #userMenuDropdown button,
.dashboard-page #earningsDropdown a {
  color: #475569;
}

.dashboard-page #userMenuDropdown a:hover,
.dashboard-page #userMenuDropdown button:hover,
.dashboard-page #earningsDropdown a:hover {
  background: #edf3fb;
  color: #2f70bd;
}

.dashboard-page .site-footer {
  border-color: #e2e8f0;
  background: #fff;
  color: #64748b;
}

.dashboard-page .site-footer a {
  color: #64748b;
}

.dashboard-page .site-footer a:hover {
  color: #243248;
}

.dashboard-page .mobile-sidebar-wrapper {
  top: 92px;
  max-height: none;
  overflow: visible;
  border-color: #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.dashboard-page .mobile-sidebar-close {
  display: none;
}

.dashboard-page .mobile-sidebar-wrapper > h3 {
  color: #94a3b8;
  letter-spacing: 0.1em;
}

.dashboard-page .mobile-sidebar-wrapper > .user-sidebar-welcome {
  padding: 14px;
  box-shadow: none;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > a,
.dashboard-page .mobile-sidebar-wrapper #userMenuNav > form {
  min-height: 46px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #475569;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > a svg {
  color: #7c8da5;
  transition: color 160ms ease;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > a:hover,
.dashboard-page .mobile-sidebar-wrapper #userMenuNav > form:hover {
  border-color: #dbeafe;
  background: #f1f7ff;
  color: #1e3a5f;
  transform: translateX(2px);
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > a:hover svg {
  color: #2563eb;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > a[class*="bg-primary/20"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 3px 0 #3b82f6;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > a[class*="bg-primary/20"] svg {
  color: #2563eb;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > form {
  display: flex;
  align-items: center;
  padding: 0 13px;
  color: #b42336;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > form button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > form svg {
  color: #dc5262;
}

.dashboard-page .mobile-sidebar-wrapper #userMenuNav > form:hover {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #9f1239;
}

.dashboard-page .mobile-sidebar-wrapper > .user-sidebar-welcome {
  border-color: #dbeafe;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff, #f8fafc);
}

.dashboard-page .mobile-sidebar-wrapper > .user-sidebar-welcome p:first-child {
  color: #64748b;
}

.dashboard-page .mobile-sidebar-wrapper > .user-sidebar-welcome p:last-child {
  color: #243248;
}

.dashboard-page .mobile-sidebar-wrapper > .user-sidebar-welcome .w-12 {
  border: 1px solid rgba(131, 181, 255, 0.28);
  background: linear-gradient(145deg, #3479c9, #245b9d);
  box-shadow: 0 6px 16px rgba(39, 94, 155, 0.24);
}

.dashboard-page .user-panel-header #userMenuToggle {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.dashboard-page .user-panel-header #userSidebarToggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

@media (min-width: 1024px) {
  .dashboard-page .user-panel-header #userMenuToggle {
    order: 3;
  }
}

/* Light, consistent upload modal on all user dashboard pages */
.dashboard-page #uploadModal > div:nth-child(2) > div {
  border-color: #e2e8f0;
  background: #fff;
  color: #243248;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.dashboard-page #uploadModal h2,
.dashboard-page #uploadModal h3,
.dashboard-page #uploadModal p.text-lg,
.dashboard-page #uploadModal label {
  color: #243248 !important;
}

.dashboard-page #uploadModal p.text-slate-400,
.dashboard-page #uploadModal p.text-sm,
.dashboard-page #uploadModal .status-box {
  color: #64748b !important;
}

.dashboard-page #uploadModal button[onclick="closeUploadModal()"] {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
}

.dashboard-page #uploadModal #closeUploadModal {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
}

.dashboard-page #uploadModal #closeUploadModal:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #243248;
}

.dashboard-page #uploadModal button[onclick="closeUploadModal()"]:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #243248;
}

.dashboard-page #uploadModal .upload-zone {
  border-color: #bfdbfe !important;
  background: #f8fbff !important;
  color: #334155;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-page #uploadModal .upload-zone:hover,
.dashboard-page #uploadModal .upload-zone:focus-within {
  border-color: var(--color-primary, #3b82f6) !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), 0.1);
}

.dashboard-page #uploadModal .upload-zone[class*="bg-slate-900/50"] {
  border-color: var(--color-primary, #3b82f6) !important;
  background: #eff6ff !important;
}

.dashboard-page #uploadModal #userUploadZone {
  border-color: #bfdbfe !important;
  background: #f8fbff !important;
  color: #334155;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-page #uploadModal #userUploadZone:hover {
  border-color: var(--color-primary, #3b82f6) !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), 0.1);
}

.dashboard-page #uploadModal #userUploadZone[class*="bg-slate-700/30"] {
  border-color: var(--color-primary, #3b82f6) !important;
  background: #eff6ff !important;
}

.dashboard-page #uploadModal #userUploadZone svg {
  color: #6892c7;
}

.dashboard-page #uploadModal #userUploadZone p:first-of-type {
  color: #243248 !important;
}

.dashboard-page #uploadModal #userUploadZone p:last-of-type {
  color: #64748b !important;
}

.dashboard-page #uploadModal #userFilePassword {
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  color: #243248;
}

.dashboard-page #uploadModal #userFilePassword::placeholder {
  color: #94a3b8;
}

.dashboard-page #uploadModal #userFilePassword:focus {
  border-color: var(--color-primary, #3b82f6);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), 0.14);
}

.dashboard-page #uploadModal details summary {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.dashboard-page #uploadModal details summary:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.dashboard-page #uploadModal details > div {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.dashboard-page #uploadModal details span[class*="bg-slate-700"] {
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #475569;
}

.dashboard-page #uploadModal #userUploadPercent {
  color: #243248 !important;
}

.dashboard-page #uploadModal #userUploadProgress > div.w-full {
  background: #e2e8f0;
}

.dashboard-page #uploadModal .upload-zone svg {
  color: #6892c7 !important;
}

.dashboard-page #uploadModal .upload-zone p.text-lg {
  color: #243248 !important;
}

.dashboard-page #uploadModal .upload-zone p.text-sm {
  color: #64748b !important;
}

.dashboard-page #uploadModal #filePassword {
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  color: #243248;
}

.dashboard-page #uploadModal #filePassword::placeholder {
  color: #94a3b8;
}

.dashboard-page #uploadModal #filePassword:hover {
  border-color: #94a3b8;
}

.dashboard-page #uploadModal #filePassword:focus {
  border-color: var(--color-primary, #3b82f6);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), 0.14);
}

.dashboard-page #uploadModal .status-box {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.dashboard-page #uploadModal #uploadSubmitBtn,
.dashboard-page #uploadModal button[type="submit"] {
  min-height: 48px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(var(--color-primary-rgb, 59, 130, 246), 0.18);
}

@media (max-width: 640px) {
  .dashboard-page #uploadModal > div:nth-child(2) {
    top: max(12px, env(safe-area-inset-top));
    right: 0;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 0;
    display: flex;
    width: 100%;
    max-height: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 12px;
    transform: none;
  }

  .dashboard-page #uploadModal > div:nth-child(2) > div {
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    padding: 20px;
    border-radius: 18px;
  }

  .dashboard-page #uploadModal .upload-zone {
    min-height: 220px;
    padding: 28px 18px !important;
  }

  .dashboard-page #uploadModal #userUploadZone {
    min-height: 200px;
    padding: 28px 18px !important;
  }
}

@media (max-width: 1023px) {
  .dashboard-page .user-file-action-popup {
    border: 1px solid #e2e8f0;
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.16);
    color: #243248;
  }

  .dashboard-page .user-file-action-popup-header {
    border-bottom-color: #e2e8f0;
  }

  .dashboard-page .user-file-action-popup-title {
    color: #243248;
  }

  .dashboard-page .user-file-action-popup-close {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
  }

  .dashboard-page .user-file-action-popup-close:hover {
    background: #f1f5f9;
    color: #243248;
  }

  .dashboard-page .user-file-action-popup-buttons button,
  .dashboard-page .user-file-action-popup-buttons a {
    border-color: #e2e8f0;
    background: #fff;
    color: #334155;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  }

  .dashboard-page .user-file-action-popup-buttons button:hover,
  .dashboard-page .user-file-action-popup-buttons a:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
  }

  .dashboard-page .user-file-action-popup-buttons button span,
  .dashboard-page .user-file-action-popup-buttons a span {
    color: #475569;
  }
}

.dashboard-page #customShareModal .dashboard-share-modal {
  border-color: #e2e8f0;
  background: #fff;
  color: #243248;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}

.dashboard-page #customShareModal .dashboard-share-modal > div:first-child {
  border-color: #e2e8f0;
}

.dashboard-page #customShareModal .dashboard-share-modal h3,
.dashboard-page #customShareModal .dashboard-share-modal .font-medium.text-white {
  color: #243248;
}

.dashboard-page #customShareModal .dashboard-share-modal .text-slate-400,
.dashboard-page #customShareModal .dashboard-share-modal .text-slate-300 {
  color: #64748b;
}

.dashboard-page #customShareModal .dashboard-share-modal .close-modal {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
}

.dashboard-page #customShareModal .dashboard-share-modal .close-modal:hover {
  background: #f1f5f9;
  color: #243248;
}

.dashboard-page #customShareModal .dashboard-share-modal .share-option {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}

.dashboard-page #customShareModal .dashboard-share-modal .share-option:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.dashboard-page .user-delete-confirm-card {
  border-color: #e2e8f0;
  background: #fff;
  color: #475569;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}

.dashboard-page .user-delete-confirm-card h3,
.dashboard-page .user-delete-confirm-card span {
  color: #243248;
}

.dashboard-page .user-delete-confirm-card .delete-confirm-cancel {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.dashboard-page .user-delete-confirm-card .delete-confirm-cancel:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

@media (max-width: 640px) {
  .dashboard-page #customShareModal .dashboard-share-modal,
  .dashboard-page .user-delete-confirm-card {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 20px;
    border-radius: 18px;
  }
}

@media (max-width: 1023px) {
  .dashboard-page .user-panel-header #userSidebarToggle {
    display: inline-flex;
  }
}

.dashboard-page #userMenuNav.mobile-menu-active {
  border-left: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  box-shadow: -12px 0 32px rgba(15, 23, 42, 0.12);
}

.dashboard-page #userMenuNav.mobile-menu-active > a {
  color: #475569;
}

.dashboard-page #userMenuNav.mobile-menu-active > a svg {
  color: #7c8da5;
}

.dashboard-page #userMenuNav.mobile-menu-active > a:hover {
  border-color: #dbeafe;
  background: #f1f7ff;
  color: #1e3a5f;
}

.dashboard-page #userMenuNav.mobile-menu-active > a[class*="bg-primary/20"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 3px 0 #3b82f6;
}

.dashboard-page #userMenuNav.mobile-menu-active > a[class*="bg-primary/20"] svg {
  color: #2563eb;
}

.dashboard-page #userMenuNav.mobile-menu-active > form {
  color: #b42336;
}

.dashboard-page #userMenuNav.mobile-menu-active > h3 {
  color: #64748b;
}

.dashboard-page .mobile-sidebar-wrapper nav a {
  min-height: 46px;
}

.dashboard-page .user-panel-header .max-w-7xl,
.dashboard-page .main-content .max-w-7xl {
  max-width: 1440px;
}

.dashboard-page .file-list-item {
  border-color: var(--border-subtle);
}

@media (max-width: 639px) {
  .dashboard-page .user-panel-header .max-w-7xl {
    min-height: 58px;
  }
}

@media (max-width: 1023px) {
  .dashboard-page .user-dashboard-layout {
    padding: 20px 20px 36px;
  }

  .dashboard-page .user-dashboard-sidebar {
    width: 100%;
    flex-basis: auto;
  }

  .dashboard-page .mobile-sidebar-wrapper {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

#toast-container.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(400px, calc(100vw - 40px));
  pointer-events: none;
}

.dashboard-page .user-premium-upgrade {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  padding: 12px 16px;
  border: 1px solid #c99b3b;
  border-radius: 13px;
  background: linear-gradient(135deg, #f3d77f 0%, #dfb84f 54%, #c99b3b 100%);
  box-shadow: 0 8px 18px rgba(164, 119, 24, 0.2), inset 0 1px rgba(255, 255, 255, 0.45);
  color: #392b12;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.dashboard-page .user-premium-upgrade:hover {
  transform: translateY(-2px);
  border-color: #b78624;
  background: linear-gradient(135deg, #f7df91 0%, #e8c45e 54%, #d3a63e 100%);
  box-shadow: 0 12px 24px rgba(164, 119, 24, 0.28), inset 0 1px rgba(255, 255, 255, 0.5);
}

.dashboard-page .user-premium-upgrade:focus-visible {
  outline: 3px solid rgba(202, 153, 49, 0.38);
  outline-offset: 3px;
}

.dashboard-page .user-premium-upgrade-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.dashboard-page .user-premium-upgrade-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #765513;
}

.dashboard-page .user-dashboard-main button {
  transition-duration: 160ms;
}

.dashboard-page .user-dashboard-main button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}

.dashboard-page .user-dashboard-main button:not(:disabled):active {
  transform: translateY(1px);
}

.dashboard-page .user-files-table-header {
  min-height: 56px;
  border: 1px solid #dce6f2 !important;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%) !important;
  color: #52647c !important;
  box-shadow: 0 2px 6px rgba(30, 64, 105, 0.04);
}

.dashboard-page .user-files-table-header > div {
  min-width: 0;
}

.dashboard-page .user-files-table-header .sort-header-btn {
  min-height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  color: #52647c;
  font-weight: 650;
  transition: color 160ms ease, background-color 160ms ease;
}

.dashboard-page .user-files-table-header .sort-header-btn:hover,
.dashboard-page .user-files-table-header .sort-header-btn:focus-visible {
  background: #fff;
  color: #2563eb;
}

.dashboard-page .user-files-table-header .sort-header-btn .sort-indicator {
  color: #8ca0b9;
}

.dashboard-page .user-files-table-header #userSelectAllFiles {
  accent-color: #3479c9;
}

.dashboard-page #userFilesBody > div {
  gap: 10px;
}

.dashboard-page #userFilesBody .file-list-item {
  margin: 0;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px;
  background: #fff !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.045);
  color: #334155;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-page #userFilesBody .file-list-item:hover {
  border-color: #bfdbfe !important;
  background: #fbfdff !important;
  box-shadow: 0 6px 16px rgba(30, 64, 105, 0.08);
}

.dashboard-page #userFilesBody .file-list-item .mobile-file-info {
  border-color: #e2e8f0;
}

.dashboard-page #customRenameModal,
.dashboard-page #customQRCodeModal,
.dashboard-page #customQRModal {
  background: rgba(15, 23, 42, 0.48) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  padding: 16px !important;
}

.dashboard-page #customRenameModal > div,
.dashboard-page #customQRCodeModal > div,
.dashboard-page #customQRModal > div {
  width: min(100%, 440px) !important;
  box-sizing: border-box !important;
  max-height: min(90vh, 760px) !important;
  max-height: min(90dvh, 760px) !important;
  overflow: auto !important;
  padding: 24px !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 18px !important;
  background: #fff !important;
  color: #334155 !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22) !important;
}

.dashboard-page #customRenameModal h3,
.dashboard-page #customQRCodeModal h3,
.dashboard-page #customQRModal h3 {
  margin: 0 0 14px !important;
  color: #1e293b !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  overflow-wrap: anywhere;
}

.dashboard-page #customRenameModal p,
.dashboard-page #customQRCodeModal p,
.dashboard-page #customQRModal p {
  color: #64748b !important;
  line-height: 1.55 !important;
}

.dashboard-page #customRenameModal #renameInput {
  min-height: 48px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #243248 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-page #customRenameModal #renameInput:focus {
  border-color: var(--color-primary, #3b82f6) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), 0.14) !important;
}

.dashboard-page #customRenameModal #cancelRename,
.dashboard-page #customQRCodeModal #copyLink,
.dashboard-page #customQRModal #copyLink {
  border: 1px solid #dbe3ed !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.dashboard-page #customRenameModal #cancelRename:hover,
.dashboard-page #customQRCodeModal #copyLink:hover,
.dashboard-page #customQRModal #copyLink:hover {
  background: #e8eef6 !important;
  color: #243248 !important;
}

.dashboard-page #customRenameModal #confirmRename,
.dashboard-page #customQRCodeModal #downloadQR,
.dashboard-page #customQRModal #downloadQR {
  border: 1px solid #1d4ed8 !important;
  background: linear-gradient(135deg, #3479c9, #245b9d) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(39, 94, 155, 0.18);
}

.dashboard-page #customRenameModal #confirmRename:hover,
.dashboard-page #customQRCodeModal #downloadQR:hover,
.dashboard-page #customQRModal #downloadQR:hover {
  filter: brightness(1.06);
}

.dashboard-page #customQRCodeModal .close-modal,
.dashboard-page #customQRModal .close-modal {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px;
  background: #f8fafc !important;
  color: #64748b !important;
}

.dashboard-page #customQRCodeModal .close-modal:hover,
.dashboard-page #customQRModal .close-modal:hover {
  background: #eff6ff !important;
  color: #2563eb !important;
}

.dashboard-page #customQRCodeModal img,
.dashboard-page #customQRModal img {
  max-width: 100%;
  height: auto;
}

.dashboard-page #customQRCodeModal > div > div:last-child > div:last-child,
.dashboard-page #customQRModal > div > div:last-child > div:last-child {
  box-sizing: border-box;
  flex-wrap: wrap;
}

.dashboard-page .user-delete-confirm-modal > .absolute {
  background: rgba(15, 23, 42, 0.48) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

@media (max-width: 480px) {
  .dashboard-page #customRenameModal > div,
  .dashboard-page #customQRCodeModal > div,
  .dashboard-page #customQRModal > div {
    padding: 20px !important;
    border-radius: 16px !important;
  }

  .dashboard-page #customQRCodeModal img,
  .dashboard-page #customQRModal img {
    width: min(220px, 65vw) !important;
    height: auto !important;
  }
}

#toast-container .toast {
  position: static;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: #172438;
  color: #e8eef6;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(-8px);
  animation: none;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
  cursor: pointer;
}

#toast-container .toast.show {
  opacity: 1;
  transform: translateY(0);
}

#toast-container .toast svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

#toast-container .toast-message {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

#toast-container .toast-dismiss {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: -4px -6px -4px 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: currentColor;
  opacity: 0.72;
  cursor: pointer;
  transition: background-color 160ms ease, opacity 160ms ease;
}

#toast-container .toast-dismiss:hover,
#toast-container .toast-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

#toast-container .toast-dismiss:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

#toast-container .toast-dismiss svg {
  width: 16px;
  height: 16px;
}

#toast-container .toast.toast-success {
  border-color: rgba(16, 185, 129, 0.32);
  background: #102c2b;
  color: #b9f3dd;
}

#toast-container .toast.toast-error {
  border-color: rgba(248, 113, 113, 0.34);
  background: #321c26;
  color: #fecaca;
}

#toast-container .toast.toast-warning {
  border-color: rgba(251, 191, 36, 0.34);
  background: #302718;
  color: #fde68a;
}

#toast-container .toast.toast-info {
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.34);
  background: #172840;
  color: #dbeafe;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

body.download-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -15%, rgba(var(--color-primary-rgb, 59, 130, 246), 0.1), transparent 42%),
    #f3f6fb;
  color: #243248;
}

.download-page .main-content {
  display: block;
  min-height: 0;
  flex: 1 0 auto;
  background: transparent;
}

.download-page-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
}

.download-brand {
  margin: 0 auto 28px;
}

.download-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #243248;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.download-brand-link:hover {
  color: var(--color-primary, #3479c9);
}

.download-brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--color-primary, #3479c9), var(--color-primary-dark, #245b9d));
  box-shadow: 0 8px 18px rgba(var(--color-primary-rgb, 59, 130, 246), 0.2);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 750;
}

.download-brand-link strong {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.download-content {
  width: min(100%, 1320px);
  margin: 0 auto;
}

.download-ad {
  position: relative;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.045);
}

.download-page .download-ad h3 {
  color: #243248;
}

.download-page .download-ad p {
  color: #64748b;
}

.download-ad::before {
  position: absolute;
  top: 7px;
  left: 12px;
  z-index: 1;
  color: #94a3b8;
  content: "ADVERTISEMENT";
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.download-ad-content {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.download-ad-content > a {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.download-ad-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
}

.download-ad-content iframe,
.download-ad-content video,
.download-ad-content object,
.download-ad-content embed {
  max-width: 100%;
}

.download-ad-banner {
  width: min(100%, 760px);
  min-height: 96px;
  margin: 0 auto 20px;
  padding: 24px 14px 12px;
}

.download-ad-banner .download-ad-content {
  min-height: 58px;
}

.download-ad-banner .download-ad-content img {
  max-height: 100px;
}

.download-donation {
  display: flex;
  width: min(100%, 420px);
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 auto 24px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.download-donation-message {
  margin: 0;
  color: #52647c;
  font-size: 0.92rem;
  line-height: 1.5;
}

.download-donation form {
  width: min(100%, 300px);
}

.download-donation-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
  transition: transform 160ms ease, filter 160ms ease;
}

.download-donation-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.download-donation-button img {
  display: block;
  width: 100%;
  height: auto;
}

.download-main-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
}

.download-card-column {
  order: 1;
  display: flex;
  width: min(100%, 680px);
  min-width: 0;
  justify-content: center;
}

.download-side-ad {
  order: 0;
  flex: 0 1 240px;
  width: 240px;
  min-height: 250px;
  padding: 24px 10px 10px;
}

.download-side-ad.Right-Side-Ad {
  order: 2;
}

.download-file-card {
  width: 100%;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid #dce5f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(24, 46, 78, 0.1);
  color: #243248;
}

.download-file-card label,
.download-file-card .text-slate-400 {
  color: #64748b;
}

.download-file-card #passwordError {
  color: #b91c1c;
}

.download-file-card [class~="bg-emerald-500/10"] {
  border: 1px solid #bdebdc;
  background: #ecfdf5;
  color: #047857;
}

.download-file-card > div:first-child {
  min-width: 0;
  gap: 14px;
  margin-bottom: 22px;
}

.download-file-card h1 {
  min-width: 0;
  margin: 0;
  color: #1e2d43;
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.download-file-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  color: #4b7db8;
}

.download-file-icon svg {
  width: 27px;
  height: 27px;
}

.download-file-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.download-file-meta-item {
  display: flex;
  min-width: 0;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #f7f9fc;
}

.download-file-meta-item p {
  margin: 0;
}

.download-file-meta-item p:first-child {
  color: #718198;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.download-file-meta-item p:last-child {
  color: #27364b;
  font-size: 0.84rem;
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}

.download-file-card #filePassword {
  border-color: #cbd5e1;
  background: #fff;
  color: #243248;
}

.download-file-card #filePassword:focus {
  border-color: var(--color-primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 130, 246), 0.13);
}

.download-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.download-actions #downloadButton {
  width: auto;
  flex: 1 1 auto;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 13px;
  background: linear-gradient(135deg, #168b69, #117858);
  box-shadow: 0 8px 18px rgba(17, 120, 88, 0.18);
  font-size: 0.95rem;
}

.download-actions #downloadButton:not(.opacity-50):hover {
  background: linear-gradient(135deg, #117858, #0d674b);
  box-shadow: 0 10px 22px rgba(17, 120, 88, 0.24);
  transform: translateY(-1px);
}

.download-actions #downloadButton svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.download-icon-button {
  display: inline-flex;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.download-actions > .download-icon-button {
  width: 48px;
  flex: 0 0 48px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.download-actions > .download-icon-button:hover,
.download-actions > .download-icon-button:focus-visible {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.download-icon-button:hover,
.download-icon-button:focus-visible {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.download-icon-button:focus-visible,
.download-donation-button:focus-visible,
.download-actions #downloadButton:focus-visible {
  outline: 3px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.3);
  outline-offset: 2px;
}

.download-icon-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.download-speed-panel {
  margin-top: 16px;
}

.download-speed-panel > div {
  border: 1px solid #bdebdc;
  background: #ecfdf5;
  color: #047857;
  line-height: 1.5;
}

.download-upgrade-panel {
  margin-top: 16px;
}

.download-upgrade-card {
  border: 1px solid #f5d99b;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  padding: 16px;
}

.download-upgrade-card p.text-amber-300 {
  color: #92400e;
}

.download-upgrade-card p.text-slate-400 {
  color: #64748b;
  line-height: 1.55;
}

.download-upgrade-card a {
  color: #b45309;
}

.download-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 22px;
  margin: 22px auto 0;
  color: #64748b;
  font-size: 0.85rem;
}

.download-footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.download-footer-links a:hover {
  color: var(--color-primary, #3479c9);
}

@media (max-width: 1260px) {
  .download-page-layout {
    padding: 22px 18px;
  }

  .download-main-layout {
    flex-wrap: wrap;
    gap: 14px;
  }

  .download-card-column {
    flex: 1 1 100%;
    max-width: 680px;
  }

  .download-side-ad {
    flex: 1 1 calc(50% - 8px);
    width: auto;
    min-height: 120px;
  }
}

@media (max-width: 768px) {
  .download-page .download-side-ad {
    display: none;
  }
}

@media (max-width: 600px) {
  .download-page .main-content {
    min-height: 100dvh;
  }

  .download-page-layout {
    min-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
  }

  .download-brand {
    margin-bottom: 20px;
  }

  .download-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .download-brand-link strong {
    font-size: 1.05rem;
  }

  .download-ad-banner {
    min-height: 82px;
    margin-bottom: 14px;
    padding: 22px 8px 8px;
    border-radius: 12px;
  }

  .download-ad-banner .download-ad-content {
    min-height: 50px;
  }

  .download-ad-banner .download-ad-content img {
    max-height: 72px;
  }

  .download-donation {
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 14px;
  }

  .download-main-layout {
    flex-direction: column;
    align-items: center;
  }

  .download-card-column {
    width: 100%;
  }

  .download-file-card {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .download-file-meta {
    gap: 8px;
    margin-bottom: 18px;
  }

  .download-file-meta-item {
    min-height: 58px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    padding: 10px;
  }

  .download-file-meta-item p:last-child {
    max-width: 100%;
    text-align: left;
  }

  .download-actions {
    gap: 8px;
  }

  .download-actions #downloadButton {
    min-width: 0;
    padding: 11px 10px;
    font-size: 0.88rem;
  }

  .download-icon-button {
    width: 44px;
    min-width: 44px;
    min-height: 48px;
  }

  .download-icon-button svg {
    width: 20px;
    height: 20px;
  }

  .download-actions > .download-icon-button {
    width: 44px;
    flex-basis: 44px;
  }

  .download-side-ad {
    width: min(100%, 420px);
    min-height: 100px;
    flex: 0 1 auto;
    padding: 22px 8px 8px;
  }

  .download-side-ad .download-ad-content img {
    max-height: 220px;
  }

  .download-footer-links {
    gap: 10px 16px;
    margin-top: 18px;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-page *,
  .download-page *::before,
  .download-page *::after {
    transition-duration: 0.01ms !important;
  }
}

.dashboard-page .dashboard-form-control {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 11px;
  background: #fff !important;
  color: #243248 !important;
  font: inherit;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.dashboard-page .dashboard-form-control::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

.dashboard-page .dashboard-form-control:focus {
  border-color: #7aa7e5 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.dashboard-page .dashboard-form-control:disabled {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  cursor: not-allowed;
}

.dashboard-page .dashboard-form select.dashboard-form-control {
  color-scheme: light;
}

.dashboard-page .dashboard-form-hint {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.dashboard-page .profile-form {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.dashboard-page .profile-form [class~="bg-amber-500/10"] {
  border-color: #f5d99b !important;
  background: #fffbeb !important;
}

.dashboard-page .profile-form [class~="text-amber-400"] {
  color: #92400e !important;
}

.dashboard-page .profile-form [class~="bg-blue-500/10"] {
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

.dashboard-page .profile-form [class~="text-blue-400"] {
  color: #1d4ed8 !important;
}

.dashboard-page #payment-settings-section {
  padding-top: 24px;
  border-color: #e2e8f0 !important;
}

.dashboard-page #paymentSettingsForm {
  padding: clamp(14px, 2.5vw, 22px);
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  background: #f8fafc;
}

.dashboard-page #payment-settings-section .peer + div {
  background-color: #cbd5e1;
}

.dashboard-page #payment-settings-section .peer:checked + div {
  background-color: #3479c9;
}

.dashboard-page #payment-settings-section .peer:focus-visible + div {
  outline: 3px solid rgba(59, 130, 246, 0.2);
  outline-offset: 2px;
}

.dashboard-page .dashboard-form-submit {
  min-height: 48px;
  border-radius: 11px;
  background: linear-gradient(135deg, #3479c9, #2864a8) !important;
  box-shadow: 0 6px 14px rgba(39, 94, 155, 0.18) !important;
  color: #fff !important;
}

.dashboard-page .dashboard-form-submit:hover {
  background: linear-gradient(135deg, #286bb7, #20558f) !important;
}

.user-main-ad {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  margin: 0 0 24px;
  padding: 20px 12px 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.045);
}

.user-main-ad::before,
.user-sidebar-ad::before {
  display: block;
  margin-bottom: 7px;
  color: #94a3b8;
  content: "ADVERTISEMENT";
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  line-height: 1;
}

.user-ad-content {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.user-ad-content > * {
  box-sizing: border-box;
  max-width: 100% !important;
}

.user-ad-content img,
.user-ad-content video,
.user-ad-content iframe,
.user-ad-content object,
.user-ad-content embed {
  max-width: 100% !important;
}

.user-ad-content img {
  display: block;
  width: auto;
  height: auto;
  max-height: 140px;
  object-fit: contain;
  border-radius: 8px;
}

.user-main-ad .user-ad-content > a {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.user-sidebar-ad {
  box-sizing: border-box;
  max-width: 100%;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.user-sidebar-ad .user-ad-content img {
  max-height: 220px;
}

body.error-page-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--color-primary-rgb, 59, 130, 246), 0.16), transparent 48%),
    linear-gradient(180deg, #0b1220 0%, #111b2d 100%);
}

body.error-page-body .app-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 5vw, 48px);
}

.error-page-body .main-content {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.error-page {
  width: min(100%, 520px);
  margin: auto;
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 27, 45, 0.94), rgba(11, 18, 32, 0.97));
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.38), inset 0 1px rgba(255, 255, 255, 0.035);
  color: #e8eef6;
  text-align: center;
}

.error-page-icon {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  place-items: center;
  border: 1px solid rgba(var(--error-rgb, 239, 68, 68), 0.2);
  border-radius: 24px;
  background: rgba(var(--error-rgb, 239, 68, 68), 0.1);
  color: #fb7185;
}

.error-page-icon svg {
  width: 36px;
  height: 36px;
}

.error-page-403 .error-page-icon {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.error-page-404 .error-page-icon {
  border-color: rgba(var(--color-primary-rgb, 59, 130, 246), 0.22);
  background: rgba(var(--color-primary-rgb, 59, 130, 246), 0.12);
  color: #60a5fa;
}

.error-page-code {
  margin: 0 0 8px;
  color: #fb7185;
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1;
}

.error-page-403 .error-page-code {
  color: #fbbf24;
}

.error-page-404 .error-page-code {
  color: #60a5fa;
}

.error-page-title {
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.error-page-description {
  max-width: 390px;
  margin: 0 auto 28px;
  color: #9aa9bd;
  font-size: 1rem;
  line-height: 1.75;
}

.error-page-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary, #3b82f6), var(--color-primary-dark, #2563eb));
  box-shadow: 0 10px 26px rgba(var(--color-primary-rgb, 59, 130, 246), 0.22);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.error-page-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 30px rgba(var(--color-primary-rgb, 59, 130, 246), 0.3);
}

.error-page-action:focus-visible {
  outline: 3px solid rgba(var(--color-primary-rgb, 59, 130, 246), 0.45);
  outline-offset: 3px;
}

.error-page-action svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  body.error-page-body .app-shell {
    padding: 16px;
  }

  .error-page-body .main-content {
    min-height: 0;
    padding: 12px 0;
  }

  .error-page {
    border-radius: 22px;
  }

  .error-page-icon {
    width: 66px;
    height: 66px;
    margin-bottom: 18px;
    border-radius: 20px;
  }

  .error-page-icon svg {
    width: 31px;
    height: 31px;
  }

  .error-page-description {
    margin-bottom: 24px;
    font-size: 0.94rem;
  }

  .error-page-action {
    width: 100%;
    max-width: 280px;
  }

  .user-main-ad {
    min-height: 62px;
    margin-bottom: 18px;
    padding: 18px 8px 8px;
    border-radius: 12px;
  }

  .user-ad-content img {
    max-height: 110px;
  }

  .user-sidebar-ad {
    margin-top: 18px;
    padding: 9px;
  }

  .dashboard-page .profile-form {
    padding: 16px;
    border-radius: 14px;
  }

  .dashboard-page #paymentSettingsForm {
    padding: 14px;
  }

}
