/*============================================================
   ✨ Global Resets and Base Setup
============================================================ */

/* Consistent box-sizing for all elements */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Reset default margins and paddings for the whole page */
html, body {
    margin: 0;
    padding: 0;
    height: 100%; /* Full viewport height */
    font-family: Arial, sans-serif; /* Clean, readable font */
}

/* ============================================================
   ✨ Main Layout
   ============================================================ */

/* Layout for the body */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f9f9f9
}

/* Central flex container */
.container {
    display: flex;
    flex-direction: column;
    flex: 1; /* Grow and push footer down */
}


/*✨ Navbar (Primary Navigation Bar)
 ============================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #4165f6;
    color: white;
    padding: 10px 20px;
    z-index: 1000; /* Stay above all */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navbar Logo */
.navbar .logo {
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

/* Navbar Links Container */
.navbar ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Navbar Individual Link */
.navbar li {
    margin: 0 10px;
    padding: 0;
}

.navbar a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: white;
    transition: background-color 0.3s ease;
}

/* Hover effect for links */
.navbar li.active-green a,
.navbar a:hover {
    color: #bff939;
}

/* ✅ MOBILE OVERRIDE */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 0.01px 0.02px;
  }

  .logo-container {
    width: 100%;
    text-align: center;
    margin-bottom: 1px;
  }

  .navbar .logo img {
    height: 30px;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1px;
    padding: 0;
    margin: 0;
  }

  .nav-links li {
    font-size: 16px;
    white-space: nowrap;
    
  }

  .nav-links a {
    font-size: 13px;
    padding: 4px 6px;
    display: inline-block;
  }
  

}

/* ============================================================
   ✨ Secondary Navbar (Below Main Navbar)
   ============================================================ */

.secondary-navbar {
    position: fixed;
    top: 45px; /* Below main navbar */
    left: 0;
    right: 0;
    background-color: #3c3d3d;
    padding: 10px 0;
    z-index: 999;
    height: 40px;
    display: flex;
    align-items: center;
}

/* Container for secondary navbar links */
.secondary-navbar ul {
    display: flex;
    justify-content: center;
    width: 100%;
}

.secondary-navbar li {
    margin: 0 15px;
}

@media (max-width: 768px) {
  .secondary-navbar {
    top: 96px;                        /* Adjust if your main navbar changes height */
    height: 40px;
    padding: 0;
    background-color: #3c3d3d;
    overflow-x: auto;
  }

  .secondary-navbar ul {
    display: flex !important;        /* Force horizontal layout */
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    padding: 0 10px;
    padding-left: 0.1px;             /* Helps prevent first-item clipping */
    gap: 0.001px;                    /* Minimum spacing between items */
    margin: 0;
    scrollbar-width: none;
  }

  .secondary-navbar ul::-webkit-scrollbar {
    display: none;                   /* Hide scrollbar on mobile */
  }

  .secondary-navbar li {
    white-space: nowrap;
    font-size: 16px;
    font-weight: bold;
  }

  .secondary-navbar li:first-child {
    margin-left: 200px;              /* Push first item into view if it was hidden */
  }

  .secondary-navbar a {
    padding: 0.001px 0.001px;       /* Minimized padding for tight spacing */
    font-size: 10px;
    display: inline-block;
  }
}





/* ============================================================
   ✨ Third Navbar (Only for Students Section)
   ============================================================ */

.third-navbar {
    position: fixed;
    top: 85px; /* Below secondary navbar */
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    padding: 10px 0;
    z-index: 998;
    height: 40px;
    display: flex;
    align-items: center;
}

.third-navbar ul {
    display: flex;
    justify-content: center;
    width: 100%;
}

.third-navbar li {
    margin: 0 15px;
}

@media (max-width: 768px) {
  .third-navbar {
    top: 135px; /* 40px (primary) + 38px (secondary) */
    height: 38px;
    padding: 0;
    background-color: #f8f9fa;
    overflow-x: auto;
  }

  .third-navbar ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    padding: 0 10px;
    margin: 0;
    gap: 0.001px;
    scrollbar-width: none;
    position: relative;
  }

  .third-navbar ul::before {
    content: "";
    flex: 0 0 25px;   /* ✅ Pushes first item into view */
  }

  .third-navbar ul::-webkit-scrollbar {
    display: none;
  }

  .third-navbar li {
    white-space: nowrap;
    font-size: 16px;
    font-weight: bold;
  }

  .third-navbar li:first-child {
    margin-left: 80px;              /* Push first item into view if it was hidden */
  }


  .third-navbar a {
    padding: 0.001px 0.001px;
    font-size: 10px;
    display: inline-block;
  }
}



