@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

/* CSS Variables - Green Theme */
:root {
  --poppins: 'Google Sans Flex', sans-serif;
  --lato: 'Google Sans Flex', sans-serif;

  --light: #f9f9f9;
  --blue: #2a90ea;
  --light-blue: #cdf6fc;
  --grey: #eee;
  --dark-grey: #aaaaaa;
  --dark: #342e37;
  --red: #db504a;
  --light-red: #ffddd8;
  --yellow: #ffce26;
  --light-yellow: #fff2c6;
  --orange: #fd7238;
  --light-orange: #ffe0d3;
  --green: #1d976c;
  --light-green: #a4f1c0;

  /* Primary color is green */
  --primary: #1d976c;
  --primary-light: #93f9b9;
  --success: #27ae60;
  --warning: #ffce26;
  --danger: #db504a;
  --info: #3498db;
}

/* Equal Height Two Columns */
.equal-columns {
  display: flex;
  gap: 24px;
}

.equal-columns>* {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.equal-columns .card {
  flex: 1;
}

@media (max-width: 768px) {
  .equal-columns {
    flex-direction: column;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}

html {
  overflow-x: hidden;
}

.text {
  color: var(--dark);
}

/* Dark Mode */
body.dark {
  --light: #222d31;
  --grey: #223130;
  --dark: #fbfbfb;
  --dark-grey: #a0a0a0;
  --light-blue: rgba(46, 172, 204, 0.15);
  --light-green: rgba(46, 204, 113, 0.15);
  --light-yellow: rgba(255, 206, 38, 0.15);
  --light-orange: rgba(253, 114, 56, 0.15);
  --light-red: rgba(219, 80, 74, 0.15);
}

body.dark .card,
body.dark .table-data>div,
body.dark .modal-box {
  background: #222d31;
}

body.dark input,
body.dark select,
body.dark textarea {
  background: #35464d;
  color: #fbfbfb;
  border-color: #2a2a4a;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus,
body.dark .form-control:focus {
  background: #35464d;
  color: #fbfbfb;
  border-color: var(--green);
}

body.dark input::placeholder {
  color: #888;
}

body.dark .text-grey {
  color: #a0a0a0;
}

body.dark .form-label {
  color: #fbfbfb;
}

body {
  background: var(--grey);
  color: var(--dark);
  overflow-x: hidden;
  font-family: var(--poppins);
}

/* ===== SIDEBAR ===== */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100%;
  background: var(--light);
  z-index: 2000;
  font-family: var(--lato);
  transition: 0.3s ease;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

#sidebar::-webkit-scrollbar {
  display: none;
}

#sidebar.hide {
  width: 60px;
}

#sidebar .brand {
  font-size: 20px;
  font-weight: 700;
  height: 56px;
  display: flex;
  align-items: center;
  color: var(--green);
  position: sticky;
  top: 0;
  left: 0;
  background: var(--light);
  z-index: 500;
  padding-bottom: 20px;
  box-sizing: content-box;
  padding-left: 10px;
}

#sidebar .brand .bx {
  min-width: 50px;
  display: flex;
  justify-content: center;
  font-size: 28px;
}

#sidebar .brand .brand-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 10px;
}

#sidebar .brand .text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 10px;
}

#sidebar.hide .brand .text {
  display: none;
}

#sidebar .side-menu {
  width: 100%;
  margin-top: 12px;
}

#sidebar .side-menu li {
  height: 48px;
  background: transparent;
  margin-left: 6px;
  border-radius: 48px 0 0 48px;
  padding: 4px;
}

#sidebar .side-menu li.active {
  background: var(--grey);
  position: relative;
}

#sidebar .side-menu li.active::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  top: -40px;
  right: 0;
  box-shadow: 20px 20px 0 var(--grey);
  z-index: -1;
}

#sidebar .side-menu li.active::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  bottom: -40px;
  right: 0;
  box-shadow: 20px -20px 0 var(--grey);
  z-index: -1;
}

#sidebar .side-menu li a {
  width: 100%;
  height: 100%;
  background: var(--light);
  display: flex;
  align-items: center;
  border-radius: 48px;
  font-size: 14px;
  color: var(--dark);
  white-space: nowrap;
  overflow-x: hidden;
}

#sidebar .side-menu.top li.active a {
  color: var(--green);
}

#sidebar.hide .side-menu li a {
  width: calc(48px - (4px * 2));
  transition: width 0.3s ease;
}

#sidebar .side-menu li a.logout {
  color: var(--red);
}

#sidebar .side-menu.top li a:hover {
  color: var(--green);
}

#sidebar .side-menu li a .bx {
  min-width: calc(60px - ((4px + 6px) * 2));
  display: flex;
  justify-content: center;
  font-size: 20px;
}

/* Sidebar Tooltip on Hover (when minimized) */
#sidebar .side-menu li a {
  position: relative;
}

