/* ============================================================================
   Vandlet Admin - design layer
   Sits on top of the Vuexy vendor build and vandlet-brand.css.
   Everything here is additive: tokens, then component refinements, then the
   small set of purpose-built components the admin panel uses.
   ========================================================================== */

:root {
  /* Brand ------------------------------------------------------------------ */
  --vd-blue: #1546b4;
  --vd-blue-600: #1e5ad4;
  --vd-blue-700: #133fa2;
  --vd-blue-050: #eef3fd;
  --vd-gold: #f5b81c;
  --vd-gold-600: #d99a00;
  --vd-gold-050: #fef6e2;

  /* Surfaces --------------------------------------------------------------- */
  --vd-bg: #f3f5fa;
  --vd-surface: #ffffff;
  --vd-surface-2: #f8fafd;
  --vd-border: #e6eaf3;
  --vd-border-strong: #d7deec;

  /* Ink -------------------------------------------------------------------- */
  --vd-ink: #182338;
  --vd-ink-2: #4b586f;
  --vd-ink-3: #7c88a0;

  /* Semantic --------------------------------------------------------------- */
  --vd-success: #14a06a;
  --vd-warning: #e0940c;
  --vd-danger: #dc3b4b;
  --vd-info: #0f83c4;

  /* Shape ------------------------------------------------------------------ */
  --vd-radius: 14px;
  --vd-radius-sm: 10px;
  --vd-radius-pill: 999px;

  --vd-shadow-xs: 0 1px 2px rgba(16, 32, 68, .05);
  --vd-shadow-sm: 0 1px 2px rgba(16, 32, 68, .05), 0 2px 6px rgba(16, 32, 68, .04);
  --vd-shadow-md: 0 4px 12px rgba(16, 32, 68, .07), 0 1px 3px rgba(16, 32, 68, .05);
  --vd-shadow-lg: 0 18px 40px -16px rgba(16, 32, 68, .28);

  --vd-ease: cubic-bezier(.4, .2, .2, 1);
}

/* ---------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------ */

body {
  background-color: var(--vd-bg);
  color: var(--vd-ink-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--vd-ink);
  letter-spacing: -.015em;
}

::selection {
  background: rgba(21, 70, 180, .16);
}

a {
  text-decoration: none;
}

/* One consistent focus ring instead of the four the vendor build ships. */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.page-link:focus-visible,
.dropdown-item:focus-visible,
.menu-link:focus-visible {
  outline: 2px solid rgba(21, 70, 180, .45);
  outline-offset: 2px;
  box-shadow: none;
}

/* Money, counts and dates line up column-wise. */
.vd-num,
.vd-table td.vd-num,
.vd-table th.vd-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.vd-mono-sm {
  font-size: .8125rem;
  letter-spacing: .01em;
}

/* Flex children need this before text-truncate can do anything. */
.min-w-0 {
  min-width: 0;
}

/* ---------------------------------------------------------------------------
   App chrome: navbar, sidebar, content, footer
   ------------------------------------------------------------------------ */

.layout-navbar {
  background: var(--vd-surface) !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--vd-border);
  backdrop-filter: saturate(140%) blur(6px);
}

.layout-navbar .app-brand-link img {
  transition: transform .25s var(--vd-ease);
}

.layout-navbar .app-brand-link:hover img {
  transform: translateY(-1px);
}

/* Vertical sidebar -------------------------------------------------------- */

.layout-menu {
  background: var(--vd-surface) !important;
  border-right: 1px solid var(--vd-border);
  box-shadow: none !important;
}

