/* 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: #e2e8f0;
  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;
  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;
}

/* 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: 1250px;
  margin: 0 auto;
  padding: 24px 20px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-between;
  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;
  align-items: center;
  gap: 12px;
  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;
  align-items: center;
  gap: 24px;
  overflow: visible;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-links a::after {
  content: '→';
  position: absolute;
  right: -20px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  color: var(--color-primary-light);
}

.nav-links a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.nav-links form {
  margin: 0;
}

.nav-link-button {
  background: transparent;
  color: #cbd5e1;
  padding: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-link-button::after {
  content: '→';
  position: absolute;
  right: -20px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  color: var(--color-primary-light);
}

.nav-link-button:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.nav-link-button:hover {
  color: #ffffff;
}

.nav-links a:hover {
  color: #ffffff;
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  background: transparent;
  color: #cbd5e1;
  padding: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font: inherit;
}

.nav-dropdown-toggle:hover {
  color: #ffffff;
}

.nav-dropdown-toggle::after {
  content: '→';
  position: absolute;
  right: -20px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  color: var(--color-primary-light);
}

.nav-dropdown-toggle:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.nav-dropdown-arrow {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #ffffff;
}

.nav-dropdown-menu a::after {
  display: none;
}

.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;
}

.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;
}
