/* === GLOBAL STYLES === */
body, html {
  height: 100%;
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #6c757d;
  background: #f8f9fa;
}

.wrapper { display: flex; }

/* === NAVBAR === */
.navbar {
  height: 60px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 99;
}

/* === SIDEBAR === */
.sidebar {
  width: 250px;
  background: #fff;
  border-right: 1px solid #fff;
  transition: all 0.3s ease;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar.collapsed { width: 0; overflow: hidden; }

.sidebar-top {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.sidebar-logo { width: 120px; border-radius: 50%; object-fit: cover; transition: 0.3s; }
.sidebar-title { color: #911818; transition: opacity 0.3s; }
.sidebar.collapsed .sidebar-title { opacity: 0; }

.sidebar-nav { display: flex; flex-direction: column; margin-top: 10px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #4c4646;
  text-decoration: none;
  border-radius: 5px;
  margin: 2px 10px;
  transition: all 0.3s ease;
}
.sidebar-nav a i { margin-right: 10px; transition: 0.3s; }
.sidebar.collapsed .sidebar-nav a span { display: none; }
.sidebar-nav a:hover { background: #1a1a1a; color: #fff; }

.sidebar-nav a.active {
  background-color: #28a745;
  color: #fff;
  font-weight: bold;
}


.login-container {
  max-width: 500px;
  margin: 80px auto;
  padding: 40px 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
.logo {
  display: block;
  margin: 0 auto 20px auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
}
.org-name {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: #28a745;
  margin-bottom: 20px;
}
.form-control {
  min-height: 45px;
  font-size: 16px;
}
.btn {
  font-size: 16px;
  font-weight: bold;
  padding: 10px;
}
.toggle-password {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
  font-size: 18px;
}
.password-wrapper {
  position: relative;
}

/* === TOGGLE BUTTON === */
#sidebarToggleBtn {
  position: fixed;
  top: 15px;
  left: 10px;
  background: #fff;
  color: #25e21b;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  z-index: 101;
  transition: transform 0.3s;
}
#sidebarToggleBtn.rotate { transform: rotate(180deg); }

/* === MAIN === */
.main {
  margin-left: 250px;
  width: calc(100% - 250px);
  transition: all 0.3s ease;
}
.main.expanded {
  margin-left: 0;
  width: 100%;
}

.content { padding: 20px; margin-top: 20px; }

/* === BUTTONS === */
.btn-success { background: #28a745; border: none; }
.btn-success:hover { background: #218838; }

/* === DATATABLES === */
.table-responsive { width: 100%; overflow-x: auto; }
table.dataTable th, table.dataTable td { white-space: nowrap; }

/* === FORMS === */
.centered-form {
  max-width: 600px;
  margin: 0 auto 30px;
}
.category-form-wrapper,
.expense-form-wrapper {
  max-width: 600px;
  margin: 30px auto;
  background: #fff;
  border-radius: 10px;
  padding: 25px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* === DASHBOARD CARDS === */
.card {
  transition: 0.3s;
  min-height: 180px;
  border-radius: 12px;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.card a {
  color: #000;
  font-weight: 500;
}
.card a:hover {
  color: #28a745;
  text-decoration: none;
}
.dashboard-icon {
  font-size: 2.2rem;
}
canvas {
  border-radius: 12px;
  max-height: 100% !important;
}
.card-header h5 {
  font-size: 1.3rem;
  font-weight: 600;
}
.summary-text {
  font-size: 1rem;
  font-weight: 500;
}
.summary-number {
  font-size: 1.6rem;
  font-weight: bold;
}
.gradient-primary { background: linear-gradient(45deg,#1E3C72,#2A5298); }
.gradient-success { background: linear-gradient(45deg,#11998e,#38ef7d); }
.gradient-warning { background: linear-gradient(45deg,#f7971e,#ffd200); }
.gradient-info { background: linear-gradient(45deg,#36d1dc,#5b86e5); }
.gradient-secondary { background: linear-gradient(45deg,#757f9a,#d7dde8); }
.gradient-danger { background: linear-gradient(45deg,#c31432,#240b36); }
.text-white { color:#fff !important; }

/* === DASHBOARD CHARTS CONTAINER === */
.card {
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
  min-height: 160px;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.summary-icon {
  font-size: 2.2rem;
}
.summary-label {
  font-size: 1rem;
  opacity: 0.85;
}
.summary-number {
  font-size: 1.6rem;
  font-weight: bold;
}
.gradient-primary { background: linear-gradient(45deg,#1E3C72,#2A5298); color: #fff; }
.gradient-success { background: linear-gradient(45deg,#11998e,#38ef7d); color: #fff; }
.gradient-warning { background: linear-gradient(45deg,#f7971e,#ffd200); color: #fff; }
.gradient-info { background: linear-gradient(45deg,#36d1dc,#5b86e5); color: #fff; }
.gradient-secondary { background: linear-gradient(45deg,#757f9a,#d7dde8); color: #fff; }
.gradient-danger { background: linear-gradient(45deg,#dc3545,#e55d87); color: #fff; }

.dashboard-charts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.dashboard-charts .card {
  flex: 1 1 48%;
  height: 450px;
  display: flex;
  flex-direction: column;
}
.dashboard-charts canvas {
  width: 100% !important;
  height: 100% !important;
}
