:root {
  --gold-primary: #D99F27;
  --gold-dark: #B49350;
  --gold-soft: #FCF8EF;
  --blue-gray: #606575;
  --gray-light: #9B9EA5;
  --background: #FDFDFC;
  --background-soft: #F7F8FA;
  --text-dark: #1F2937;
  --text-light: #606575;
  --border: #E5E7EB;
  --success: #16a34a;
  --warning: #D99F27;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(96, 101, 117, .12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text-dark);
  background:
    radial-gradient(circle at top left, rgba(217, 159, 39, .12), transparent 34%),
    linear-gradient(180deg, var(--background) 0%, var(--background-soft) 100%);
}
.brand-logo{
    width:58px;
    height:58px;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-shrink:0;
}

.brand-logo img{
    width:58px;
    height:58px;
    object-fit:contain;
}
.hidden {
  display: none !important;
}

.app-header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  box-shadow: 0 12px 28px -12px rgba(180, 147, 80, .9);
}

.brand-title {
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: .75rem;
  color: var(--text-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem .85rem;
  border-radius: .8rem;
  color: var(--blue-gray);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.nav-item:hover {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.app-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .75);
  color: var(--text-light);
  font-size: .8rem;
}

.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: .75rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: -.04em;
  line-height: 1.05;
  max-width: 850px;
  margin: 0 auto;
}

.hero-text {
  color: var(--text-light);
  max-width: 720px;
  margin: 1rem auto 0;
  font-size: 1.02rem;
}

/* Cards */

.card-surface {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(155, 158, 165, .22);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.card-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
}

.section-title i {
  color: var(--gold-primary);
}

.success-title,
.success-title i {
  color: var(--success);
}

.section-subtitle {
  color: var(--text-light);
  font-size: .9rem;
  margin: .25rem 0 0;
}

.dropzone {
  border: 2px dashed var(--gold-dark);
  border-radius: 1.1rem;
  padding: 2.75rem 1rem;
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: all .2s ease;
}

.dropzone:hover {
  border-color: var(--gold-primary);
  background: var(--gold-soft);
}

.dropzone.dragover {
  border-color: var(--gold-primary);
  background: #F4E4B2;
  transform: scale(1.01);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  pointer-events: none;
}

.dropzone-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold-primary);
  font-size: 2rem;
}

.dropzone-title {
  color: var(--text-dark);
  font-weight: 800;
  font-size: 1.05rem;
}

.dropzone-subtitle {
  color: var(--text-light);
  font-size: .9rem;
}

.file-pill {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: .95rem 1rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}

.file-info i {
  color: var(--gold-primary);
  font-size: 1.6rem;
}

.file-text {
  min-width: 0;
}

.file-name {
  color: var(--text-dark);
  font-weight: 700;
  max-width: 640px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: var(--text-light);
  font-size: .8rem;
}

.file-clear {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  padding: .4rem;
}

.file-clear:hover {
  color: var(--danger);
}

.actions-row {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.5rem;
}

.btn-primary-pro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #fff;
  font-weight: 800;
  padding: .75rem 1.35rem;
  border-radius: .85rem;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  box-shadow: 0 12px 28px -14px rgba(180, 147, 80, .9);
}

.btn-primary-pro:hover:not(:disabled) {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -14px rgba(180, 147, 80, .95);
}

.btn-primary-pro:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-secondary-pro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: #fff;
  color: var(--blue-gray);
  font-weight: 800;
  padding: .72rem 1.2rem;
  border-radius: .85rem;
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.btn-secondary-pro:hover {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

/* Processing */

.progress-info {
  display: flex;
  justify-content: space-between;
  color: var(--blue-gray);
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .65rem;
}

.progress-shell {
  height: .7rem;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-dark));
  border-radius: 999px;
  transition: width .4s ease;
}

.step-grid {
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  list-style: none;
}

.step-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem .95rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: #fff;
  color: var(--text-light);
  font-size: .9rem;
  font-weight: 700;
  transition: all .25s ease;
}

.step-item.active {
  border-color: var(--gold-primary);
  color: var(--gold-dark);
  background: var(--gold-soft);
}

.step-item.done {
  border-color: #86efac;
  color: #15803d;
  background: #f0fdf4;
}

/* Results */

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.7rem;
}

.stat-card {
  background: linear-gradient(180deg, #ffffff, var(--background-soft));
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-light);
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-top: .25rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.8rem;
}

.result-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.2rem;
  overflow: hidden;
}

.box-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.warnings-box {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: var(--gold-soft);
  border: 1px solid #F4E4B2;
  color: var(--gold-dark);
}

.warnings-title {
  font-weight: 900;
  margin-bottom: .4rem;
}

.warnings-box ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: .9rem;
}


.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-title {
  color: var(--text-dark);
  font-size: 2rem;
  font-weight: 900;
  margin: 0;
}

.page-subtitle {
  color: var(--text-light);
  margin: .35rem 0 0;
}

.table thead th {
  font-size: .74rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: .05em;
  font-weight: 900;
}

.badge-soft-success {
  background: #EDF7EF;
  color: #2F7A47;
}

.badge-soft-danger {
  background: #FCECEC;
  color: #C0392B;
}

.badge-soft-warning {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.quality-decision {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--border);
}

.quality-decision.good {
  background: #EDF7EF;
  border-color: #86efac;
}

.quality-decision.warning {
  background: var(--gold-soft);
  border-color: #F4E4B2;
}

.quality-decision.danger {
  background: #FCECEC;
  border-color: #F5B7B1;
}

.quality-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--gold-primary);
  font-size: 1.4rem;
}

.quality-title {
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: .25rem;
}

.quality-message {
  color: var(--text-light);
  font-size: .9rem;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.quality-metric {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: .8rem;
  padding: .85rem;
}

.quality-metric span {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
}

.quality-metric strong {
  display: block;
  margin-top: .25rem;
  font-size: 1.3rem;
  color: var(--text-dark);
}

.quality-bar-shell {
  height: .65rem;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
}

.quality-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), #EAB54B, var(--gold-dark));
  border-radius: 999px;
  transition: width .4s ease;
}

.quality-score-label {
  margin-top: .4rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-light);
}


@media (max-width: 900px) {
  .stats-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .step-grid {
    grid-template-columns: 1fr;
  }

  .result-header,
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    display: none;
  }
}