:root {
  --sidebar-width: 80px;
  --sidebar-expanded-width: 312px;
}
/*@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');*/

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
}

.page-wrapper {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: hidden;
  position: relative;
}
.page-content {
  padding: 32px;
  position: relative;
  left: var(--sidebar-width);
  width: calc(100dvw - var(--sidebar-width));
  transition: none; /* Remove transition on initial load */
}
.page-content-user {
  width: 100%;
}
.page-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  padding:  35px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: var(--sidebar-width);
  transition: all 0.3s ease;
  background-color: #fff;
  z-index: 2;
}
.page-sidebar .nav-title, 
.page-sidebar .role {
  display: none !important; 
}

.page-sidebar .logo .small-name {
  display: inline-block;
}

.page-sidebar.open {
  width: var(--sidebar-expanded-width); 
}

.page-sidebar.open .nav-title, 
.page-sidebar.open .role {
  display: inline-block !important; 
}

.page-sidebar.open .logo img {
  display: block;
}

.page-sidebar.open .logo .small-name {
  display: none;
}

.sidebar-toggle {
  display: block;
  z-index: 999;
  width: 40px;
  height: 40px;
  transform: translate(-20px, 0px);
  transition: all 0.3s ease;
}

.page-sidebar.open .sidebar-toggle {
  left: var(--sidebar-expanded-width);
}

.page-sidebar.open .sidebar-toggle i {
  transform: rotate(180deg);
}

.page-sidebar.open + .page-content {
  left: var(--sidebar-expanded-width);
  width: calc(100dvw - var(--sidebar-expanded-width));
}

.menu-content {
  height: 100%; 
  padding: 52px 0 32px 0px;
  overflow-y: auto;
}
.bottom-menu-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.menu-content a:hover{
  background-color: #F1F5F9;
  border-radius: 6px;
}
.menu-content a,
.bottom-menu-content a {
  gap: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
}
.menu-content a img,
.bottom-menu-content a img {
  opacity: 0.7;
}
.menu-content a svg,
.bottom-menu-content a svg {
  opacity: 0.5;
}

.menu-content .nav-title,
.bottom-menu-content .nav-title {
  font-weight: 600;
  color: #374151;
  display: inline-block;
}
.menu-content a.active,
.bottom-menu-content a.active {
  border-radius: 6px;
  background-color: #F1F5F9;
}
.menu-content a.active img,
.bottom-menu-content a.active img {
  opacity: 1;
}
.menu-content a.active svg,
.bottom-menu-content a.active svg {
  opacity: 1;
}
.menu-content a.active .nav-title,
.bottom-menu-content a.active .nav-title {
  color: #1F2937;
}

.page-sidebar .logo .small-name {
  display: none;
}

.logo-trimmed {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

input:not([type="submit"]),
input[type="date"]:valid,
select:valid {
  color: #09090B !important;
}

input:not([type="submit"])::placeholder {
  opacity: 1;
  color: #A1A1AA !important;
}

input[type="date"]:not(:valid),
select:not(:valid) {
  color: #A1A1AA !important;
}

label {
  color: #4B5563 !important;
}

.fixed {
  transition: opacity 0.2s ease-in-out;
}

.bg-opacity-30 {
  opacity: 0.8;
}

/* Ensure the modal is above other content */
.z-50 {
  z-index: 50;
}

.cursor-pointer{
  cursor: pointer;
}


@media screen and (max-width: 768px) {
  .page-content {
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width)) !important;
    padding: 20px;
  }
  .page-sidebar {
    background-color: #fff;
    width: 80px; 
    z-index: 2;
  }
  .page-sidebar .nav-title, .page-sidebar .role {
    display: none !important; 
  } 
  .page-sidebar.open {
    width: 250px; 
  }
  .page-sidebar.open .nav-title, 
  .page-sidebar.open .role {
    display: inline-block !important; 
  }
  .page-sidebar .logo img {
    display: none;
  }
  .page-sidebar.open .logo img {
    display: block;
  }
  .page-sidebar .logo .small-name {
    display: inline-block
  }
  .page-sidebar.open .logo .small-name {
    display: none
  }
  .sidebar-toggle {
    display: block;
  }
  .page-sidebar.open .sidebar-toggle {
    left: 250px;
  }
  .page-sidebar.open .sidebar-toggle i {
    transform: rotate(180deg);
  }
}

  .pagination .active{
    background-color: #052f4a;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 13px;
  }
  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    font-weight: 600;
  }