.layout-menu .app-brand {
  height: auto;
  padding: 1.25rem 1.25rem 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.layout-menu .app-brand-logo {
  height: 38px;
  width: auto;
  transition: transform .25s var(--vd-ease);
}

.layout-menu .app-brand-link:hover .app-brand-logo {
  transform: translateY(-1px);
}

/* Collapse / close control in the brand row. */
.layout-menu .app-brand .layout-menu-toggle {
  padding: .25rem;
  border-radius: var(--vd-radius-sm);
  color: var(--vd-ink-3);
  line-height: 0;
  transition: background-color .18s var(--vd-ease), color .18s var(--vd-ease);
}

.layout-menu .app-brand .layout-menu-toggle:hover {
  background: var(--vd-blue-050);
  color: var(--vd-blue);
}

.layout-menu-collapsed .layout-menu .app-brand .layout-menu-toggle i.ti-chevrons-left {
  transform: rotate(180deg);
}

.menu-vertical .menu-inner {
  padding-inline: .75rem;
}

.menu-vertical .menu-header {
  padding: 1.25rem .5rem .375rem;
  color: var(--vd-ink-3);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.menu-vertical .menu-header:first-child {
  padding-top: .25rem;
}

.menu-vertical .menu-item {
  margin: .125rem 0;
}

.menu-vertical .menu-item .menu-link {
  border-radius: var(--vd-radius-sm);
  padding: .625rem .75rem;
  margin: 0;
  width: 100%;
  font-weight: 500;
  color: var(--vd-ink-2) !important;
  transition: background-color .18s var(--vd-ease), color .18s var(--vd-ease);
}

.menu-vertical .menu-item .menu-link:hover {
  background: var(--vd-blue-050);
  color: var(--vd-blue) !important;
}

/* The vendor build paints the active item with a gradient; match its
   specificity to get a flat brand block instead. */
.bg-menu-theme.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle),
.menu-vertical .menu-item.active > .menu-link {
  background: var(--vd-blue) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px -4px rgba(21, 70, 180, .55) !important;
}

.bg-menu-theme.menu-vertical .menu-item.active > .menu-link .menu-icon,
.menu-vertical .menu-item.active > .menu-link .menu-icon {
  color: #fff !important;
}

.menu-vertical .menu-icon {
  margin-right: .625rem;
  font-size: 1.25rem;
}

/* Icons-only rail: centre the glyphs and hide the section labels. */
.layout-menu-collapsed:not(.layout-menu-hover) .menu-vertical .menu-header,
.layout-menu-collapsed:not(.layout-menu-hover) .menu-vertical .menu-header-text {
  opacity: 0;
}

/* Detached navbar sits inside the page column, beside the sidebar. */
.layout-navbar.navbar-detached {
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius);
  box-shadow: var(--vd-shadow-xs) !important;
}

.content-wrapper > .container-xxl {
  padding-top: 1.75rem !important;
}

.content-footer {
  background: transparent !important;
  border-top: 1px solid var(--vd-border);
}

.content-footer .footer-container {
  color: var(--vd-ink-3);
  font-size: .8125rem;
}

/* Navbar user chip */
.vd-user-chip {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .25rem .25rem .25rem .75rem;
  border-radius: var(--vd-radius-pill);
  border: 1px solid var(--vd-border);
  background: var(--vd-surface);
  transition: border-color .18s var(--vd-ease), box-shadow .18s var(--vd-ease);
}

.vd-user-chip:hover {
  border-color: var(--vd-border-strong);
  box-shadow: var(--vd-shadow-xs);
}

.vd-user-chip__meta {
  line-height: 1.15;
  text-align: right;
}

.vd-user-chip__name {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--vd-ink);
}

.vd-user-chip__role {
  display: block;
  font-size: .6875rem;
  color: var(--vd-ink-3);
}

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

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

.card-header {
  border-bottom: 1px solid var(--vd-border);
  background: transparent;
  padding: 1.125rem 1.375rem;
}

.card-header:has(+ .card-body) {
  padding-bottom: 1rem;
}

.card-header .card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0;
}

.card-header .card-subtitle {
  font-size: .8125rem;
  color: var(--vd-ink-3);
  margin-top: .125rem;
}

.card-body {
  padding: 1.375rem;
}

/* Cards that only wrap a table shouldn't double up on padding. */
.card > .vd-table-wrap:first-child {
  border-top-left-radius: var(--vd-radius);
  border-top-right-radius: var(--vd-radius);
}

.vd-card-hover {
  transition: transform .2s var(--vd-ease), box-shadow .2s var(--vd-ease);
}

.vd-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--vd-shadow-md);
}

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

.vd-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.vd-page-header__eyebrow {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vd-ink-3);
  margin-bottom: .375rem;
}

.vd-page-header__eyebrow a {
  color: inherit;
}

.vd-page-header__eyebrow a:hover {
  color: var(--vd-blue);
}

.vd-page-header__title {
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.2;
  margin: 0;
}

.vd-page-header__subtitle {
  margin: .375rem 0 0;
  color: var(--vd-ink-3);
  font-size: .875rem;
  max-width: 60ch;
}

.vd-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

/* ---------------------------------------------------------------------------
   Stat tiles
   ------------------------------------------------------------------------ */

