:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(17, 24, 39, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-active: #3b82f6;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.35);
  --team-color: #3b82f6;
  --client-color: #f59e0b;
  --success-color: #10b981;
  --danger-color: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow blobs */
.app-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  filter: blur(100px);
  border-radius: 50%;
  opacity: 0.25;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3b82f6, #1d4ed8);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #8b5cf6, #ec4899);
  bottom: -100px;
  right: -100px;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #06b6d4, #3b82f6);
  top: 40%;
  right: 20%;
}

/* Header */
.app-header {
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 25, 0.7);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.brand-fallback-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.brand-subtext {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #fff;
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.05);
}

/* Main Container */
.main-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Card */
.transfer-card {
  width: 100%;
  max-width: 520px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Audience Mode Selector */
.audience-section {
  margin-bottom: 1.25rem;
}

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mode-option {
  border: 1.5px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mode-option input[type="radio"] {
  display: none;
}

.mode-option:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

.mode-option.active {
  border-color: var(--border-active);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.15);
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.mode-icon {
  font-size: 1.1rem;
}

.mode-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.mode-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: auto;
}

.badge-team {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-client {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.mode-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2.2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 1.25rem;
  position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--border-active);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon-wrapper {
  display: inline-flex;
  padding: 0.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #60a5fa;
  margin-bottom: 0.75rem;
}

.drop-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.browse-link {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: underline;
}

.drop-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.browse-pill-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.75rem 0 0.5rem 0;
}

.btn-browse-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #60a5fa;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-browse-pill:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #fff;
  transform: translateY(-1px);
}

/* Files Preview */
.files-preview-container {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.85rem;
  margin-bottom: 1.25rem;
}

.files-preview-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.files-list {
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}

.file-item-name {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-size {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.btn-remove-file {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.btn-remove-file:hover {
  color: var(--danger-color);
}

.btn-add-more {
  background: none;
  border: 1px dashed var(--border-color);
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-more:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

/* Input Group */
.input-group {
  margin-bottom: 1.25rem;
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.text-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.text-input:focus {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.07);
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Progress bar */
.progress-container {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  width: 0%;
  transition: width 0.15s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Success / Share Screen */
.success-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 1rem auto;
}

.success-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.success-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.35rem 0 1.25rem 0;
}

.transfer-summary-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.sum-size {
  margin-left: auto;
  color: var(--text-muted);
}

.share-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.share-url-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  color: #60a5fa;
  font-family: monospace;
  font-size: 0.82rem;
  outline: none;
}

.btn-copy {
  background: #2563eb;
  border: none;
  border-radius: 10px;
  padding: 0 1rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy:hover {
  background: #1d4ed8;
}

.expiry-notice {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  justify-content: center;
}

/* QR Code */
.qr-container {
  margin-bottom: 1.25rem;
  text-align: center;
}

.btn-toggle-qr {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#qrCodeWrapper {
  margin-top: 0.75rem;
  background: #fff;
  padding: 0.75rem;
  border-radius: 12px;
  display: inline-block;
}

#qrCanvas {
  display: block;
}

/* Client & Team Specific Screens */
.state-container {
  text-align: center;
  padding: 2.5rem 1rem;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem auto;
}

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

.state-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.error-icon-wrapper {
  width: 60px;
  height: 60px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}

.error-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.error-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.client-badge-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.expiry-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
}

.file-meta-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.file-size-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.file-type-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.gate-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: #93c5fd;
}

.download-success-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.retry-link {
  color: #10b981;
  font-weight: 700;
}

.direct-download-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0 1.25rem 0;
}

.pulse-indicator {
  position: relative;
  width: 14px;
  height: 14px;
}

.pulse-dot {
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.status-msg {
  font-size: 0.88rem;
  color: #93c5fd;
  font-weight: 500;
}

.direct-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* Footer */
.app-footer {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.5);
}

select.text-input option {
  background: #111827;
  color: #f3f4f6;
  padding: 8px;
}

.transfer-list-section {
  margin-bottom: 2rem;
}

.transfer-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.transfer-list-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transfer-list-count {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-weight: 600;
}

