/*
LogiPort Basic - Sistema de Design (identidade visual comercial)
Copyright © 2026 Livrezon Tecnologia Ltda.

Paleta: branco, verde escuro, cinza claro, azul discreto.
Tipografia moderna (Segoe UI / system stack, sem dependência de CDN).
Layout limpo, cards elegantes, sombras suaves, bordas arredondadas.
*/

:root {
  --lp-green-dark: #0f5132;
  --lp-green-dark-hover: #0b3d26;
  --lp-green: #198754;
  --lp-green-light: #d1e7dd;
  --lp-blue: #0d6efd;
  --lp-blue-light: #cfe2ff;
  --lp-gray: #6c757d;
  --lp-gray-light: #e9ecef;
  --lp-gray-lighter: #f8f9fa;
  --lp-surface: #ffffff;
  --lp-bg: #f6f8f7;
  --lp-text: #1c2b24;
  --lp-text-muted: #6c757d;
  --lp-danger: #dc3545;
  --lp-danger-bg: #f8d7da;
  --lp-warning: #997404;
  --lp-warning-bg: #fff3cd;
  --lp-success: #0f5132;
  --lp-success-bg: #d1e7dd;
  --lp-info: #084298;
  --lp-info-bg: #cfe2ff;

  --lp-radius-sm: 8px;
  --lp-radius: 14px;
  --lp-radius-lg: 20px;
  --lp-shadow-sm: 0 1px 3px rgba(15, 81, 50, 0.08);
  --lp-shadow: 0 4px 16px rgba(15, 81, 50, 0.09);
  --lp-shadow-lg: 0 12px 32px rgba(15, 81, 50, 0.14);
  --lp-transition: 150ms ease;
}

* {
  box-sizing: border-box;
}

.lp-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.lp-about-logo { width: 64px !important; height: 64px !important; color: var(--lp-green-dark); }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Arial, Helvetica, sans-serif;
  background-color: var(--lp-bg);
  color: var(--lp-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--lp-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--lp-text);
  margin: 0 0 0.4rem 0;
}

/* ===================== Layout raiz ===================== */

.lp-shell {
  display: flex;
  min-height: 100vh;
}

.lp-sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--lp-green-dark) 0%, #0a3d27 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: var(--lp-shadow-lg);
  position: relative;
  z-index: 10;
}

.lp-brand {
  padding: 1.5rem 1.4rem 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lp-brand-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.lp-brand-text {
  line-height: 1.15;
}

.lp-brand-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
}

.lp-brand-sub {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.lp-sidebar nav {
  padding: 0.75rem 0.6rem;
  flex: 1;
  overflow-y: auto;
}

.lp-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 0.62rem 0.8rem;
  font-size: 0.89rem;
  font-weight: 500;
  border-radius: var(--lp-radius-sm);
  margin-bottom: 0.15rem;
  transition: background-color var(--lp-transition), color var(--lp-transition);
}

.lp-nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.lp-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  text-decoration: none;
}

.lp-nav-link.active {
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.lp-nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.6rem 0.8rem;
}

.lp-sidebar-footer {
  padding: 0.9rem 1.2rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.5;
}

.lp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lp-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--lp-surface);
  border-bottom: 1px solid var(--lp-gray-light);
}

.lp-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.87rem;
  color: var(--lp-text-muted);
}

.lp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lp-green-light);
  color: var(--lp-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.lp-content {
  padding: 1.75rem 2rem 2.5rem 2rem;
  flex: 1;
}

.lp-page-footer {
  padding: 0.9rem 2rem;
  font-size: 0.72rem;
  color: var(--lp-text-muted);
  border-top: 1px solid var(--lp-gray-light);
  background-color: var(--lp-surface);
  display: flex;
  justify-content: space-between;
}

/* ===================== Cards ===================== */

.lp-card {
  background-color: var(--lp-surface);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow-sm);
  border: 1px solid var(--lp-gray-light);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.25rem;
  transition: box-shadow var(--lp-transition);
}

.lp-card:hover {
  box-shadow: var(--lp-shadow);
}

.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}

.lp-metric-card {
  background-color: var(--lp-surface);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow-sm);
  border: 1px solid var(--lp-gray-light);
  padding: 1.3rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform var(--lp-transition), box-shadow var(--lp-transition);
}

.lp-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow);
}

.lp-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--lp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--lp-green-light);
  color: var(--lp-green-dark);
}
.lp-metric-icon svg { width: 22px; height: 22px; }
.lp-metric-icon.blue { background-color: var(--lp-blue-light); color: var(--lp-blue); }
.lp-metric-icon.gray { background-color: var(--lp-gray-light); color: var(--lp-gray); }
.lp-metric-icon.warning { background-color: var(--lp-warning-bg); color: var(--lp-warning); }

.lp-metric-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--lp-text);
  line-height: 1.1;
}