/* Tooltip for minimized sidebar - using ::after pseudo-element */
#sidebar.hide .side-menu li a::before {
  content: attr(title);
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 14px;
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

#sidebar.hide .side-menu li a:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Hide bottom menu (logout) - it's in navbar profile dropdown */
#sidebar .side-menu.bottom {
  display: none;
}

/* Menu Labels */
#sidebar .menu-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--dark-grey);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 20px;
  margin-top: 30px;
  margin-bottom: 10px;
}

#sidebar.hide .menu-label {
  display: none;
}

/* Bottom menu positioning */
#sidebar .side-menu.bottom {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
}

/* ===== CONTENT ===== */
#content {
  position: relative;
  width: calc(100% - 260px);
  left: 260px;
  transition: 0.3s ease;
}

#sidebar.hide~#content {
  width: calc(100% - 60px);
  left: 60px;
}

/* ===== NAVBAR ===== */
#content nav {
  height: 56px;
  background: var(--light);
  padding: 0 24px;
  display: flex;
  align-items: center;
  grid-gap: 24px;
  font-family: var(--lato);
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
}

#content nav::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  bottom: -40px;
  left: 0;
  border-radius: 50%;
  box-shadow: -20px -20px 0 var(--light);
}

#content nav a {
  color: var(--dark);
}

#content nav .bx.bx-menu {
  cursor: pointer;
  color: var(--dark);
  font-size: 24px;
}

#content nav .nav-link {
  font-size: 16px;
  transition: 0.3s ease;
}

#content nav .nav-link:hover {
  color: var(--green);
}

#content nav form {
  max-width: 400px;
  width: 100%;
  margin-right: auto;
}

#content nav form .form-input {
  display: flex;
  align-items: center;
  height: 36px;
}

#content nav form .form-input input {
  flex-grow: 1;
  padding: 0 16px;
  height: 100%;
  border: none;
  background: var(--grey);
  border-radius: 36px 0 0 36px;
  outline: none;
  width: 100%;
  color: var(--dark);
  font-size: 14px;
}

#content nav form .form-input button {
  width: 36px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--green);
  color: var(--light);
  font-size: 18px;
  border: none;
  outline: none;
  border-radius: 0 36px 36px 0;
  cursor: pointer;
}

#content nav .notification {
  font-size: 20px;
  position: relative;
}

#content nav .notification .num {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--light);
  background: var(--red);
  color: var(--light);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Notification Dropdown */
#content nav .notification-menu {
  display: none;
  position: absolute;
  top: 56px;
  right: 80px;
  background: var(--light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  width: 280px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 9999;
  font-family: var(--lato);
}

#content nav .notification-menu ul {
  list-style: none;
  padding: 10px;
  margin: 0;
}

#content nav .notification-menu li {
  padding: 12px;
  border-bottom: 1px solid var(--grey);
  color: var(--dark);
  font-size: 14px;
}

#content nav .notification-menu li:hover {
  background-color: var(--light-green);
  color: var(--dark);
  border-radius: 8px;
}

#content nav .notification-menu li:last-child {
  border-bottom: none;
}

/* Profile */
#content nav .profile img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
}

#content nav .profile-menu {
  display: none;
  position: absolute;
  top: 56px;
  right: 24px;
  background: var(--light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  width: 200px;
  z-index: 9999;
  font-family: var(--lato);
}

#content nav .profile-menu ul {
  list-style: none;
  padding: 10px;
  margin: 0;
}

#content nav .profile-menu li {
  padding: 10px 12px;
  border-bottom: 1px solid var(--grey);
}

#content nav .profile-menu li:last-child {
  border-bottom: none;
}

#content nav .profile-menu li+li:hover {
  background-color: var(--light-green);
  border-radius: 8px;
}

#content nav .profile-menu li a {
  color: var(--dark);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#content nav .profile-menu li a .bx {
  font-size: 18px;
}

/* Active State for Menus */
#content nav .notification-menu.show,
#content nav .profile-menu.show {
  display: block;
}

/* Dark Mode Switch */
#content nav .switch-lm {
  background-color: var(--grey);
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px;
  position: relative;
  height: 26px;
  width: 50px;
}

#content nav .switch-lm .ball {
  background-color: var(--green);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  height: 20px;
  width: 20px;
  transform: translateX(0px);
  transition: transform 0.2s linear;
}

#content nav .checkbox:checked+.switch-lm .ball {
  transform: translateX(24px);
}

.bxs-moon {
  color: var(--yellow);
  font-size: 14px;
}

.bx-sun {
  color: var(--orange);
  font-size: 14px;
}

/* ===== MAIN CONTENT ===== */
#content main {
  width: 100%;
  padding: 36px 24px;
  font-family: var(--poppins);
  min-height: calc(100vh - 56px);
}

#content main .head-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-gap: 16px;
  flex-wrap: wrap;
}

#content main .head-title .left h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark);
}

#content main .head-title .left .breadcrumb {
  display: flex;
  align-items: center;
  grid-gap: 16px;
}