/* =========================================================================
   TWO-COLUMN DASHBOARD LAYOUT & SCROLLABLE SENT/RECEIVED BOXES
   ========================================================================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 1.75rem;
  width: 100%;
  max-width: 1200px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    max-width: 580px;
  }
}

.upload-column-card {
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.transfers-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
  min-height: 600px;
}

.history-card {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.25rem 1.4rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  min-height: 280px;
  max-height: calc(50% - 0.625rem);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.history-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.history-card-icon {
  font-size: 1.15rem;
}

.history-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.history-scroll-container {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0.75rem;
  padding-right: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Scrollbar styles */
.history-scroll-container::-webkit-scrollbar {
  width: 6px;
}
.history-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}
.history-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.history-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.2s ease;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.history-item-info {
  flex: 1;
  min-width: 0;
}

.history-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  word-break: break-word;
  white-space: normal;
  line-height: 1.35;
}

.history-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.history-meta-date {
  color: #93c5fd;
}

.history-meta-dot {
  opacity: 0.4;
}

.history-meta-size {
  color: #d1d5db;
}

.history-meta-user {
  color: #60a5fa;
  font-family: monospace;
}

.history-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-action-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.btn-action-download:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-action-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-copy:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.btn-action-delete {
  background: none;
  border: none;
  color: rgba(239, 68, 68, 0.6);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-action-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.btn-box-expired {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.history-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 120px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  gap: 0.4rem;
}

.history-loading {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* =========================================================================
   UPLOAD PROGRESS MODAL POPUP & DYNAMIC ANIMATION
   ========================================================================= */

.upload-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 8, 18, 0.78);
  animation: fadeInModal 0.3s ease forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.upload-modal-card {
  position: relative;
  width: 100%;
  max-width: 530px;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) transparent;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 28px;
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(37, 99, 235, 0.25);
  backdrop-filter: blur(25px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleUp {
  from { transform: scale(0.92) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Dynamic Animated Floating Orb */
.modal-anim-wrapper {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon-orb {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 28px rgba(37, 99, 235, 0.6);
  z-index: 2;
  animation: orbFloat 3s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.modal-icon-svg {
  animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.modal-anim-ripple {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.5);
  animation: ripplePulse 2.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.modal-anim-ripple.ripple-2 {
  animation-delay: 1.2s;
}

@keyframes ripplePulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Large Center Percentage */
.modal-percent-wrap {
  margin-bottom: 0.35rem;
}

.modal-percent {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #60a5fa, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Uploaded / Total Row */
.modal-bytes-row {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.modal-bytes-label {
  color: #94a3b8;
  font-size: 0.8rem;
}

.modal-bytes-val {
  font-weight: 700;
  color: #f8fafc;
  font-family: monospace;
  font-size: 0.95rem;
}

/* Dynamic Animated Progress Track & Shimmer */
.modal-progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.modal-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #06b6d4);
  position: relative;
  transition: width 0.25s ease-out;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
}

.modal-progress-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmerMove 1.6s infinite linear;
}

@keyframes shimmerMove {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Live Stats Grid */
.modal-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.modal-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.modal-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Status Pill */
.modal-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.8rem;
  color: #93c5fd;
  font-weight: 500;
}

/* Itemized File-by-File Upload Tracker */
.modal-files-tracker {
  width: 100%;
  margin-top: 1rem;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  text-align: left;
}

.modal-files-tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-files-tracker-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.modal-files-tracker-summary {
  font-size: 0.74rem;
  font-weight: 600;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
}

.modal-files-tracker-list {
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.5) rgba(255, 255, 255, 0.05);
}

.modal-files-tracker-list::-webkit-scrollbar {
  width: 6px;
}

.modal-files-tracker-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.modal-files-tracker-list::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 10px;
}

.modal-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-file-row.is-uploading {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.modal-file-row.is-verified {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.modal-file-row.is-retrying {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.modal-file-row.is-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.modal-file-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  margin-right: 0.75rem;
}

.modal-file-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.modal-file-subfolder {
  font-size: 0.7rem;
  color: #60a5fa;
  font-weight: 500;
}

.modal-file-size {
  font-size: 0.7rem;
  color: #64748b;
  font-family: monospace;
}

.modal-file-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-queued {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-uploading {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-verified {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-retrying {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: pulseWarning 1.5s infinite;
}

.badge-error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Cancel Button */
.btn-modal-cancel {
  margin-top: 1.25rem;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

/* =========================================================================
   DYNAMIC DOWNLOAD MODAL & CLIENT AD SHOWCASE STYLING
   ========================================================================= */

.download-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 8, 18, 0.82);
  animation: fadeInModal 0.3s ease forwards;
}

.download-modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 28px;
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(25px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.download-modal-card.client-mode {
  max-width: 530px;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.2);
}

.download-icon-orb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.6);
  z-index: 2;
  animation: orbFloat 3s ease-in-out infinite;
}

.download-icon-orb.client-orb {
  background: linear-gradient(135deg, #3b82f6, #a855f7);
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.6);
}

.download-icon-svg {
  animation: bounceDownloadArrow 1.5s ease-in-out infinite;
}

@keyframes bounceDownloadArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.download-anim-ripple {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.5);
  animation: ripplePulse 2.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.download-anim-ripple.client-ripple {
  border-color: rgba(59, 130, 246, 0.5);
}

.download-anim-ripple.ripple-2 {
  animation-delay: 1.2s;
}

/* Team Ad-Free Shield Badge */
.team-adfree-shield {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-top: 1.1rem;
}

/* Client Ad Card Showcase */
.client-ad-card {
  width: 100%;
  margin-top: 1.25rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 1.25rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.client-ad-card:hover {
  border-color: rgba(245, 158, 11, 0.65);
}

.client-ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.client-ad-content-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.client-ad-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  background: #0f172a;
}

.client-ad-text-wrap {
  flex: 1;
  min-width: 0;
}

.client-ad-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.client-ad-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.client-ad-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-ad-primary {
  flex: 1;
  min-width: 140px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.btn-ad-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.55);
}

.btn-ad-secondary {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #4ade80;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-ad-secondary:hover {
  background: rgba(37, 211, 102, 0.25);
  color: #86efac;
}

/* Modal Close / Done Button */
.btn-modal-close-action {
  margin-top: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.55rem 1.4rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.btn-modal-close-action:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* =========================================================================
   CLIENT DETAILS LOOKUP & AUTOFILL
   ========================================================================= */
.btn-client-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 0 0.85rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-client-search:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.28);
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-client-search:active:not(:disabled) {
  transform: translateY(0);
}

.btn-client-search:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.client-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.45rem;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 18px 40px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(59, 130, 246, 0.25);
  z-index: 1050;
  max-height: 290px;
  overflow-y: auto;
  padding: 0.45rem;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.client-suggestions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-close-suggestions {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
}

.btn-close-suggestions:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.client-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.client-suggestion-item {
  padding: 0.65rem 0.8rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.client-suggestion-item:last-child {
  border-bottom: none;
}

.client-suggestion-item:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.3);
}

.suggestion-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.suggestion-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
}

.suggestion-brand {
  font-size: 0.76rem;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  white-space: nowrap;
}

.suggestion-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: #94a3b8;
}

.suggestion-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.suggestion-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: #cbd5e1;
}

.suggestion-date {
  margin-left: auto;
  font-size: 0.7rem;
  color: #64748b;
}

.client-autofill-highlight {
  animation: autofillPulse 1.8s ease-in-out;
}

@keyframes autofillPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    border-color: #10b981 !important;
  }
  50% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.25);
    border-color: #10b981 !important;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* =========================================================================
   CLIENT FILE TYPE TOGGLE (Final Files vs Raw Files)
   ========================================================================= */
.btn-file-type-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.btn-file-type-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
}

.btn-file-type-toggle.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(99, 102, 241, 0.22) 100%);
  border: 1.5px solid #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

.btn-file-type-toggle.raw-active.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(234, 88, 12, 0.22) 100%);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

/* Generic Modal Overlay & Box (Shared across index.html & admin.html) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
  padding: 1rem;
}

.modal-box {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

/* Fixed 10-12 Row Scrollbox with Frozen Sticky Header */
.table-scroll-container {
  max-height: 590px;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) rgba(15, 23, 42, 0.6);
}

.table-scroll-container table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.table-scroll-container thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-scroll-container thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0f172a !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.table-scroll-container thead tr {
  background: #0f172a !important;
}

/* Custom Sleek Scrollbar */
.table-scroll-container::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.table-scroll-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 8px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

.date-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.32rem 0.65rem;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.date-filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.date-filter-btn.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-weight: 700;
}



