/* ==========================================================================
   Verifybit PWA - Luxury Dark-Tech Cypherpunk Style System
   ========================================================================== */

/* -------- Variabili del Design System -------- */
:root {
  --bg-dark-obsidian: #05070c;
  --bg-deep-blue: #0b0e17;
  --bg-card: rgba(16, 23, 41, 0.75);
  --bg-card-hover: rgba(24, 34, 59, 0.9);
  
  --primary-glow: #2563eb;
  --primary-neon: #3b82f6;
  --accent-green: #00ff87;
  --accent-green-bg: rgba(0, 255, 135, 0.08);
  --accent-orange: #f59e0b;
  --accent-orange-bg: rgba(245, 158, 11, 0.08);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  
  --shadow-neon: 0 0 25px rgba(37, 99, 235, 0.25);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;
}

/* -------- Reset e Fondamenta -------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark-obsidian);
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-neon);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover {
  filter: brightness(1.2);
}

.monospace {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.95em;
  letter-spacing: 0.5px;
}

.selectable {
  user-select: all;
  -webkit-user-select: all;
}

.hidden {
  display: none !important;
}

/* -------- App Container -------- */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background-image: radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.12), transparent 60%);
}

/* -------- Splash Screen -------- */
.splash-screen {
  position: fixed;
  inset: 0;
  background-color: var(--bg-dark-obsidian);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.splash-content {
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.logo-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: 2px;
  background: linear-gradient(to right, #ffffff, var(--primary-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.spinner-container {
  margin: 1.5rem auto;
}

.quantum-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  border-top-color: var(--primary-neon);
  border-right-color: var(--accent-green);
  animation: spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.splash-loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 1rem;
  font-family: 'Syne', sans-serif;
}

/* -------- Main Header -------- */
.main-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background-color: rgba(5, 7, 12, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
  position: sticky;
  top: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-symbol {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
}

.badge-beta {
  font-size: 0.65rem;
  font-weight: 600;
  background-color: var(--primary-neon);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

.user-profile-zone {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.credits-badge {
  background-color: var(--accent-orange-bg);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--accent-orange);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
}
.credits-badge:hover {
  background-color: rgba(245, 158, 11, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.user-avatar:hover {
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* -------- Layout del Contenuto -------- */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  padding-bottom: 90px; /* Spazio per la bottom nav */
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.view-screen {
  animation: screenFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* -------- Titoli di Sezione -------- */
.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.section-title-bar h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: -1rem;
  margin-bottom: 0.5rem;
}

.total-badge {
  font-size: 0.8rem;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  color: var(--text-secondary);
}

/* -------- Form di Accesso -------- */
.login-card {
  max-width: 440px;
  width: 100%;
  margin: 3rem auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.login-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.input-group input {
  background-color: rgba(5, 7, 12, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}
.input-group input:focus {
  outline: none;
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* -------- Bottoni Premium Glow -------- */
.btn-primary-glow {
  position: relative;
  background: var(--primary-glow);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-neon);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.45);
  filter: brightness(1.1);
}
.btn-primary-glow:active {
  transform: translateY(0);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: skewX(-25deg);
  animation: shine 6s infinite;
}

.w-100 {
  width: 100%;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.8rem 1.25rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
}

.btn-clear {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-clear:hover {
  color: white;
}

/* -------- Footer e Link Accesso -------- */
.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.external-link {
  font-weight: 500;
  border-bottom: 1px dashed rgba(59, 130, 246, 0.5);
}

.auth-error-msg, .upload-error-msg {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
}

/* -------- Search Filter Bar -------- */
.search-filter-bar {
  margin-bottom: 0.5rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
}

.search-input-wrapper input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}
.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--border-glass-hover);
  background-color: var(--bg-card-hover);
}

/* -------- Archive Grid & Cards -------- */
.archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}
.file-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.file-card-icon {
  font-size: 1.5rem;
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.status-badge.anchored {
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 135, 0.2);
}

.status-badge.pending {
  background-color: var(--accent-orange-bg);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.anchored .status-dot {
  background-color: var(--accent-green);
}

.pending .status-dot {
  background-color: var(--accent-orange);
  animation: pulse 1.5s infinite;
}

.file-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.file-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 0.6rem;
}

/* -------- Dropzone per caricamento file -------- */
.upload-dropzone {
  border: 2px dashed var(--border-glass);
  border-radius: 20px;
  background-color: var(--bg-card);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary-neon);
  background-color: rgba(37, 99, 235, 0.03);
}

.dropzone-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05), transparent 70%);
  opacity: 0;
  transition: var(--transition-smooth);
  pointer-events: none;
}
.upload-dropzone:hover .dropzone-glow, .upload-dropzone.dragover .dropzone-glow {
  opacity: 1;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.upload-big-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
  margin-bottom: 0.5rem;
  transition: var(--transition-smooth);
}
.upload-dropzone:hover .upload-big-icon {
  transform: translateY(-5px);
}

.upload-dropzone h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.upload-dropzone p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.file-size-limit {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.hidden-file-input {
  display: none;
}

/* -------- Selected File Card -------- */
.selected-file-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-card-details {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-icon {
  font-size: 2.2rem;
}

.file-meta {
  flex: 1;
  overflow: hidden;
}

.file-meta h4 {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.upload-options {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1rem;
}

.option-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.segmented-control {
  background-color: rgba(5, 7, 12, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.35rem;
  display: flex;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  text-transform: none;
  letter-spacing: 0;
}

.segmented-control input[type="radio"]:checked + label {
  background-color: var(--primary-glow);
  color: white;
}

/* -------- Progress Bar -------- */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-bar-wrapper {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--primary-neon), var(--accent-green));
  border-radius: 100px;
  transition: width 0.3s ease;
}

.progress-container p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* -------- Verify Result Card -------- */
.verify-result-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.result-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
}

.result-badge.found {
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 135, 0.2);
}