.vd-stat {
  position: relative;
  height: 100%;
  padding: 1.25rem 1.375rem;
  border-radius: var(--vd-radius);
  border: 1px solid var(--vd-border);
  background: var(--vd-surface);
  box-shadow: var(--vd-shadow-sm);
  overflow: hidden;
  transition: transform .2s var(--vd-ease), box-shadow .2s var(--vd-ease);
}

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

/* Hairline of brand colour along the top edge. */
.vd-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--vd-stat-accent, var(--vd-blue));
  opacity: .9;
}

.vd-stat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.vd-stat__label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--vd-ink-3);
}

.vd-stat__value {
  display: block;
  margin-top: .5rem;
  font-size: 1.6rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--vd-ink);
  font-variant-numeric: tabular-nums;
}

.vd-stat__value small {
  font-size: .75rem;
  font-weight: 500;
  color: var(--vd-ink-3);
  letter-spacing: 0;
}

.vd-stat__foot {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  font-size: .8125rem;
  color: var(--vd-ink-3);
}

.vd-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  font-size: 1.375rem;
  color: var(--vd-stat-accent, var(--vd-blue));
  background: var(--vd-blue-050); /* fallback for browsers without color-mix */
  background: color-mix(in srgb, var(--vd-stat-accent, var(--vd-blue)) 12%, #fff);
}

/* Accent variants */
.vd-stat--blue    { --vd-stat-accent: var(--vd-blue); }
.vd-stat--gold    { --vd-stat-accent: var(--vd-gold-600); }
.vd-stat--success { --vd-stat-accent: var(--vd-success); }
.vd-stat--info    { --vd-stat-accent: var(--vd-info); }
.vd-stat--warning { --vd-stat-accent: var(--vd-warning); }
.vd-stat--danger  { --vd-stat-accent: var(--vd-danger); }

/* Delta chip: +12.4% / -3.1% */
.vd-delta {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .1875rem .5rem;
  border-radius: var(--vd-radius-pill);
  font-size: .75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vd-delta--up {
  color: var(--vd-success);
  background: rgba(20, 160, 106, .12);
}

.vd-delta--down {
  color: var(--vd-danger);
  background: rgba(220, 59, 75, .12);
}

.vd-delta--flat {
  color: var(--vd-ink-3);
  background: rgba(124, 136, 160, .14);
}

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

.vd-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vd-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.vd-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--vd-surface-2);
  border-bottom: 1px solid var(--vd-border);
  padding: .75rem 1.375rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--vd-ink-3);
  white-space: nowrap;
}

.vd-table > tbody > tr > td {
  padding: .875rem 1.375rem;
  border-bottom: 1px solid var(--vd-border);
  vertical-align: middle;
  color: var(--vd-ink-2);
  font-size: .875rem;
}

.vd-table > tbody > tr:last-child > td {
  border-bottom: 0;
}

.vd-table > tbody > tr {
  transition: background-color .15s var(--vd-ease);
}

.vd-table > tbody > tr:hover {
  background: var(--vd-blue-050);
}

.vd-table th.text-end,
.vd-table td.text-end {
  text-align: right;
}

/* Primary cell: avatar + name + secondary line */
.vd-ident {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.vd-ident__name {
  display: block;
  font-weight: 600;
  color: var(--vd-ink);
  font-size: .875rem;
  line-height: 1.3;
}

.vd-ident__meta {
  display: block;
  font-size: .75rem;
  color: var(--vd-ink-3);
  line-height: 1.3;
}

/* Row actions stay put and only reveal on hover on wide screens. */
.vd-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .375rem;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .vd-table > tbody > tr .vd-row-actions .vd-row-actions__hover {
    opacity: 0;
    transition: opacity .15s var(--vd-ease);
  }

  .vd-table > tbody > tr:hover .vd-row-actions .vd-row-actions__hover,
  .vd-table > tbody > tr:focus-within .vd-row-actions .vd-row-actions__hover {
    opacity: 1;
  }
}

/* Table footer strip: pagination + result count */
.vd-table-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .875rem 1.375rem;
  border-top: 1px solid var(--vd-border);
  background: var(--vd-surface-2);
  border-bottom-left-radius: var(--vd-radius);
  border-bottom-right-radius: var(--vd-radius);
}

.vd-table-foot__count {
  font-size: .8125rem;
  color: var(--vd-ink-3);
}

.vd-table-foot .pagination {
  margin-bottom: 0;
}

/* Laravel's Bootstrap-5 paginator prints its own "Showing x to y of z results".
   The footer already says that on the left, so suppress the duplicate. */
.vd-table-foot nav p.small {
  display: none;
}