/* =====================================================================================================================================================
                                                                ✨ Main Content Areas
   ==================================================================================================================================================== */

/* General Page Content */
.content {
    flex: 1;
    padding: 20px;
    padding-top: 85px; /* Space for navbars */
    text-align: center;
    background-color: #f9f9f9;
    overflow-x: auto;

}

@media (max-width: 768px) {
  .content {
    padding-top: 130px; /* Enough room for all three bars */
  }
}

/* For pages with 2 navbars, smaller top padding */
.section-content.no-top-padding {
  padding-top: 25px; /* override */
}

/* ===== Universal page content wrapper ===== */
.section-content {
  flex: 1;
  padding: 20px;
  padding-top: 55px;                 /* room under navbars (desktop) */
  min-height: calc(100vh - 165px);   /* sticky footer spacing */
  text-align: center;
  background-color: #f9f9f9;
  margin-top: 15px; /* Keep this so the header isn't glued to navbar */
}

/* Reusable table spacing inside sections */
.section-content table {
  margin-bottom: 50px;
}

/* Page-specific subcontexts (keep if you need different spacing later) */
.view-page table {                   /* e.g., detail pages */
  margin-bottom: 10px;
}

/* ===== Mobile adjustments ===== */
@media (max-width: 768px) {
  .section-content {
    padding: 10px;
    padding-top: 130px;              /* room for stacked navbars on mobile */
    text-align: left;
  }

  .section-content table {
    width: 100%;
    font-size: 13px;
    display: block;                  /* allow horizontal scroll */
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 8px;
  }

  .section-content table th,
  .section-content table td {
    padding: 8px 10px;
    text-align: center;
    font-size: 12px;
  }

  /* smooth scrollbars hidden on common detail pages */
  .view-page table::-webkit-scrollbar {
    display: none;
  }
}



/* ============================================================
   ✨ Sticky Footer
   ============================================================ */

.footer {
    background-color: #4165f6;
    color: white;
    text-align: center;
    padding: 8px 0;
    width: 100%;
    margin-top: auto;
}

.footer p {
    margin: 0;
    padding: 0;
}

.footer a {
    color: #ff6f61;
    text-decoration: none;
}

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



/*---------------------------------------------------- hereo what changed register and login form ----------------------------------------------------*/
/* ------------------
📦 General Form Layout (Used for Login + Register)
------------------- */
/* Login Form Container */
.login-container {
    width: 100%;
    max-width: 400px; /* Set a maximum width for the form */
    margin: 50px auto; /* Center the form and add top margin */
    padding: 30px;
    background-color: #fff;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow for a modern look */
}

/* Form Title */
.login-container h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
    color: #4165f6; /* Matching header color */
}

/* Input Fields */
.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: #4165f6; /* Highlight with a blue color */
    outline: none; /* Remove the default focus outline */
}

/* Submit Button */
.login-container button[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: #4165f6;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.login-container button[type="submit"]:hover {
    background-color: #324ed3; /* Darker blue on hover */
}

/* Links */
.login-container .links {
    text-align: center;
    margin-top: 20px;
}

.login-container .links a {
    color: #4165f6;
    text-decoration: none;
    font-size: 16px;
}

.login-container .links a:hover {
    text-decoration: underline;
}

/* Register Form Container */
.register-container {
    width: 100%;
    max-width: 400px; /* Set a maximum width for the form */
    margin: 50px auto; /* Center the form and add top margin */
    padding: 30px;
    background-color: #fff;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow for a modern look */
}

/* Form Title */
.register-container h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
    color: #4165f6; /* Matching header color */
}

/* Input Fields */
.register-container input[type="text"],
.register-container input[type="password"] {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.register-container input[type="text"]:focus,
.register-container input[type="password"]:focus {
    border-color: #4165f6; /* Highlight with a blue color */
    outline: none; /* Remove the default focus outline */
}

/* Submit Button */
/* Register Button */
.btn-register {
    width: 100%;
    padding: 15px;
    background-color: #4165f6;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn-register:hover {
    background-color: #324ed3;
}

/* Cancel Button */
.btn-cancel {
    width: 100%;
    padding: 15px;
    background-color: #f02b3f;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn-cancel:hover {
    background-color: #d62233;
}


/* Links */
.register-container .links {
    text-align: center;
    margin-top: 20px;
}

.register-container .links a {
    color: #4165f6;
    text-decoration: none;
    font-size: 16px;
}

.register-container .links a:hover {
    text-decoration: underline;
}

.password-hint {
  font-size: 13px;
  color: #888;
  margin-top: 5px;
  display: block;
  text-align: left;
}


/* ------------------
📦 Navigation Bars
------------------- */

/* Secondary Navigation Bar */
.secondary-navbar,
.third-navbar {
    background-color: #3c3d3d; /* Default for secondary, override third below */
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
}

.third-navbar {
    background-color: #f8f9fa; /* Light background for third bar */
    padding: 10px 0;
}

.secondary-navbar ul,
.third-navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.secondary-navbar li,
.third-navbar li {
    margin: 0 20px;
}

.secondary-navbar a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: color 0.3s ease;
}