.result-badge.not-found {
  background-color: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.result-header h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
}

.result-details-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 0.75rem;
}
.detail-tile:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tile-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.tile-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-all;
}

.link-txid {
  color: var(--primary-neon);
  font-weight: 500;
}
.link-txid:hover {
  text-decoration: underline;
}

/* -------- Credits Ricarica Screen -------- */
.credits-balance-card {
  background: radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 60%), var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.balance-meta {
  display: flex;
  flex-direction: column;
}

.balance-meta span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.balance-meta h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-orange);
  line-height: 1;
  margin-top: 0.25rem;
}

.credits-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  background-color: rgba(5, 7, 12, 0.3);
}

.packages-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.packages-section h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.packages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .packages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.package-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}
.package-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
}

.package-card.featured {
  border-color: var(--accent-orange);
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.06), transparent 70%), var(--bg-card);
}

.pkg-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-orange);
  color: #05070c;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 100px;
}

.pkg-header h4 {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-secondary);
}

.pkg-credits {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

.package-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex: 1;
}

.pkg-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 0.75rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.pkg-price {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-orange);
}

.pkg-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* -------- Payment Lightning Modal -------- */
.payment-modal, .detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1010;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.close-modal-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.close-modal-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.payment-modal-content, .detail-modal-content {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.payment-modal-content h3, .detail-modal-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.payment-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -0.5rem;
}

.qr-container {
  width: 200px;
  height: 200px;
  background-color: white;
  border-radius: 12px;
  padding: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.qr-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.qr-placeholder-loading {
  position: absolute;
  inset: 0;
  background-color: var(--bg-deep-blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.invoice-amount-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.amount-sats {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-orange);
}

.amount-fiat {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.invoice-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}
.invoice-actions > * {
  flex: 1;
}

.payment-timeout {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border-glass);
}

.payment-status-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.payment-status-badge.pending {
  background-color: var(--accent-orange-bg);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.status-dot-anim {
  width: 8px;
  height: 8px;
  background-color: var(--accent-orange);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

/* -------- Settings Screen -------- */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.25rem;
}

.settings-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-user-avatar {
  font-size: 2.2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-user-meta h4 {
  font-weight: 600;
  font-size: 1rem;
}

.settings-user-meta p {
  font-size: 0.75rem;
  color: var(--accent-green);
}

.settings-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-action-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: var(--transition-smooth);
}
.settings-action-item:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.action-icon {
  font-size: 1.4rem;
}

.action-meta {
  flex: 1;
}

.action-meta h4 {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.action-meta p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

.danger-action {
  border-color: rgba(239, 68, 68, 0.2);
}
.danger-action:hover {
  background-color: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.4);
}
.danger-action .action-meta h4 {
  color: #f87171;
}

.btn-logout {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-radius: 12px;
  padding: 0.85rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-fast);
  margin-top: 1rem;
}
.btn-logout:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

.app-version-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* -------- File Detail Modal -------- */
.detail-modal-content {
  align-items: stretch;
  text-align: left;
}

.detail-header-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.detail-file-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 135, 0.2);
  align-self: flex-start;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
}

.detail-modal-content h3 {
  font-size: 1.25rem;
  word-break: break-all;
  margin-top: 0;
}

.technical-details {
  background-color: rgba(5, 7, 12, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.row-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.row-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  word-break: break-all;
}

.detail-actions {
  margin-top: 0.5rem;
}

/* -------- Bottom Navigation Bar (Mobile) -------- */
.bottom-nav {
  height: 70px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  flex: 1;
  height: 100%;
}

.nav-icon {
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
  transition: var(--transition-fast);
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-item:hover {
  color: white;
}

.nav-item.active {
  color: var(--primary-neon);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.4));
}

.nav-item.active .nav-label {
  font-weight: 600;
}

/* -------- Desktop Sidebar / Top Nav adaptations -------- */
@media (min-width: 769px) {
  /* Adattamento layout desktop: trasforma nav in top-nav a destra o sidebar */
  .bottom-nav {
    top: 0;
    bottom: auto;
    left: auto;
    width: 440px;
    height: 70px;
    background: none;
    border-top: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: absolute;
    right: 180px; /* Di fianco al profilo */
    z-index: 110;
  }
  
  .bottom-nav .nav-item {
    padding: 0 1rem;
    flex-direction: row;
    gap: 0.35rem;
  }
  
  .bottom-nav .nav-icon {
    font-size: 1.15rem;
    margin-bottom: 0;
  }
  
  .bottom-nav .nav-label {
    font-size: 0.85rem;
  }
  
  .main-content {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }
}

/* -------- Stati di Caricamento -------- */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  gap: 1rem;
  animation: fadeIn 0.4s ease;
}

.pulse-loader {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-neon);
  box-shadow: 0 0 15px var(--primary-glow);
  animation: pulse 1.5s infinite ease-in-out;
}

.empty-icon {
  font-size: 3.5rem;
}

.empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
  margin-bottom: 0.5rem;
}

/* -------- Keyframe Animations -------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes shine {
  0% { left: -100%; }
  12% { left: 150%; }
  100% { left: 150%; }
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
  100% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
