/*
 * Barberaa Admin — Global Design System
 * ======================================
 * RULE: Never override Bootstrap 5 base classes (.row, .table, .form-control, etc.)
 * Only define custom component classes prefixed with project context.
 */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand — #002C73 is the primary color */
  --ba-primary:       #002C73;
  --ba-primary-hover: #001f52;
  --ba-primary-light: #E2EDFF;
  --ba-accent:        #FFD307;
  --ba-accent-hover:  #e6be06;
  --ba-blue:          #3480FC;
  --ba-green:         #22c55e;
  --ba-green-muted:   #dcfce7;
  --ba-red:           #ef4444;
  --ba-red-muted:     #fee2e2;
  --ba-orange:        #f97316;
  --ba-orange-muted:  #fff7ed;
  --ba-white:         #ffffff;
  --ba-gray-50:       #f8fafc;
  --ba-gray-100:      #f1f5f9;
  --ba-gray-200:      #e2e8f0;
  --ba-gray-300:      #cbd5e1;
  --ba-gray-400:      #94a3b8;
  --ba-gray-500:      #64748b;
  --ba-gray-600:      #475569;
  --ba-gray-700:      #334155;
  --ba-gray-800:      #1e293b;
  --ba-gray-900:      #0f172a;
  --ba-font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ba-radius-sm:     6px;
  --ba-radius:        8px;
  --ba-radius-lg:     12px;
  --ba-radius-xl:     16px;
  --ba-shadow-xs:     0 1px 2px rgba(0,0,0,0.05);
  --ba-shadow-sm:     0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --ba-shadow:        0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --ba-shadow-md:     0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --ba-shadow-lg:     0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --ba-transition:    all 0.2s ease;

  /* Override Bootstrap 5 primary color to #002C73 */
  --bs-primary: #002C73;
  --bs-primary-rgb: 0, 44, 115;
  --bs-link-color: #002C73;
  --bs-link-hover-color: #001f52;
}

/* Bootstrap .btn-primary override */
.btn-primary {
  --bs-btn-bg: #002C73;
  --bs-btn-border-color: #002C73;
  --bs-btn-hover-bg: #001f52;
  --bs-btn-hover-border-color: #001f52;
  --bs-btn-active-bg: #001a45;
  --bs-btn-active-border-color: #001a45;
  --bs-btn-disabled-bg: #002C73;
  --bs-btn-disabled-border-color: #002C73;
}

.btn-outline-primary {
  --bs-btn-color: #002C73;
  --bs-btn-border-color: #002C73;
  --bs-btn-hover-bg: #002C73;
  --bs-btn-hover-border-color: #002C73;
  --bs-btn-active-bg: #001f52;
  --bs-btn-active-border-color: #001f52;
}

/* Primary subtle backgrounds */
.bg-primary-subtle { background-color: var(--ba-primary-light) !important; }
.text-primary { color: var(--ba-primary) !important; }

/* Nav pills active state */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--ba-primary);
  color: var(--ba-white);
}
.nav-pills .nav-link {
  color: var(--ba-primary);
}


/* ---------- 2. TYPOGRAPHY ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

body {
  font-family: var(--ba-font);
  background-color: var(--ba-gray-50);
  color: var(--ba-gray-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ---------- 3. PAGE LOADER ---------- */
#loader-container {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(2px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}


/* ---------- 4. BOOTSTRAP BUTTON OVERRIDES ---------- */
/* Secondary button = #FFD307 gold with black text */
.btn-secondary {
  --bs-btn-bg: #FFD307;
  --bs-btn-border-color: #FFD307;
  --bs-btn-color: #000;
  --bs-btn-hover-bg: #e6be06;
  --bs-btn-hover-border-color: #e6be06;
  --bs-btn-hover-color: #000;
  --bs-btn-active-bg: #d4ad05;
  --bs-btn-active-border-color: #d4ad05;
  --bs-btn-active-color: #000;
  --bs-btn-disabled-bg: #FFD307;
  --bs-btn-disabled-border-color: #FFD307;
  --bs-btn-disabled-color: #000;
}