.third-navbar a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    transition: color 0.3s ease;
}

.secondary-navbar li.active-green a,
.secondary-navbar a:hover {
    color: #bff939;
}

.third-navbar li.active-red a,
.third-navbar a:hover {
    color: #fe0101;
}



/*  ----------------------------------------------------this section for custmsing tables ---------------------------------------------------------------*/
/* ===== Page header (title + action) ===== */
/* ===== Reusable App Table (clone of your personal-data-table style) ===== */
/* Table wrapper for optional scroll */
.table-wrapper {
  width: 100%;
}

/* Desktop table style */
.app-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  table-layout: auto; /* ✅ Let browser size columns naturally on desktop */
}

.app-table th,
.app-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-table thead th {
  background-color: #007bff;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
}

.app-table tbody tr:hover { background-color: #f1f1f1; }
.app-table tbody tr:nth-child(even) { background-color: #f9f9f9; }

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

.app-table td[title]:hover {
  white-space: normal;
  overflow: visible;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: auto;   /* ✅ Enable horizontal scroll */
    -webkit-overflow-scrolling: touch;
  }

  .app-table {
    table-layout: fixed; /* ✅ Only fixed layout on mobile for stability */
    min-width: 600px;    /* ✅ Force scroll when too narrow */
  }

  .app-table th,
  .app-table td {
    padding: 8px;
    font-size: 13px;
  }
}


/* --- ------------------------------------------------------List Page General Layout --------------------------------------------------------------*/
.wrapper {
    margin: 0 auto;
}

/* Page Title Styling */
h2 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

/* Header Container (desktop defaults) */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 0; /* space above, no gap before table */
}

/* Small top margin for tables to match school app feel */
.section-content .table-wrapper,
.section-content table {
    margin-top: 2px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .wrapper {
        padding: 0 10px; /* Optional: small side padding */
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 6px 0 10px; /* space above header, still close to table */
    }

    .header-container h2,
    h2 {
        font-size: 18px;
        text-align: left;
    }
}


/* ------ --------------------------------------------------customising Buttons -----------------------------------------------------------------------*/
/* =========================
   🔘 Global Buttons
   ========================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:5px;
  padding:8px 16px; border:none; border-radius:6px;
  font-size:15px;  line-height:1;
  cursor:pointer; text-decoration:none; white-space:nowrap;
  transition:filter .2s ease, background-color .2s ease, opacity .2s ease;
}
.btn i{ margin-right:6px; }
.btn:disabled,.btn.disabled{ opacity:.6; cursor:not-allowed; }

/* width helper for top-bar CTAs */
.btn-wide{ min-width:140px; padding-left:12px; padding-right:12px; height:34px; }
@media (max-width:480px){ .btn-wide{ min-width:auto; width:100%; } }

/* sizes */
.btn-sm{ padding:6px 10px; font-size:12px; border-radius:5px; }
.btn-lg{ padding:10px 18px; font-size:15px; }

