/**
 * Painel Comprador – tema SaaS moderno
 * Cor primária: #FF6A00 | Azul: #0D5EA8 | Verde: #5BA822
 * Fundo: #f3f6fb | Cards: branco, borda leve
 */
.buyer-body {
  display: flex;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f3f6fb;
  font-size: 14px;
  margin: 0;
}

/* Sidebar – cor diferente do vendedor (azul) */
.buyer-sidebar {
  width: 260px;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 4px 0 24px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #0c4a6e 0%, #0e5a82 25%, #0f6b96 50%, #0e5a82 75%, #0c4a6e 100%);
  background-color: #0D5EA8;
}

.buyer-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,106,0,0.08) 0%, transparent 50%, rgba(255,106,0,0.05) 100%);
  pointer-events: none;
}

.buyer-brand {
  padding: 28px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 1;
}

.buyer-brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.buyer-brand-link:hover { opacity: 0.95; }

.buyer-brand-logo {
  width: 140px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  filter: brightness(1.05);
}

.sidebar-alert.buyer-alert {
  position: relative;
  z-index: 1;
  padding: 14px 16px;
  margin: 16px;
  background: rgba(255,106,0,0.2);
  border-radius: 12px;
  font-size: 13px;
  color: #fed7aa;
  border: 1px solid rgba(255,106,0,0.35);
}

.sidebar-alert.buyer-alert a {
  color: #FF6A00;
  font-weight: 600;
  text-decoration: underline;
}

.buyer-nav {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 16px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.buyer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.buyer-nav-group-label {
  display: block;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e293b;
  background: rgba(255,255,255,0.95);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.buyer-nav-group-block {
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.buyer-nav-block-vendedor {
  background: rgba(237,128,0,0.2);
  border: 1px solid rgba(237,128,0,0.4);
  border-top: none;
}

.buyer-nav-block-comprador {
  background: rgba(13,94,168,0.35);
  border: 1px solid rgba(255,255,255,0.2);
  border-top: none;
}

.buyer-nav-block-conta {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-top: none;
}

.buyer-nav-group-block a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.buyer-nav-group-block a:hover {
  background: rgba(255,255,255,0.08);
  color: #f1f5f9;
}

.buyer-nav-group-block a.active {
  background: rgba(255,106,0,0.3);
  color: #fff;
  border-left-color: #FF6A00;
  padding-left: 17px;
}

.buyer-nav-block-comprador a.active {
  background: rgba(255,106,0,0.25);
  color: #fff;
  border-left-color: #FF6A00;
}

.buyer-nav-block-conta a.active {
  background: rgba(255,106,0,0.25);
  color: #fff;
  border-left-color: #FF6A00;
}

.nav-badge {
  background: #FF6A00;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.buyer-footer {
  position: relative;
  z-index: 1;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.buyer-footer a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
}

.buyer-footer a:hover { color: #fff; }

.buyer-sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1001;
  background: #0D5EA8;
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Main */
.buyer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.buyer-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.buyer-topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

.buyer-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  flex: 1;
}

.buyer-search-form {
  display: flex;
  gap: 8px;
  max-width: 320px;
}

.buyer-search-input {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  width: 100%;
}

.buyer-search-input:focus {
  outline: none;
  border-color: #0D5EA8;
}

.buyer-search-btn {
  padding: 10px 16px;
  background: #FF6A00;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.buyer-search-btn:hover { background: #e55f00; }

.buyer-notif-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
}

.buyer-notif-icon { font-size: 20px; }

.buyer-notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.buyer-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.buyer-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.buyer-bell-icon {
  display: block;
  flex-shrink: 0;
}

.buyer-bell:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.buyer-bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.buyer-user {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.buyer-content {
  padding: 24px;
  flex: 1;
}

/* Breadcrumb – painel comprador */
.buyer-body .breadcrumb-wrap {
  margin: -8px 0 20px 0;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.buyer-body .breadcrumb {
  font-size: 13px;
  color: #64748b;
  gap: 4px 0;
}
.buyer-body .breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  margin-right: 6px;
  color: #cbd5e1;
  font-weight: 400;
}
.buyer-body .breadcrumb-item a {
  color: #0D5EA8;
  font-weight: 500;
}
.buyer-body .breadcrumb-item a:hover {
  color: #FF6A00;
  text-decoration: none;
}
.buyer-body .breadcrumb-item--current span {
  color: #0f172a;
  font-weight: 600;
}

/* Cards e KPIs */
.buyer-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  padding: 24px;
  margin-bottom: 24px;
}

.buyer-card h2 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid #e5e7eb;
}

.kpi-card .kpi-num {
  font-size: 28px;
  font-weight: 800;
  color: #0D5EA8;
  display: block;
  line-height: 1.2;
}

.kpi-card .kpi-label {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* Listas e blocos */
.buyer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.buyer-list li {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.buyer-list li:last-child { border-bottom: none; }

/* Botões */
.buyer-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.buyer-btn-primary {
  background: #FF6A00;
  color: #fff;
}

.buyer-btn-primary:hover { background: #e55f00; }

.buyer-btn-secondary {
  background: #0D5EA8;
  color: #fff;
}

.buyer-btn-secondary:hover { background: #0a4a87; }

.buyer-btn-light {
  background: #f3f4f6;
  color: #374151;
}

.buyer-btn-light:hover { background: #e5e7eb; }

/* Form alterar senha */
.buyer-card.form-senha-card-buyer {
  max-width: 420px;
}
.form-senha-card-buyer .form-group {
  margin-bottom: 18px;
}
.form-senha-card-buyer .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}
.form-senha-card-buyer .form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-senha-card-buyer .form-group input:focus {
  outline: none;
  border-color: #FF6A00;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
}
.form-senha-card-buyer .btn-senha-submit {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 10px;
  margin-top: 4px;
}

/* Status propostas */
.status-sent { color: #6b7280; }
.status-viewed { color: #0D5EA8; }
.status-accepted { color: #5BA822; }
.status-rejected { color: #b91c1c; }
.status-negotiation { color: #FF6A00; }

/* Responsivo */
@media (max-width: 768px) {
  .buyer-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: left 0.25s ease;
  }
  .buyer-sidebar.open { left: 0; }
  .buyer-sidebar-toggle { display: block; }
  .buyer-topbar-menu-btn { display: block; }
  .buyer-search-form { max-width: 100%; }
}
