/* ---------------------------------------------------------------------------
   Product styles layered on top of the vendor admin template.
   Load order: style.css -> brand-retint.css -> custom.css
   Keep product-specific rules here so the vendor sheet stays upgradable.
   --------------------------------------------------------------------------- */

:root {
  /* Sampled from the GPC logo (assets/img/logo-gpc.png). */
  --brand:        #0e263e;   /* navy wordmark */
  --brand-dark:   #081826;
  --brand-light:  #1c4368;
  --accent:       #bfaa53;   /* gold globe */
  --accent-dark:  #a89341;
  --brand-wash:   #eef1f5;
  --ink:          #1f2a37;
  --ink-muted:    #6b7280;
  --hairline:     #e5e9f0;
  --radius:       8px;
  --shadow-sm:    0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md:    0 2px 8px rgba(16, 24, 40, .08);
}

body {
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* --- Page header ---------------------------------------------------------- */

.page-header {
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.page-header .page-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 4px;
}

.page-header .breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item.active {
  color: var(--ink-muted);
}

.page-header .breadcrumb-item a {
  color: var(--ink-muted);
  text-decoration: none;
}

.page-header .breadcrumb-item a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* --- Cards ---------------------------------------------------------------- */

.card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--hairline);
  padding: 14px 18px;
}

.card-header .card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

/* --- Stat tiles (dashboard) ----------------------------------------------- */

.stat-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  height: 100%;
  transition: box-shadow .15s ease, transform .15s ease;
}

.stat-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-tile__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-wash);
  color: var(--brand);
  font-size: 18px;
}

.stat-tile__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.stat-tile__value {
  display: block;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  /* Tabular figures stop counts jittering as they update. */
  font-variant-numeric: tabular-nums;
}

.stat-tile--muted .stat-tile__icon {
  background: #f3f4f6;
  color: var(--ink-muted);
}

/* --- Tables --------------------------------------------------------------- */

.custom-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--hairline) !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.custom-table tbody td {
  vertical-align: middle;
  font-size: 14px;
}

.custom-table tbody tr:hover {
  background: var(--brand-wash);
}

/* Scroll only when the table actually overflows, instead of showing a
   permanent scrollbar on every screen. */
.table-responsive {
  overflow-x: auto;
}

/* --- Empty state ---------------------------------------------------------- */

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-muted);
}

.empty-state__icon {
  font-size: 30px;
  color: #c3ccd9;
  margin-bottom: 10px;
}

.empty-state__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.empty-state__text {
  font-size: 13px;
  margin: 0;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  border-radius: 6px;
  font-weight: 500;
}

.btn-sm {
  font-size: 13px;
}

/* --- Avatar initials ------------------------------------------------------ */

.avatar-initials {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

/* --- Header --------------------------------------------------------------- */

/* The vendor sheet paints .header with a left-to-right brand gradient. The
   layout declares data-topbar="light", so render a plain white bar instead of
   a retinted gradient. */
.header {
  background: #fff !important;
  border-bottom: 1px solid var(--hairline);
  box-shadow: none;
}

/* The vendor's dropdown chevron is absolutely positioned and escapes the 60px
   bar, leaving a stray arrow floating over the page below it. */
.header .has-arrow .dropdown-toggle::after {
  display: none;
}

/* Keep the user block off the right edge and centred in the bar. */
.header .user-menu {
  align-items: center;
  height: 60px;
  padding-right: 20px;
}

.header .user-menu > li > a.dropdown-toggle {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 6px;
}

.header .user-menu .dropdown-menu {
  margin-top: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 210px;
}

.header .user-menu .dropdown-item {
  padding: 9px 14px;
  font-size: 14px;
}

.header .user-menu .dropdown-header {
  padding: 10px 14px 4px;
}

.header #toggle_btn .bar-icon span,
.header .mobile_btn {
  color: var(--ink);
}

.header #toggle_btn .bar-icon span {
  background-color: var(--ink-muted);
}

/* --- Header user block ---------------------------------------------------- */

.user-menu .user-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}

.user-menu .user-identity__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.user-menu .user-identity__role {
  font-size: 12px;
  color: var(--ink-muted);
}

@media (max-width: 767px) {
  .user-menu .user-identity__text {
    display: none;
  }
}

/* --- Sidebar -------------------------------------------------------------- */

/* The vendor sheet sets this via [data-sidebar=dark] .sidebar, so the override
   has to match that specificity to win. */
[data-sidebar=dark] .sidebar,
[data-sidebar=dark] .sidebar .sidebar-inner,
.sidebar {
  background-color: var(--brand);
}

.sidebar-brand {
  display: block;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  text-decoration: none;
}

/* The logo wordmark is navy, so it needs a light ground to stay legible
   against the navy sidebar. */
.sidebar-brand__chip {
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
}

.sidebar-brand__img {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  margin: 0 auto;
}

.sidebar-menu > ul > li > a {
  color: rgba(255, 255, 255, .78);
}

.sidebar-menu > ul > li > a:hover {
  color: #fff;
}

.sidebar-menu .menu-title span {
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* The retint turns these navy, which disappears against the navy sidebar. */
.sidebar .sidebar-menu ul li.menu-title a {
  color: rgba(255, 255, 255, .55) !important;
}

.sidebar .sidebar-menu ul ul a.active {
  color: var(--accent) !important;
}

.sidebar .sidebar-menu ul ul a {
  color: rgba(255, 255, 255, .70);
}

.sidebar .sidebar-menu ul ul a:hover {
  color: #fff;
}

/* Highlight the entry matching the current URL -- gold reads clearly against
   the navy ground. */
.sidebar-menu li a.active,
.sidebar-menu li.active > a {
  color: #fff !important;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* --- Alerts --------------------------------------------------------------- */

.alert {
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
}

.alert-success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #085d3a;
}

.alert-danger {
  background: #fef3f2;
  border-color: #fecdca;
  color: #912018;
}

/* --- Forms ---------------------------------------------------------------- */

.input-block .col-form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 6px;
}

.form-control {
  border-radius: 6px;
  border-color: #d5dbe5;
  font-size: 14px;
}

.form-control:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(14, 38, 62, .12);
}

/* Mark required fields so the form is readable before it is submitted. */
.required::after {
  content: " *";
  color: #d92d20;
}

/* --- Login ---------------------------------------------------------------- */

.account-box {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.account-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.account-subtitle {
  color: var(--ink-muted);
  font-size: 14px;
}

/* --- Wordmark ------------------------------------------------------------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.wordmark__img {
  height: 56px;
  width: auto;
  display: block;
}

.account-logo .wordmark {
  /* The template centres this block with text-align, which inline-flex honours. */
  margin-bottom: 4px;
}

#toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--ink-muted);
}
