/* -------------------------------------------------------
   IBISBA Service Catalogue – Management UI theme
   Matches the frontend design language
   ------------------------------------------------------- */

/* --- Site header (matches frontend Header.tsx) ------- */
.sc-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.sc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  margin: 0 auto;
  max-width: 1400px;
  box-sizing: border-box;
}

.sc-header-logo img {
  height: 60px;
  width: auto;
}

.sc-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.sc-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  color: #333;
  padding: 0.25rem 0.15rem;
  transition: color 0.2s;
}

.sc-nav a:hover { color: #2e8b1f; }

.sc-nav .sc-nav-active { color: #2e8b1f; font-weight: 600; }

.sc-nav-item {
  position: relative;
}

.sc-nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 14px;
}

.sc-nav-trigger {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  padding: 0.25rem 0.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.sc-nav-trigger:hover { color: #2e8b1f; }

.sc-nav-caret {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
  display: inline-block;
}

.sc-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border-top: 3px solid #2e8b1f;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  padding: 0.7rem 0;
  z-index: 200;
}

.sc-nav-item:hover .sc-dropdown { display: block; }

.sc-dropdown a {
  display: block;
  padding: 0.5rem 1.2rem;
  font-size: 15px;
  color: #333;
  white-space: nowrap;
}

.sc-dropdown a:hover { color: #2e8b1f; }

/* --- Fonts & base ------------------------------------ */
body, .q-page, .q-layout {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif !important;
  background-color: #f9f9f9 !important;
  color: #333 !important;
}

/* --- Header bar -------------------------------------- */
.q-header, .nicegui-content > .q-layout__section--marginal {
  background: #ffffff !important;
  border-bottom: 1px solid #e0e0e0 !important;
  box-shadow: none !important;
}

/* --- Top bar (row with title + logout) --------------- */
.mgmt-topbar {
  background: #ffffff;
  border-bottom: 3px solid #2e8b1f;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

/* --- Page title -------------------------------------- */
.text-h5, .text-2xl {
  color: #1a1a1a !important;
  font-weight: 700 !important;
}

/* --- Cards ------------------------------------------- */
.q-card {
  background: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}


/* --- Table ------------------------------------------- */
.q-table__container {
  border: 1px solid #e0e0e0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

.q-table thead tr th {
  background-color: #f5f5f5 !important;
  color: #555 !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-bottom: 2px solid #e0e0e0 !important;
}

.q-table tbody tr:hover {
  background-color: #f0f7ee !important;
}

.q-table tbody td {
  border-bottom: 1px solid #f0f0f0 !important;
  color: #333 !important;
  font-size: 0.9rem !important;
}

/* --- Inputs ------------------------------------------ */
.q-field__control {
  background-color: #ffffff !important;
}

.q-field--outlined .q-field__control:before {
  border-color: #d0d0d0 !important;
}

.q-field--outlined.q-field--focused .q-field__control:after {
  border-color: #2e8b1f !important;
}

.q-field__label {
  color: #666 !important;
}

/* --- Select chips ------------------------------------ */
.q-chip {
  background-color: #e8f5e3 !important;
  color: #2e8b1f !important;
  border-radius: 4px !important;
}

.q-chip__icon {
  color: #2e8b1f !important;
}

/* --- Dialog ------------------------------------------ */
.q-dialog .q-card {
  border-top: 3px solid #2e8b1f !important;
}

/* --- Notifications ----------------------------------- */
.q-notification--positive {
  background: #2e8b1f !important;
}

/* --- Separator --------------------------------------- */
.q-separator {
  background-color: #e0e0e0 !important;
}

/* --- Scrollbar (subtle) ------------------------------ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }
