:root {
  /* Normec Agrocontrol orange */
  --brand-primary: #ff7300;
  --brand-primary-dark: #e66800;
  --brand-primary-contrast: #ffffff;
  --surface-bg: #F1F1F1;
  --surface-card: #ffffff;
  --sidebar-width: 210px;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  margin-bottom: 0;
  background-color: var(--surface-bg);
  font-family: 'Open Sans', sans-serif;
  min-height: 100vh;
  min-width: 100%;
  display: inline-block;
}

/* SIDEBAR STYLES */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding-top: 66px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  font-size: 0.80rem;
}

.sidebar-sticky {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-sticky::-webkit-scrollbar {
  width: 5px;
}
.sidebar-sticky::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 1rem;
  background-color: var(--surface-bg);
  border-top: 1px solid #ccc6c6;
  font-size: 0.75rem;
}

.sidebar .nav-link {
  color: #333;
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
  margin: 2px 0;
  transition: all 0.2s;
}

.sidebar .nav-link:hover {
  background-color: #fcece0;
  color: var(--brand-primary);
}

.sidebar .nav-link i {
  color: var(--brand-primary);
  font-size: 0.9rem;
}

.nav-link.active-link {
  background-color: #fcece0 !important;
  color: var(--brand-primary) !important;
  font-weight: 600;
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 4px 4px 0;
}

.nav-link.active-link i {
  color: var(--brand-primary) !important;
}

/* MAIN CONTAINER ADJUSTMENT */
.main-container {
  transition: margin-left 0.3s;
}

body.has-sidebar .main-container {
  margin-left: var(--sidebar-width);
}

body.has-sidebar .footer {
  margin-left: var(--sidebar-width);
}

/* FOOTER PERSONALIZADO */
.footer {
  background-color: var(--brand-primary) !important;
  color: white !important;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  z-index: 1030;
}
.footer a {
  color: #ffffff !important;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.table-custom {
  /* Mantenemos tus estilos de diseño */
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  background-color: white;
  margin-bottom: 1rem;
}

.table-custom th {
  background-color: #f2f2f2;
  font-weight: 600;
  padding: 12px 15px;
  text-align: left;
}

.table-custom td {
  padding: 10px 15px;
  border: 1px solid #dee2e6;
  color: #444;
}

.table-custom tr:nth-child(even) {
  background-color: #f9f9f9;
}

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary-dark);
}
.btn-primary:hover {
  background-color: var(--brand-primary-dark);
}