/* ═══════════════════════════════════════
   WINOVE — Sistema de Propostas
   CSS Principal
═══════════════════════════════════════ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --sidebar-bg: #0f172a;
  --sidebar-width: 240px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: #f1f5f9;
  color: #1e293b;
  font-size: 14px;
}

/* ─── Sidebar ─── */
.sidebar {
  background: var(--sidebar-bg) !important;
  width: var(--sidebar-width) !important;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  border-radius: 0;
  width: 100%;
}

.nav-link-item:hover {
  background: rgba(255,255,255,0.07);
  color: #e2e8f0;
}

.nav-link-item.active {
  background: rgba(37,99,235,0.2);
  color: #60a5fa;
  border-left: 3px solid var(--primary);
  padding-left: 13px;
}

.nav-link-item i { font-size: 16px; width: 18px; text-align: center; }

/* ─── Layout principal ─── */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 28px;
}

/* ─── Page header ─── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.page-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* ─── Cards ─── */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  background: #fff;
}

.card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 18px;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  font-size: 13.5px;
}

.card-body { padding: 18px; }

/* ─── Stat Cards ─── */
.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card-highlight { border-color: #bbf7d0; background: #f0fdf4; }

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-value { font-size: 24px; font-weight: 700; color: #0f172a; }
.stat-value-sm { font-size: 17px; }
.stat-label { font-size: 12px; color: #64748b; font-weight: 500; }

/* ─── Soft backgrounds ─── */
.bg-primary-soft { background: #eff6ff; }
.bg-success-soft { background: #f0fdf4; }
.bg-warning-soft { background: #fffbeb; }
.bg-danger-soft  { background: #fef2f2; }
.bg-secondary-soft { background: #f8fafc; }

/* ─── Tabela ─── */
.proposals-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  font-weight: 600;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.proposals-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.proposals-table tbody tr:hover td { background: #f8fafc; }
.proposals-table tbody tr:last-child td { border-bottom: none; }

.proposal-number {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  background: #eff6ff;
  padding: 3px 8px;
  border-radius: 5px;
}

.proposal-number:hover { background: #dbeafe; }

/* ─── Botão ghost ─── */
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #e2e8f0;
}

/* ─── Formulário ─── */
.nav-tabs .nav-link {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

.nav-tabs { border-bottom: 1px solid #e2e8f0; }

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

.form-label.required::after {
  content: ' *';
  color: #dc2626;
}

.form-control, .form-select {
  font-size: 13.5px;
  border-color: #e2e8f0;
  border-radius: 7px;
  padding: 8px 12px;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* ─── Tech tags input ─── */
.tech-tags-input {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 6px 10px;
  background: #fff;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tech-tags-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
}

.tech-tag button {
  background: none;
  border: none;
  color: #93c5fd;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.tech-tag button:hover { color: #dc2626; }

.tag-input {
  border: none;
  outline: none;
  font-size: 13.5px;
  min-width: 120px;
  flex: 1;
  padding: 3px 0;
}

/* ─── Info labels (view) ─── */
.info-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin-bottom: 3px;
}

.info-value {
  font-size: 14px;
  color: #1e293b;
}

.whitespace-pre { white-space: pre-wrap; }

/* ─── Badges ─── */
.badge {
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
}

.bg-secondary-subtle { background: #f1f5f9 !important; }
.bg-info-subtle      { background: #eff6ff !important; }
.bg-warning-subtle   { background: #fffbeb !important; }
.bg-success-subtle   { background: #f0fdf4 !important; }
.bg-danger-subtle    { background: #fef2f2 !important; }
.bg-dark-subtle      { background: #f1f5f9 !important; }

/* ─── Login Page ─── */
.login-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1d4ed8 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  margin: 0 auto 16px;
}

.login-logo h1 { font-size: 24px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.login-logo p  { color: #64748b; font-size: 13px; margin: 0; }

.btn-login { padding: 12px; font-size: 14px; font-weight: 600; }

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11.5px;
  color: #94a3b8;
}

/* ─── Botões ─── */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ─── Alert ─── */
.alert-sm { font-size: 13.5px; padding: 10px 14px; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .sidebar { width: 200px !important; }
  .main-content { margin-left: 200px; padding: 16px; }
}
