/* ============================================================
   ALMARE ArchViz — Design System
   Tokens repris de almare.io (premium, architectural, sobre)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Backgrounds */
  --bg-cream: #F6F2EB;
  --bg-dark: #0A0908;
  --bg-surface: #14110D;
  --bg-card: #FFFFFF;
  --bg-card-dark: #1A1815;
  --bg-input: #F0ECE5;
  --bg-hover: #EDE8E0;

  /* Text */
  --text-primary: #12100D;
  --text-secondary: #7D7368;
  --text-muted: #9D8976;
  --text-white: #F0E6DA;
  --text-on-dark: #DDD8CF;

  /* Accent (gold/bronze) */
  --accent: #C4936A;
  --accent-light: #D4A87E;
  --accent-subtle: rgba(196,147,106,0.15);

  /* Borders */
  --border: #E5DFD6;
  --border-dark: #2A241E;
  --border-input: #D1C9BC;

  /* Status */
  --success: #10B981;
  --success-bg: rgba(16,185,129,0.1);
  --warning: #F59E0B;
  --warning-bg: rgba(245,158,11,0.1);
  --danger: #EF4444;
  --danger-bg: rgba(239,68,68,0.1);
  --info: #3B82F6;
  --info-bg: rgba(59,130,246,0.1);

  /* CTA */
  --cta-bg: #0A0908;
  --cta-text: #F0E6DA;
  --cta-hover: #1A1815;
  --cta-light-bg: #F0E6DA;
  --cta-light-text: #0A0908;

  /* Spacing */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-dark: 0 8px 30px rgba(0,0,0,0.4);
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: var(--text-primary);
  background: var(--bg-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }
img { max-width: 100%; display: block; }

/* ============================================================
   HEADER — Dark bar ALMARE style
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(10,9,8,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px;
}
.header-logo {
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.header-logo-text {
  font-size: 14px; font-weight: 300; letter-spacing: 0.38em;
  color: white; text-transform: uppercase;
}
.header-logo-sub {
  font-size: 9px; letter-spacing: 0.2em; color: var(--text-muted);
  text-transform: uppercase;
}
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a {
  font-size: 13px; color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.header-nav a:hover, .header-nav a.active { color: white; }
.header-nav .btn-outline {
  border: 1px solid var(--border-dark); border-radius: var(--radius-full);
  padding: 6px 14px; font-size: 11px; letter-spacing: 0.1em;
  color: var(--text-muted); text-transform: uppercase;
}
.header-nav .btn-outline:hover { color: var(--text-white); border-color: var(--text-muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--cta-bg); color: var(--cta-text);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--cta-hover); color: white; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-accent {
  background: var(--accent); color: white;
}
.btn-accent:hover { background: var(--accent-light); }
.btn-light {
  background: var(--cta-light-bg); color: var(--cta-light-text);
  box-shadow: var(--shadow);
}
.btn-light:hover { background: #E8DCCF; }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-secondary);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.form-input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-input); border: 1px solid var(--border-input);
  border-radius: var(--radius); font-size: 14px;
  color: var(--text-primary); transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { min-height: 100px; resize: vertical; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.page { padding-top: 72px; min-height: 100vh; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============================================================
   BO LAYOUT — Sidebar + Content
   ============================================================ */
.bo-layout { display: flex; min-height: 100vh; padding-top: 56px; }
.bo-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-dark); border-right: 1px solid var(--border-dark);
  padding: 24px 0; position: fixed; top: 56px; bottom: 0; left: 0;
  overflow-y: auto;
}
.bo-sidebar-nav { list-style: none; }
.bo-sidebar-nav li a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; font-size: 13px;
  color: rgba(255,255,255,0.6); transition: all 0.2s;
}
.bo-sidebar-nav li a:hover { background: rgba(255,255,255,0.05); color: white; }
.bo-sidebar-nav li a.active {
  color: var(--accent-light);
  background: rgba(196,147,106,0.08);
  border-right: 2px solid var(--accent);
}
.bo-sidebar-nav li a svg { width: 18px; height: 18px; opacity: 0.7; }
.bo-sidebar-section {
  padding: 0 24px; margin: 24px 0 8px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
}
.bo-content { flex: 1; margin-left: 240px; padding: 32px; background: var(--bg-cream); }
.bo-content-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.bo-content-header h1 { font-size: 24px; font-weight: 600; }

