/* ============================================================
   Veo Energia – Design System para Dashboards
   Espelha a identidade visual de siteveoenergia/css/styles.css
   ============================================================ */

:root {
  --veo-primary: #10529F;
  --veo-accent: #009FE3;
  --veo-dark: #0A366B;
  --veo-yellow: #FFB800;
  --veo-text: #1F2937;
  --veo-gray: #6B7280;
  --veo-bg: #F5F8FC;
  --veo-surface: #FFFFFF;
  --veo-border: #E5E7EB;
  --veo-sidebar-w: 240px;
}

/* ── Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--veo-bg);
  color: var(--veo-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── Topbar ── */
.dash-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--veo-border);
  box-shadow: 0 1px 4px rgba(16, 82, 159, 0.06);
}

.dash-topbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.dash-topbar__logo img {
  height: 36px;
  width: auto;
}

.dash-topbar__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--veo-primary);
  background: #E0F0FE;
  border: 1px solid #B9DCFA;
  border-radius: 999px;
  padding: 2px 10px;
}

.dash-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-topbar__user {
  font-size: 13px;
  font-weight: 600;
  color: var(--veo-primary);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--veo-gray);
  background: transparent;
  border: 1px solid var(--veo-border);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-logout:hover {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}

/* ── Sidebar ── */
.dash-sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: var(--veo-sidebar-w);
  background: #fff;
  border-right: 1px solid var(--veo-border);
  overflow-y: auto;
  z-index: 40;
  padding: 20px 12px;
}

.dash-sidebar__section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--veo-gray);
  padding: 0 8px;
  margin: 16px 0 6px;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.dash-nav-link:hover,
.dash-nav-link.active {
  background: #EFF6FF;
  color: var(--veo-primary);
  font-weight: 600;
}

.dash-nav-link .dash-icon {
  font-size: 18px;
  color: var(--veo-accent);
}

.dash-nav-link.active .dash-icon,
.dash-nav-link:hover .dash-icon {
  color: var(--veo-primary);
}

/* ── Main content area ── */
.dash-main {
  margin-left: var(--veo-sidebar-w);
  padding-top: 56px;
  min-height: 100vh;
}

.dash-content {
  padding: 28px 28px;
  max-width: 1280px;
}

/* ── Page title ── */
.dash-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--veo-primary);
  margin-bottom: 20px;
}

/* ── Cards ── */
.veo-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--veo-border);
  box-shadow: 0 2px 8px rgba(16, 82, 159, 0.06);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.veo-card--accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--veo-primary), var(--veo-accent));
}

/* ── Stat card ── */
.stat-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--veo-border);
  box-shadow: 0 1px 6px rgba(16, 82, 159, 0.05);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--veo-gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card__value {
  font-size: 28px;
  font-weight: 800;
  color: var(--veo-primary);
}

.stat-card__icon {
  font-size: 22px;
  color: var(--veo-accent);
  margin-bottom: 4px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--veo-primary);
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(16, 82, 159, 0.25);
}

.btn-primary:hover {
  background: var(--veo-dark);
  box-shadow: 0 4px 14px rgba(16, 82, 159, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--veo-primary);
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #DBEAFE;
  border-color: #93C5FD;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #FEE2E2;
}

/* ── Form inputs ── */
.veo-input {
  width: 100%;
  border: 1px solid var(--veo-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--veo-text);
  background: #fff;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.veo-input:focus {
  border-color: var(--veo-primary);
  box-shadow: 0 0 0 3px rgba(16, 82, 159, 0.12);
}

.veo-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* ── Table ── */
.veo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.veo-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--veo-gray);
  background: #F8FAFC;
  border-bottom: 1px solid var(--veo-border);
}

.veo-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F3F4F6;
  color: var(--veo-text);
  vertical-align: middle;
}

.veo-table tr:last-child td {
  border-bottom: none;
}

.veo-table tr:hover td {
  background: #F8FAFC;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.badge--blue {
  background: #EFF6FF;
  color: #1D4ED8;
}

.badge--green {
  background: #F0FDF4;
  color: #15803D;
}

.badge--amber {
  background: #FFFBEB;
  color: #B45309;
}

.badge--red {
  background: #FEF2F2;
  color: #DC2626;
}

.badge--purple {
  background: #F5F3FF;
  color: #6D28D9;
}

.badge--gray {
  background: #F3F4F6;
  color: #6B7280;
}

/* ── Alert ── */
.veo-alert {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.veo-alert--error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.veo-alert--success {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.veo-alert--info {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

/* ── Loading spinner ── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E5E7EB;
  border-top-color: var(--veo-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Tabs ── */
.dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #F3F4F6;
  margin-bottom: 24px;
}

.dash-tab {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--veo-gray);
  padding: 10px 16px;
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.dash-tab:hover {
  color: var(--veo-primary);
}

.dash-tab.active {
  color: var(--veo-primary);
  border-bottom-color: var(--veo-primary);
}

/* ── Kanban ── */
.kanban-col {
  min-width: 280px;
  width: 280px;
  background: #F8FAFC;
  border-radius: 14px;
  border: 1px solid var(--veo-border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}

.kanban-col__header {
  padding: 12px 16px;
  border-bottom: 2px solid var(--veo-primary);
  font-size: 13px;
  font-weight: 700;
  color: var(--veo-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-col__body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--veo-border);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(16, 82, 159, 0.05);
}

.kanban-card:hover {
  border-color: var(--veo-accent);
  box-shadow: 0 4px 12px rgba(16, 82, 159, 0.12);
  transform: translateY(-2px);
}

.kanban-card__name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--veo-text);
}

.kanban-card__sub {
  font-size: 12px;
  color: var(--veo-gray);
  margin-top: 2px;
}

/* ── Modal ── */
.veo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 54, 107, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.veo-modal {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(16, 82, 159, 0.18);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.veo-modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--veo-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--veo-primary) 0%, var(--veo-dark) 100%);
  border-radius: 20px 20px 0 0;
  color: #fff;
}

.veo-modal__title {
  font-size: 16px;
  font-weight: 700;
}

.veo-modal__body {
  padding: 24px;
}

/* ── Stepper (dashboard-cliente) ── */
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.3s;
}

.step-circle--done {
  background: #22C55E;
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.step-circle--active {
  background: var(--veo-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 82, 159, 0.35);
}

.step-circle--pending {
  background: #E5E7EB;
  color: #9CA3AF;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .dash-sidebar {
    display: none;
  }

  .dash-main {
    margin-left: 0;
  }

  .dash-content {
    padding: 20px 16px;
  }
}