:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --success: #10b981;
  --dark: #1e293b;
  --text-main: #334155;
  --glass: rgba(255, 255, 255, 0.9);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
  background-color: #f8fafc;
  color: var(--text-main);
  margin: 0;
  overflow-x: hidden;
}

.bg-gradient {
  position: fixed;
  top: 0;
  width: 100vw;
  height: 300px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
}

.main-header {
  text-align: center;
  color: white;
  padding: 40px 0;
}

.logo-area h1 {
  font-size: 2.5rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo-area span {
  color: #a5b4fc;
}

.content-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
  margin-top: -20px;
}

.card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid white;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* Drop Zone UI */
.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #f1f5f9;
  position: relative;
}

.drop-zone:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.drop-zone input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

/* Invoice Look */
.invoice-paper {
  background: white;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  margin-block-end: 100px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.series-badge {
  background: var(--dark);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-top: 8px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
}
.invoice-table th {
  background: #f8fafc;
  padding: 12px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #64748b;
}
.invoice-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.grand-total {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
  background: #f5f3ff;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Containerul pentru aliniere */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-download span {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

/* Efecte de Hover și Activitate */
.btn-download:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  color: #ffffff;
}

.btn-download:hover span {
  transform: translateY(2px); /* Efect de "descărcare" la iconiță */
}

.btn-download:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}
/* Stilul pentru textul cu puls */
.pulse-text {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  margin-top: 15px;
  display: block;
}

/* Animația punctelor de suspensie */
.pulse-text::after {
  content: "";
  display: inline-block;
  width: 20px;
  text-align: left;
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "...";
  }
}

/* Opțional: Efect de fade-in/out pe tot textul pentru un look mai fluid */
.pulse-text {
  animation: pulseOpacity 2s ease-in-out infinite;
}

@keyframes pulseOpacity {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
@keyframes popIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-pop {
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-top: 1px solid white;
}
