:root {
  --color-primary: #015d12;
  --color-primary-dark: #01450d;
  --color-primary-light: #0a7b1f;
  --color-bg: #e1e9e6;
  --color-card: #ffffff;
  --color-text: #1d2b22;
  --color-muted: #6b7b73;
  --radius-lg: 16px;
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.08);
}

body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.app-wrapper {
  min-height: 100vh;
  display: flex;
  background: var(--color-bg);
}

.app-sidebar {
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  width: 250px !important;
  padding: 18px 0 20px 14px;
  border-top-right-radius: 26px;
  border-bottom-right-radius: 26px;
  position: relative;
  overflow: hidden;
  overflow-x: hidden;
}

.app-sidebar .offcanvas-body {
  height: 100%;
  overflow-y: hidden;
  overflow-x: hidden;
}

.app-sidebar .nav-link {
  color: #cfe5d2;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 600;
  display: flex;
  gap: 9px;
  align-items: center;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  min-height: 42px;
}

.app-sidebar .nav-link i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
}

.app-sidebar .nav-link span {
  display: block;
  line-height: 1.2;
  white-space: normal;
}

.app-sidebar .nav-link.sidebar-link-long span {
  max-width: 140px;
}

.app-sidebar .nav-link:hover {
  background: rgba(225, 233, 230, 0.92);
  color: var(--color-primary);
  transform: translateX(1px);
}

.app-sidebar .nav-link.active {
  border-radius: 10px !important;
  background-color: #e4efe8;
  color: #014f10;
  border-right: 0;
  border-left: 4px solid #0b6b1f;
  margin-right: 0;
  width: 100%;
  font-weight: 700;
}

.app-sidebar .nav-link.active::before,
.app-sidebar .nav-link.active::after {
  content: none;
}

.app-sidebar .nav-link.active i,
.app-sidebar .nav-link:hover i {
  color: var(--color-primary);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-brand img {
  height: 40px;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-logo {
  height: 48px;
}

.btn-menu-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 12px;
  padding: 6px 10px;
}

.app-header .btn-menu-toggle {
  background: #e2eee7;
  border: 1px solid #bcd3c7;
  color: var(--color-primary);
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#sidebarToggle i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

body.sidebar-collapsed #sidebarToggle i {
  transform: rotate(180deg);
}


.app-sidebar .offcanvas-header .btn-menu-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
}

.sidebar-user {
  background: transparent;
  border-radius: 0;
  padding: 0 2px;
  font-weight: 600;
  color: #dfeee4;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 2px 0 6px;
}

.sidebar-nav {
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 18px;
  box-sizing: border-box;
  margin-top: 2px;
  min-height: 0;
  flex: 1 1 auto;
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 6px 0 6px;
  color: #cfe5d2;
  font-size: 0.64rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  opacity: 0.54;
}

body.sidebar-collapsed .sidebar-footer {
  display: none;
}

body.sidebar-collapsed .app-sidebar {
  width: 72px !important;
  padding-left: 10px;
}

body.sidebar-collapsed .sidebar-nav {
  padding-right: 8px;
}

.app-sidebar #sidebarToggle {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  margin-right: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


body.sidebar-collapsed .sidebar-top {
  align-items: center;
}

body.sidebar-collapsed .sidebar-user {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}

body.sidebar-collapsed .sidebar-user span {
  display: none;
}

body.sidebar-collapsed .sidebar-logo {
  display: none;
}

body.sidebar-collapsed .app-sidebar .nav-link {
  justify-content: center;
  gap: 0;
  padding: 10px;
  width: 100%;
  margin-right: 0;
}

body.sidebar-collapsed .app-sidebar .nav-link span {
  display: none;
}

body.sidebar-collapsed .app-sidebar .nav-link.active {
  width: 100%;
  padding-right: 10px;
}

.app-sidebar .nav-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
  background: rgba(225, 233, 230, 0.2);
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  background: var(--color-primary);
  padding: 6px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  height: 32px;
}

.app-header {
  background: transparent;
  border-bottom: none;
  padding: 18px 0 10px;
  box-shadow: none;
}

.app-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e1e9e5;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(8, 31, 16, 0.08);
  flex-wrap: wrap;
}