@media (max-width: 1024px) {
  .bo-sidebar { display: none; }
  .bo-content { margin-left: 0; }
}

/* ============================================================
   PIPELINE STEPS
   ============================================================ */
.pipeline { display: flex; gap: 2px; margin-bottom: 24px; }
.pipeline-step {
  flex: 1; padding: 10px 6px; text-align: center;
  border-radius: 6px; font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
  transition: all 0.3s;
}
.pipeline-step.done { background: var(--success-bg); color: var(--success); }
.pipeline-step.current {
  background: var(--accent); color: white;
  animation: pulse-soft 2s infinite;
}
.pipeline-step.pending { background: var(--bg-input); color: var(--text-muted); }
.pipeline-step.error { background: var(--danger-bg); color: var(--danger); }
.pipeline-step.waiting { background: var(--warning-bg); color: var(--warning); }
@keyframes pulse-soft { 0%,100% { opacity:1; } 50% { opacity:0.7; } }

/* ============================================================
   SCORE BARS
   ============================================================ */
.score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.score-label { width: 100px; font-size: 12px; color: var(--text-secondary); }
.score-track { flex: 1; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.score-fill.ok { background: var(--success); }
.score-fill.warn { background: var(--warning); }
.score-fill.fail { background: var(--danger); }
.score-value { width: 40px; text-align: right; font-size: 13px; font-weight: 600; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  font-size: 13px; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px;
}
.alert-success { background: var(--success-bg); color: #065F46; border: 1px solid rgba(16,185,129,0.2); }
.alert-warning { background: var(--warning-bg); color: #92400E; border: 1px solid rgba(245,158,11,0.2); }
.alert-danger { background: var(--danger-bg); color: #991B1B; border: 1px solid rgba(239,68,68,0.2); }
.alert-info { background: var(--info-bg); color: #1E40AF; border: 1px solid rgba(59,130,246,0.2); }

/* ============================================================
   RENDER GALLERY
   ============================================================ */
.render-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.render-item { border-radius: var(--radius-lg); overflow: hidden; background: white; border: 1px solid var(--border); }
.render-item img { width: 100%; height: 200px; object-fit: cover; background: var(--bg-input); }
.render-item .render-info { padding: 12px 16px; }
.render-item .render-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.render-item .render-meta { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   UPLOAD DROPZONE
   ============================================================ */
.dropzone {
  border: 2px dashed var(--border-input); border-radius: var(--radius-lg);
  padding: 48px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--bg-input);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent); background: var(--accent-subtle);
}
.dropzone-icon { font-size: 48px; color: var(--text-muted); margin-bottom: 12px; }
.dropzone-text { font-size: 15px; color: var(--text-secondary); }
.dropzone-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ============================================================
   TABLE
   ============================================================ */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 10px 16px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.table tr:hover td { background: var(--bg-hover); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--bg-input); color: var(--text-muted); }
.badge-accent { background: var(--accent-subtle); color: var(--accent); }

/* ============================================================
   QUOTA BAR
   ============================================================ */
.quota { margin-bottom: 20px; }
.quota-header { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.quota-header span:last-child { color: var(--text-muted); }
.quota-track { height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.quota-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.5s; }
.quota-fill.high { background: var(--warning); }
.quota-fill.full { background: var(--danger); }

/* ============================================================
   VERSIONS TIMELINE
   ============================================================ */
.timeline-item {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.timeline-dot.current { background: var(--accent); }
.timeline-dot.past { background: var(--border); }
.timeline-info { flex: 1; }
.timeline-title { font-size: 14px; font-weight: 500; }
.timeline-date { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   RESPONSIVE HAMBURGER
   ============================================================ */
.mobile-toggle { display: none; background: none; border: none; color: white; cursor: pointer; padding: 8px; }
@media (max-width: 768px) { .mobile-toggle { display: block; } .header-nav { display: none; } }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-accent { color: var(--accent); }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none; }
