body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f9;
}

/* Sidebar */
.sidebar {
  width: 250px;
  height: 100vh;
  background-color: #2393bc;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding-top: 1px;
  transition: transform 0.3s ease-in-out;
  z-index: 2000;
}
.sidebar h2 {
  text-align: center;
  font-size: 20px;
  background-color: #4ac1ed;
  color: white;
  margin-top: 40px;
}
.sidebar a {
  text-decoration: none;
  color: white;
  padding-left: 5px;
  display: flex;
  align-items: center;
  transition: background-color 0.3s;
  margin-left: 20px;
  padding-bottom: 10px;
}
.sidebar a, i {
  font-size: 15px;
}
.sidebar a:hover {
  background-color: #4d73a5;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 250px;
  right: 0;
  background-color: #4ac1ed;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 1000;
  transition: left 0.3s ease-in-out;
}
.navbarlogin {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #34A3A1;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 1000;
  transition: left 0.3s ease-in-out;
}
.navbarlogin .user-info a { color: white; }
.navbar .logo { font-size: 12px; font-weight: bold; }
.navbar a { color: white; }
.navbar .user-info img {
  width: 40px; height: 40px; border-radius: 50%;
  margin-right: 10px; cursor: pointer;
}
.navbar .user-info .dropdown {
  display: none; position: absolute; top: 50px; right: 0;
  background-color: white; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-radius: 5px; overflow: hidden; z-index: 1000;
}
.navbar .user-info .dropdown a {
  display: block; padding: 10px 20px; text-decoration: none;
  color: #34495e; transition: background-color 0.3s;
}
.navbar .user-info .dropdown a:hover { background-color: #f4f4f9; }
.navbar .user-info.active .dropdown { display: block; }

/* Main content */
.main-content {
  margin-left: 250px;
  margin-top: 50px;
  padding-left: 10px;
  transition: margin-left 0.3s ease-in-out;
}

/* Breadcrumb */
.breadcrumb {
  background-color: #f4f4f9;
  padding: 10px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 0.9em;
}
.breadcrumb a {
  text-decoration: none; color: #34495e; margin-right: 10px;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin-right: 10px; color: #888; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
  background-color: transparent;
}
.card {
  border-radius: 10px;
  padding: 15px;
  color: white;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:nth-child(1) { background: linear-gradient(135deg, #3498db, #2980b9); }
.card:nth-child(2) { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.card:nth-child(3) { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.card:nth-child(4) { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }
.card h3 { margin: 10px 0; font-size: 1.5em; }
.card p { font-size: 1em; opacity: 0.9; }

h2 { text-align: center; margin-bottom: 5px; color: #000000; }


/* Form */
form {
  margin-top: 20px;
  background: #e7e4ef;
  padding: 10px 10px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(250, 230, 230, 0.05);
  user-select: none;
  max-width: 300%;
}
form h3 {
  margin-top: 0; margin-bottom: 18px; font-weight: 700; font-size: 18px;
  color: var(--accent-2);
}
form label {
  display: block; font-weight: 600; margin-bottom: 6px; color: var(--muted);
  user-select: text;
}
form input, form select, form textarea {
  width: 100%;
  padding: 10px 10px;
  margin-bottom: 16px;
  border: none;
  border-left: 1px solid #858383;
  border-bottom: 1px solid #858383;
  background: #cfe2f3;
  outline: none;
  outline-offset: 2px;
  user-select: text;
  transition: border-color 0.25s ease;
}

/* Form view */
.form-view {
  width: 100%;
  padding: 10px 10px;
  margin-bottom: 5px;
  font-size: 15px;
  background: #faf9f9;
}
.form-view input, .form-view select {
  width: 100%;
  padding: 10px 20px;
  padding-left: 5px;
  border-right: 1.5px solid #b3ada9;
  border-top: 1px solid #e7cbaf;
  background: #f1f1f1;
  color: #000000;
  font-size: 12px;
}

/* Form filter */
.form-filter {
  width: 100%;
  padding: 10px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  background: #f3eeee;
}
.form-filter input, .form-filter select {
  width: 100%;
  padding: 10px 10px;
  padding-left: 20px;
  margin-right: 50%;
  border-right: 1.5px solid #b3ada9;
  border-top: 1px solid #e7cbaf;
  background: #f1f1f1;
  color: #000000;
  font-size: 12px;
}

/* Form grid */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 3px;
  width: 100%;
}
.form-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.form-row-sm {
  display: flex;
  float: right;
  gap: 1px;
  width: 100%;
  margin-bottom: 2px;
}
.form-col-sm {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 50%;
}
.form-col-sm input {
  font-size: medium;
  font-weight: bold;
  color: #e90404;
}

/* Form responsive */
@media (max-width: 768px) {
  .form-row { flex-direction: column; }
  .form-col { width: 100%; }
}
/* Mid-size laptops & Tablets */
@media (max-width: 1024px) {
  .form-col { flex: 1 1 48%; }
}

/* Inputs */
label {
  display: block;
  font-weight: bold;
  margin-bottom: 2px;
  color: #000000;
}
input, select, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
input:focus {
  border-color: #a7df41;
  outline: 2px;
  box-shadow: 0 0 5px rgba(115, 255, 0, 0.911);
}

/* Buttons */
button {
  padding: 5px;
  background-color: #250218;
  color: white;
  border: none;
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
  
}
.btn-danger {
  padding: 2px;
  background-color: #e90e0e;
  color: white;
  border: none;
  border-radius: 2px;
  font-size: 10px;
  cursor: pointer;
}
.btn-link {
  padding: 10px;
  color: #250218;
  border: 2px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  grid-column: span 3;
}
button:hover { background-color: #0056b3; }

/* Mobile sidebar/nav */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .navbar { left: 0; }
  .main-content { margin-left: 0; }
  .navbar .menu-toggle { display: block; cursor: pointer; }
  .navbar .menu-toggle span {
    display: block; width: 25px; height: 3px; background-color: white; margin: 5px 0;
  }
  .sidebar.active { transform: translateX(0); }
}

/* Alert */
.alert {
  padding: 20px;
  background-color: #19b640;
  color: white;
  margin: 2px auto;
  border-radius: 4px;
  width: 50%;
  position: relative;
  opacity: 1;
  transition: opacity 1s ease;
}

/* Form container */
.form-container {
  /* Set a responsive width */
  width: 100%; /* Adjust this percentage as needed */
  max-width: 1200px;
  background-color: #edf5e3;
  border-radius: 2px;
  box-shadow: 4px 4px 4px rgb(255, 253, 253);
  box-sizing: border-box; 
  padding: 25px; /* Add padding for better spacing */
  margin-top: 5px;  /*Adds a small margin on top/bottom and centers it horizontally */

}

.form-container form {
  margin-top: 20px;
  background: #ffffff;
  padding: 5px 5px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(250, 230, 230, 0.05);
  user-select: none;
  max-width: auto;
}

/* Table container */
.table-container {
  max-width: 100%;
  margin: 10px auto;
  overflow-x: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 5px; /* Waa la yareeyay */
  background: #f7f7f7;
}

.table-container form {
  margin-top: 20px;
  background: #e7e4ef;
  padding: 4px 4px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(250, 230, 230, 0.05);
  user-select: none;
  max-width: auto;
}

/* Wax ka beddelka th iyo td si loo yareeyo booska */
/* Miiska guud ahaan */
/* Miiska oo dhan si loo koobo */
table {
  width: 100%;
  border-collapse: collapse;
  padding: 0;
  margin: 0;
  background: #eeeeee;
}

/* Madaxa miiska (Header) */
th {
  padding: 5px 5px; /* Aad u yar */
  font-size: 12px;
  background: #267694; /* Midabka ka muuqda sawirkaaga */
  color: white;
  border: 1px solid #444;
  height: 15px; /* Dherer go'an oo gaaban */
}

/* Unugyada xogta (Table Data) */
td {
  width:5px;
  padding: 2px 2px;      /* Midka ugu muhiimsan: 2px oo kaliya kor iyo hoos */
  font-size: 12px;     /* Qoraal yar oo nidaamsan */
  line-height: 0.9;      /* Qoraalka isku soo dhoway weyn */
  border: 1px solid #444;
  vertical-align: middle; 
  height: 10px;          /* Waxaan ku khasbaynaa inuu yaraado dhererka godka */
}

/* Ka saar margin kasta oo ku jira sawirada/icons-ka gudaha td */
td img, td i, td svg {
  display: block;        /* Waxay ka saartaa booska hoose ee qoraalka */
  margin: auto;
  padding: 0;
  max-height: 10px;      /* Si aysan u kala bixin godka */
}

/* Safka miiska */
tbody tr {
  height: 2px;          /* Khasab ka dhig dhererka safka */
  width:5px;
}  

/* Pagination */
.pagination {
  margin-top: 10px;
  text-align: left;
}
.pagination select {
  padding: 5px;
  font-size: 14px;
  width: 70px;
  margin: 0 10px;
}
.pagination button {
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
}

/* Sorting arrows */
.ascending::after { content: " ↑"; }
.descending::after { content: " ↓"; }

/* Export button */
.export-button {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.export-button button {
  padding: 10px 20px;
  background-color: #3f87a6;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.modal { background: rgba(0,0,0,0.5); } /* Si uu bogga hoose u madoobaado */

/* -------- PRINT SETUP -------- */
@page {
    size: A5 landscape;
    margin: 10mm;
}

@media print {
    body * {
        visibility: hidden;
    }
    .print-area, .print-area * {
        visibility: visible;
    }
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
}

/* -------- RECEIPT STYLE -------- */
.receipt-box {
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    box-sizing: border-box;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt-header h2 {
    margin: 0;
    font-size: 18px;
}


/* PRINT SETTINGS */
@page {
    size: A5 landscape;
    margin: 10mm;
}

.receipt-wrapper {
    background:#fff;
    padding:20px;
    border-radius:6px;
}

.receipt-header {
    text-align:center;
    margin-bottom:15px;
}

.receipt-header h2 {
    margin:0;
}

.receipt-info {
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap:6px;
    font-size:13px;
    margin-bottom:15px;
}

.school-info {
    font-size: 13px;
    line-height: 1.5;
}

.receipt-info {
    font-size: 13px;
    margin-bottom: 10px;
}

.receipt-info strong {
    display: inline-block;
    width: 140px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.receipt-table th,
.receipt-table td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: left;
}

.receipt-table th {
    background-color: #27283B;
    color: #fff;
}

.receipt-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.total-box {
    font-weight: bold;
    font-size: 15px;
}

.receipt_content {
  text-align: left;
  border-bottom: 1px solid #0f0202;
}
.header h1 {
  text-align: center;
  font-size: 15px;
  margin-bottom: 0px;
  color: #000000;
}
.header p { font-size: 16px; }
.details { margin-bottom: 1px; }
.details table { width: 100%; border-collapse: collapse; }
.details table th, .details table td { padding: 2px; text-align: left; }
.details table th { font-weight: bold; }
.amount {
  text-align: right;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
}
.footer {
  text-align: center;
  font-size: 10px;
}

/* Print */
@media print {
  .print-btn { display: none; background-color: rgb(104, 68, 68); }
}

/* Status badges */
.paid { background-color: #1a8f02; color: #f8f2f2; }
.unpaid { background-color: #e45c67; color: #f8f2f2; }
.partial { background-color: #f3cc77; color: #242222; }
.Pending { background-color: #503804; color: #f8f2f2; }
.Canceled { background-color: #ec0b04; color: #f8f2f2; }
.Suspended { background-color: #eb1717; color: #f8f2f2; }

/* Login */
.loginbody {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  display: grid;
  /* display: flex; */
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0px auto;
}
.login-container {
  background-color: #eeeeee;
  padding: 2rem;
  border-radius: 0px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 100%;
  /* max-width: 800px; */
}
.login-container img{
  width:100px;
  border:none;
  justify-content: center;
  align-items: center;
  padding-left:35%;
}
.login-form h2 { text-align: center; margin-bottom: 1rem; }

.login-button {
  width: auto;
  padding: 0.8rem;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.login-button:hover { background-color: #0056b3; }
.signup-link { text-align: center; margin-top: 1rem; font-size: 0.9rem; }
.signup-link a { color: #007bff; text-decoration: none; }
.signup-link a:hover { text-decoration: underline; }

/* Carousel & sections */
.carousel-container {
  width: 100%;
  max-width: 600px;
  margin: auto;
  position: relative;
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 20px;
}
.carousel-slide { display: none; }
.carousel-slide.active { display: block; }
.carousel-nav { text-align: center; margin-top: 10px; }
.carousel-nav button {
  padding: 8px 16px; margin: 0 5px; background-color: #330033;
  color: white; border: none; cursor: pointer;
}
.carousel-nav button:hover { background-color: #660066; }
.section-buttons { display: flex; gap: 10px; margin-bottom: 15px; }
.section-buttons button {
  padding: 10px 20px; background-color: #330033; color: white;
  border: none; cursor: pointer; font-weight: bold;
}
.section-buttons button.active { background-color: #660066; }
.section-content {
  display: none; padding: 15px; border: 1px solid #ccc; background-color: #f9f9f9;
}
.section-content.active { display: block; }
.section-content p { margin: 5px 0; }

/* Preloader */

/* Demi loader-ka print receipt page kaliya */
/* Demi loader */
#preloader { display:none !important; }
body.is-loading { overflow:auto !important; }

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

.total-row th {
    font-size:14px;
}

.print-btn {
    margin-top:15px;
    text-align:center;
}

@media print {
    .print-btn { display:none; }
}



#preloader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #f1f1f1; z-index: 99999;
  display: flex; justify-content: center; align-items: center;
  transition: opacity 5s ease-out, visibility 0.5s;
  opacity: 1; visibility: visible;
}
body:not(.is-loading) #preloader { opacity: 0; visibility: hidden; }
.loader {
  border: 8px solid #ddd; border-top: 8px solid #7c4dff;
  border-radius: 50%; width: 60px; height: 60px;
  animation: spin 2s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* CSS-ka caadiga ah ee Header-ka */
.print-header-container {
  text-align: center;
  margin-bottom: 0px;
}