.btn-outline-secondary {
  --bs-btn-color: #000;
  --bs-btn-border-color: #FFD307;
  --bs-btn-hover-bg: #FFD307;
  --bs-btn-hover-border-color: #FFD307;
  --bs-btn-hover-color: #000;
  --bs-btn-active-bg: #e6be06;
  --bs-btn-active-border-color: #e6be06;
  --bs-btn-active-color: #000;
}


.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--ba-radius-sm);
  color: var(--ba-gray-600);
  transition: var(--ba-transition);
}
.btn-icon:hover {
  background: var(--ba-gray-100);
  color: var(--ba-gray-800);
}

/* Legacy button aliases — styled as primary */
.input-btn,
.add-staff-btn,
.software-button {
  background-color: var(--ba-primary);
  color: var(--ba-white);
  border: none;
  border-radius: var(--ba-radius-sm);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  height: 42px;
  cursor: pointer;
  transition: var(--ba-transition);
}
.input-btn:hover,
.add-staff-btn:hover,
.software-button:hover {
  background-color: var(--ba-primary-hover);
  color: var(--ba-white);
}

.close-btn {
  background: var(--ba-white);
  border: 1px solid var(--ba-gray-200);
  border-radius: var(--ba-radius-sm);
  font-weight: 600;
  height: 42px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: var(--ba-transition);
}
.close-btn:hover { background: var(--ba-gray-100); }

.btn-custom-download {
  background: var(--ba-primary);
  border-radius: var(--ba-radius-lg);
  color: var(--ba-white);
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border: none;
}
.btn-custom-download:hover {
  background: #001f52;
  color: var(--ba-white);
}

.btn-outline-yellow {
  border: 1px solid var(--ba-primary);
  color: var(--ba-gray-900);
}


/* ---------- 5. DASHBOARD CARDS ---------- */
.dashboard-card {
  background: var(--ba-white);
  border: 1px solid var(--ba-gray-200);
  border-radius: var(--ba-radius-lg);
  padding: 1.25rem;
  transition: var(--ba-transition);
}
.dashboard-card:hover { box-shadow: var(--ba-shadow); }

.dashboard-card-h5 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ba-gray-500);
  margin-bottom: 0.5rem;
}
.dashboard-card-h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ba-gray-900);
  margin-bottom: 0.25rem;
}
.dashboard-card-p {
  font-size: 0.8125rem;
  color: var(--ba-gray-400);
}
.dashboard-card-up {
  color: var(--ba-green);
  font-weight: 600;
  font-size: 0.8125rem;
}
.dashboard-card-down {
  color: var(--ba-red);
  font-weight: 600;
  font-size: 0.8125rem;
}
.dashboard-h4 {
  color: var(--ba-gray-900);
  font-weight: 700;
  font-size: 1.25rem;
}

.card-default {
  background: var(--ba-white);
  border: 1px solid var(--ba-gray-200);
  border-radius: var(--ba-radius);
}
.card-custom {
  background: var(--ba-white);
  border-radius: var(--ba-radius-lg);
  box-shadow: var(--ba-shadow-sm);
}


/* ---------- 6. CUSTOM FORM HELPERS ---------- */
.add-staff-control {
  height: 48px;
  border: 1px solid var(--ba-gray-300);
  border-radius: var(--ba-radius-sm);
  box-shadow: var(--ba-shadow-xs);
}
.form-height { height: 48px; }
.form-control-sd {
  height: 48px;
  background: var(--ba-white);
  border: 1px solid var(--ba-gray-300);
  border-radius: var(--ba-radius-sm);
  box-shadow: var(--ba-shadow-xs);
}
.form-control3 { border: 0; }


