/*============================================================
   ✨ 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
   ============================================================ */

/* ---------- Global layout ---------- */
:root{
  --nav1: 45px;    /* main navbar height */
  --nav2: 40px;    /* secondary navbar height */
  --nav3: 0px;     /* third navbar height (0 on pages that don't use it) */
}

@media (max-width: 768px){
  :root{
    --nav1: 40px;
    --nav2: 40px;
    
  }
}

/* Make room for the fixed headers so content never sits under them */
body{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:#f9f9f9;
  padding-top: calc(var(--nav1) + var(--nav2) + var(--nav3));
}

/* container just fills the rest */
.container{
  display:flex;
  flex-direction:column;
  flex:1;
}

/* ---------- Primary navbar ---------- */
.navbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav1);
  background: #4165f6;
  color: #fff;
  padding: 6px 12px;
  z-index: 1000;

  display:flex; align-items:center; justify-content:space-between;
}
.navbar .logo{ font-size:22px; font-weight:700; color:#fff; text-decoration:none; }
.navbar ul{ display:flex; gap:10px; margin:0; padding:0; list-style:none; }
.navbar a{ color:#fff; text-decoration:none; padding:6px 8px; display:block; }
.navbar li.active-green a, .navbar a:hover{ color:#bff939; }

/* ---------- Secondary navbar ---------- */
.secondary-navbar{
  position: fixed;
  top: var(--nav1);
  left:0; right:0;
  height: var(--nav2);
  background:#3c3d3d;
  z-index: 999;

  display:flex; align-items:center;
}
.secondary-navbar ul{
  display:flex; gap:12px; margin:0; padding:0; list-style:none;
  justify-content:center; width:100%;
}
/* Mobile: horizontal scroll if needed */
@media (max-width: 768px){
  .secondary-navbar{
    overflow-x:auto;
  }
  .secondary-navbar ul{
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:4px;
    padding:0 10px;
    scrollbar-width:none;
  }
  .secondary-navbar ul::-webkit-scrollbar{ display:none; }
}





/* =====================================================================================================================================================
                                                                ✨ 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;
    }
}

/* -------------------- Page Header (Suppliers & Lists) -------------------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* ensures proper stacking on mobile */
  gap: 10px;
  margin: 45px 0 4px;
}

.page-header h2 {
  font-size: 22px;
  color: #333;
  margin: 0;
  font-weight: 700;
}

/* Right section (search + add button) */
.page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Searchbar styling */
.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.searchbar input {
  padding: 8px 10px;
  border: 2px solid #dbe2ee;
  border-radius: 8px;
  font-size: 14px;
  min-width: 220px;
  transition: border-color 0.2s ease-in-out;
}

.searchbar input:focus {
  border-color: #007bff;
  outline: none;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease-in-out;
}

.btn i {
  font-size: 14px;
}

.btn-add {
  background-color: #007bff;
  color: #fff;
}

.btn-add:hover {
  background-color: #0066d3;
  transform: translateY(-1px);
}

.btn-add:active {
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .page-header-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .searchbar input {
    width: 100%;
    min-width: unset;
  }

  .btn-add {
    width: 100%;
    justify-content: center;
  }
}

/* ------ --------------------------------------------------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%;
    right: 0;
    left: auto;

    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;
}



/* ===== 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; }
}





/* this stling for caculator page*/
/* Page wrapper */
/* ===== SUMMARY CARD (final result) ===== */
/* Base layout */
/* Base layout */
.mi-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 100px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #222;
}

.mi-page-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.mi-page-header h2 i {
  font-size: 1rem;
}
.mi-subtext {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
}

/* Cards / containers */
.mi-form-card,
.mi-summary-card,
.mi-products-card {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.04);
  margin-bottom: 24px;
  padding: 16px;
}

/* Summary (final result of whole trip) */
.mi-summary-card {
  border-left: 6px solid #555;
}
.mi-summary-card.good {
  border-left-color: #2ecc71;
}
.mi-summary-card.bad {
  border-left-color: #e74c3c;
}

.mi-summary-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 12px;
  align-items: flex-start;
}

.mi-summary-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
}
.mi-summary-value {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  color: #000;
  margin-top: 4px;
}
.mi-summary-margin {
  font-size: 0.85rem;
  color: #444;
  margin-top: 4px;
}
.mi-summary-verdict {
  font-size: 0.95rem;
  font-weight: 600;
  background: #000;
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 90px;
  text-align: center;
}

.mi-summary-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr));
  gap: 12px 16px;
}
.mi-sum-item {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}
.mi-sum-label {
  font-size: 0.7rem;
  color: #777;
  line-height: 1.2;
}
.mi-sum-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
  margin-top: 2px;
}


/* Form sections (Exchange rate, Travel, Cargo, Products, Customs) */
.mi-form-section {
  border: 1px solid #eee;
  background: #fcfcfc;
  border-radius: 12px;
  padding: 12px 12px 8px;
  margin-bottom: 24px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.02);
}
.mi-section-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  display: flex;
  align-items: center;
  column-gap: 8px;
}
.mi-section-head p {
  margin: 2px 0 16px 0;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.3;
}

/* Small compact inputs */
.compact-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #bbb;
  padding: 8px 10px;
  font-size: 0.8rem;
  background: #fff;
  outline: none;
  line-height: 1.2;
}
.compact-input:focus {
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

/* Grid for normal labeled inputs (customs block etc.) */
.mi-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr));
  gap: 16px;
  margin-bottom: 12px;
}
.mi-field.mi-span-2 {
  grid-column: span 2;
}
@media(max-width:600px){
  .mi-field.mi-span-2 { grid-column: span 1; }
}
.mi-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

