/*--------------------------------------------------------------
# CSS Variables — Blue Theme
--------------------------------------------------------------*/
:root {
  scroll-behavior: smooth;

  /* Light Blue — Primary Palette */
  --lemon-primary:   #5DADE2;
  --lemon-secondary: #4A9FD4;
  --lemon-accent:    #2E86C1;
  --lemon-darker:    #1A6EA8;
  --lemon-light:     #7EC8F0;
  --lemon-text:      #0D2F4A;
  --lemon-border:    #5DADE2;
  --lemon-hover:     #6BBDE8;
  --lemon-bg:        #EBF5FB;
  --lemon-lighter:   #F4FAFF;

  /* Blue aliases */
  --blue-primary:    #87CEEB;
  --blue-dark:       #5DADE2;
  --blue-darker:     #2E86C1;
  --blue-light:      #AED6F1;
  --blue-lighter:    #D6EAF8;
  --blue-text:       #1A3A5C;
  --blue-border:     #5DADE2;
  --blue-bg:         #EBF5FB;

  /* Layout heights */
  --header-h:  60px;
  --navbar-h:  60px;
  --topbar-h:  120px;   /* header + navbar */
}

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
  font-family: 'Cairo', 'Almarai', sans-serif;
  background: #f4f8fe;
  color: #444;
  padding-top: var(--topbar-h);   /* push content below both bars */
}

h1, h2, h3, h4, h5, h6, .font-primary {
  font-family: 'Cairo', 'Almarai', sans-serif;
  color: rgb(13, 35, 58);
}

a       { color: #2E86C1; text-decoration: none; }
a:hover { color: #5DADE2; text-decoration: none; }

/*--------------------------------------------------------------
# Layout — Main
--------------------------------------------------------------*/
#main {
  width: 100%;
  min-height: calc(100vh - var(--topbar-h));
  padding: 0;
  margin-top: 0;               /* body padding-top already handles offset */
  transition: all 0.3s;
}

/* Main content area
   body padding-top already handles the offset.
   Do NOT set position:relative / z-index here —
   that would create a stacking context and trap navbar dropdowns. */
#main {
  width: 100%;
  min-height: calc(100vh - var(--topbar-h));
  padding: 0;
  margin-top: 0;
  transition: all 0.3s;
}

/* legacy class used in some templates */
#main.main {
  margin-top: 0 !important;
  padding: 0;
}

.main-content {
  width: 100%;
  background: #ffffff;
  min-height: calc(100vh - var(--topbar-h));
  /* no position/z-index — must not create a stacking context */
}