#content main .head-title .left .breadcrumb li {
  color: var(--dark);
  font-size: 14px;
}

#content main .head-title .left .breadcrumb li a {
  color: var(--dark-grey);
  pointer-events: none;
}

#content main .head-title .left .breadcrumb li a.active {
  color: var(--green);
  pointer-events: unset;
}

/* ===== BUTTONS ===== */
.btn {
  height: 40px;
  /* Slightly taller for better touch */
  padding: 0 20px;
  border-radius: 10px;
  /* Modern cleaner look than 36px pill */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  grid-gap: 8px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--poppins);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Primary: Main Action (Green) */
.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.btn-primary:hover {
  background: #147a55;
  /* Darker green */
  border-color: #147a55;
  box-shadow: 0 4px 12px rgba(29, 151, 108, 0.3);
}

/* Secondary: Alternative Action (Blue) */
.btn-secondary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.btn-secondary:hover {
  background: #1a7ac8;
  /* Darker blue */
  border-color: #1a7ac8;
  box-shadow: 0 4px 12px rgba(42, 144, 234, 0.3);
}

/* Success: Alias for Primary or specific success (Green) */
.btn-success {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Danger: Destructive (Red) */
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-danger:hover {
  background: #c0392b;
  /* Darker red */
  border-color: #c0392b;
  box-shadow: 0 4px 12px rgba(219, 80, 74, 0.3);
}

/* Warning: Alerts (Yellow) */
.btn-warning {
  background: var(--yellow);
  color: #333;
  /* Dark text on yellow */
  border-color: var(--yellow);
}

.btn-warning:hover {
  background: #f1c40f;
  border-color: #f1c40f;
}

/* Light/Tertiary: Cancel/Ghost (Grey) */
.btn-light,
.btn-tertiary {
  background: var(--grey);
  color: var(--dark);
  border-color: var(--grey);
}

.btn-light:hover,
.btn-tertiary:hover {
  background: #ddd;
  border-color: #ddd;
}

/* Outline Variants */
.btn-outline-primary {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

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

.btn-outline-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

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

/* Sizes */
.btn-small {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-large {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
  border-radius: 12px;
}

/* Full Width */
.btn-block {
  display: flex;
  width: 100%;
}

/* ===== BOX INFO (Stats Cards) ===== */
.box-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 24px;
  margin-top: 36px;
}

.box-info li {
  padding: 24px;
  background: var(--light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  grid-gap: 24px;
}

.box-info li .bx {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  font-size: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.box-info li:nth-child(1) .bx {
  background: var(--light-green);
  color: var(--green);
}

.box-info li:nth-child(2) .bx {
  background: var(--light-blue);
  color: var(--blue);
}

.box-info li:nth-child(3) .bx {
  background: var(--light-yellow);
  color: var(--yellow);
}

.box-info li:nth-child(4) .bx {
  background: var(--light-orange);
  color: var(--orange);
}

.box-info li .text h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark);
}

.box-info li .text p {
  color: var(--dark-grey);
  font-size: 14px;
}

/* ===== TABLES ===== */
.table-data {
  display: flex;
  flex-wrap: wrap;
  grid-gap: 24px;
  margin-top: 24px;
  width: 100%;
  color: var(--dark);
}

.table-data>div {
  border-radius: 20px;
  background: var(--light);
  padding: 24px;
  overflow-x: auto;
  flex: 1;
}

.table-data .head {
  display: flex;
  align-items: center;
  grid-gap: 16px;
  margin-bottom: 24px;
}

.table-data .head h3 {
  margin-right: auto;
  font-size: 20px;
  font-weight: 600;
}

.table-data .head .bx {
  cursor: pointer;
  font-size: 20px;
}

.table-data table {
  width: 100%;
  border-collapse: collapse;
}

.table-data table th {
  padding: 12px 10px;
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid var(--grey);
  color: var(--dark-grey);
  font-weight: 600;
  text-transform: uppercase;
}

.table-data table td {
  padding: 16px 10px;
  border-bottom: 1px solid var(--grey);
  font-size: 14px;
}

.table-data table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.table-data table td img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.table-data table tr td:first-child {
  display: flex;
  align-items: center;
  grid-gap: 12px;
  padding-left: 6px;
}

/* Status badges */
.status {
  font-size: 11px;
  padding: 6px 16px;
  color: var(--light);
  border-radius: 20px;
  font-weight: 700;
  display: inline-block;
}

.status.completed,
.status.lunas {
  background: var(--green);
}

.status.process,
.status.sebagian {
  background: var(--blue);
}

.status.pending,
.status.belum {
  background: var(--orange);
}

.status.success,
.status.aktif {
  background: var(--green);
}

.status.danger,
.status.nonaktif {
  background: var(--red);
}

.status.info {
  background: var(--info);
}

/* Transaction Type Colors */
.status.payment {
  background: var(--green);
  color: var(--light);
}

/* Light Green */
.status.deposit {
  background: var(--blue);
  color: var(--light);
}

/* Light Blue */
.status.withdrawal {
  background: var(--orange);
  color: var(--light);
}

/* Light Yellow */
.status.transfer {
  background: var(--yellow);
  color: var(--light);
}

/* Light Orange */
.status.discount {
  background: #e74c3c;
  color: var(--light);
}

/* Red for discounts */

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark);
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--grey);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--poppins);
  background: var(--light);
  color: var(--dark);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(60, 145, 230, 0.2);
}

