/* assets/css/main.css — Primma · Identidade visual */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary:       #1B4332;
  --primary-mid:   #2D6A4F;
  --primary-light: #D8F3DC;
  --accent:        #F4A261;
  --accent-dark:   #E07A3A;
  --text-main:     #1A1A2E;
  --text-muted:    #6B7280;
  --bg:            #F9FAFB;
  --white:         #FFFFFF;
  --border:        #E5E7EB;
  --radius:        8px;
  --shadow:        0 2px 8px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.12);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-main);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAVBAR ---- */
.navbar {
  background: var(--primary);
  color: #fff;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: .5px;
}

.navbar-brand span { color: var(--accent); }

.navbar-menu { display: flex; align-items: center; gap: 8px; }

.navbar-menu a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.navbar-menu a:hover,
.navbar-menu a.ativo {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* ---- CONTAINER ---- */
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px; }

/* ---- BOTÕES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  min-height: 44px;
  text-decoration: none;
  transition: background .15s, transform .1s;
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-mid); }

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover { background: var(--primary-light); border-color: var(--primary-light); }

.btn-danger {
  background: #EF4444;
  color: #fff;
}
.btn-danger:hover { background: #DC2626; }

.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 36px; }
.btn-block { width: 100%; }

/* ---- CARD ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

/* ---- FORMULÁRIO ---- */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  background: #fff;
  transition: border-color .15s;
  min-height: 44px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}

textarea.form-control { min-height: 80px; resize: vertical; }

/* ---- ALERT ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 14px;
}

.alert-erro   { background: #FEE2E2; color: #991B1B; border-left: 3px solid #EF4444; }
.alert-sucesso{ background: var(--primary-light); color: var(--primary); border-left: 3px solid var(--primary); }
.alert-info   { background: #EFF6FF; color: #1D4ED8; border-left: 3px solid #3B82F6; }

/* ---- BADGE DE STATUS ---- */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-rascunho  { background: #F3F4F6; color: var(--text-muted); }
.badge-enviado   { background: #DBEAFE; color: #1D4ED8; }
.badge-aprovado  { background: var(--primary-light); color: var(--primary); }
.badge-recusado  { background: #FEE2E2; color: #991B1B; }

/* ---- LISTA DE ORÇAMENTOS ---- */
.lista-orcamentos { list-style: none; }

.orc-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  border-left: 3px solid transparent;
  transition: border-color .15s, box-shadow .15s;
}

.orc-item:hover {
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.orc-info { flex: 1; min-width: 0; }
.orc-cliente { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orc-data { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.orc-valor { font-weight: 700; font-size: 16px; color: var(--primary); white-space: nowrap; }

/* ---- STATS DASHBOARD ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}

.stat-numero {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- MÓDULO CHIP ---- */
.modulo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
}

/* ---- LOADING SPINNER ---- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- STATUS SALVO ---- */
#status-salvo {
  display: none;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

/* ---- RESPONSIVO ---- */
@media (max-width: 480px) {
  .navbar-menu a span { display: none; }
  .container { padding: 14px 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
