/* =========================================================
   ROOT VARIABLES
   ========================================================= */
:root {
  --summit-blue: #121f49;
  --gold: #f1ca56;
  --font-size: 16px;
  --spacing-unit: 1rem;
}

/* =========================================================
   GLOBAL STYLES
   ========================================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
}

/* Background color helper */
.bg-brand {
  background-color: var(--summit-blue) !important;
}

/* Headings */
h1 {
  color: #333;
}

/* Text alignment helpers */
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}

/* Spacing utilities */
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 12px;
}
.mt-3 {
  margin-top: 16px;
}

/* Small muted text */
small.muted {
  color: #777;
}

/* hide admin link then show them with js in shared/js/scripts.php */
.admin-only {
  display: none;
}
.manager-only {
  display: none;
}
.csrep-only {
  display: none;
}
.salesrep-only {
  display: none;
}

/* =========================================================
   LAYOUT CONTAINERS
   ========================================================= */
#container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* Top bar (header area) */
#topbar {
  background: #121f49;
  color: #fff;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-flow: wrap;
  justify-content: center;
}

#title {
  max-width: 1100px;
  font-size: 25px;
  flex-grow: 1;
  text-align: center;
  margin: 10px 0;
}

#name {
  color: #fff;
  font-size: 14px;
  flex-grow: 1;
  white-space: nowrap;
}

/* =========================================================
   LOGO STYLING
   ========================================================= */
#logo {
  max-width: 135px;
  width: 100%;
  height: auto;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

#logo:hover {
  opacity: 0.7;
}

/* =========================================================
   CARD COMPONENTS
   ========================================================= */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.card.container {
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   FORMS
   ========================================================= */

input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

form legend {
  font-weight: 600;
  margin-left: 0.5rem;
  font-size: 1.1rem;
  position: absolute;
  top: -0.75rem;
  left: 1rem;
  background-color: #003862;
  color: #fff;
  padding: 2px 8px;
  border-radius: 5px;
  width: auto;
}
fieldset.card {
  padding-top: 2rem!important;
}
.form-label {
    margin-bottom: .1rem;
}

/* =========================================================
   BUTTONS
   ========================================================= */
button,
.btn {
  display: inline-block;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease; /* smooth 0.3s transition */
}

/* Primary button */
.btn-primary {
  background: #121f49;
  color: #fff;
  transition: background-color 0.5s ease-in-out;
}

.btn-primary:hover {
  background: #3b53a1;
}

/* Outline button */
.btn-outline {
  background: #fff;
  border: 1px solid #ccc;
}
.btn-outline:hover {
  background: #eee;
  border: 1px solid #ccc;
}

/* Small button */
.btn-sm {
  font-size: 0.8em;
  padding: 7px 11px;
}

/* Tiny button */
.btn-tiny {
  padding: 4px 7px;
  font-size: 0.7rem;
}

/* =========================================================
   MENU / NAVIGATION
   ========================================================= */
#main-menu {
  display: none;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0 12px;
}

.menu li a {
  display: inline-block;
  padding: 8px 12px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  border: 1px solid #eee;
  transition: background-color 0.5s ease-in-out;
}

.menu li.active a,
.menu li:hover a {
  background-color: #eaf5f7;
}

/* =========================================================
   GRID LAYOUT
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* =========================================================
   TABLE STYLES
   ========================================================= */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
}
table th a {
  color: inherit;
  text-decoration: none;
}
th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

thead th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
  transition: background-color 0.3s ease; /* smooth 0.3s transition */
}

th.sortable {
  cursor: pointer;
  position: relative;
  user-select: none;
  white-space: nowrap;
}

th.sortable:hover {
  background-color: #f9f9f9;
}

.table-dark th.sortable:hover {
  background-color: #666;
}

th .sort-icon {
  font-size: 0.8em;
  color: #aaa;
}

tr.alt {
  background: #fcfcfc;
}


/* Table background color variations */
.white-bg {
  background-color: white!important;
}

.orange-bg {
  background-color: #fff3cd!important;
  color: #826a0a;
}

.red-bg {
  background-color: #f8d7da!important;
  color: #721c24;
}

/* =========================================================
   BADGES
   ========================================================= */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #ddd;
}

/* =========================================================
   NAVBAR / DROPDOWN MENU (Bootstrap)
   ========================================================= */
.navbar-brand {
  padding: 0;
}

.navbar .dropdown-menu {
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Nav links */
.navbar-nav .nav-link {
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--gold);
}

/* Navbar toggler */
.navbar-toggler {
  border: none;
}

/* Dropdown menus */
.navbar-nav .dropdown-menu {
  padding: 0;
  border-radius: 0;
  background-color: var(--summit-blue);
}

.navbar-nav .dropdown-menu .dropdown-item {
  color: #fff;
}

.navbar-nav .dropdown-menu .dropdown-divider {
  background-color: #2b3b6e;
}

.navbar-nav .dropdown-item.active,
.navbar-nav .dropdown-item:hover {
  color: var(--gold);
  text-decoration: none;
  background-color: var(--summit-blue);
}


@media print {
  .no-print {
    display: none !important;
  }
}
