body {
  background-color: #d9c9a4;
  background-repeat: repeat;
  background-size: cover;
  color: #2e2400;
  font-family: 'Libre Baskerville', serif;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NkYGBg+M9ABwAEqwHlO4j5ygAAAABJRU5ErkJggg==');
  opacity: 0.08;
}

.container {
  background: rgba(245, 238, 220, 0.92);
  border: 2px solid #b09e75;
  border-radius: 0;
  padding: 1.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
}

.container::before,
.container::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 12px;
  left: 0;
}

.container::before {
  top: -12px;
}

.container::after {
  bottom: -12px;
}

h1,
h2,
h3,
h4 {
  font-weight: bold;
  letter-spacing: 1.5px;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  position: relative;
  color: #4a3710;
  border-bottom: 1px solid #b2976a;
}

h1::after,
h2::after,
h3::after,
h4::after {
  content: '\2022 \2022 \2022';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: #b2976a;
  font-size: 1.1rem;
}

h6 {
  color: #7a4f20;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.form-label
{
  color: #7a4f20;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

a {
  color: #4a3710;
  text-decoration: none;
  font-style: italic;
}

a:hover {
  text-decoration: underline;
}

.form-control {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #b09e75;
  border-radius: 0;
  padding: .6rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.input-group {
  border: 1px solid #b09e75;
  border-radius: 0;
}

.input-group .form-control,
.input-group .form-select,
.input-group .input-group-text {
  border: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.8);
}

.form-select{
  height: 45px !important;
  border-radius: 0;
  border: 1px solid #b09e75;
}

.btn-primary {
  background: linear-gradient(145deg, #a37335, #7a4f20);
  border: 1px solid #5a3818;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 0;
}

.btn-primary:hover {
  background: linear-gradient(145deg, #7a4f20, #a37335);
}

.btn-secondary {
  background: linear-gradient(145deg, #a37335, #7a4f20);
  border: 1px solid #5a3818;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border-radius: 0;
}

.btn-secondary:hover {
  background: linear-gradient(145deg, #7a4f20, #a37335);
}

html[data-sidebar="hidden"] #sidebar {
  transform: translateX(-100%);
}

html[data-sidebar="hidden"] #showSidebarBtn {
  display: flex !important;
}

html[data-sidebar="hidden"] #hideSidebarBtn {
  display: none !important;
}

html[data-sidebar="hidden"] #mainContent {
  margin-left: 20px !important;
}

.sidebar-container {
  position: relative;
}

.sidebar {
  width: 240px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(245, 238, 220, 0.95);
  border-right: 2px solid #b09e75;
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}


.sidebar.hidden {
  transform: translateX(-100%);
}

.main-content {
  margin: 10px 20px 10px 260px;
  box-sizing: border-box;
  transition: margin-left 0.3s ease;
}

.main-content.full-width {
  margin-left: 20px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 20px;
  }

  #showSidebarBtn {
    display: block;
  }
}

#hideSidebarBtn {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 0;
  margin-bottom: 1rem;
}

#showSidebarBtn {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  width: 40px;
  height: 40px;
  border-radius: 0;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  #showSidebarBtn {
    display: block;
  }
}


#hideSidebarBtn i,
#showSidebarBtn i {
  font-size: 1.2rem;
}

.sidebar .nav-link {
  display: block;
  margin: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  background: #f5f0dc;
  color: #4a3710;
  text-decoration: none;
  letter-spacing: 1px;
  position: relative;
  clip-path: polygon(0 10px,
      10px 0,
      100% 0,
      100% 100%,
      0 100%);
  border: 1px solid #b09e75;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, box-shadow 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: #e7d9b0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sidebar .btn {
  all: unset;
}

.western-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 240, 0.92);
  border: 2px solid #b09e75;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-family: 'Libre Baskerville', serif;
  margin-top: 1.5rem;
}

.western-table thead {
  background-color: #e7d9b0;
  color: #4a3710;
  font-weight: bold;
  letter-spacing: 1px;
}

.western-table th,
.western-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid #c8b38f;
}

.western-table tbody tr:nth-child(odd) {
  background-color: rgba(245, 238, 220, 0.6);
}

.western-table tbody tr:hover {
  background-color: #f3e6be;
  transition: background-color 0.2s ease-in-out;
}

.animate-slide {
  animation: slideFadeIn 0.4s ease-in-out;
}

@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.border,
.border-top,
.border-bottom,
.border-start,
.border-end {
  border-color: #b2976a !important;
}

.disabled-color {
  opacity: 0.4;
}

.western-modal {
  background: #f2e8cc;
  border: 2px solid #7a4f20;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-family: 'Libre Baskerville', serif;
  color: #4a3710;
}

.western-modal .modal-header,
.western-modal .modal-footer {
  border-color: #b09e75;
  background-color: rgba(245, 238, 220, 0.92);
  border-radius: 0;
}

.western-modal .modal-title {
  font-weight: bold;
  letter-spacing: 1px;
}

.western-alert {
  background: #f2e8cc;
  border: 2px solid #7a4f20;
  padding: 1rem 1.25rem;
  color: #4a3710;
  font-family: 'Libre Baskerville', serif;
  font-weight: bold;
  border-radius: 0;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.western-alert .icon {
  font-size: 1.5rem;
  color: #4a3710;
  flex-shrink: 0;
}

.western-alert .text {
  flex: 1;
}

.western-checkbox {
  background-color: rgba(245, 238, 220, 0.95);
  border: 1px solid #7a4f20;
  border-radius: 0;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.western-checkbox:hover {
  background-color: #f3e6be;
}

.western-checkbox input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid #7a4f20;
  border-radius: 0;
  cursor: pointer;
  position: relative;
}

.western-checkbox input[type="checkbox"]:checked {
  background-color: #7a4f20;
}

.western-checkbox input[type="checkbox"]:checked::after {
  content: '\2713';
  color: #fff;
  font-size: 14px;
  position: absolute;
  left: 2px;
  top: -1px;
}

.western-checkbox label {
  margin: 0;
  font-family: 'Libre Baskerville', serif;
  font-weight: bold;
  color: #4a3710;
  user-select: none;
}

.western-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.western-pagination a,
.western-pagination span {
  padding: 0.5rem 0.85rem;
  border: 1px solid #7a4f20;
  background: rgba(245, 238, 220, 0.95);
  color: #4a3710;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0;
  font-style: normal;
  width: 60px;
  text-align: center;
}

.western-pagination a:hover {
  background: #f3e6be;
}

.western-pagination .active {
  background: #a37335;
  color: #fff;
  pointer-events: none;
  border-color: #5a3818;
}

.text-expense {
    color: #B10705;
}

.text-income {
    color: #036704;
}

.no-background-button {
  background: none !important;
  border: none !important;
  color: #4a3710!important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}