/* variants (only colors change) */
.btn-add       { background:#28a745; color:#fff; }   /* green */
.btn-edit      { background:#ffc107; color:#000; }   /* amber */
.btn-save      { background:#4165f6; color:#fff; }   /* brand blue */
.btn-back       { background:#a0a2a7; color:#fff; }

/* sizes */
.btn-sm{ padding:6px 10px; font-size:12px; border-radius:5px; }
.btn-lg{ padding:10px 18px; font-size:15px; }

/* variants (only colors change) */
.btn-add       { background:#28a745; color:#fff; }   /* green */
.btn-edit      { background:#ffc107; color:#000; }   /* amber */
.btn-save      { background:#4165f6; color:#fff; }   /* brand blue */
.btn-back       { background:#a0a2a7; color:#fff; }
.btn-print       { background:#6e6f72; color:#fff; }
.btn-excel       { background:#2ddfe6; color:#fff; }
.btn-delete    { background:#dc3545; color:#fff; }   /* red */
.btn-view       { background:#2ba949; color:#fff; }
.btn-cancel    { background:#e02134; color:#fff; }
.btn-search    { background:#0d6efd; color:#fff; }   /* search button style */
.btn-whatsapp  { background:#25d366; color:#fff; }   /* social */
.btn-email     { background:#fbbd02; color:#000; }

.btn:hover{ filter:brightness(.95); }

/* =========================
   🔎 Search Bar + Actions Row
   ========================= */
.button-container{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}

.search-form{
  display:flex; align-items:center; gap:5px;
  /* make the whole unit same height as .btn */
  height:34px;
}

.search-form input[type="text"]{
  height:34px;                      /* matches .btn height */
  padding:0 12px;
  border:1px solid #d0d5dd;
  border-radius:6px;
  outline:none;
  width:210px;                      /* consistent input width */
  background:#fff;
}
.search-form input[type="text"]:focus{
  border-color:#4165f6;             /* brand focus color */
}

/* make the search submit look exactly like buttons */
.search-form button{
  height:34px;                      /* same height as input */
  padding:0 12px;
  border:none; border-radius:6px;
  background:#0d6efd; color:#fff;   /* same as .btn-search */
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  cursor:pointer; transition:filter .2s ease;
}
.search-form button:hover{ filter:brightness(.95); }

/* =========================
   📱 Mobile tweaks
   ========================= */
@media (max-width:768px){
  .button-container{ flex-direction:column; align-items:stretch; }

  .search-form{ width:100%; height:auto; gap:6px; }
  .search-form input[type="text"]{ width:100%; height:40px; }
  .search-form button{ width:100%; height:40px; }

  /* make top-bar CTAs full-width too */
  .button-container .btn{ width:100%; }
}





/* styling to flash messages */
/* ------------------------------ */
/* Flash Messages (Alerts)        */
/* ------------------------------ */
.alert {
    position: fixed;
    top: 135px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 1s;
}

/* Different Alert Types */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error,
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning,
.find-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ------------------------------ */
/* Table Title Styling            */
/* ------------------------------ */
.table-title {
    background-color: #f4f4f4;
    padding: 10px;
    border: 1px solid #ddd;
    border-bottom: none;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    border-radius: 4px 4px 0 0;
}



/* ---------------------------------------------------- styling drop down list to language switcher --------------------------------------------------- */
/*this for language switcher*/
.language-dropdown {
    position: relative;
    display: flex; /* behave like nav item */
    align-items: center;
    margin: 0 5px;
    height: 100%; /* match navbar height */
}

.language-dropdown-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;         /* ↓ reduce padding */
    font-size: 14px;          /* ↓ smaller font for mobile */
    height: 30px;             /* force consistent height */
    line-height: 1;           /* remove vertical stretching */
    border: none;             /* optional: remove borders in navbar */
    background: none;         /* optional: make it look like other links */
    color: white;             /* make icon and text white like links */
}


.language-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 4px;
    padding: 5px 0;
    margin-top: 2px;
}

.language-dropdown:hover .language-dropdown-menu {
    display: block;
}

.language-dropdown-menu a {
    color: #333;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    text-align: center; /* ✅ Center text inside each item */
}

.language-dropdown-menu a:hover {
    background-color: #f0f0f0;
}

@media (max-width: 768px) {
  .language-dropdown {
    margin-left: 0;
  }

  .language-dropdown-button {
    font-size: 12px;
    padding: 2px 5px;
    height: 20px;
  }

  .language-dropdown-menu {
    right: 0;
    left: auto;
  }
}



/* -------------------------------------------------------- Customising Pgination -----------------------------------------------------------------------*/
/* ========================= */
/* 📑 Pagination Styling     */
/* ========================= */

.pagination {
    margin-top: -35px;
    text-align: center;
}

.pagination a, 
.pagination span {
    margin: 0 5px;
    padding: 8px 18px;
    text-decoration: none;
    color: #4165f6;
    border: 1px solid #4165f6;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background-color: #4165f6;
    color: white;
}

.pagination .disabled {
    color: #888;
    border-color: #888;
    cursor: not-allowed;
}

.pagination .page-info {
    margin: 0 5px;
    font-size: 14px;
    color: #333;
}



/* ------------------------------------------------------------ styling error pages 404, 500  -----------------------------------------------------------*/
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    text-align: center;
    padding: 20px;
}

.error-container h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #e74c3c;
}

.error-container p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #555;
}

.error-container .btn {
    padding: 10px 20px;
    border-radius: 6px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.error-container .btn:hover {
    background-color: #2980b9;
}


/* -------------------------------------- This css styling for master form which works with All add/edit -----------------------------------------------*/
/* ✅ Master Form Container */
.master-form-container {
    max-width: 650px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* ✅ Form Title */
.master-form-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
}

/* ✅ Form Group */
.master-form-group {
    margin-bottom: 15px;
}

.master-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.master-form-group input,
.master-form-group select,
.master-form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

.master-form-group input:focus,
.master-form-group select:focus,
.master-form-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0px 0px 5px rgba(0, 123, 255, 0.5);
}

/* ✅ Buttons */
.master-form-buttons {
    display: flex;
    justify-content: flex-end; /* Aligns buttons to the right */
    gap: 10px; /* Adds space between buttons */
    margin-top: 15px; /* Adds spacing from the form */
}

.master-btn-save,
.master-btn-cancel {
    min-width: 120px; /* ✅ Same width for all buttons */
    text-align: center; /* ✅ Center the text */
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

/* Save Button */
.master-btn-save {
    background: #28a745;
    color: white;
}

.master-btn-save:hover {
    background: #218838;
}

/* Cancel Button */
.master-btn-cancel {
    background: #dc3545;
    color: white;
    text-decoration: none; /* Just in case it's a link */
}

.master-btn-cancel:hover {
    background: #c82333;
}


/* 🔍 Search Student Form */
.search-student-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
}

/* 📦 Input & Button Wrapper (Ensures Perfect Alignment) */
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 400px;
}

/* ✍ Student ID Input */
#student_id {
    flex-grow: 1;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    width: 100%;
}

/* 🔍 Find Button (Ensures Icon & Text Are Aligned) */
.master-btn-search {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center; /* ✅ Ensures Vertical Alignment */
    justify-content: center; /* ✅ Centers Content */
    gap: 6px; /* ✅ Space Between Icon & Text */
}

/* 🖱️ Hover Effect */
.master-btn-search:hover {
    background-color: #0056b3;
}

/* 🛠 Fix Icon Size */
.master-btn-search i {
    font-size: 18px;
}


/*-----------------------------------------------bbubles inside tables-------------------------------------------*/
/* =======================================================
   BUBBLES — GLOBAL, NON-INTRUSIVE (inherit table font)
   ======================================================= */
/* ====== CHIPS: base ====== */
.tb-badge{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:4px 12px; border-radius:999px; border:1px solid transparent;
  line-height:1; font:inherit; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:middle;
}
.u-ellipsis{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Company (fallback) */
.tb-badge.--company{ background:#eef6ff; color:#0b3a75; border-color:#d6e8ff; }

/* Neutral meta (zone/position, etc.) */
.tb-badge.--meta{ background:#f3f4f6; color:#374151; border-color:#e5e7eb; }

/* ====== STATUS & CONDITION: identical size + centered ====== */
/* Fixed pill size so 'good' = 'transferred' visually */
.tb-badge.--status,
.tb-badge.--cond{
  height:28px;                 /* fixed height */
  min-width:95px;              /* fixed visual width */
  max-width:95px;              /* keep identical */
  padding:0 12px;              /* vertical size controlled by height */
  font-weight:550;
  font-size: 14px;
  border-width:1px;
  justify-content:center; align-items:center; text-align:center;
}

/* Status colors */
.tb-badge.--status.status-waiting        { background:#f8fafc; color:#0f172a; border-color:#e5e7eb; }
.tb-badge.--status.status-parked         { background:#eef2ff; color:#3730a3; border-color:#c7d2fe; }
.tb-badge.--status.status-to-transfer    { background:#eff6ff; color:#1e3a8a; border-color:#bfdbfe; }
.tb-badge.--status.status-transferred    { background:#ecfdf5; color:#065f46; border-color:#bbf7d0; }
.tb-badge.--status.status-to-disposition { background:#fff7ed; color:#7c2d12; border-color:#fed7aa; }
.tb-badge.--status.status-disposed       { background:#fef2f2; color:#7f1d1d; border-color:#fecaca; }
.tb-badge.--status.status-change         { background:#f3fec6; color:#0f172a; border-color:#e2e8f0; }
.tb-badge.--status.status-repaired       { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.tb-badge.--status.status-complete       { background:#d9fbe5; color:#065f46; border-color:#a7f3c7; }
.tb-badge.--status.status-finished       { background:#d9fbe5; color:#065f46; border-color:#a7f3c7; }
.tb-badge.--status.status-in-progress    { background:#f3fec6; color:#0f172a; border-color:#e2e8f0; }

/* Condition colors */
.tb-badge.--cond.cond-good           { background:#d9fbe5; color:#065f46; border-color:#a7f3c7; }
.tb-badge.--cond.cond-damaged        { background:#fff7ed; color:#7c2d12; border-color:#fed7aa; }
.tb-badge.--cond.cond-very-damaged   { background:#fef2f2; color:#7f1d1d; border-color:#fecaca; }
.tb-badge.--cond.cond-repaired       { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.tb-badge.--cond.cond-unknown        { background:#f3f4f6; color:#374151; border-color:#e5e7eb; }


/* ====== TYPE (20 / 40 / 45) distinct colors ====== */
.tb-badge.--type{ font-weight:700; height:28px; min-width:62px; max-width:62px; padding:0 10px; }
.tb-badge.--type.type-20{ background:#eff3e9; color:#818c3c; border-color:#bbf7d0; }
.tb-badge.--type.type-40{ background:#e6f0ff; color:#1e3a8a; border-color:#bfdbfe; } /* blue */
.tb-badge.--type.type-45{ background:#f5e8ff; color:#5b21b6; border-color:#e9d5ff; } /* purple */

/* ====== Vessel (light blue bg, darker blue text) ====== */
.tb-badge.--vessel{ background:#e6f0ff; color:#1e3a8a; border-color:#bfdbfe;}

/* ====== Company color mapping (unchanged palette) ====== */
.tb-company[data-company="evergreen" i]{ background:#d9fbe5; color:#065f46; border-color:#a7f3c7; }
.tb-company[data-company="one" i],
.tb-company[data-company="oneline" i],
.tb-company[data-company="ocean network express" i]{ background:#fde7f3; color:#9d174d; border-color:#f9a8d4; }
.tb-company[data-company="hmm" i]{ background:#fee2e2; color:#7f1d1d; border-color:#fecaca; }
.tb-company[data-company="sealead" i]{ background:#e6f0ff; color:#1e3a8a; border-color:#bfdbfe; }
.tb-company[data-company="akkon" i],
.tb-company[data-company="akkon lines" i]{ background:#efe3d6; color:#6b3f1d; border-color:#e0c7ab; }
.tb-company[data-company="sarjak cl yellow" i]{ background:#fff3c4; color:#7c2d12; border-color:#fde68a; }
.tb-company[data-company="sarjak cl blue" i]{ background:#1d4ed8; color:#ffffff; border-color:#1e40af; }
.tb-company[data-company="sarjak cl" i]{ background:#fff3c4; color:#7c2d12; border-color:#fde68a; }
.tb-company[data-company="mohill international shipping" i],
.tb-company[data-company="mohill" i]{ background:#0b2447; color:#ffffff; border-color:#0a1d3a; }
.tb-company[data-company="maersk" i]{ background:#d6f6fb; color:#0f766e; border-color:#99f0f7; }
.tb-company[data-company="cma" i],
.tb-company[data-company="cma cgm" i]{ background:#e5edff; color:#1e3a8a; border-color:#c7d2fe; }
.tb-company[data-company="msc" i]{ background:#ffe7a3; color:#1f2937; border-color:#facc15; }
.tb-company[data-company="cosco" i],
.tb-company[data-company="cosco shipping" i]{ background:#e0ebff; color:#1e3a8a; border-color:#bcd2ff; }

/* ====== Keep rows from growing: actions never wrap ====== */
.table-actions{ display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:nowrap; }
.tb-btn{ height:30px; display:inline-flex; align-items:center; justify-content:center; padding:0 10px; }







/* ===== Table Action Buttons (non-intrusive) ===== */
/* Container inside the Actions <td> */
.table-actions{
  display:inline-flex;           /* inline so cell height stays compact */
  align-items:center;
  gap:6px;
  white-space:nowrap;            /* prevent wrapping that makes rows taller */
  vertical-align:middle;
}

/* Base button — inherits your table font/size */
.tb-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:30px;                   /* fixed height keeps row height stable */
  padding:0 10px;                /* no vertical padding */
  border-radius:8px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  text-decoration:none;
  cursor:pointer;
  line-height:1;                 /* avoid extra vertical space */
  vertical-align:middle;
  font:inherit;                  /* inherit your table font/size */
  white-space:nowrap;
}
.tb-btn i{ font-size:14px; line-height:1; }

/* Sizes (optional) */
.tb-btn--sm{ height:32px; padding:0 12px; }
.tb-btn--xs{ height:26px; padding:0 8px; }

/* Icon-only (square) */
.tb-btn--icon{ width:30px; height:30px; padding:0; }
.tb-btn--icon i{ font-size:13px; }

/* Variants (keep it subtle to match your UI) */
.tb-btn--primary{ background:#28a745; color:#fff; }
.tb-btn--ghost{ background:transparent; }

/* States */
.tb-btn:hover{ filter:brightness(0.98); }
.tb-btn--primary:hover{ background:#06b134; }
.tb-btn:disabled,
.tb-btn.disabled{ opacity:.55; cursor:default; }

/* Focus (keyboard) */
.tb-btn:focus-visible{
  outline:2px solid #2563eb; outline-offset:1px;
  border-color:#2563eb;
}

/* Mobile: allow compact icon-only if you decide to hide labels */
@media (max-width:720px){
  .table-actions{ gap:4px; }
  .tb-btn--mobile-icononly .label{ display:none; }
  .tb-btn--mobile-icononly{ width:30px; padding:0; }
}









/* =======================================================
   TYPE (20 / 40 / 45) + VESSEL
   ======================================================= */

/* Stronger type look (use: <span class="tb-badge --type type-20">20</span>) */
.tb-badge.--type{ font-weight:700; }

.tb-badge.--type.type-40{ background:#e8f1ff; color:#1e3a8a; border-color:#bfdbfe; }
.tb-badge.--type.type-45{ background:#f5e8ff; color:#5b21b6; border-color:#e9d5ff; }

/* Small neutral style (optional): use with --meta is-sm + type-XX */
.tb-badge.--meta.type-20{ background:#eefdf0; color:#166534; border-color:#bbf7d0; }
.tb-badge.--meta.type-40{ background:#eef5ff; color:#1e3a8a; border-color:#bfdbfe; }
.tb-badge.--meta.type-45{ background:#f7efff; color:#5b21b6; border-color:#e9d5ff; }

/* Vessel bubble — light blue */
.tb-badge.--vessel{ background:#e4efff; color:#4c60f5; border-color:#dbeafe; }




/* =======================================================================================================================================
                               this styling is for thefinancel  dahsbored and analtics so treat it carefullly
  =============================================================================== ======================================================= */





/* Dashboard Header */
.dashboard-header {
    text-align: center;
    margin: 5px 0;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-top: 30px;
    margin-bottom: -10px;
    
}

.dashboard-header .dashboard-subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* Dashboard Cards */
.dashboard-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-icon {
    font-size: 2rem;
    color: #7c4dff; /* Purple */
    margin-bottom: 15px;
}

.card-content h2 {
    font-size: 2rem;
    color: #333;
    margin: 10px 0;
}

.card-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    
}

.card-percentage {
    margin: 10px 0;
}

.card-percentage .percentage {
    font-size: 1.2rem;
    font-weight: bold;
    color: #7c4dff; /* Purple */
}

.card-percentage span {
    margin: 0 7px; /* Adds horizontal space between percentages */
}

.card-percentage-pocket {
    margin: 25px 0;
}

.card-percentage-pocket .percentage {
    font-size: 1.2rem;
    font-weight: bold;
    color: #7c4dff; /* Purple */
}

.card-percentage-pocket span {
    margin: 0 3px; /* Adds horizontal space between percentages */


}

.category-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.category-line:last-child {
    border-bottom: none; /* Remove border for the last line */
}

.category-line span{
    margin: 0 4px; /* Adds horizontal space between percentages */
}

.category-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    flex: 1; /* Allow the name to take up space */
}

.category-value {
    font-size: 1.1rem;
    color: #28a745; /* Green for revenue */
    margin: 0 10px;
    font-weight: bold;
}

.category-percentage {
    font-size: 1.1rem;
    color:#7c4dff; /* Purple */
    font-weight: bold;
}


.card-details {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.detail-paid {
    color: #28a745; /* Green */
}

.detail-rest {
    color: #ffc107; /* Yellow */
}

.detail-lost {
    color: #e4066e; /* Yellow #f44e9b*/
    
}

/* Update pocket Icon Styling */
.update-pocket-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #666; /* Light gray color */
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.update-pocket-icon:hover {
    color: #333; /* Darker color on hover */
}


/* Charts Section 1 */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0px;
}

/* Charts Section 2 */
.charts-section-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chart-header {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
}

/* Existing Headers */
.revenue-header {
    background: linear-gradient(135deg, #4caf50, #b9dabb); /* Green */
}

.expense-header {
    background: linear-gradient(135deg, #7c4dff, #ccb3fb); /* Purple */
}

.courses-header {
    background: linear-gradient(135deg, #9c27b0, #dfabe7); /* Glossy Purple */
}

/* New Chart Headers */
.transactions-header {
    background: linear-gradient(135deg, #ec407a, #f6b6cb); /* Glossy Pink/Red */
}

.age-header {
    background: linear-gradient(135deg, #bbb155, #fff8c6); /* Glossy yellow-gold */
}

.pins-header {
    background: linear-gradient(135deg, #0471cb, #bad6ed); /* Glossy Blue */
}

.chart-header i {
    font-size: 1.5rem;
}

.chart-body {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

canvas {
    max-width: 100%;
    max-height: 100%;
}

/* this styling to transactions dounet with lables on extreeme left  */
/* Wrapper for legend + chart */
.donut-flex-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

/* Legend box tight to the left side of the card */
.legend-column.tight-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  min-width: 160px;

  /* ALIGNMENT TWEAKS */
  padding-left: 0;
  margin-left: -6px; /* Pull closer to card edge */
  align-items: flex-start;
}

/* Icon before each legend item */
.legend-column span::before {
  content: " ";
  margin-right: 0px;
}



/* Thin Horizontal Card */
.thin-horizontal-card {
    width: 100%;
    background: #bbb155; /* Semi-transparent white */
    backdrop-filter: blur(10px); /* Blur effect */
    border-radius: 10px; /* Rounded corners */
    padding: 15px 20px; /* Padding inside the card */
    margin-bottom: 0px; /* Space below the card */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 0px;
    
}

.thin-horizontal-card:hover {
    transform: translateY(-3px); /* Lift on hover */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
}

/* Thin Card Content */
.thin-card-content {
    display: flex;
    justify-content: space-between; /* Distribute items evenly */
    align-items: center;
    width: 100%;
    gap: 18px; /* Space between items */
}

/* Thin Card Item */
.thin-card-item {
    text-align: center;
    flex: 1; /* Allow items to grow and take equal space */
    min-width: 0; /* Prevent flex items from overflowing */
}

/* Thin Card Label */
.thin-card-label {
    font-size: 1rem;
    color: #020202; /* Light gray for labels */
    margin-bottom: 5px; /* Space between label and value */
}

/* Thin Card Value */
.thin-card-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fefefe; /* Purple for values */
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .thin-card-content {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }

  .thin-card-item {
    flex: 0 0 30%; /* 3 items per row with spacing */
    text-align: center;
    padding: 6px 0;
  }

  .thin-card-label {
    font-size: 0.85rem;
  }

  .thin-card-value {
    font-size: 1rem;
  }
}

/* Divider between items on mobile */
@media (max-width: 768px) {
  .thin-card-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px;
  }
}



/* Second Thin Card (Partner Details) #c5e9f7fe #bbd17ffe*/
.partner-thin-card {
    background: linear-gradient(
            to right,
            #e6f0ff 0%,
            #f9fbff 65%,
            #e6f0ff 100%
        );

    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 0px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-thin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}


/* Partner Card Content */
.partner-card-content {
    display: flex;
    justify-content: space-between; /* Distribute partners evenly */
    align-items: flex-start; /* Align items to the top */
    gap: 20px; /* Larger spacing between partners */
}

/* Partner Card Item */
.partner-card-item {
    display: flex;
    flex-direction: column; /* Stack name/value and payment details vertically */
    gap: 8px; /* Small spacing between name/value and payment details */
}

/* Partner Info (Name and Value) */
.partner-info {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between label and value */
}


/* Partner Payment (Paid and Rest) */
.partner-payment {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between paid and rest */
}

/* Partner Label */
.partner-label {
    font-size: 1rem;
    color: #666; /* Light gray for labels */
}

/* Partner Value */
.partner-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #7c4dff; /* Purple for values */
}

/* Payment Label */
.payment-label {
    font-size: 0.9rem; /* Smaller font size */
    color: #666; /* Light gray for labels */
}

/* Payment Value */
.payment-value {
    font-size: 0.9rem; /* Smaller font size */
    font-weight: bold;
    color: #333; /* Dark gray for values */
}

@media (max-width: 768px) {
  .partner-card-content {
    flex-direction: column; /* Stack partners vertically */
    gap: 15px; /* Slightly smaller gap on mobile */
  }

  .partner-card-item {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  }

  .partner-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .partner-payment {
    justify-content: space-between;
    width: 100%;
    margin-top: 6px;
  }

  .partner-label {
    font-size: 0.9rem;
  }

  .partner-value {
    font-size: 1.1rem;
  }

  .payment-label,
  .payment-value {
    font-size: 0.85rem;
  }
}

/* --- Thin card: flexible row + divider (desktop) --- */
/* make the thin card wrap nicely */
.thin-card-content{
  display:flex;
  flex-wrap:wrap;            /* <— allow line break when needed */
  gap:12px 40px;             /* row gap, column gap */
  justify-content:flex-start;/* tighter, predictable spacing */
}

/* keep each item tight in width */
.thin-card-item{ flex:0 0 auto; }

/* visual separation after the Containers block */
.thin-card-item.containers-item{
  padding-right:16px;
  margin-right:10px;
  position:relative;
}
.thin-card-item.containers-item::after{
  content:"";
  position:absolute;
  right:0;
  top:4px;
  bottom:4px;
  width:1px;
  background:rgba(255,255,255,0.6);   /* matches thin card style */
}





    







 




























 











































    


































 











































    