.form-control::placeholder {
  color: var(--dark-grey);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* ===== MODALS ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: var(--light);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-box.large {
  max-width: 700px;
}

.modal-box.xlarge {
  max-width: 900px;
}

/* ===== FOOTER ===== */
.app-footer {
  position: relative;
  padding: 20px 24px;
  background: var(--light);
  text-align: center;
  font-size: 13px;
  color: var(--dark-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.app-footer::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  top: -40px;
  left: 0;
  border-radius: 50%;
  box-shadow: -20px 20px 0 var(--light);
}

.app-footer p {
  margin: 0;
}

.app-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.app-footer a:hover {
  text-decoration: underline;
}

/* Brand Logo Image */
#sidebar .brand .brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  margin-right: 10px;
  min-width: 36px;
}

/* Modal Table Styling */
.modal-box table {
  width: 100%;
  border-collapse: collapse;
}

.modal-box table th,
.modal-box table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--grey);
  text-align: left;
  font-size: 14px;
}

.modal-box table th {
  font-size: 13px;
  color: var(--dark-grey);
  font-weight: 600;
  text-transform: uppercase;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--grey);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}

.modal-header .close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grey);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--dark-grey);
  transition: all 0.2s ease;
}

.modal-header .close-btn:hover {
  background: var(--red);
  color: var(--light);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--grey);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--light);
  z-index: 10;
}

/* Modal Small Variant */
.modal-box.small {
  max-width: 400px;
}

/* ===== BUTTON GROUPS ===== */
.btn-group {
  display: flex;
  gap: 8px;
}

.btn-group .btn {
  flex: 1;
}

/* Method Selection Buttons */
.method-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.method-btn.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.method-btn:hover:not(.active) {
  background: var(--grey);
}

/* Confirmation Modal Specific */
.modal-confirm .modal-body p {
  margin-bottom: 8px;
}

.modal-confirm .modal-body p:last-child {
  margin-bottom: 0;
  color: var(--dark-grey);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== CARDS ===== */
.card {
  background: var(--light);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}

/* ===== CHECKBOX ===== */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--dark-grey);
}

.loading .bx {
  animation: spin 1s linear infinite;
  font-size: 24px;
  margin-right: 10px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--dark-grey);
}

.empty-state .bx {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 14px;
}

/* ===== NOTIFICATIONS/TOASTS ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

.toast.success {
  border-left: 4px solid var(--green);
}

.toast.error {
  border-left: 4px solid var(--red);
}

.toast.warning {
  border-left: 4px solid var(--yellow);
}

.toast.info {
  border-left: 4px solid var(--green);
}

.toast .bx {
  font-size: 24px;
}

.toast.success .bx {
  color: var(--green);
}

.toast.error .bx {
  color: var(--red);
}

.toast.warning .bx {
  color: var(--yellow);
}

.toast.info .bx {
  color: var(--green);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--grey);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.tabs .tab {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-grey);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
}

.tabs .tab:hover {
  color: var(--dark);
}

.tabs .tab.active {
  background: var(--light);
  color: var(--green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== SEARCH/FILTER BAR ===== */
.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-bar .search-input {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-bar .search-input input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--grey);
  border-radius: 10px;
  font-size: 14px;
  background: var(--light);
  color: var(--dark);
}

.search-bar .search-input .bx {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-grey);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.pagination button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--grey);
  background: var(--light);
  color: var(--dark);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.pagination button.active {
  background: var(--green);
  color: var(--light);
  border-color: var(--green);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
  #sidebar {
    width: 260px;
    transform: translateX(-260px);
  }

  #sidebar.show {
    transform: translateX(0);
  }

  #sidebar.hide {
    width: 260px;
    transform: translateX(-260px);
  }

  #content {
    width: 100%;
    left: 0;
  }

  #sidebar.hide~#content {
    width: 100%;
    left: 0;
  }

  #content nav .nav-link {
    display: none;
  }

  #content nav .notification-menu {
    right: 60px;
    width: 250px;
  }

  #content nav .profile-menu {
    right: 12px;
  }

  .box-info {
    grid-template-columns: 1fr;
  }

  #content main .head-title {
    flex-direction: column;
    align-items: flex-start;
  }

  #content main .head-title .left h1 {
    font-size: 24px;
  }
}