/* ---------- 7. STATUS BADGES ---------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.appointment-completed, .software-active   { background: var(--ba-green-muted); color: #15803d; }
.appointment-confirmed                      { background: var(--ba-primary-light); color: var(--ba-blue); }
.appointment-requested                      { background: var(--ba-orange-muted); color: var(--ba-orange); }
.appointment-cancelled, .appointment-rejected, .software-inactive { background: var(--ba-red-muted); color: var(--ba-red); }


/* ---------- 8. AUTH / LOGIN PAGES ---------- */
.login-bg {
  background-image: url('../img/background/bg1.png');
  background-size: cover;
  background-position: center;
  min-height: 100vh;
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--ba-white);
  border-radius: var(--ba-radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

.auth-card-header {
  background: var(--ba-primary);
  padding: 1.75rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.auth-logo { height: 26px; width: auto; }
.auth-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.25); }
.auth-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ba-primary);
}

.auth-card-body { padding: 2rem 2.5rem 2.5rem; }

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ba-gray-400);
  margin-bottom: 1.5rem;
  text-decoration: none;
  transition: var(--ba-transition);
}
.auth-back:hover { color: var(--ba-primary); }

.auth-title {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--ba-gray-900);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}
.auth-subtitle {
  font-size: 0.875rem;
  color: var(--ba-gray-500);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.auth-form .auth-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}
.auth-form .auth-field label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ba-gray-500);
  margin-bottom: 0.5rem;
}
.auth-form .auth-field input {
  border: 1.5px solid var(--ba-gray-200);
  border-radius: var(--ba-radius);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  background: var(--ba-gray-50);
  transition: var(--ba-transition);
}
.auth-form .auth-field input::placeholder { color: var(--ba-gray-400); }
.auth-form .auth-field input:focus {
  background: var(--ba-white);
  border-color: var(--ba-primary);
  box-shadow: 0 0 0 3px rgba(0,44,115,0.08);
  outline: none;
}

.btn-auth {
  display: block;
  width: 100%;
  background: var(--ba-primary);
  color: var(--ba-white);
  font-weight: 700;
  border: none;
  border-radius: var(--ba-radius);
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--ba-transition);
}
.btn-auth:hover {
  background: var(--ba-primary-hover);
  color: var(--ba-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,44,115,0.3);
}
.btn-auth:active { transform: translateY(0); }

.auth-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ba-primary);
  text-decoration: none;
}
.auth-link:hover { color: var(--ba-blue); text-decoration: underline; }

.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}
.auth-success-icon.icon-blue  { background: var(--ba-primary-light); color: var(--ba-blue); }
.auth-success-icon.icon-green { background: var(--ba-green-muted); color: var(--ba-green); }

@media (max-width: 575.98px) {
  .auth-card-header { padding: 1.25rem 1.5rem; }
  .auth-card-body { padding: 1.5rem; }
}

/* Legacy auth compat */
.login-card, .password-card { width: 100%; max-width: 440px; background: var(--ba-white); box-shadow: var(--ba-shadow-lg); border-radius: var(--ba-radius-xl); padding: 2.5rem; }
.wrapper-center { justify-content: center; display: flex; align-items: center; }
.logo-container { margin-top: 100px; margin-bottom: 60px; text-align: center; }
.form-container { text-align: center; }
.h3-title { font-weight: 800; font-size: 1.5rem; color: var(--ba-gray-900); }


/* ---------- 9. STAFF ---------- */
.staff-filter { background: var(--ba-primary-light); padding: 1rem; border-radius: var(--ba-radius); }
.profile-pic { width: 200px; max-height: 200px; display: inline-block; }
.file-upload { display: none; }
.circle { border-radius: 50%; overflow: hidden; width: 128px; height: 128px; border: 3px solid var(--ba-gray-200); }
.p-image { position: relative; top: -39px; left: 81px; color: var(--ba-gray-500); }
.upload-button { font-size: 1.2em; }
.upload-button:hover { color: var(--ba-gray-400); }


