/* ============================================
   SYNQSAFE - STILE MINIMALISTA WETRANSFER
   ============================================ */

:root {
  --bg-primary: #0a0f1c;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --accent: #38bdf8;
  --accent-green: #22c55e;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148,163,184,0.15);
  --border-hover: rgba(56,189,248,0.4);
  --shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  --radius: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER - Minimalista
   ============================================ */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.brand-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sub {
  display: none;
}

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

/* ============================================
   BUTTONS - Stile pulito
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  background: transparent;
  color: var(--text-secondary);
}

.btn:hover {
  color: var(--text);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-green));
  color: #000;
  font-weight: 600;
  padding: 12px 28px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(56,189,248,0.3);
  color: #000;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-secondary);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.lang-switcher {
  display: flex;
  gap: 4px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.lang-btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.lang-btn:hover {
  color: var(--text);
  text-decoration: none;
}

.lang-btn.active {
  background: var(--accent);
  color: #000;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 60px;
}

/* ============================================
   LAYOUT GRID - Centrato come WeTransfer
   ============================================ */

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.layout-center {
  max-width: 560px;
  margin: 0 auto;
}

.layout-wide {
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  nav {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

/* ============================================
   CARDS - Stile glassmorphism sottile
   ============================================ */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.3), transparent);
}

.card-simple {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card + .card {
  margin-top: 24px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

p:last-child {
  margin-bottom: 0;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* ============================================
   HERO SECTION - Homepage
   ============================================ */

.hero {
  text-align: center;
  padding: 80px 0;
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid rgba(56,189,248,0.3);
  background: rgba(56,189,248,0.1);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

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

/* ============================================
   FEATURES GRID
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

/* ============================================
   FORMS - Stile minimalista
   ============================================ */

.form-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subsection-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 24px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 140px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="tel"],
form input[type="date"],
form input[type="number"],
form input[type="file"],
form textarea,
form select {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

form input:focus,
form textarea:focus,
form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

/* Account Type Selector */
.account-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.account-type-option {
  cursor: pointer;
}

.account-type-option input {
  display: none;
}

.option-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  text-align: center;
  transition: all 0.2s ease;
}

.account-type-option input:checked + .option-card {
  border-color: var(--accent);
  background: rgba(56,189,248,0.08);
}

.option-card:hover {
  border-color: var(--border-hover);
}

.option-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.option-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   PROJECT CARDS - Dashboard
   ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.project-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.badge-soft {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 50px;
  background: rgba(56,189,248,0.1);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pill-link {
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.pill-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill-link .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

.flash {
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.2);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ============================================
   CODE / INVITE LINKS
   ============================================ */

code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-block;
  word-break: break-all;
  color: var(--text-secondary);
}

/* ============================================
   LISTS
   ============================================ */

ul, ol {
  padding-left: 20px;
  color: var(--text-secondary);
}

ul li, ol li {
  margin-bottom: 8px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: 24px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 24px;
}

.mb-4 {
  margin-bottom: 24px;
}

/* Divider */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 600px) {
  .shell {
    padding: 0 16px;
  }
  
  .card {
    padding: 24px 20px;
  }
  
  .hero {
    padding: 40px 0;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }
  
  .account-type-selector {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .btn-primary {
    width: 100%;
  }
}

/* ===== STILI REPORT ZIP ===== */

.badge-zip {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8, #4ade80);
  color: #000;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.status-ok {
  color: #4ade80;
  font-weight: 600;
}

.status-error {
  color: #f87171;
  font-weight: 600;
}

.zip-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.zip-stat {
  background: rgba(56, 189, 248, 0.1);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.zip-stat-error {
  background: rgba(248, 113, 113, 0.15);
}

.zip-stat-warning {
  background: rgba(251, 191, 36, 0.15);
}

.zip-stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #38bdf8;
}

.zip-stat-error .zip-stat-number {
  color: #f87171;
}

.zip-stat-warning .zip-stat-number {
  color: #fbbf24;
}

.zip-stat-label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

.zip-section {
  margin-top: 16px;
  border-radius: 8px;
  padding: 12px;
}

.zip-section h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
}

.zip-section-error {
  background: rgba(248, 113, 113, 0.1);
  border-left: 3px solid #f87171;
}

.zip-section-warning {
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid #fbbf24;
}

.zip-file-list {
  max-height: 200px;
  overflow-y: auto;
}

.zip-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.8rem;
}

.zip-file-item:last-child {
  border-bottom: none;
}

.zip-file-path {
  color: #e2e8f0;
  word-break: break-all;
  flex: 1;
}

.zip-file-size {
  color: #94a3b8;
  margin-left: 12px;
  white-space: nowrap;
}

.zip-details {
  margin-top: 16px;
}

.zip-details summary {
  cursor: pointer;
  color: #38bdf8;
  font-size: 0.85rem;
  padding: 8px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 6px;
}

.zip-details summary:hover {
  background: rgba(56, 189, 248, 0.2);
}

.zip-details[open] summary {
  margin-bottom: 8px;
}

/* ===== STILI CONFRONTO CARTELLE ===== */

.upload-box {
  background: rgba(56, 189, 248, 0.05);
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.upload-box:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.1);
}

.upload-box label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #38bdf8;
}

.upload-box input[type="file"] {
  width: 100%;
}

.compare-files {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.compare-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 8px;
}

.compare-label {
  font-weight: bold;
  color: #38bdf8;
  min-width: 24px;
}

.compare-name {
  flex: 1;
  color: #e2e8f0;
}

.compare-size {
  color: #94a3b8;
  font-size: 0.85rem;
}