@media screen and (max-width: 576px) {
  #content nav form .form-input input {
    display: none;
  }

  #content nav form .form-input button {
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    color: var(--dark);
  }

  #content nav form.show .form-input input {
    display: block;
    width: 100%;
  }

  #content nav form.show .form-input button {
    width: 36px;
    height: 100%;
    border-radius: 0 36px 36px 0;
    color: var(--light);
    background: var(--green);
  }

  #content nav form.show~.notification,
  #content nav form.show~.switch-lm,
  #content nav form.show~.profile {
    display: none;
  }

  #content main {
    padding: 24px 16px;
  }

  .table-data .head {
    min-width: 100%;
    flex-wrap: wrap;
  }

  .btn {
    padding: 0 12px;
    font-size: 13px;
  }

  .modal-box {
    margin: 16px;
    max-height: calc(100vh - 32px);
  }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--green);
}

.text-success {
  color: var(--green);
}

.text-danger {
  color: var(--red);
}

.text-warning {
  color: var(--yellow);
}

.text-grey {
  color: var(--dark-grey);
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

.hidden {
  display: none !important;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s;
}

.modal.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.modal-content {
  background: var(--light);
  padding: 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  /* Ensure it's not hidden */
  display: block;
}

/* ===== COMPONENT SYSTEM ===== */

/* ===== GRID SYSTEM & CARDS (Bootstrap-like) ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -12px;
  margin-left: -12px;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

.col-md-6 {
  flex: 0 0 100%;
  max-width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

@media (min-width: 768px) {
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

.card {
  background: var(--light);
  border-radius: 20px;
  border: 1px solid rgba(29, 150, 108, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-body {
  padding: 24px;
  flex: 1 1 auto;
}

.border-0 {
  border: none !important;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.rounded-3 {
  border-radius: 12px !important;
}

.rounded-4 {
  border-radius: 20px !important;
}

.bg-primary-subtle {
  background-color: var(--light-green);
}

.bg-warning-subtle {
  background-color: var(--light-yellow);
}

.bg-danger-subtle {
  background-color: var(--light-red);
}


/* ===== UTILITY CLASSES (Bootstrap-like) ===== */
/* Spacing */
.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-auto {
  margin-top: auto !important;
}

.m-0 {
  margin: 0 !important;
}

.me-2 {
  margin-right: 0.5rem !important;
}

.p-2 {
  padding: 0.5rem !important;
}

.p-3 {
  padding: 1rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

/* Sizing */
.w-100 {
  width: 100% !important;
}

.h-100 {
  height: 100% !important;
}

/* Flexbox Layout */
.d-flex {
  display: flex !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.align-items-center {
  align-items: center !important;
}

.gap-3 {
  gap: 1rem !important;
}

/* Typography & Decorative */
.rounded-circle {
  border-radius: 50% !important;
}

.fw-bold {
  font-weight: 600 !important;
}

.fs-3 {
  font-size: 1.75rem !important;
}

.fs-5 {
  font-size: 1.25rem !important;
}

.text-white {
  color: #fff !important;
}

.text-dark {
  color: var(--dark) !important;
}

.text-secondary,
.text-muted {
  color: var(--dark-grey) !important;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--dark);
  background-color: var(--light);
  background-clip: padding-box;
  border: 1px solid var(--dark-grey);
  border-radius: 10px;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  font-family: var(--poppins);
}

.form-control:focus {
  color: var(--dark);
  background-color: var(--light);
  border-color: var(--green);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(29, 151, 108, 0.25);
}

.form-control:disabled {
  background-color: var(--grey); 
  opacity: 1;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  appearance: none;
}

/* --- Loading Overlay --- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Unique Pulsing Dots Loader */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loader-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
  animation-delay: 0s;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse-dot {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.loading-text {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.5px;
}


/* --- Modern Tabs --- */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--light);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--grey);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-grey);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: var(--light);
  color: var(--dark);
}

.tab-btn.active {
  background: var(--light-green);
  color: var(--dark);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode Overrides */
body.dark .tabs {
  background: var(--light);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ===== TRANSACTIONS PAGE ===== */
.tx-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .tx-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .tx-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .tx-summary-grid {
    grid-template-columns: 1fr;
  }
}

.tx-summary-card {
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
  background: var(--light);
  border: 1px solid rgba(29, 150, 108, 0.12);
}

.tx-summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(29, 150, 108, 0.12);
}

.tx-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  background: rgba(29, 150, 108, 0.1);
  color: var(--primary);
}

.tx-card-body {
  flex: 1;
  min-width: 0;
}

.tx-card-value {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dark);
}

.tx-card-label {
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
  color: var(--dark-grey);
}

.tx-card-count {
  font-size: 11px;
  margin-top: 4px;
  color: var(--dark-grey);
  opacity: 0.7;
}

.tx-table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tx-filter-group {
  margin: 0;
}

.tx-filter-select-period {
  width: 150px;
}

.tx-filter-select-type {
  width: 150px;
}

.tx-filter-date {
  width: 140px;
}

