/* ==========================================================================
   FOTO TREVO - DESIGN SYSTEM & STYLES (VANILLA CSS)
   ========================================================================== */

:root {
  --hue-primary: 155; /* Shamrock / Trevo Green */
  --primary-color: hsl(var(--hue-primary), 70%, 45%);
  --primary-hover: hsl(var(--hue-primary), 75%, 38%);
  --primary-light: hsl(var(--hue-primary), 65%, 95%);
  --primary-glow: hsla(var(--hue-primary), 70%, 45%, 0.25);

  --bg-dark: hsl(220, 25%, 10%);
  --bg-card: hsla(220, 20%, 15%, 0.7);
  --bg-card-border: hsla(220, 15%, 30%, 0.4);

  --text-main: hsl(220, 15%, 95%);
  --text-muted: hsl(220, 10%, 65%);
  --text-accent: hsl(var(--hue-primary), 75%, 60%);

  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 15%, hsla(var(--hue-primary), 60%, 25%, 0.15), transparent 40%),
    radial-gradient(circle at 85% 85%, hsla(200, 60%, 20%, 0.15), transparent 40%);
  background-attachment: fixed;
}

.app-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header & Brand */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-color), hsl(175, 75%, 40%));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #ffffff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ffffff, var(--text-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Steps Timeline (UX Progress) */
.steps-timeline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.step-item {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.step-item.active {
  border-color: var(--primary-color);
  color: #fff;
  background: hsla(var(--hue-primary), 70%, 45%, 0.1);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: hsla(220, 15%, 25%, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.step-item.active .step-number {
  background: var(--primary-color);
  color: #fff;
}

/* Barra de Progresso Visual */
.progress-bar-container {
  width: 100%;
  height: 10px;
  background: hsla(220, 25%, 8%, 0.8);
  border: 1px solid var(--bg-card-border);
  border-radius: 50px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), hsl(175, 75%, 45%));
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Grid & Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-accent);
  margin-top: 0.25rem;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px dashed hsla(220, 15%, 25%, 0.6);
  font-size: 0.9rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label { color: var(--text-muted); }
.info-value { font-weight: 600; color: var(--text-main); }

/* Uploader Dropzone */
.dropzone {
  border: 2px dashed var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  background: hsla(220, 25%, 8%, 0.5);
  transition: all var(--transition-fast);
  margin-bottom: 1.5rem;
}

.dropzone:hover {
  border-color: var(--primary-color);
  background: hsla(var(--hue-primary), 70%, 45%, 0.05);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.preview-item {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--bg-card-border);
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), hsl(165, 75%, 40%));
  color: #ffffff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), hsl(165, 80%, 35%));
}

.btn-whatsapp {
  background: #25D366;
  color: #ffffff;
  font-weight: 700;
}

.btn-whatsapp:hover {
  background: #1DA851;
}

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

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--text-accent);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.65rem 1rem;
  background: hsla(220, 25%, 8%, 0.8);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary-color);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.product-title { font-size: 1.05rem; font-weight: 700; color: #fff; }
.product-size { font-size: 0.8rem; background: hsla(var(--hue-primary), 70%, 45%, 0.2); color: var(--text-accent); padding: 0.2rem 0.5rem; border-radius: 4px; }
.product-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }
.product-footer { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-size: 1.15rem; font-weight: 800; color: var(--text-accent); }

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: hsla(220, 20%, 12%, 0.5);
}

/* Status Badges Simplificados (Pronto para baixar, Baixando, Baixado) */
.badge-status {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pronto { background: hsla(200, 90%, 50%, 0.2); color: hsl(200, 90%, 65%); border: 1px solid hsla(200, 90%, 50%, 0.4); }
.status-baixando { background: hsla(45, 90%, 50%, 0.2); color: hsl(45, 90%, 65%); border: 1px solid hsla(45, 90%, 50%, 0.4); }
.status-baixado { background: hsla(var(--hue-primary), 70%, 45%, 0.2); color: var(--text-accent); border: 1px solid hsla(var(--hue-primary), 70%, 45%, 0.4); }

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--bg-dark);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: hsla(var(--hue-primary), 70%, 45%, 0.15);
  border: 1px solid hsla(var(--hue-primary), 70%, 45%, 0.4);
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.app-footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid hsla(220, 15%, 20%, 0.5);
}