.vd-table-foot nav > div {
  justify-content: flex-end !important;
}

/* ---------------------------------------------------------------------------
   Toolbar / filters
   ------------------------------------------------------------------------ */

.vd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .625rem;
  padding: 1rem 1.375rem;
  border-bottom: 1px solid var(--vd-border);
}

.vd-toolbar__search {
  flex: 1 1 260px;
  min-width: 220px;
}

.vd-toolbar .form-control,
.vd-toolbar .form-select {
  border-radius: var(--vd-radius-sm);
}

.vd-search {
  position: relative;
}

.vd-search .ti {
  position: absolute;
  top: 50%;
  left: .875rem;
  transform: translateY(-50%);
  color: var(--vd-ink-3);
  font-size: 1.0625rem;
  pointer-events: none;
}

.vd-search .form-control {
  padding-left: 2.5rem;
}

/* Applied-filter pills */
.vd-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .5rem .25rem .75rem;
  border-radius: var(--vd-radius-pill);
  background: var(--vd-blue-050);
  color: var(--vd-blue);
  font-size: .75rem;
  font-weight: 600;
}

.vd-filter-pill a {
  color: inherit;
  opacity: .65;
  display: inline-flex;
}

.vd-filter-pill a:hover {
  opacity: 1;
}

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

.vd-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  overflow: hidden;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: var(--vd-blue);
  user-select: none;
}

.vd-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vd-avatar--sm { width: 1.75rem; height: 1.75rem; font-size: .625rem; }
.vd-avatar--lg { width: 3rem;    height: 3rem;    font-size: .9375rem; }
.vd-avatar--xl { width: 4.5rem;  height: 4.5rem;  font-size: 1.375rem; }

.vd-avatar--square { border-radius: 12px; }

/* Deterministic tints so the same record always gets the same colour. */
.vd-avatar--t0 { background: #1546b4; }
.vd-avatar--t1 { background: #0f83c4; }
.vd-avatar--t2 { background: #14a06a; }
.vd-avatar--t3 { background: #d99a00; }
.vd-avatar--t4 { background: #b5397c; }
.vd-avatar--t5 { background: #6b46c1; }
.vd-avatar--t6 { background: #c2410c; }
.vd-avatar--t7 { background: #0f766e; }

.vd-avatar-ring {
  padding: 2px;
  border-radius: 50%;
  background: var(--vd-surface);
  box-shadow: 0 0 0 2px var(--vd-border);
  display: inline-flex;
}

/* ---------------------------------------------------------------------------
   Status pills
   ------------------------------------------------------------------------ */

.vd-status {
  display: inline-flex;
  align-items: center;
  gap: .4375rem;
  padding: .25rem .625rem;
  border-radius: var(--vd-radius-pill);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.vd-status::before {
  content: "";
  width: .4375rem;
  height: .4375rem;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.vd-status--success { color: var(--vd-success); background: rgba(20, 160, 106, .12); }
.vd-status--danger  { color: var(--vd-danger);  background: rgba(220, 59, 75, .12); }
.vd-status--warning { color: var(--vd-warning); background: rgba(224, 148, 12, .14); }
.vd-status--info    { color: var(--vd-info);    background: rgba(15, 131, 196, .12); }
.vd-status--primary { color: var(--vd-blue);    background: rgba(21, 70, 180, .10); }
.vd-status--muted   { color: var(--vd-ink-3);   background: rgba(124, 136, 160, .14); }

/* ---------------------------------------------------------------------------
   Buttons, forms, inputs
   ------------------------------------------------------------------------ */

.btn {
  border-radius: var(--vd-radius-sm);
  font-weight: 500;
  transition: transform .12s var(--vd-ease), box-shadow .18s var(--vd-ease),
              background-color .18s var(--vd-ease), border-color .18s var(--vd-ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  box-shadow: 0 4px 12px -6px rgba(21, 70, 180, .8);
}

.btn-primary:hover {
  box-shadow: 0 6px 16px -6px rgba(21, 70, 180, .85);
}

.btn-sm {
  border-radius: 8px;
}

/* Icon-only ghost button used in table rows. */
.vd-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--vd-ink-3);
  font-size: 1.0625rem;
  transition: background-color .15s var(--vd-ease), color .15s var(--vd-ease),
              border-color .15s var(--vd-ease);
}

.vd-icon-btn:hover {
  background: var(--vd-blue-050);
  border-color: var(--vd-border);
  color: var(--vd-blue);
}

.vd-icon-btn--danger:hover {
  background: rgba(220, 59, 75, .1);
  color: var(--vd-danger);
}

.form-control,
.form-select {
  border-radius: var(--vd-radius-sm);
  border-color: var(--vd-border-strong);
  color: var(--vd-ink);
  transition: border-color .15s var(--vd-ease), box-shadow .15s var(--vd-ease);
}

.form-control::placeholder {
  color: var(--vd-ink-3);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--vd-blue);
  box-shadow: 0 0 0 3px rgba(21, 70, 180, .12) !important;
}

.form-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--vd-ink-2);
  margin-bottom: .375rem;
}

.input-group-text {
  background: var(--vd-surface-2);
  border-color: var(--vd-border-strong);
  color: var(--vd-ink-3);
}

.vd-form-hint {
  display: block;
  margin-top: .375rem;
  font-size: .75rem;
  color: var(--vd-ink-3);
}

/* Section divider inside long forms */
.vd-form-section {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 1.5rem 0 1rem;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--vd-ink-3);
}

.vd-form-section::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--vd-border);
}

/* ---------------------------------------------------------------------------
   Offcanvas & modals
   ------------------------------------------------------------------------ */

.offcanvas {
  border: 0;
  box-shadow: var(--vd-shadow-lg);
}

.offcanvas-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--vd-border);
}

.offcanvas-title {
  font-size: 1.0625rem;
  font-weight: 650;
}

.offcanvas-body {
  padding: 1.5rem;
}

/* Sticky action bar so long forms never hide their submit button. */
.vd-offcanvas-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: .5rem;
  margin: 1.5rem -1.5rem -1.5rem;
  padding: 1rem 1.5rem;
  background: var(--vd-surface);
  border-top: 1px solid var(--vd-border);
}