/* ===== DASHBOARD STATS CARDS ===== */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 1200px) {
  .dash-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-stats-grid .dash-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .dash-stats-grid .dash-card {
    padding: 14px 12px 10px;
    gap: 8px;
  }
  .dash-stats-grid .dash-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .dash-stats-grid .dash-card-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
    border-radius: 10px;
  }
  .dash-stats-grid .dash-card-value {
    font-size: 16px;
  }
  .dash-stats-grid .dash-card-label {
    font-size: 11px;
  }
  .dash-stats-grid .dash-card-sub {
    font-size: 10px;
    padding-top: 8px;
  }
}

.dash-card {
  border-radius: 18px;
  padding: 20px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s, box-shadow 0.15s;
  background: var(--light);
  border: 1px solid rgba(29, 150, 108, 0.12);
}

.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(29, 150, 108, 0.12);
}

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

.dash-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(29, 150, 108, 0.1);
  color: var(--primary);
}

.dash-card-info {
  flex: 1;
  min-width: 0;
}

.dash-card-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dark);
}

.dash-card-label {
  font-size: 12px;
  margin-top: 3px;
  color: var(--dark-grey);
  font-weight: 500;
}

.dash-card-sub {
  font-size: 12px;
  color: var(--dark-grey);
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid var(--grey);
  padding-top: 10px;
}

.dash-card-sub i {
  font-size: 14px;
  color: var(--primary);
}

.tx-operator-name {
  font-weight: 500;
  font-size: 13px;
}

.btn-icon-action {
  margin-right: 4px;
}

.tx-filter-action {
  align-self: flex-end;
}

/* ===== SAVINGS PAGE - CLASS SUMMARY TABLE ===== */
.summary-table {
    width: 100%;
    border-collapse: collapse;
}
.summary-table th {
    padding: 12px 10px;
    font-size: 13px;
    text-align: left;
    border-bottom: 1px solid var(--grey);
    color: var(--dark-grey);
    font-weight: 600;
    text-transform: uppercase;
}
.summary-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--grey);
    font-size: 14px;
    color: var(--dark);
}
.summary-table tbody tr:last-child td { border-bottom: none; }
.summary-table tbody tr:hover { background: rgba(0,0,0,0.02); }
.summary-table .text-right { text-align: right; }
.summary-table-total td {
    font-weight: 700;
    border-top: 2px solid var(--grey);
    border-bottom: none;
    background: rgba(29,150,108,0.04);
}

/* ===== SAVINGS PAGE - LAYOUT ===== */
.savings-card-form    { overflow: visible; }
.savings-form-class   { flex: 1; }
.savings-form-search  { flex: 2; position: relative; }
.savings-placeholder  { padding: 40px 0; }
.savings-placeholder i { font-size: 48px; }
.savings-right-col    { display: flex; flex-direction: column; gap: 12px; }
.savings-today-list   { max-height: 340px; overflow-y: auto; }
.savings-card-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.btn-full             { width: 100%; }

/* Today transactions list items */
.tx-history-item      { display: flex; align-items: center; gap: 15px; }
.tx-history-name      { flex: 2; min-width: 0; }
.tx-history-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-history-name small  { display: block; }
.tx-history-class     { flex: 1; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-history-amount    { flex: 1.5; text-align: right; flex-shrink: 0; }
.tx-icon              { flex-shrink: 0; }

/* ===== SAVINGS PAGE - COMPONENTS ===== */
.savings-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 24px;
    margin: 24px 24px 0 0;
}
@media (max-width: 1024px) {
    .savings-grid { grid-template-columns: 1fr; margin: 24px 0 0; }
}

.balance-card {
    background: var(--light);
    border: 1px solid rgba(29,150,108,0.15);
    border-radius: 16px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.balance-card:hover { box-shadow: 0 4px 16px rgba(29,150,108,0.1); }
.balance-card::before {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at top right, rgba(29,150,108,0.08), transparent 70%);
    border-radius: 0 16px 0 0;
    pointer-events: none;
}
.balance-card::after { display: none; }

.balance-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 4px;
}
.balance-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.balance-card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--dark-grey);
}
.balance-card-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}
.balance-card-name {
    font-size: 13px;
    color: var(--dark-grey);
    margin-bottom: 0;
}
.balance-card-reset {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--grey);
    background: transparent;
    color: var(--dark-grey);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.balance-card-reset:hover { background: var(--grey); color: var(--dark); }

.tx-type-btns { display: flex; gap: 12px; margin-bottom: 20px; }
.tx-type-btns button {
    flex: 1; padding: 12px; border-radius: 10px;
    border: 1px solid var(--grey); background: var(--light);
    cursor: pointer; transition: all 0.2s; font-weight: 600;
    color: var(--dark);
}
.tx-type-btns button.active-deposit  { border-color: var(--green);  background: var(--light-green);  color: var(--green); }
.tx-type-btns button.active-withdraw { border-color: var(--orange); background: var(--light-orange); color: var(--orange); }

.tx-history-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--grey); }
.tx-history-item:last-child { border-bottom: none; }