.is-invalid {
  border: 1px solid red;
  border-radius: 6px;
}

.trash-icon{
  z-index: 10;
}

.remove-contacts{
  height: 30px;
  width: 30px;
  display: flex;
  justify-content: center;
}

.value-box{
  height: 100%;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  z-index: 1;
}
input[type="date"] {
  appearance: none; 
  -webkit-appearance: none;
  position: relative;
  padding-right: 2.5rem;
}

input[type="date"]::before {
  content: url("/assets/icons/calendar-568f241f.svg");
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0.5;
}

.page-content.enable-transitions {
  transition: all 0.3s ease;
}

.alert-red {
  border: 1px solid #fca5a5;
  background: #fef2f2;
  border-radius: 12px;
  padding: 12px 16px;
  color: #b91c1c;
  margin-bottom: 0.5rem;
}
.alert-blue {
  border: 1px solid #60a5fa;
  background: #f0f9ff;
  border-radius: 12px;
  padding: 12px 16px;
  color: #1d4ed8;
}
.alert-icon-red {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  color: #ef4444;
}
.alert-icon-blue {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  color: #3b82f6;
}

.client-display-image {
  width: 50px;
  height: 50px;
}

/* ===================== Global Search Overlay ===================== */
.gs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: gs-fade-in 120ms ease-out;
}

.gs-overlay.hidden {
  display: none;
}

@keyframes gs-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gs-panel {
  width: min(640px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25), 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  animation: gs-pop-in 140ms ease-out;
}

@keyframes gs-pop-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.gs-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #E4E7EC;
}

.gs-input-icon {
  color: #94A3B8;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.gs-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: #0F172A !important;
  background: transparent;
  padding: 0;
}

.gs-input::placeholder {
  color: #94A3B8 !important;
}

.gs-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.gs-notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #F1F5F9;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}

.gs-notes-toggle input {
  margin: 0;
  cursor: pointer;
  accent-color: #052f4a;
}

.gs-results {
  overflow-y: auto;
  padding: 4px 0;
  flex: 1;
}

.gs-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748B;
  padding: 10px 16px 6px;
}

.gs-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: #0F172A;
  cursor: pointer;
  border-left: 2px solid transparent;
}

.gs-result:hover,
.gs-result.is-active {
  background-color: #F1F5F9;
  border-left-color: #052f4a;
}

.gs-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F1F5F9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.gs-result.is-active .gs-icon {
  background: #052f4a;
  color: #ffffff;
}

.gs-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.gs-label {
  font-size: 14px;
  font-weight: 500;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-sublabel {
  font-size: 12px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-type-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: #E2E8F0;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.gs-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94A3B8;
  font-size: 13px;
}

.gs-empty.hidden {
  display: none;
}

.gs-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid #E4E7EC;
  background: #F8FAFC;
  font-size: 12px;
  color: #64748B;
  flex-wrap: wrap;
}

.gs-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gs-hint-right {
  margin-left: auto;
}

.gs-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid #CBD5E1;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #475569;
  line-height: 1;
}

@media screen and (max-width: 640px) {
  .gs-overlay {
    padding-top: 6vh;
  }
  .gs-footer {
    font-size: 11px;
    gap: 8px;
  }
  .gs-hint-right {
    display: none;
  }
}

/* Service centre form: force equal 50% columns for ID/Name and Phone/Email */
@media (min-width: 768px) {
  .service-centre-form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .service-centre-form-grid > .form-group {
    min-width: 0;
  }
}