.modal-content {
  border: 0;
  border-radius: var(--vd-radius);
  box-shadow: var(--vd-shadow-lg);
}

/* ---------------------------------------------------------------------------
   Empty states
   ------------------------------------------------------------------------ */

.vd-empty {
  padding: 3rem 1.5rem;
  text-align: center;
}

.vd-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--vd-blue-050);
  color: var(--vd-blue);
  font-size: 1.75rem;
}

.vd-empty__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--vd-ink);
  margin-bottom: .25rem;
}

.vd-empty__text {
  font-size: .875rem;
  color: var(--vd-ink-3);
  margin: 0 auto;
  max-width: 44ch;
}

/* ---------------------------------------------------------------------------
   Misc: progress, list rows, pagination, alerts
   ------------------------------------------------------------------------ */

.vd-progress {
  display: block;
  height: 6px;
  border-radius: var(--vd-radius-pill);
  background: var(--vd-border);
  overflow: hidden;
}

.vd-progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--vd-blue);
  transition: width .6s var(--vd-ease);
}

.vd-progress__bar--success { background: var(--vd-success); }
.vd-progress__bar--warning { background: var(--vd-warning); }
.vd-progress__bar--danger  { background: var(--vd-danger); }

/* Compact list rows used by dashboard panels. */
.vd-list {
  display: flex;
  flex-direction: column;
}

.vd-list__row {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .8125rem 1.375rem;
  border-bottom: 1px solid var(--vd-border);
  transition: background-color .15s var(--vd-ease);
}

.vd-list__row:last-child {
  border-bottom: 0;
}

.vd-list__row:hover {
  background: var(--vd-surface-2);
}

/* Keep hover fills inside the card's rounded corners. */
.card > .vd-list__row:last-child,
.card > .vd-list:last-child .vd-list__row:last-child {
  border-radius: 0 0 var(--vd-radius) var(--vd-radius);
}

.card > .vd-table-wrap:last-child .vd-table > tbody > tr:last-child > td:first-child {
  border-bottom-left-radius: var(--vd-radius);
}

.card > .vd-table-wrap:last-child .vd-table > tbody > tr:last-child > td:last-child {
  border-bottom-right-radius: var(--vd-radius);
}

.vd-list__body {
  flex: 1;
  min-width: 0;
}