.app-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.app-header-project {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-header-separator {
  width: 2px;
  height: 32px;
  align-self: center;
  background: rgba(15, 107, 47, 0.55);
}

.app-header-divider {
  background: #e4ebe6;
}

.app-header-line {
  background: #e4ebe6;
}

.app-brand-title {
  font-weight: 700;
  color: #0f6b2f;
  letter-spacing: 0.2px;
  font-size: 1.4rem;
}

.app-header-title {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.app-page-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #2b2b2b;
}

.app-page-subtitle {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.app-header-divider {
  width: 1px;
  height: 44px;
  background: #e2e9e4;
}

.app-header-line {
  margin-top: 12px;
  height: 1px;
  background: transparent;
}

.app-header .btn-outline-proagro {
  border-radius: 12px;
  border-color: #cfe0d6;
}

.app-user .btn-proagro {
  border-radius: 12px;
  padding: 6px 14px;
  box-shadow: 0 6px 16px rgba(1, 93, 18, 0.2);
}

.app-user .btn-outline-proagro {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.app-content {
  padding: 26px 0;
  background: var(--color-bg);
}

.content-shell {
  width: 100%;
  box-sizing: border-box;
}

.page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 26px;
  box-sizing: border-box;
}

.card {
  border: none;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  background: var(--color-card);
}

.card-stat {
  display: flex;
  gap: 14px;
  align-items: center;
}

.card-stat-card .card-body {
  min-height: 96px;
  display: flex;
  align-items: center;
}

.card-stat-card .card-stat > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-stat-card .card-stat-title,
.card-stat-card .card-stat-subtitle,
.card-stat-card .card-stat-link {
  line-height: 1.2;
}

.card-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e7efe9;
  display: grid;
  place-items: center;
  color: #015d12;
  font-size: 20px;
}

.dashboard-exec .card {
  border-radius: 12px;
}

.dashboard-filters .card-body {
  background: linear-gradient(180deg, #f8faf9 0%, #ffffff 100%);
  border-radius: 12px;
}

.dashboard-filters h6 {
  font-weight: 700;
  color: #2f4a40;
}

.dashboard-filters .bi-funnel {
  color: var(--color-primary);
}

.dashboard-filters .form-label {
  font-weight: 600;
  color: #4f635b;
}

.dashboard-filters-actions .btn {
  min-width: 130px;
}

.dashboard-months-dropdown .dropdown-menu {
  max-height: 220px;
  overflow-y: auto;
}

.dashboard-months-trigger {
  height: calc(2.25rem + 2px);
  display: flex;
  align-items: center;
}

.dashboard-months-dropdown .dropdown-item {
  cursor: pointer;
}

.dashboard-months-dropdown .dropdown-item:active {
  background: #eef3f0;
  color: inherit;
}

.kpi-card .card-stat-icon {
  background: #eef3f0;
}

.kpi-primary .card-stat-icon {
  width: 46px;
  height: 46px;
  font-size: 24px;
}

.kpi-primary .card-stat-value {
  font-size: 1.8rem;
}

.kpi-secondary .card-stat-title {
  color: #6c757d;
}

.kpi-ok {
  background: #f4fbf6;
  box-shadow: inset 0 0 0 1px #d7f1de;
}

.ranking-name {
  font-weight: 600;
}

.card-stat-title {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.card-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
}

.card-stat-subtitle {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.card-stat-link {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 2px;
}

.card-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.chart-wrapper {
  position: relative;
  height: 260px;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8fa9a0;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.btn-proagro {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

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

.btn-outline-proagro {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

.table thead th {
  color: var(--color-muted);
  font-weight: 600;
}

.table td,
.table th {
  vertical-align: middle;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-notify {
  background: var(--color-primary-light);
}

.status-badge {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
}

.status-card {
  border-left: 6px solid #d0d9d3;
  background: #f5f8f6;
}

.status-card--open {
  border-left-color: #0a7b1f;
  background: #ecf7ef;
}

.status-card--closed {
  border-left-color: #7c8a83;
  background: #eef1ef;
}

.status-card--scheduled {
  border-left-color: #0b5ed7;
  background: #eef5ff;
}

.status-date-card {
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.status-date-card--open {
  background: #eaf6ef;
  color: #1f4f2a;
}

.status-date-card--close {
  background: #fff1ec;
  color: #7a2d1c;
}

.status-date-label {
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-date-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.status-date-time {
  font-size: 1.1rem;
  font-weight: 700;
}

.janela-page .alert {
  display: none;
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 98, 74, 0.08), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(0, 98, 74, 0.12), transparent 50%),
    linear-gradient(135deg, #e7eeeb, #f5f8f6);
}

.auth-password-field {
  position: relative;
  display: block;
}

.auth-password-field input[type="password"],
.auth-password-field input[type="text"] {
  padding-right: 42px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.auth-password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 12px !important;
  transform: translateY(-50%) !important;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  color: #2f4f2f;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  z-index: 2;
}

.auth-password-toggle:focus {
  outline: none;
  box-shadow: none;
}

.auth-password-field input[type="password"]::-ms-reveal,
.auth-password-field input[type="password"]::-ms-clear {
  display: none;
}

/* Hide native reveal icons on Chromium-based browsers */
.auth-password-field input[type="password"]::-webkit-credentials-auto-fill-button,
.auth-password-field input[type="password"]::-webkit-contacts-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}

.auth-password-field input[type="password"]::-webkit-textfield-decoration-container {
  display: none !important;
}

.historico-table th,
.historico-table td {
  padding-top: 6px;
  padding-bottom: 6px;
}

.badge-ref {
  font-weight: 500;
}

.badge-ref-strong {
  border-color: #99b7a4 !important;
  background: #f4f7f5;
  color: #1f2f28;
}

.badge-normal {
  background: #e6ece8;
  color: #2b3d34;
}

.badge-especial {
  background: #ffe8cc;
  color: #7a3b00;
}

.badge-tipo-strong {
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.status-badge-home {
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.colaborador-form .section-card + .section-card {
  margin-top: 8px;
}

.colaborador-form input[readonly],
.colaborador-form select[disabled],
.colaborador-form textarea[readonly] {
  background-color: #f1f4f3;
  color: #4c5a55;
  cursor: not-allowed;
}

.colaborador-form .helper-text {
  color: #7b8a84;
}

.colaborador-form .section-financeira {
  border-left: 4px solid #0f6b2f;
}

.colaborador-form .descontos-table th,
.colaborador-form .descontos-table td {
  vertical-align: middle;
}

.colaboradores-table .colaborador-inativo {
  background: #f3f5f4;
  color: #5d6b64;
}

.colaboradores-table .colaborador-inativo td {
  color: #5d6b64;
}

.colaboradores-table .badge-inativo {
  background: #e3e7e5;
  color: #58645f;
}

:root {
  --admin-card-bg: #ffffff;
  --admin-card-border: rgba(15, 107, 47, 0.12);
  --admin-accent: #0f6b2f;
  --admin-muted: #6b7b73;
  --admin-soft: #eef4f1;
  --admin-shadow: 0 24px 45px rgba(5, 20, 10, 0.08);
}

.admin-edit-card {
  border-radius: 20px;
  box-shadow: var(--admin-shadow);
  border: 1px solid var(--admin-card-border);
}

.admin-edit-page {
  position: relative;
  overflow: hidden;
}

.admin-edit-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(15, 107, 47, 0.06), transparent 55%);
  pointer-events: none;
}

.admin-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 107, 47, 0.1);
}

.admin-edit-page .section-card {
  background: var(--admin-card-bg);
  border: 1px solid rgba(15, 107, 47, 0.08);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 28px rgba(9, 40, 20, 0.06);
  animation: adminFadeIn 0.35s ease;
}

.admin-edit-layout .section-card {
  padding: 16px;
  margin-bottom: 14px;
}

.admin-edit-page .section-title {
  font-weight: 700;
  color: var(--admin-accent);
  margin-bottom: 2px;
}

.admin-edit-page .section-subtitle {
  color: var(--admin-muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.admin-edit-layout .section-subtitle {
  margin-bottom: 10px;
}

.admin-edit-page .form-label {
  font-weight: 600;
  color: #203128;
}

.admin-edit-page .form-control,
.admin-edit-page .form-select {
  border-radius: 12px;
  border-color: rgba(15, 107, 47, 0.15);
  background: #fbfdfc;
  box-shadow: none;
}

.admin-edit-page .form-control:focus,
.admin-edit-page .form-select:focus {
  border-color: rgba(15, 107, 47, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(15, 107, 47, 0.12);
}

.admin-edit-page .form-control[disabled],
.admin-edit-page .form-select[disabled] {
  background: #f2f6f4;
  color: #65746d;
}

@keyframes adminFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  max-width: 440px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
  background: #fff;
  padding: 28px;
}

.auth-card .form-control {
  width: 100%;
  border-radius: 10px;
  padding: 10px 12px;
}

.auth-card .btn-proagro {
  border-radius: 10px;
}

.auth-title {
  font-weight: 700;
  color: var(--color-text);
}

.auth-subtitle {
  color: var(--color-muted);
}

.auth-logo {
  height: 54px;
}

.auth-divider {
  height: 1px;
  background: #e6ede8;
  margin: 18px 0;
}

.auth-vertical-divider {
  width: 1px;
  height: 44px;
  background: #dfe8e2;
}

@media (max-width: 1199px) {
  .app-sidebar {
    width: 82vw;
    max-width: 320px;
    height: 100vh;
    padding: 16px 0 16px 16px;
    border-radius: 0 20px 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    visibility: hidden;
  }
  .app-sidebar.show {
    transform: translateX(0);
    visibility: visible;
  }
  .app-sidebar .offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 16px;
  }
  .app-sidebar .sidebar-top {
    display: none;
  }
  body.sidebar-collapsed .app-sidebar {
    width: 82vw;
    padding-left: 16px;
    transform: translateX(-100%);
    visibility: hidden;
  }
  body.sidebar-collapsed .app-sidebar.show {
    transform: translateX(0);
    visibility: visible;
  }
  body.sidebar-collapsed .app-sidebar .nav-link {
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 16px;
    width: 100%;
    margin-right: 0;
  }
  body.sidebar-collapsed .app-sidebar .nav-link span {
    display: inline;
  }
  body.sidebar-collapsed .app-sidebar .nav-link.active {
    width: 100%;
    padding-right: 12px;
  }
  .app-sidebar .nav-link.active {
    width: 100%;
  }
  .app-sidebar .nav-link.active::before,
  .app-sidebar .nav-link.active::after {
    content: none;
    display: none;
  }
  .app-content {
    padding: 16px 0;
  }
  .page-container {
    padding: 0 16px;
  }
}

@media (max-width: 1199px) {
  .offcanvas-backdrop.show {
    opacity: 0.4;
  }
}

@media (min-width: 1200px) {
  .app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    transform: none;
    visibility: visible;
  }
  .app-sidebar.offcanvas {
    visibility: visible;
    transform: none;
  }
  .offcanvas-backdrop {
    display: none;
  }
}

@media (max-width: 991px) {
  .app-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .app-header-main {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .app-header-separator {
    height: 1px;
    width: 100%;
  }
  .app-header-separator {
    width: 100%;
    height: 1px;
  }
  .app-header-project {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }
  .app-header-title {
    text-align: left;
    width: 100%;
  }
  .app-user {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .app-user .text-end {
    text-align: left !important;
  }
  .app-user form {
    margin-left: auto;
  }
  .app-user .btn-outline-proagro,
  .app-user .btn-proagro {
    min-height: 40px;
  }
}

@media (max-width: 576px) {
  .app-header {
    padding: 16px 0;
  }
  .app-header-row {
    padding: 12px 14px;
  }
  .app-user {
    align-items: center;
  }
  .app-user form {
    width: auto;
  }
  .app-header .btn-menu-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 16px rgba(8, 31, 16, 0.12);
  }
  .app-header-project .app-brand-title {
    display: none;
  }
}

@media (max-width: 767px) {
  .app-user .text-end.d-none.d-md-block {
    display: block !important;
  }
}

.baixa-selection-bar {
  background: #f4f8f6;
  border: 1px solid #dce8e2;
  border-radius: 10px;
  padding: 10px 12px;
}

.baixa-table-wrap {
  max-height: 420px;
}

.baixa-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf8;
}