/*--------------------------------------------------------------
# Back to top
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 99999;
  background: var(--lemon-primary);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;
}
.back-to-top i      { font-size: 24px; color: #fff; line-height: 0; }
.back-to-top:hover  { background: var(--lemon-hover); color: #fff; }
.back-to-top.active { visibility: visible; opacity: 1; }

/*--------------------------------------------------------------
# Bootstrap Overrides
--------------------------------------------------------------*/
.dropdown-menu {
  border-radius: 4px;
  padding: 10px 0;
  animation-name: dropdown-animate;
  animation-duration: 0.2s;
  animation-fill-mode: both;
  border: 0;
  box-shadow: 0 5px 30px 0 rgba(29, 82, 140, 0.2);
}
.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer { text-align: center; font-size: 15px; padding: 10px 25px; font-family: 'Cairo', 'Almarai', sans-serif; }
.dropdown-menu .dropdown-footer a { color: #444; text-decoration: underline; }
.dropdown-menu .dropdown-footer a:hover { text-decoration: none; }
.dropdown-menu .dropdown-divider { color: #AED6F1; margin: 0; }
.dropdown-menu .dropdown-item    { font-size: 14px; padding: 10px 15px; transition: 0.3s; font-family: 'Cairo', 'Almarai', sans-serif; }
.dropdown-menu .dropdown-item i  { margin-right: 10px; font-size: 18px; line-height: 0; }
.dropdown-menu .dropdown-item:hover { background-color: var(--lemon-lighter); }

@media (min-width: 768px) {
  .dropdown-menu-arrow::before {
    content: "";
    width: 13px; height: 13px;
    background: #fff;
    position: absolute;
    top: -7px; right: 20px;
    transform: rotate(45deg);
    border-top: 1px solid #d4e9f7;
    border-left: 1px solid #d4e9f7;
  }
}

@keyframes dropdown-animate {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* Light Backgrounds */
.bg-primary-light   { background-color: #cfe2ff; border-color: #cfe2ff; }
.bg-secondary-light { background-color: #e2e3e5; border-color: #e2e3e5; }
.bg-success-light   { background-color: #d1e7dd; border-color: #d1e7dd; }
.bg-danger-light    { background-color: #f8d7da; border-color: #f8d7da; }
.bg-warning-light   { background-color: #fff3cd; border-color: #fff3cd; }
.bg-info-light      { background-color: #cff4fc; border-color: #cff4fc; }
.bg-dark-light      { background-color: #d3d3d4; border-color: #d3d3d4; }

/* Card */
.card {
  margin-bottom: 30px;
  border: none;
  border-radius: 5px;
  box-shadow: 0 0 30px rgba(29, 82, 140, 0.1);
}
.card-header, .card-footer {
  border-color: #ddeef8;
  background-color: #fff;
  color: #5a7fa3;
  padding: 15px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.card-title {
  padding: 20px 0 15px;
  font-size: 18px;
  font-weight: 500;
  color: #1A6EA8;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.card-title span { color: #7aaac8; font-size: 14px; font-weight: 400; }
.card-body       { padding: 0 20px 20px; font-family: 'Cairo', 'Almarai', sans-serif; }
.card-img-overlay { background-color: rgba(255,255,255,0.6); }

.alert-heading { font-weight: 500; font-size: 20px; font-family: 'Cairo', 'Almarai', sans-serif; }
.btn-close       { background-size: 25%; }
.btn-close:focus { outline: 0; box-shadow: none; }

/* Accordion */
.accordion-item { border: 1px solid #ddeef8; }
.accordion-button:focus { outline: 0; box-shadow: none; }
.accordion-button:not(.collapsed) { color: #1A6EA8; background-color: #f0f8ff; font-family: 'Cairo', 'Almarai', sans-serif; }
.accordion-flush .accordion-button { padding: 15px 0; background: none; border: 0; font-family: 'Cairo', 'Almarai', sans-serif; }
.accordion-flush .accordion-button:not(.collapsed) { box-shadow: none; color: var(--lemon-accent); }
.accordion-flush .accordion-body { padding: 0 0 15px; color: #3e4f6f; font-size: 15px; font-family: 'Cairo', 'Almarai', sans-serif; }

/* Breadcrumbs (Bootstrap component) */
.breadcrumb               { font-size: 14px; color: #7aaac8; font-weight: 600; font-family: 'Cairo', 'Almarai', sans-serif; }
.breadcrumb a             { color: #7aaac8; transition: 0.3s; }
.breadcrumb a:hover       { color: #2E86C1; }
.breadcrumb .breadcrumb-item::before { color: #7aaac8; }
.breadcrumb .active       { color: #2E86C1; font-weight: 600; }

/* Bordered Tabs */
.nav-tabs-bordered { border-bottom: 2px solid #ddeef8; }
.nav-tabs-bordered .nav-link { margin-bottom: -2px; border: none; color: #2c384e; font-family: 'Cairo', 'Almarai', sans-serif; }
.nav-tabs-bordered .nav-link:hover,
.nav-tabs-bordered .nav-link:focus { color: var(--lemon-accent); }
.nav-tabs-bordered .nav-link.active {
  background-color: #fff;
  color: var(--lemon-accent);
  border-bottom: 2px solid var(--lemon-accent);
}

/*--------------------------------------------------------------
# Page Title
--------------------------------------------------------------*/
.pagetitle        { margin-bottom: 10px; }
.pagetitle h1     { font-size: 24px; margin-bottom: 0; font-weight: 600; color: var(--lemon-text); font-family: 'Cairo', 'Almarai', sans-serif; }

/*--------------------------------------------------------------
# Header  (fixed, height = --header-h = 60px)
--------------------------------------------------------------*/
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1001;
  background: linear-gradient(135deg, var(--lemon-darker) 0%, var(--lemon-primary) 100%);
  box-shadow: 0 2px 15px rgba(26, 110, 168, 0.4);
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.logo { line-height: 1; }
.logo img  { max-height: 36px; margin-left: 8px; }
.logo span { font-size: 22px; font-weight: 700; color: white; font-family: 'Cairo', 'Almarai', sans-serif; }

.header-nav ul { list-style: none; margin: 0; padding: 0; }
.header-nav .nav-icon {
  font-size: 20px; color: rgba(255,255,255,0.9);
  margin-left: 18px; position: relative; cursor: pointer; transition: color 0.3s;
}
.header-nav .nav-icon:hover { color: white; }
.header-nav .nav-profile { color: rgba(255,255,255,0.9); }
.header-nav .nav-profile img { max-height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); }
.header-nav .nav-profile span { font-size: 14px; font-weight: 600; color: white; font-family: 'Cairo', 'Almarai', sans-serif; }
.header-nav .badge-number {
  position: absolute; inset: -2px -5px auto auto;
  font-weight: normal; font-size: 11px; padding: 2px 5px;
  background: #F44336; border-radius: 10px; color: white;
}
.header-nav .profile {
  min-width: 240px; padding-bottom: 0; top: 8px !important;
  background: white; border-radius: 8px;
}
.header-nav .profile .dropdown-header h6 { font-size: 17px; margin-bottom: 0; font-weight: 600; color: var(--lemon-darker); font-family: 'Cairo', 'Almarai', sans-serif; }
.header-nav .profile .dropdown-header span { font-size: 13px; color: #888; font-family: 'Cairo', 'Almarai', sans-serif; }
.header-nav .profile .dropdown-item { font-size: 14px; padding: 10px 15px; transition: 0.3s; font-family: 'Cairo', 'Almarai', sans-serif; }
.header-nav .profile .dropdown-item i { margin-left: 10px; font-size: 17px; color: var(--lemon-accent); }
.header-nav .profile .dropdown-item:hover { background-color: var(--lemon-lighter); color: var(--lemon-text); }
.header-nav .notifications { inset: 8px -15px auto auto !important; min-width: 320px; }
.header-nav .notifications .notification-item { display: flex; align-items: center; padding: 12px 15px; transition: 0.3s; }
.header-nav .notifications .notification-item i { margin: 0 5px 0 15px; font-size: 22px; }
.header-nav .notifications .notification-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 3px; font-family: 'Cairo', 'Almarai', sans-serif; }
.header-nav .notifications .notification-item p { font-size: 13px; margin-bottom: 2px; color: #919191; font-family: 'Cairo', 'Almarai', sans-serif; }
.header-nav .notifications .notification-item:hover { background-color: var(--lemon-lighter); }

/* ─── legacy navbar-custom (if used elsewhere) ─── */
.navbar-custom {
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 1000;
  background: white;
  box-shadow: 0 3px 12px rgba(26, 110, 168, 0.15);
  border-bottom: 3px solid var(--lemon-primary);
  display: flex; align-items: center; padding: 0 15px;
}
.navbar-custom .nav-item-custom > a {
  color: var(--lemon-text); font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 6px; transition: all 0.3s;
  display: flex; align-items: center; gap: 6px; text-decoration: none;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.navbar-custom .nav-item-custom > a:hover,
.navbar-custom .nav-item-custom > a.active { background: var(--lemon-bg); color: var(--lemon-darker); }
.navbar-custom .nav-item-custom > a i { color: var(--lemon-accent); font-size: 15px; }
.navbar-custom .dropdown-menu {
  border: 1px solid var(--lemon-border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(26, 110, 168, 0.15); min-width: 200px; margin-top: 5px;
}
.navbar-custom .dropdown-menu .dropdown-item { padding: 9px 18px; font-size: 14px; color: var(--lemon-text); font-family: 'Cairo', 'Almarai', sans-serif; }
.navbar-custom .dropdown-menu .dropdown-item:hover { background: var(--lemon-bg); color: var(--lemon-darker); }
.navbar-custom .dropdown-menu .dropdown-item i { color: var(--lemon-accent); margin-left: 8px; font-size: 14px; }

/*--------------------------------------------------------------
# Navbar  (main-navbar — Desktop, fixed below header)
--------------------------------------------------------------*/
.main-navbar {
  position: fixed;
  top: var(--header-h);        /* sits directly under the 60px header */
  right: 0; left: 0;
  height: var(--navbar-h);
  z-index: 1000;
  background: linear-gradient(135deg, #ffffff 0%, var(--lemon-bg) 100%);
  border-bottom: 2px solid var(--lemon-border);
  box-shadow: 0 3px 10px rgba(26, 110, 168, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  overflow: visible;           /* allow dropdowns to escape the bar */
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0; padding: 0;
  list-style: none;
  gap: 5px;
}

.nav-item { position: relative; height: 100%; }

.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 15px;
  color: var(--lemon-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  gap: 7px;
}
.nav-link i { font-size: 1.05rem; }
.nav-link:hover,
.nav-link:focus { background: rgba(93, 173, 226, 0.1); color: var(--lemon-accent); }
.nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lemon-primary), var(--lemon-accent));
}

/* navbar dropdown overrides (tighter than global) */
.main-navbar .dropdown-menu {
  border: 2px solid var(--lemon-border);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(26, 110, 168, 0.15);
  padding: 6px 0;
  min-width: 220px;
  z-index: 1050 !important;   /* must be above #main content */
  position: absolute;
}
.main-navbar .dropdown-item {
  padding: 9px 18px;
  color: var(--lemon-text);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s;
}
.main-navbar .dropdown-item:hover {
  background: rgba(93, 173, 226, 0.1);
  color: var(--lemon-accent);
  padding-right: 22px;
}
.main-navbar .dropdown-item i { color: var(--lemon-primary); width: 16px; }
.main-navbar .dropdown-divider { border-color: rgba(93, 173, 226, 0.25); margin: 4px 0; }

/*--------------------------------------------------------------
# Mobile nav toggle button
--------------------------------------------------------------*/
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: calc(var(--header-h) + 11px);   /* vertically centred in header gap */
  right: 15px;
  z-index: 1002;
  background: var(--lemon-primary);
  color: white;
  border: none;
  border-radius: 6px;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/*--------------------------------------------------------------
# Mobile navbar (full-width slide-down)
--------------------------------------------------------------*/
.mobile-navbar {
  display: none;
  position: fixed;
  top: var(--header-h);           /* just below the header; no navbar on mobile */
  right: 0; left: 0;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: white;
  border-bottom: 2px solid var(--lemon-border);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  z-index: 1001;
}
.mobile-navbar.active { display: block; }

.mobile-nav-menu  { flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.mobile-nav-item  { width: 100%; border-bottom: 1px solid #e8f4fc; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 18px;
  color: var(--lemon-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  background: none; border: none;
  width: 100%; text-align: right; gap: 10px;
}
.mobile-nav-link i { font-size: 1.05rem; margin-left: 8px; }
.mobile-nav-link.has-dropdown::after {
  content: '\f282';
  font-family: 'bootstrap-icons' !important;
  font-size: 0.95rem;
  transition: transform 0.3s ease;
}
.mobile-nav-link.has-dropdown.open::after { transform: rotate(180deg); }

.mobile-dropdown-menu { display: none; background: #f4faff; padding: 0; margin: 0; list-style: none; }
.mobile-dropdown-menu.show { display: block; }

.mobile-dropdown-item {
  display: flex; align-items: center;
  padding: 11px 38px;
  border-bottom: 1px solid #e8f4fc;
  color: var(--lemon-text);
  text-decoration: none;
  font-size: 0.88rem; gap: 9px;
  transition: background 0.2s;
}
.mobile-dropdown-item i { color: var(--lemon-primary); font-size: 0.95rem; }
.mobile-dropdown-item:hover { background: rgba(93, 173, 226, 0.08); }
.mobile-dropdown-divider { margin: 4px 18px; height: 1px; background: #d6eaf8; border: none; }

/*--------------------------------------------------------------
# Responsive breakpoints
--------------------------------------------------------------*/
/* Desktop: show main-navbar, hide mobile toggle + mobile navbar */
@media (min-width: 993px) {
  .main-navbar       { display: flex !important; }
  .mobile-nav-toggle { display: none !important; }
  .mobile-navbar     { display: none !important; }

  /* body already has padding-top: 120px (header + navbar) */
}

/* Tablet / Mobile: hide main-navbar, show toggle button */
@media (max-width: 992px) {
  .main-navbar        { display: none !important; }
  .mobile-nav-toggle  { display: flex; }

  /* On mobile there is NO second bar → only 60px offset needed */
  body { padding-top: var(--header-h); }

  #main {
    min-height: calc(100vh - var(--header-h));
  }
}

@media (max-width: 576px) {
  .mobile-nav-toggle  { top: calc(var(--header-h) + 13px); right: 10px; width: 34px; height: 34px; }
  .mobile-nav-link    { font-size: 0.88rem; padding: 0 14px; }
  .mobile-dropdown-item { padding: 10px 32px; font-size: 0.84rem; }
}

/*--------------------------------------------------------------
# Select2 Global Fixes
--------------------------------------------------------------*/
.select2-container           { width: 100% !important; z-index: 1051 !important; }
.select2-dropdown            { z-index: 1060 !important; }

.select2-container--default .select2-selection--single {
  height: 38px !important; border: 1px solid #ced4da !important; border-radius: 0.375rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px !important; color: #495057 !important; text-align: right;
  font-family: 'Cairo', 'Almarai', sans-serif !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px !important; }
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--lemon-primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(93, 173, 226, 0.25) !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--lemon-primary); }
.select2-results__option, .select2-search__field { font-family: 'Cairo', 'Almarai', sans-serif !important; }

.modal .select2-container { z-index: 1055 !important; }
.modal .select2-dropdown  { z-index: 1065 !important; }

/*--------------------------------------------------------------
# Shared Page Components
--------------------------------------------------------------*/

/* breadcrumbs section bar */
.breadcrumbs {
  background: linear-gradient(135deg, var(--lemon-darker) 0%, var(--lemon-primary) 100%);
  color: white;
  padding: 22px 30px;
  box-shadow: 0 4px 20px rgba(26, 110, 168, 0.3);
  position: relative;
}
.breadcrumbs::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #AED6F1, #5DADE2, #1A6EA8);
}
.breadcrumbs.blue {
  background: linear-gradient(135deg, var(--blue-darker) 0%, var(--blue-dark) 100%);
  box-shadow: 0 4px 20px rgba(46, 134, 193, 0.3);
}
.breadcrumbs.blue::before { background: linear-gradient(90deg, #AED6F1, #2196F3, #1565C0); }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

.page-title          { display: flex; align-items: center; gap: 15px; }
.page-title i        { font-size: 1.6rem; background: rgba(255,255,255,0.2); padding: 10px; border-radius: 10px; }
.page-title h2       { font-size: 1.8rem; font-weight: 700; margin: 0; color: white; font-family: 'Cairo', 'Almarai', sans-serif; }

.breadcrumb-btn {
  background: rgba(255,255,255,0.15); color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 22px; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(10px); font-family: 'Cairo', 'Almarai', sans-serif;
}
.breadcrumb-btn:hover { background: rgba(255,255,255,0.25); color: white; transform: translateY(-2px); text-decoration: none; }

/* Form Cards */
.form-card {
  background: white; border-radius: 15px; padding: 30px;
  box-shadow: 0 6px 25px rgba(26, 110, 168, 0.1);
  border: 1px solid var(--lemon-border);
  position: relative; overflow: visible; margin-bottom: 25px;
}
.form-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 5px; height: 100%;
  background: linear-gradient(to bottom, var(--lemon-primary), var(--lemon-accent));
  border-radius: 0 15px 15px 0;   /* clips to card corners without needing overflow:hidden */
}
.form-card.green::before { background: linear-gradient(to bottom, #4CAF50, #2E7D32); border-radius: 0 15px 15px 0; }
.form-card.blue { box-shadow: 0 6px 25px rgba(46,134,193,0.1); border-color: var(--blue-border); }
.form-card.blue::before { background: linear-gradient(to bottom, var(--blue-dark), var(--blue-darker)); border-radius: 0 15px 15px 0; }

.form-card h5 {
  color: var(--lemon-darker); font-size: 1.5rem; margin-bottom: 22px;
  padding-bottom: 14px; border-bottom: 2px solid var(--lemon-border);
  display: flex; align-items: center; gap: 12px; font-weight: 700;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.form-card h5 i { color: var(--lemon-primary); }
.form-card.blue h5 { color: var(--blue-darker); border-bottom-color: var(--blue-border); }
.form-card.blue h5 i { color: var(--blue-dark); }

/* info-box (invoice templates) */
.info-box {
  background: white; border-radius: 15px; padding: 28px;
  box-shadow: 0 6px 25px rgba(26, 110, 168, 0.1);
  border: 1px solid var(--lemon-border);
  position: relative; overflow: visible; margin-bottom: 25px;
}
.info-box::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 5px; height: 100%;
  background: linear-gradient(to bottom, var(--lemon-primary), var(--lemon-accent));
  border-radius: 0 15px 15px 0;
}

/* Field Labels */
.field-label {
  color: var(--lemon-text); font-weight: 600; margin-bottom: 8px;
  font-size: 14px; display: flex; align-items: center; gap: 8px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.field-label::before {
  content: ''; width: 4px; height: 16px; background: var(--lemon-primary);
  border-radius: 3px; display: inline-block; flex-shrink: 0;
}
.blue .field-label::before, .field-label.blue::before { background: var(--blue-dark); }

/* Total field */
.total-field {
  background: linear-gradient(135deg, var(--lemon-bg) 0%, #DAEAF7 100%) !important;
  border: 2px solid var(--lemon-border) !important; font-weight: 700 !important;
  color: var(--lemon-darker) !important; text-align: center;
  font-size: 1.1rem !important; font-family: 'Cairo', 'Almarai', sans-serif !important;
}
.total-field.blue {
  background: linear-gradient(135deg, var(--blue-bg) 0%, #DAEAF7 100%) !important;
  border-color: var(--blue-border) !important; color: var(--blue-darker) !important;
}

/* Page Table */
.page-table-wrapper { border-radius: 12px; border: 1px solid var(--lemon-border); overflow: hidden; box-shadow: 0 3px 12px rgba(0,0,0,0.05); }
.page-table-wrapper.blue { border-color: var(--blue-border); }
.page-table { margin-bottom: 0; }
.page-table thead th {
  background: linear-gradient(135deg, var(--lemon-darker) 0%, var(--lemon-accent) 100%);
  color: white; border: none; padding: 14px 12px;
  font-weight: 600; text-align: center; font-size: 14px; white-space: nowrap;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.page-table.blue thead th { background: linear-gradient(135deg, var(--blue-darker) 0%, var(--blue-dark) 100%); }
.page-table thead th:first-child { border-top-right-radius: 12px; }
.page-table thead th:last-child  { border-top-left-radius: 12px; }
.page-table tbody td {
  padding: 13px 12px; border-bottom: 1px solid #e8f4fc;
  text-align: center; vertical-align: middle; font-size: 14px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.page-table tbody tr:hover      { background-color: rgba(93, 173, 226, 0.06); }
.page-table.blue tbody tr:hover { background-color: rgba(135, 206, 235, 0.08); }
.page-table tbody tr:last-child td { border-bottom: none; }

/* Badges */
.badge-lemon {
  background: linear-gradient(135deg, var(--lemon-primary) 0%, var(--lemon-accent) 100%);
  color: white; padding: 5px 12px; border-radius: 18px;
  font-size: 13px; font-weight: 600; font-family: 'Cairo', 'Almarai', sans-serif;
}
.badge-blue {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-darker) 100%);
  color: white; padding: 5px 12px; border-radius: 18px;
  font-size: 13px; font-weight: 600; font-family: 'Cairo', 'Almarai', sans-serif;
}

/* Buttons */
.btn-lemon {
  background: linear-gradient(135deg, var(--lemon-primary) 0%, var(--lemon-accent) 100%);
  color: white; border: none; padding: 11px 26px; border-radius: 10px;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.btn-lemon:hover  { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(93,173,226,0.4); color: white; }
.btn-lemon.w-full { width: 100%; }

.btn-blue {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-darker) 100%);
  color: white; border: none; padding: 11px 26px; border-radius: 10px;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.btn-blue:hover  { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(46,134,193,0.4); color: white; }
.btn-blue.w-full { width: 100%; }

.btn-green {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  color: white; border: none; padding: 11px 36px; border-radius: 10px;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(76,175,80,0.4); color: white; }

.btn-delete {
  background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
  color: white; border: none; padding: 7px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.btn-delete:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(244,67,54,0.3); color: white; }

.btn-print {
  background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
  color: white; border: none; padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.btn-print:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(96,125,139,0.3); color: white; }

/* Aliases */
.btn-add {
  background: linear-gradient(135deg, var(--lemon-primary) 0%, var(--lemon-accent) 100%);
  color: white; border: none; padding: 11px 26px; border-radius: 10px;
  font-weight: 600; font-size: 15px; width: 100%; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.btn-add:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(93,173,226,0.4); color: white; }

.btn-save {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  color: white; border: none; padding: 11px 36px; border-radius: 10px;
  font-weight: 600; font-size: 15px; min-width: 200px; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(76,175,80,0.4); color: white; }

.search-btn {
  background: rgba(255,255,255,0.15); color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 22px; border-radius: 8px; font-weight: 600;
  text-decoration: none; transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(10px); font-family: 'Cairo', 'Almarai', sans-serif;
}
.search-btn:hover { background: rgba(255,255,255,0.25); color: white; transform: translateY(-2px); text-decoration: none; }

/* Total inputs */
#Gtot, #subTot, .input-total {
  background: linear-gradient(135deg, var(--lemon-bg) 0%, #DAEAF7 100%) !important;
  border: 2px solid var(--lemon-border) !important; font-weight: 700 !important;
  color: var(--lemon-darker) !important; text-align: center;
  font-size: 1.1rem !important; font-family: 'Cairo', 'Almarai', sans-serif !important;
}

/* Table inside cards / info-boxes */
.form-card .table thead th,
.info-box  .table thead th {
  background: linear-gradient(135deg, var(--lemon-darker) 0%, var(--lemon-accent) 100%);
  color: white; border: none; padding: 14px 12px; font-weight: 600;
  text-align: center; font-size: 14px; white-space: nowrap;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.form-card .table tbody td,
.info-box  .table tbody td {
  padding: 13px 12px; border-bottom: 1px solid #e8f4fc;
  text-align: center; vertical-align: middle; font-size: 14px;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
.form-card .table tbody tr:hover,
.info-box  .table tbody tr:hover { background-color: rgba(93,173,226,0.06); }
.form-card .table tbody tr:last-child td,
.info-box  .table tbody tr:last-child td { border-bottom: none; }
.form-card .table-responsive,
.info-box  .table-responsive {
  border-radius: 12px; border: 1px solid var(--lemon-border); overflow: hidden;
}

/* Alert messages */
.alert-message {
  position: fixed; top: 135px; left: 20px; z-index: 9999;
  min-width: 280px; border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  animation: slideInLeft 0.3s ease; padding: 13px 18px; font-weight: 500;
  font-family: 'Cairo', 'Almarai', sans-serif;
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/*--------------------------------------------------------------
# Contact section
--------------------------------------------------------------*/
.contact         { padding: 25px 20px; }
.contact section { padding: 25px 20px; }
section.contact  { padding: 25px 20px; }

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  padding: 20px 0; font-size: 14px; transition: all 0.3s;
  border-top: 1px solid rgba(93, 173, 226, 0.3); font-family: 'Cairo', 'Almarai', sans-serif;
}
.footer .copyright { text-align: center; color: var(--lemon-text); }
.footer .credits   { padding-top: 5px; text-align: center; font-size: 13px; color: var(--lemon-text); }
.footer .credits a { color: var(--lemon-accent); }
.footer .credits a:hover { color: var(--lemon-darker); }

/*--------------------------------------------------------------
# Dashboard
--------------------------------------------------------------*/
.dashboard .filter { position: absolute; right: 0; top: 15px; }
.dashboard .filter .icon { color: #7aaac8; padding-right: 20px; transition: 0.3s; font-size: 16px; }
.dashboard .filter .icon:hover { color: var(--lemon-primary); }
.dashboard .info-card    { padding-bottom: 10px; }
.dashboard .info-card h6 { font-size: 28px; color: var(--lemon-text); font-weight: 700; margin: 0; font-family: 'Cairo', 'Almarai', sans-serif; }
.dashboard .card-icon {
  font-size: 32px; line-height: 0; width: 64px; height: 64px;
  flex-shrink: 0; flex-grow: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px;
}
.dashboard .sales-card .card-icon     { color: var(--lemon-accent); background: var(--lemon-bg); }
.dashboard .revenue-card .card-icon   { color: #2eca6a; background: #e0f8e9; }
.dashboard .customers-card .card-icon { color: #ff771d; background: #ffecdf; }
.dashboard .warning-card .card-icon   { color: #FF9800; background: #FFF3E0; }
.dashboard .activity { font-size: 14px; }
.dashboard .activity .activity-item .activite-label { color: #888; position: relative; flex-shrink: 0; flex-grow: 0; min-width: 64px; }
.dashboard .activity .activity-item .activite-label::before { content: ""; position: absolute; right: -11px; width: 4px; top: 0; bottom: 0; background-color: var(--lemon-bg); }
.dashboard .activity .activity-item .activity-badge { margin-top: 3px; z-index: 1; font-size: 11px; line-height: 0; border-radius: 50%; flex-shrink: 0; border: 3px solid #fff; flex-grow: 0; }
.dashboard .activity .activity-item .activity-content { padding-left: 10px; padding-bottom: 20px; }
.dashboard .activity .activity-item:first-child .activite-label::before { top: 5px; }
.dashboard .activity .activity-item:last-child .activity-content { padding-bottom: 0; }
.dashboard .recent-sales        { font-size: 14px; }
.dashboard .recent-sales .table thead { background: var(--lemon-bg); }
.dashboard .recent-sales .table thead th { border: 0; font-family: 'Cairo', 'Almarai', sans-serif; }
.dashboard .top-selling         { font-size: 14px; }
.dashboard .top-selling .table thead { background: var(--lemon-bg); }
.dashboard .top-selling .table thead th { border: 0; font-family: 'Cairo', 'Almarai', sans-serif; }
.dashboard .top-selling .table tbody td { vertical-align: middle; font-family: 'Cairo', 'Almarai', sans-serif; }
.dashboard .top-selling img { border-radius: 5px; max-width: 60px; }

/*--------------------------------------------------------------
# Profile
--------------------------------------------------------------*/
.profile .profile-card img   { max-width: 120px; }
.profile .profile-card h2    { font-size: 24px; font-weight: 700; color: #2c384e; margin: 10px 0 0; font-family: 'Cairo', 'Almarai', sans-serif; }
.profile .profile-card h3    { font-size: 18px; font-family: 'Cairo', 'Almarai', sans-serif; }
.profile .profile-card .social-links a { font-size: 20px; display: inline-block; color: rgba(26,110,168,0.5); line-height: 0; margin-right: 10px; transition: 0.3s; }
.profile .profile-card .social-links a:hover { color: var(--lemon-darker); }
.profile .profile-overview .row   { margin-bottom: 20px; font-size: 15px; }
.profile .profile-overview .label { font-weight: 600; color: rgba(26,110,168,0.6); font-family: 'Cairo', 'Almarai', sans-serif; }
.profile .profile-edit label      { font-weight: 600; color: rgba(26,110,168,0.6); font-family: 'Cairo', 'Almarai', sans-serif; }
.profile .profile-edit img        { max-width: 120px; }

/*--------------------------------------------------------------
# Error 404
--------------------------------------------------------------*/
.error-404      { padding: 30px; }
.error-404 h1   { font-size: 180px; font-weight: 700; color: var(--lemon-primary); margin-bottom: 0; line-height: 150px; font-family: 'Cairo', 'Almarai', sans-serif; }
.error-404 h2   { font-size: 24px; font-weight: 700; color: var(--lemon-text); margin-bottom: 30px; font-family: 'Cairo', 'Almarai', sans-serif; }
.error-404 .btn { background: #2E86C1; color: #fff; padding: 8px 30px; font-family: 'Cairo', 'Almarai', sans-serif; }
.error-404 .btn:hover { background: #1A6EA8; }
@media (min-width: 992px) { .error-404 img { max-width: 50%; } }

/*--------------------------------------------------------------
# Responsive — page components
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .breadcrumbs    { padding: 18px 15px; }
  .page-title h2  { font-size: 1.4rem; }
  .form-card      { padding: 20px 15px; }
  .form-card h5   { font-size: 1.3rem; }
  .page-table     { min-width: 700px; }
  .btn-lemon, .btn-blue, .btn-green { font-size: 14px; padding: 10px 20px; width: 100%; }
  .breadcrumb-btn { width: 100%; justify-content: center; }
  .contact        { padding: 18px 12px; }
}

@media (max-width: 576px) {
  .page-title     { flex-direction: column; gap: 8px; text-align: center; }
  .page-title i   { font-size: 1.3rem; padding: 8px; }
  .page-title h2  { font-size: 1.2rem; }
}