.vd-list__title {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--vd-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vd-list__meta {
  display: block;
  font-size: .75rem;
  color: var(--vd-ink-3);
}

.vd-list__value {
  font-size: .875rem;
  font-weight: 650;
  color: var(--vd-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pagination {
  gap: .25rem;
}

.pagination .page-link {
  border-radius: 8px;
  border-color: var(--vd-border);
  color: var(--vd-ink-2);
  min-width: 2rem;
  text-align: center;
}

.pagination .page-item.active .page-link {
  box-shadow: 0 4px 12px -6px rgba(21, 70, 180, .8);
}

/* Toast-style flash messages, top-right. */
.vd-flash-stack {
  position: fixed;
  /* Clears the navbar so a toast never sits on top of the account menu. */
  top: 4.75rem;
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: min(24rem, calc(100vw - 2rem));
}

.vd-flash {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--vd-radius-sm);
  border: 1px solid var(--vd-border);
  border-left: 3px solid var(--vd-blue);
  background: var(--vd-surface);
  box-shadow: var(--vd-shadow-md);
  color: var(--vd-ink-2);
  font-size: .875rem;
  animation: vd-flash-in .28s var(--vd-ease) both;
}

.vd-flash--success { border-left-color: var(--vd-success); }
.vd-flash--danger  { border-left-color: var(--vd-danger); }
.vd-flash--warning { border-left-color: var(--vd-warning); }

.vd-flash__icon {
  font-size: 1.125rem;
  line-height: 1.2;
}

.vd-flash--success .vd-flash__icon { color: var(--vd-success); }
.vd-flash--danger  .vd-flash__icon { color: var(--vd-danger); }
.vd-flash--warning .vd-flash__icon { color: var(--vd-warning); }
.vd-flash--info    .vd-flash__icon { color: var(--vd-info); }

.vd-flash__body { flex: 1; }

.vd-flash.vd-flash--leaving {
  animation: vd-flash-out .25s var(--vd-ease) both;
}

@keyframes vd-flash-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes vd-flash-out {
  to { opacity: 0; transform: translateX(12px); }
}

/* ---------------------------------------------------------------------------
   Auth pages
   ------------------------------------------------------------------------ */

.vd-auth {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  background: var(--vd-bg);
  overflow: hidden;
}

/* Two soft brand washes so the centred card sits on something, not a flat slab. */
.vd-auth::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 42% at 50% -6%, rgba(21, 70, 180, .13) 0%, transparent 66%),
    radial-gradient(26% 34% at 92% 100%, rgba(245, 184, 28, .16) 0%, transparent 68%);
  pointer-events: none;
}

/* Faint grid texture, faded out towards the edges. */
.vd-auth::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 70, 180, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 70, 180, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(64% 58% at 50% 42%, #000 0%, transparent 100%);
  mask-image: radial-gradient(64% 58% at 50% 42%, #000 0%, transparent 100%);
  pointer-events: none;
}

.vd-auth__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 25rem;
}

.vd-auth__brand {
  display: block;
  margin-bottom: 1.75rem;
  text-align: center;
}

.vd-auth__brand img {
  height: 66px;
  width: auto;
}

.vd-auth__legal {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: .8125rem;
  color: var(--vd-ink-3);
}

/* The auth pages have no navbar, so toasts start at the top edge there. */
.vd-auth ~ .vd-flash-stack {
  top: 1rem;
}

.vd-auth__card {
  width: 100%;
}

.vd-auth__card .card {
  border: 1px solid var(--vd-border);
  border-radius: 18px;
  box-shadow: var(--vd-shadow-lg);
}

@media (max-width: 575.98px) {
  .vd-auth {
    padding: 1.75rem 1rem;
  }

  .vd-auth__brand img {
    height: 56px;
  }
}

/* ---------------------------------------------------------------------------
   Scrollbars & responsive trims
   ------------------------------------------------------------------------ */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--vd-border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: var(--vd-border-strong);
  border: 3px solid var(--vd-bg);
  border-radius: var(--vd-radius-pill);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--vd-ink-3);
}

@media (max-width: 767.98px) {
  .vd-page-header__title { font-size: 1.25rem; }
  .vd-stat { padding: 1rem; }
  .vd-stat__value { font-size: 1.375rem; }
  .vd-table > thead > tr > th,
  .vd-table > tbody > tr > td { padding-left: 1rem; padding-right: 1rem; }
  .vd-toolbar { padding: .875rem 1rem; }
  .vd-table-foot { padding: .875rem 1rem; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .layout-navbar,
  .layout-menu,
  .content-footer,
  .vd-page-header__actions,
  .vd-toolbar,
  .vd-table-foot,
  .vd-flash-stack,
  .vd-row-actions {
    display: none !important;
  }

  body { background: #fff; }

  .card,
  .vd-stat {
    box-shadow: none !important;
    border-color: #d5d5d5 !important;
    break-inside: avoid;
  }
}
