/* GrindsWorld design system — loaded after Bootstrap 5 (public/vendor/bootstrap/css/bootstrap.min.css,
   itself a custom Sass build with GrindsWorld's palette/type/shape already baked in).
   Provides: page chrome (header/footer/hero), the small set of Tabler-theme utility
   classes still referenced in the view templates, and layout glue. */

body {
  -webkit-font-smoothing: antialiased;
}

a {
  transition: color .15s ease;
}

/* ---------------------------------------------------------------- */
/* Page shell                                                       */
/* ---------------------------------------------------------------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-main {
  flex: 1 1 auto;
}

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

.header {
  background: #fff;
}

.header .container {
  padding-top: .85rem;
  padding-bottom: .85rem;
}

.sticky-top .header + .header {
  border-top: 1px solid var(--bs-border-color);
}

.sticky-top {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.header-brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--bs-dark);
  display: flex;
  align-items: center;
}

.header-brand:hover {
  color: var(--bs-primary);
}

.header-toggler {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--bs-border-radius);
  color: var(--bs-dark);
}

.header-toggler:hover {
  background: var(--bs-tertiary-bg, #f1f5f9);
}

.header-toggler-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath stroke='%230f172a' stroke-width='1.75' stroke-linecap='round' d='M2.5 5h15M2.5 10h15M2.5 15h15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.leading-none {
  line-height: 1;
}

.header .nav-tabs {
  border-bottom: 0;
}

.header .nav-tabs .nav-link {
  border: 0;
  color: var(--bs-secondary-color);
  font-weight: 600;
  padding: .5rem .9rem;
  border-radius: var(--bs-border-radius);
}

.header .nav-tabs .nav-link:hover {
  color: var(--bs-primary);
  background: var(--bs-tertiary-bg, #f1f5f9);
}

.header .nav-tabs .nav-link.active {
  color: var(--bs-primary);
  background: var(--bs-tertiary-bg, #f1f5f9);
}

.dropdown-menu-arrow {
  margin-top: .6rem !important;
}

.dropdown-menu-arrow:before {
  content: "";
  position: absolute;
  top: -6px;
  right: 1.1rem;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid var(--bs-border-color);
  border-left: 1px solid var(--bs-border-color);
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------- */
/* Avatars                                                           */
/* ---------------------------------------------------------------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--bs-tertiary-bg, #eef2ff) center/cover no-repeat;
  color: var(--bs-primary);
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}

.avatar-sm { width: 1.75rem; height: 1.75rem; font-size: .75rem; }
.avatar-md { width: 3rem; height: 3rem; font-size: 1.1rem; }
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.4rem; }
.avatar-xl { width: 5rem; height: 5rem; font-size: 1.75rem; }
.avatar-xxl { width: 6.5rem; height: 6.5rem; font-size: 2.25rem; }

/* ---------------------------------------------------------------- */
/* Cards in a row (Tabler's row-cards / row-deck)                    */
/* ---------------------------------------------------------------- */

.row-cards > * {
  margin-bottom: 1.5rem;
}

.row-deck {
  display: flex;
  flex-wrap: wrap;
}

.row-deck > [class*="col-"] {
  display: flex;
  align-items: stretch;
}

.row-deck > [class*="col-"] > .card {
  width: 100%;
}

.card {
  position: relative;
  transition: box-shadow .2s ease, transform .2s ease;
}