.lp-metric-label {
  color: var(--lp-text-muted);
  font-size: 0.83rem;
  margin-top: 0.15rem;
}

.lp-section-title {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--lp-text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.lp-section-title svg { width: 20px; height: 20px; color: var(--lp-green-dark); }

/* ===================== Botões (padronizados) ===================== */

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.3rem;
  border-radius: var(--lp-radius-sm);
  border: 1px solid transparent;
  font-size: 0.89rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--lp-transition), transform var(--lp-transition), box-shadow var(--lp-transition);
  line-height: 1.2;
}
.lp-btn:hover { text-decoration: none; }
.lp-btn:active { transform: scale(0.98); }
.lp-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.lp-btn-primary {
  background-color: var(--lp-green-dark);
  color: #ffffff;
  box-shadow: var(--lp-shadow-sm);
}
.lp-btn-primary:hover { background-color: var(--lp-green-dark-hover); color: #fff; }

.lp-btn-secondary {
  background-color: var(--lp-surface);
  color: var(--lp-green-dark);
  border-color: var(--lp-green-dark);
}
.lp-btn-secondary:hover { background-color: var(--lp-green-light); color: var(--lp-green-dark); }

.lp-btn-cancel,
.lp-btn-gray {
  background-color: var(--lp-gray-light);
  color: var(--lp-text);
}
.lp-btn-cancel:hover, .lp-btn-gray:hover { background-color: #dde1e3; color: var(--lp-text); }

.lp-btn-danger {
  background-color: var(--lp-danger);
  color: #ffffff;
}
.lp-btn-danger:hover { background-color: #b42433; color: #fff; }

.lp-btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.lp-btn-block { display: flex; width: 100%; }

.lp-btn svg { width: 16px; height: 16px; }

/* ===================== Formulários ===================== */

.lp-form-group {
  margin-bottom: 1.1rem;
}

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

.lp-form-group input[type="text"],
.lp-form-group input[type="password"],
.lp-form-group input[type="email"],
.lp-form-group input[type="date"],
.lp-form-group input[type="file"],
.lp-form-group input[type="color"],
.lp-form-group select,
.lp-form-group textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1.5px solid var(--lp-gray-light);
  border-radius: var(--lp-radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  background-color: var(--lp-surface);
  color: var(--lp-text);
  transition: border-color var(--lp-transition), box-shadow var(--lp-transition);
}

.lp-form-group input:focus,
.lp-form-group select:focus,
.lp-form-group textarea:focus {
  outline: none;
  border-color: var(--lp-green-dark);
  box-shadow: 0 0 0 3px var(--lp-green-light);
}

.lp-input-with-icon {
  position: relative;
}
.lp-input-with-icon svg.lp-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--lp-text-muted);
}
.lp-input-with-icon input {
  padding-left: 2.5rem !important;
}

.lp-password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--lp-text-muted);
  padding: 0.2rem;
  display: flex;
}
.lp-password-toggle svg { width: 19px; height: 19px; }

.lp-fieldset {
  border: 1.5px solid var(--lp-gray-light);
  border-radius: var(--lp-radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.3rem;
}
.lp-fieldset legend {
  font-weight: 700;
  color: var(--lp-green-dark);
  padding: 0 0.5rem;
  font-size: 0.95rem;
}

/* ===================== Mensagens padronizadas (flash) ===================== */

.lp-flash {
  border-radius: var(--lp-radius-sm);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  animation: lp-fade-in 200ms ease;
  border: 1px solid transparent;
}
.lp-flash svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 0.05rem; }
.lp-flash-title { font-weight: 700; display: block; margin-bottom: 0.1rem; }

.lp-flash-success { background-color: var(--lp-success-bg); color: var(--lp-success); border-color: #a3cfbb; }
.lp-flash-danger { background-color: var(--lp-danger-bg); color: #842029; border-color: #f1aeb5; }
.lp-flash-warning { background-color: var(--lp-warning-bg); color: var(--lp-warning); border-color: #ffe69c; }
.lp-flash-info { background-color: var(--lp-info-bg); color: var(--lp-info); border-color: #9ec5fe; }

/* ===================== Badges ===================== */

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.lp-badge-pending { background-color: var(--lp-warning-bg); color: var(--lp-warning); }
.lp-badge-success { background-color: var(--lp-success-bg); color: var(--lp-success); }
.lp-badge-gray { background-color: var(--lp-gray-light); color: var(--lp-text-muted); }
.lp-badge-blue { background-color: var(--lp-blue-light); color: var(--lp-blue); }

.lp-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--lp-green-dark);
  background-color: var(--lp-green-light);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
}
.lp-feature-pill svg { width: 13px; height: 13px; }

/* ===================== Tabelas ===================== */

table.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.lp-table th {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 2px solid var(--lp-gray-light);
  color: var(--lp-text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.lp-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--lp-gray-light);
}
table.lp-table tbody tr {
  transition: background-color var(--lp-transition);
}
table.lp-table tbody tr:hover {
  background-color: var(--lp-gray-lighter);
}

/* ===================== Login ===================== */

.lp-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--lp-green-dark) 0%, #123f2b 45%, #0a2e1e 100%);
  padding: 2rem 1rem;
}