.tx-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tx-icon.deposit  { background: var(--light-green);  color: var(--green); }
.tx-icon.withdraw { background: var(--light-orange); color: var(--orange); }

.student-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--light); border: 1px solid var(--grey);
    border-radius: 10px; max-height: 200px; overflow-y: auto; z-index: 100; display: none;
}
.student-dropdown.show { display: block; }
.student-dropdown-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--grey); }
.student-dropdown-item:hover { background: var(--light-blue); }

/* ===== SAVINGS PAGE - DAY NAVIGATION ===== */
.savings-day-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.savings-day-nav h3 { flex: 1; text-align: center; font-size: 15px; }
.btn-icon { padding: 0 8px; min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.btn-icon:disabled { opacity: 0.35; cursor: not-allowed; }

/* ===== DOWNLOADS PAGE ===== */
.dl-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dl-label { font-size: 13px; }

.alert-info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 12px;
    border-radius: 10px;
    background: var(--light-yellow);
    color: var(--dark);
    border: 1px solid var(--yellow);
}
.alert-info-box i { font-size: 16px; color: var(--orange); flex-shrink: 0; }

.dl-modal-icon {
    width: 80px;
    height: 80px;
    background: var(--light-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: var(--yellow);
}
.dl-modal-title { font-weight: 700; color: var(--dark); margin-bottom: 12px; text-align: center; }
.dl-modal-desc  { color: var(--dark-grey); font-size: 14px; margin-bottom: 24px; text-align: center; }
.dl-modal-actions { display: flex; gap: 12px; }

/* Missing utility classes */
.bg-info-subtle    { background-color: var(--light-blue); }
.bg-success-subtle { background-color: var(--light-green); }
.text-info         { color: var(--info); }
.text-muted        { color: var(--dark-grey); }
.small             { font-size: 13px; }
.py-2              { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.btn-info          { background: var(--info); color: #fff; border: none; }
.btn-info:hover    { background: #2980b9; }

/* ===== SAVINGS - BALANCE PREVIEW ===== */
.balance-card-amount-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.balance-amount-muted {
    color: var(--dark-grey) !important;
    text-decoration: line-through;
    font-size: 20px !important;
}
.balance-preview {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.balance-preview.hidden { display: none; }
.balance-preview-sep {
    color: var(--dark-grey);
    font-size: 18px;
    font-weight: 300;
}
.balance-preview-value { font-weight: 700; font-size: 28px; }
.preview-deposit  .balance-preview-value { color: var(--primary); }
.preview-withdraw .balance-preview-value { color: var(--orange); }

/* ===== COMPONENT SYSTEM - CARDS ===== */
.card-primary {
    background: var(--light);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
    transition: all 0.3s ease;
}

.card-secondary {
    background: var(--light);
    border: 2px solid var(--grey);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-secondary:hover {
    border-color: var(--green);
    box-shadow: 0 4px 12px rgba(29, 151, 108, 0.15);
    transform: translateY(-1px);
}

.card-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(29, 151, 108, 0.2);
}

/* Dark mode support for cards */
body.dark .card-secondary {
    background: var(--light);
    border-color: #2a2a4a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark .card-secondary:hover {
    border-color: var(--green);
    box-shadow: 0 4px 12px rgba(29, 151, 108, 0.25);
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-header .logo-primary {
    margin-bottom: 16px;
    order: 1;
}

.card-header .title-primary {
    margin-bottom: 8px;
    order: 2;
    width: 100%;
    display: block !important;
    text-align: center !important;
    clear: both !important;
}

.card-header .subtitle-primary {
    margin-bottom: 0;
    order: 3;
    width: 100%;
    display: block !important;
    text-align: center !important;
    clear: both !important;
}

.card-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--grey);
    margin-top: 20px;
}

.card-footer p {
    font-size: 13px;
    color: var(--dark-grey);
    margin: 0;
}

/* ===== COMPONENT SYSTEM - LAYOUTS ===== */
.layout-center {
    background: var(--grey);
    font-family: var(--poppins);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.layout-container {
    max-width: 400px;
    width: 100%;
}

.layout-container-wide {
    max-width: 1000px;
    width: 100%;
}

.layout-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.layout-grid-item {
    flex: 0 0 280px;
    max-width: 280px;
    min-height: 140px;
}

/* ===== LOGIN SPLIT LAYOUT ===== */
.login-split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--light);
}

.login-split-left {
    flex: 0 0 65%;
    background-image: url('/public/assets/bg-login.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.login-split-right {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--light);
    overflow-y: auto;
}

.login-split-form {
    width: 100%;
    max-width: 400px;
}

/* Additional mobile spacing for form elements */
@media (max-width: 768px) {
    .login-split-form {
        max-width: 100%;
        padding: 0 8px; /* Extra internal padding for form */
    }
}

@media (max-width: 480px) {
    .login-split-form {
        padding: 0 4px; /* Slight internal padding */
    }
}

/* Dark mode support for split layout */
body.dark .login-split-right {
    background: var(--light);
}

/* Mobile Layout Override */
@media (max-width: 768px) {
    .login-split-container {
        flex-direction: column;
    }
    
    .login-split-left {
        flex: 0 0 40vh;
        min-height: 40vh;
    }
    
    .login-split-right {
        flex: 1;
        padding: 24px 24px; /* Increased horizontal padding for better spacing */
        min-height: 60vh;
    }
    
    .login-split-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-split-left {
        flex: 0 0 35vh;
        min-height: 35vh;
    }
    
    .login-split-right {
        padding: 20px 20px; /* Comfortable padding for small screens */
        min-height: 65vh;
    }
}

/* Extra small screens - still comfortable margins */
@media (max-width: 360px) {
    .login-split-right {
        padding: 16px 16px; /* Comfortable padding even on very small screens */
    }
}

/* ===== COMPONENT SYSTEM - ICONS ===== */
.icon-primary {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.icon-secondary {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grey);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.icon-secondary:hover {
    background: var(--green);
    color: white;
}

.icon-blue {
    background: var(--blue);
}

.logo-primary {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: block;
    object-fit: cover;
}

/* ===== COMPONENT SYSTEM - TYPOGRAPHY ===== */
.title-primary {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.2;
    display: block;
}

.title-secondary {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
    text-align: center;
    display: block;
}

.title-tertiary {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    display: block;
}

.subtitle-primary {
    color: var(--dark-grey);
    font-size: 14px;
    display: block;
    margin-bottom: 0;
}

.subtitle-secondary {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
    line-height: 1.3;
}

.subtitle-tertiary {
    font-size: 13px;
    color: var(--dark-grey);
    line-height: 1.3;
    margin: 0;
}

.subtitle-tertiary {
    font-size: 13px;
    color: var(--dark-grey);
    line-height: 1.3;
}

/* ===== COMPONENT SYSTEM - ALERTS ===== */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--red);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
}

.alert-error.show {
    display: flex;
}

.alert-error i {
    font-size: 16px;
}

.alert-success {
    background: var(--light-green);
    border: 1px solid rgba(29, 151, 108, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

/* ===== COMPONENT SYSTEM - SECTIONS ===== */
.section-primary {
    margin-bottom: 24px;
}

.section-view {
    display: none;
}

.section-view.active {
    display: block;
}

.section-view.hidden {
    display: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--grey);
}

.section-toggle {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--grey);
}

.section-toggle.show {
    display: block;
}

/* ===== COMPONENT SYSTEM - FORMS ===== */
.form-input-group {
    position: relative;
}

.form-input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-grey);
    cursor: pointer;
    padding: 4px;
}

/* ===== COMPONENT SYSTEM - SCANNER ===== */
.scanner-container {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--grey);
    border: 2px solid var(--green);
}

.scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border: 2px dashed var(--green);
    border-radius: 8px;
    animation: scannerPulse 2s ease-in-out infinite;
}

@keyframes scannerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.scanner-status {
    font-size: 14px;
    color: var(--dark-grey);
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: center;
}

.scanner-status.success {
    color: var(--green);
    font-weight: 600;
}

.scanner-status.error {
    color: var(--red);
    font-weight: 600;
}

.scanner-section {
    text-align: center;
    margin-bottom: 20px;
}

/* ===== COMPONENT SYSTEM - UTILITIES ===== */
.text-link {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

.text-link:hover {
    text-decoration: underline;
}

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

.flex-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flex-1 {
    flex: 1;
}

.cursor-pointer {
    cursor: pointer;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
    .layout-container,
    .layout-container-wide {
        padding: 24px 20px;
        margin: 10px;
        max-width: 95%;
    }
    
    .layout-grid {
        flex-direction: column;
        gap: 16px;
    }
    
    .layout-grid-item {
        flex: 1;
        max-width: none;
    }
    
    .scanner-container {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .card-primary {
        padding: 24px 20px;
        margin: 16px;
        max-width: calc(100vw - 32px);
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
/* ===== PAGE SPECIFIC - ACCESS SELECTION ===== */
.access-selection-container {
    max-width: 1000px;
}

.access-selection-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.access-welcome {
    font-weight: 600;
    color: var(--green);
}

.access-selection-grid .dash-card {
    flex: 0 0 280px;
    max-width: 280px;
    min-height: 140px;
}

.access-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.access-link:hover {
    text-decoration: none;
    color: inherit;
}

.access-no-access {
    text-align: center;
    padding: 40px 20px;
    color: var(--dark-grey);
}

.access-no-access i {
    font-size: 48px;
    color: var(--grey);
    margin-bottom: 16px;
}

.access-no-access h3 {
    color: var(--dark);
    margin-bottom: 8px;
}

/* ===== PAGE SPECIFIC - LOGIN ===== */
.login-student-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.login-student-number {
    font-size: 14px;
    color: var(--dark-grey);
}