/* Dual currency rows (travel, cargo) */
.mi-dual-row {
  border: 1px solid #eee;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);

  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
}
.mi-dual-label {
  flex: 0 0 150px;
  font-size: 0.8rem;
  font-weight: 600;
  color:#111;
  line-height:1.4;
}
.mi-dual-fields {
  flex:1;
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
}
.mi-dual-field {
  min-width:120px;
  flex:1;
  display:flex;
  flex-direction:column;
}
.mi-dual-hint {
  font-size:0.7rem;
  font-weight:500;
  color:#777;
  margin:0 0 4px;
  line-height:1.2;
}
@media(max-width:500px){
  .mi-dual-label {
    flex: 0 0 100%;
  }
  .mi-dual-fields {
    flex-direction:column;
  }
}

/* Products form wrapper */
.mi-products-form-wrapper {
  display: grid;
  gap: 16px;
}

/* One product block = inputs row + (after submit) stats row  */
.mi-product-block {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* First row: inputs side by side */
.mi-product-input-row {
  display: grid;
  grid-template-columns: minmax(140px,1fr) 110px 70px 140px;
  gap: 12px;
  align-items: flex-end;
}
@media(max-width:700px){
  .mi-product-input-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media(max-width:420px){
  .mi-product-input-row {
    grid-template-columns: 1fr;
  }
}

.mi-product-input-row label {
  display:block;
  font-size:0.7rem;
  font-weight:600;
  color:#333;
  margin-bottom:4px;
  line-height:1.2;
}

/* columns in product row */
.mi-pcol { display:flex; flex-direction:column; }
.name-col { min-width:140px; }
.small-col { min-width:110px; }
.tiny-col { min-width:70px; }

/* Second row: calculated chips */
.mi-product-stats-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
  border-top:1px solid #eee;
  padding-top:10px;
}
.mi-stat-chip {
  background:#fafafa;
  border:1px solid #eee;
  border-radius:10px;
  min-width:140px;
  padding:8px 10px;
  box-shadow:0 4px 12px rgba(0,0,0,0.02);
  flex:0 0 auto;
}
.mi-stat-label {
  font-size:0.65rem;
  font-weight:500;
  color:#777;
  line-height:1.2;
}
.mi-stat-value {
  font-size:0.8rem;
  font-weight:600;
  color:#111;
  line-height:1.3;
  margin-top:2px;
  white-space:nowrap;
}
.good-chip {
  border-color:#2ecc71;
  background:#ecfff5;
  color:#1e8d4a;
}
.bad-chip {
  border-color:#e74c3c;
  background:#fff5f4;
  color:#c0392b;
}

/* Submit button */
.mi-submit-wrap {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 4px;
}
.mi-submit-btn {
  background: #000;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 220px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 14px 24px rgba(0,0,0,0.18);
  transition: all .15s ease;
}
.mi-submit-btn i {
  font-size: 0.9rem;
}
.mi-submit-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 28px rgba(0,0,0,0.24);
}
.mi-submit-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Bottom spacer (so FAB doesn't overlap content) */
.mi-bottom-space {
  height: 80px;
}

/* WhatsApp floating button */
.wa-float-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #25D366;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  z-index: 9999;
}
.wa-float-btn i {
  font-size: 1.2rem;
  margin-right: 8px;
}
.wa-float-btn span {
  display: inline-block;
}















    







 
/* 🧩 Reduce the top gap below navbars on desktop */
@media (min-width: 992px) {
  body {
    padding-top: calc(var(--nav1) + var(--nav2) - 100px); /* tighten desktop space */
  }

  .container {
    margin-top: 10px; /* optional - smaller top gap for main content */
  }
}


/* 📱 Compact secondary navbar on mobile */
/* 📱 Force navbar icons + text inline and ultra-compact on phones */
/* 📱 Secondary navbar (gray) — compact, one-line items, scrollable */
@media (max-width: 600px) {
  .secondary-navbar{
    position: fixed;
    top: var(--nav1, 45px);   /* sits under the blue bar */
    height: 36px;             /* smaller */
    padding: 0 4px;
    display: flex;
    align-items: center;
    background: #3c3d3d;
    overflow-x: auto;         /* ⬅️ horizontal scroll on phone */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;    /* hide scrollbar (Firefox) */
  }
  .secondary-navbar::-webkit-scrollbar{ display:none; } /* hide scrollbar (WebKit) */

  .secondary-navbar ul{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;   /* keep items on one line */
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
    white-space: nowrap;            /* prevent wrapping icon/text */
  }

  .secondary-navbar li{ margin: 0; padding: 0; }

  .secondary-navbar a{
    display: inline-flex !important; /* icon + text same line */
    align-items: center;
    gap: 4px;                        /* tiny space between icon/text */
    padding: 4px 6px;
    font-size: 14px;                 /* small so everything fits */
    line-height: 1;
    color: #fff;
  }

  .secondary-navbar i,
  .secondary-navbar svg{
    font-size: 16px;                 /* compact icons */
    line-height: 1;
  }

  /* small offset so first item isn’t clipped on some phones */
  .secondary-navbar ul::before{ content:""; flex:0 0 6px; }

  /* if your layout uses vars for stacking, update the height */
  :root{ --nav2: 36px; }
}






    


































 











































    