.lp-login-box {
  width: 100%;
  max-width: 420px;
  background-color: var(--lp-surface);
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow-lg);
  padding: 2.5rem 2.25rem 1.75rem 2.25rem;
  animation: lp-fade-in 350ms ease;
}

.lp-login-logo-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  justify-content: center;
  margin-bottom: 0.3rem;
}
.lp-login-logo-row svg { width: 40px; height: 40px; }

.lp-login-box h1 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--lp-text);
  text-align: center;
}

.lp-login-sub {
  color: var(--lp-text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.6rem;
  text-align: center;
}

.lp-login-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.3rem 0 0.4rem 0;
}

.lp-login-footer {
  text-align: center;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--lp-gray-light);
  font-size: 0.72rem;
  color: var(--lp-text-muted);
  line-height: 1.6;
}
.lp-login-footer strong { color: var(--lp-text); }

/* ===================== Wizard (configuração inicial) ===================== */

.lp-wizard-progress {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}
.lp-wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.lp-wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--lp-gray-light);
  color: var(--lp-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background-color var(--lp-transition), color var(--lp-transition);
  z-index: 1;
}
.lp-wizard-step.active .lp-wizard-step-circle,
.lp-wizard-step.done .lp-wizard-step-circle {
  background-color: var(--lp-green-dark);
  color: #fff;
}
.lp-wizard-step-label {
  font-size: 0.74rem;
  color: var(--lp-text-muted);
  margin-top: 0.4rem;
  font-weight: 600;
  text-align: center;
}
.lp-wizard-step.active .lp-wizard-step-label { color: var(--lp-green-dark); }
.lp-wizard-connector {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: var(--lp-gray-light);
  z-index: 0;
}
.lp-wizard-step.done .lp-wizard-connector { background-color: var(--lp-green-dark); }
.lp-wizard-step:last-child .lp-wizard-connector { display: none; }

.lp-wizard-panel { display: none; animation: lp-fade-in 220ms ease; }
.lp-wizard-panel.active { display: block; }

.lp-wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

/* ===================== Splash / telas de destaque ===================== */

.lp-splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--lp-green-dark) 0%, #123f2b 50%, #0a2e1e 100%);
  color: #ffffff;
  text-align: center;
  padding: 2rem;
}
.lp-splash svg.lp-splash-logo { width: 96px; height: 96px; margin-bottom: 1.2rem; }
.lp-splash h1 { color: #fff; font-size: 2rem; margin-bottom: 0.15rem; }
.lp-splash .lp-splash-slogan { color: rgba(255,255,255,0.75); font-size: 0.95rem; margin-bottom: 2rem; }
.lp-splash .lp-splash-status { font-size: 0.85rem; color: rgba(255,255,255,0.85); margin-bottom: 0.7rem; }

.lp-progress-track {
  width: 260px;
  height: 6px;
  background-color: rgba(255,255,255,0.18);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.6rem;
}
.lp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffffff 0%, var(--lp-green) 100%);
  border-radius: 999px;
  animation: lp-progress-anim 2.4s ease forwards;
}
@keyframes lp-progress-anim {
  0% { width: 0%; }
  60% { width: 78%; }
  100% { width: 100%; }
}

.lp-splash-footer {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

/* ===================== Empty state / ilustrações ===================== */

.lp-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--lp-text-muted);
}
.lp-empty-state svg { width: 56px; height: 56px; color: var(--lp-gray-light); margin-bottom: 0.8rem; }

/* ===================== Loading overlay / spinner ===================== */

.lp-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  flex-direction: column;
  gap: 0.9rem;
  backdrop-filter: blur(1px);
}
.lp-loading-overlay.visible { display: flex; }
.lp-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--lp-gray-light);
  border-top-color: var(--lp-green-dark);
  border-radius: 50%;
  animation: lp-spin 0.7s linear infinite;
}
.lp-spinner-sm {
  width: 16px; height: 16px; border-width: 2.5px;
  display: inline-block; vertical-align: middle;
}
.lp-loading-text { font-size: 0.88rem; color: var(--lp-green-dark); font-weight: 600; }

@keyframes lp-spin { to { transform: rotate(360deg); } }
@keyframes lp-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ===================== Utilidades ===================== */

.lp-flex { display: flex; }
.lp-gap-sm { gap: 0.5rem; }
.lp-gap { gap: 0.75rem; }
.lp-muted { color: var(--lp-text-muted); }
.lp-mt-1 { margin-top: 1rem; }
.lp-mb-0 { margin-bottom: 0; }
.lp-text-center { text-align: center; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background-color: var(--lp-gray-light); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