.card-img-top {
  border-top-left-radius: calc(var(--bs-card-border-radius) - 1px);
  border-top-right-radius: calc(var(--bs-card-border-radius) - 1px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

a.card:hover,
.card-link-hover:hover {
  box-shadow: var(--bs-box-shadow-lg);
  transform: translateY(-2px);
}

.card-status {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 3px;
  border-radius: calc(var(--bs-card-border-radius) - 1px) calc(var(--bs-card-border-radius) - 1px) 0 0;
  background: var(--bs-secondary-bg, #e2e8f0);
}

.bg-blue   { background-color: #3b82f6 !important; }
.bg-red    { background-color: #ef4444 !important; }
.bg-yellow { background-color: #eab308 !important; }
.bg-green  { background-color: #22c55e !important; }
.bg-purple { background-color: #a855f7 !important; }
.bg-orange { background-color: #f97316 !important; }
.bg-lime   { background-color: #84cc16 !important; }
.bg-pink   { background-color: #ec4899 !important; }

.card-options {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card-options-remove {
  color: var(--bs-secondary-color);
  opacity: .8;
  line-height: 1;
}

.card-options-remove:hover {
  opacity: 1;
  color: var(--bs-dark);
}

/* ---------------------------------------------------------------- */
/* Text helpers carried over from the old theme                     */
/* ---------------------------------------------------------------- */

.text-muted-dark {
  color: var(--bs-secondary-color);
}

.text-faded {
  color: rgba(255, 255, 255, .8);
}

.btn-xl {
  padding: .85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--bs-border-radius-lg);
}

.form-group {
  margin-bottom: 1rem;
}

.form-check-stacked .form-check {
  margin-bottom: .35rem;
}

.form-required {
  color: var(--bs-danger);
}

.table-vcenter td,
.table-vcenter th {
  vertical-align: middle;
}

.card-table {
  margin-bottom: 0;
}

.card-table tr:first-child td,
.card-table tr:first-child th {
  border-top: 0;
}

.card-table tr td:first-child,
.card-table tr th:first-child {
  padding-left: 1.5rem;
}

.card-table tr td:last-child,
.card-table tr th:last-child {
  padding-right: 1.5rem;
}

.form-footer {
  margin-top: 2rem;
}

.text-default {
  color: var(--bs-body-color) !important;
}

.page-content {
  margin: .75rem 0;
}

@media (min-width: 768px) {
  .page-content {
    margin: 1.5rem 0;
  }
}

.dropdown-icon {
  color: var(--bs-secondary-color);
  margin-right: .5rem;
  margin-left: -.5rem;
  width: 1em;
  display: inline-block;
  text-align: center;
  vertical-align: -1px;
}

.col-login {
  max-width: 24rem;
}

.p-6 { padding: 2rem !important; }
@media (min-width: 576px) {
  .pt-sm-6 { padding-top: 2rem !important; }
}
@media (min-width: 768px) {
  .pt-md-6 { padding-top: 2rem !important; }
}

/* Tabler-style toggle switch (used for the search-type radio picker) */

.custom-switch {
  user-select: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.custom-switch-input {
  position: absolute;
  z-index: -1;
  opacity: 0;
}

.custom-switches-stacked {
  display: flex;
  flex-direction: column;
}

.custom-switches-stacked .custom-switch {
  margin-bottom: .5rem;
}

.custom-switch-indicator {
  display: inline-block;
  height: 1.35rem;
  width: 2.4rem;
  background: #e2e8f0;
  border-radius: 50rem;
  position: relative;
  vertical-align: bottom;
  border: 1px solid var(--bs-border-color);
  transition: .2s border-color, .2s background-color;
}

.custom-switch-indicator:before {
  content: '';
  position: absolute;
  height: calc(1.35rem - 4px);
  width: calc(1.35rem - 4px);
  top: 1px;
  left: 1px;
  background: #fff;
  border-radius: 50%;
  transition: .2s left;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, .3);
}

.custom-switch-input:checked ~ .custom-switch-indicator {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}

.custom-switch-input:checked ~ .custom-switch-indicator:before {
  left: calc(1.05rem + 1px);
}

.custom-switch-input:focus ~ .custom-switch-indicator {
  box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .25);
}

.custom-switch-description {
  margin-left: .5rem;
  color: var(--bs-secondary-color);
  transition: .2s color;
  font-weight: 500;
}

.custom-switch-input:checked ~ .custom-switch-description {
  color: var(--bs-dark);
}

/* ---------------------------------------------------------------- */
/* Page header (title/subtitle used at the top of most inner pages)  */
/* ---------------------------------------------------------------- */

.page-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  margin: 0 0 1.75rem;
}

.page-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--bs-dark);
}

.page-title-icon {
  color: var(--bs-secondary-color);
  font-size: 1.25rem;
}

.page-subtitle {
  font-size: .95rem;
  color: var(--bs-secondary-color);
  flex-basis: 100%;
}

.page-subtitle a {
  color: inherit;
}

.page-options {
  margin-left: auto;
}

/* ---------------------------------------------------------------- */
/* Hero / masthead                                                   */
/* ---------------------------------------------------------------- */

.masthead {
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .12), transparent 45%),
              linear-gradient(135deg, #4338ca, #4f46e5 55%, #6366f1);
  color: #fff;
  padding: 3.5rem 0 3rem;
}

.masthead h2 {
  font-weight: 800;
  letter-spacing: -.01em;
}

.masthead .btn-xl {
  min-width: 100%;
}

@media (min-width: 992px) {
  .masthead {
    padding: 5rem 0 4.5rem;
  }
}

.card > .masthead:first-child {
  border-top-left-radius: calc(var(--bs-card-border-radius) - 1px);
  border-top-right-radius: calc(var(--bs-card-border-radius) - 1px);
}

/* ---------------------------------------------------------------- */
/* Footer                                                             */
/* ---------------------------------------------------------------- */

.footer {
  background: var(--bs-dark);
  color: rgba(255, 255, 255, .7);
  padding: 3rem 0;
  margin-top: 3rem;
}

.footer a {
  color: rgba(255, 255, 255, .78);
}

.footer a:hover {
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* Bootstrap 5 Media-component replacement (header sidebar block)    */
/* ---------------------------------------------------------------- */

.media-flex {
  display: flex;
  align-items: center;
}

.media-flex-body {
  flex: 1 1 auto;
  min-width: 0;
}