/* ---------- 10. SOFTWARE / STORE ---------- */
.software-border { background: var(--ba-primary-light); border-radius: var(--ba-radius); padding: 1.25rem; }
.software-table-title th, .software-p { font-size: 0.875rem; font-weight: 400; color: var(--ba-gray-600); }
.software-store-image { width: 80px; height: 70px; object-fit: cover; border-radius: var(--ba-radius-sm); }
.software-badge { background: var(--ba-gray-600); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.75rem; }
.software-yellow { color: var(--ba-primary); }
.software-f26 { font-size: 1.5rem; margin-top: 0.5rem; }
.software-back-btn { background: var(--ba-gray-300); width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-right: 0.75rem; }
.software-bold { font-weight: 600; }
.software-faded-p { color: var(--ba-gray-400); }
.software-red { color: var(--ba-red); background: var(--ba-gray-100); padding: 0.5rem 1rem; border-radius: var(--ba-radius-sm); }
.software-detail-image { width: 58px; height: 58px; object-fit: cover; border-radius: var(--ba-radius-sm); }
.software-detail-h4 { font-size: 1.125rem; font-weight: 500; }
.software-detail-p { font-size: 0.875rem; color: var(--ba-gray-500); }
.lh-00 { line-height: 0.375rem; margin-left: 0.75rem; }
.software-detail-active { background: var(--ba-green-muted); padding: 0.5rem 1rem; border-radius: var(--ba-radius); color: #15803d; font-weight: 500; }
.software-detail-deactive { background: var(--ba-red-muted); padding: 0.5rem 1rem; border-radius: var(--ba-radius); color: var(--ba-red); font-weight: 500; }
.software-detail-star { color: var(--ba-primary); font-size: 1.5rem; }
.info-bold { font-size: 1.25rem; font-weight: 600; }
.pb-software-detail { margin-bottom: 5rem; }
.software-detail-form-heading { font-size: 1.125rem; font-weight: 600; }
.software-detail-query-image { width: 84px; height: 94px; border-radius: var(--ba-radius); object-fit: cover; }
.software-detail-query-h4 { font-size: 1.125rem; font-weight: 600; }
.card-sd { background: var(--ba-gray-100); display: inline-block; }
.approveStore { height: 28px; background: var(--ba-primary); border-radius: 14px; color: var(--ba-white); border: none; }
.sclose { margin-left: 0.75rem; width: 38px; height: 38px; background: var(--ba-red); border-radius: 50%; color: var(--ba-white); border: none; display: inline-flex; align-items: center; justify-content: center; }
.sdeny { width: 128px; height: 48px; background: var(--ba-white); border: 1px solid var(--ba-red); border-radius: var(--ba-radius); color: var(--ba-red); font-weight: 600; }
.scard1 { background: var(--ba-white); border: 1px solid var(--ba-gray-200); border-radius: var(--ba-radius); }
.scard-p { text-align: center; font-weight: 600; font-size: 0.875rem; color: var(--ba-gray-500); }
.sf600 { font-size: 2rem; font-weight: 600; }


/* ---------- 11. TABS ---------- */
.tab-box.active { background: var(--ba-primary-light); color: var(--ba-gray-900); font-weight: 600; }
.title-software { color: var(--ba-gray-900); font-weight: 600; }
.subtitle-software { color: var(--ba-gray-900); font-weight: 400; }


/* Search inputs now use Bootstrap .form-control — no custom overrides needed */


/* ---------- 13. MISC CUSTOM UTILITIES ---------- */
.bg-primary-custom { background-color: var(--ba-primary); }
.light-grey-text { color: var(--ba-gray-400); }
.text-muted-custom { color: var(--ba-gray-500); }
.month-box { background: var(--ba-gray-100); border-radius: var(--ba-radius-lg); padding: 0.625rem; }
.main-select { border: none; background: transparent; }
.header-logo { width: 129px; height: 26px; }
.header-profile-picture { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.toggle.ios, .toggle-on.ios, .toggle-off.ios { border-radius: 20rem; }
.toggle.ios .toggle-handle { border-radius: 20rem; }
.fa { -webkit-text-stroke: 0; }
.submitsearch, #submitsearch { border: 1px solid var(--ba-gray-400); padding: 0.25rem 0.5rem; border-radius: 999px; cursor: pointer; display: none; }
.container-default { padding-left: 2rem; padding-right: 2rem; }

/* Scrollable table helper (opt-in, not global) */
.table-scrollable { max-height: 500px; overflow-y: auto; }
