// S13b: UI typeface (self-hosted, OFL), plain CSS import resolved by Vite.
@import "@fontsource-variable/plus-jakarta-sans/wght.css";

// Admin design layer (CoolAdmin theme), loaded after the theme and the page CSS.
// S13 light restyle, refreshed in S13b to the dev mockup: navy sidebar, light canvas, white cards.
// Same fields, names, routes and flows.
@import 'partials/tokens';

$sidebar: 264px;

html,
body,
h1, h2, h3, h4, h5, h6,
.btn,
.form-control,
.au-input,
table {
  font-family: var(--z-font);
}

body {
  background: var(--z-canvas);
  color: var(--z-ink-2);
  font-size: 14px;
  word-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--z-primary);
}

a:hover {
  color: var(--z-primary-hover);
}

.page-container2 {
  min-height: 100vh;
  background:
    radial-gradient(900px 380px at 100% -10%, #e3ecfb 0, rgba(227, 236, 251, 0) 65%),
    var(--z-canvas);
}

// ---------- Sidebar (desktop) and drawer (mobile) ----------
.menu-sidebar2,
.menu-sidebar2.js-right-sidebar {
  background: var(--z-navy);
}

.menu-sidebar2 .logo,
.menu-sidebar2.js-right-sidebar .logo {
  height: 72px;
  padding: 0 24px;
  background: transparent;
}

.menu-sidebar2 .z-logo,
.header-desktop2 .z-logo {
  color: #fff;
  font-size: 21px;
}

.menu-sidebar2__content {
  height: calc(100vh - 72px);
  border-right: none;
  padding: 0 12px 24px;
}

.account2 {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 12px;
  background: var(--z-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.z-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--z-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.z-account__text {
  min-width: 0;
}

.account2 .name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.z-account__text > a {
  font-size: 12.5px;
  color: #a9b6cf;
}

.z-account__text > a:hover {
  color: #fff;
}

.navbar-sidebar2 .navbar__list li a {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
  padding: 11px 40px 11px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #c9d3e6;
  border-bottom: none;
  border-radius: var(--z-radius-sm);
  transition: color 0.15s var(--z-ease), background-color 0.15s var(--z-ease);
}

.navbar-sidebar2 .navbar__list li a > i {
  width: 18px;
  margin-right: 12px;
  text-align: center;
  font-size: 15px;
  color: #8fa0c0;
}

.navbar-sidebar2 .navbar__list li:hover > a,
.navbar-sidebar2 .navbar__list li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.navbar-sidebar2 .navbar__list li.active > a {
  color: #fff;
}

.navbar-sidebar2 .navbar__list li.active > a > i {
  color: #fff;
}

.navbar-sidebar2 .navbar__list li .arrow {
  right: 4px;
  height: 42px;
  width: 36px;
  line-height: 42px;
}

.navbar-sidebar2 .navbar__list li .arrow i {
  font-size: 14px;
  color: #8fa0c0;
}

.navbar-sidebar2 .navbar__sub-list {
  margin: 2px 0 8px;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-sidebar2 .navbar__sub-list li {
  background: transparent;
}

.navbar-sidebar2 .navbar__sub-list li a {
  padding: 9px 12px 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
}

.navbar-sidebar2 .navbar__sub-list li a > i {
  font-size: 13px;
}

.navbar-sidebar2 .navbar__sub-list li.active > a {
  background: var(--z-navy-3);
  color: #fff;
}

@media (min-width: 992px) {
  .menu-sidebar2 {
    width: $sidebar;
  }

  .page-container2 {
    padding-left: $sidebar;
  }

  // No top bar on desktop (the sidebar carries the name); the breadcrumb moves up.
  .header-desktop2 {
    display: none;
  }

  .au-breadcrumb.m-t-75 {
    margin-top: 0;
  }
}

// Top bar on small screens only.
.header-desktop2 {
  background: var(--z-navy);
  height: 64px;
}

.header-wrap2 {
  height: 64px;
}

.header-button-item {
  color: #fff;
}

// ---------- Breadcrumb and page header ----------
.au-breadcrumb {
  height: auto;
  background: transparent;
  padding: 24px 0 0;
  border-bottom: none;
}

.au-breadcrumb .section__content {
  transform: none;
}

.au-breadcrumb .container-fluid {
  padding: 0;
}

.au-breadcrumb__list {
  margin: 0;
  font-size: 13px;
}

.au-breadcrumb__list li,
.au-breadcrumb__list li span,
.au-breadcrumb__list li a {
  color: var(--z-ink-3);
}

.au-breadcrumb__list li.active a:hover {
  color: var(--z-primary);
}

.z-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.z-page-head__title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--z-ink);
}

.z-page-head__lead {
  margin: 0;
  font-size: 14px;
  color: var(--z-ink-3);
}

.z-page-head__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
}

.z-page-head__action i {
  font-size: 12px;
}

// ---------- Dashboard counters ----------
.overview-item {
  padding: 20px;
  background: var(--z-surface);
  border: 1px solid var(--z-line);
  border-radius: var(--z-radius-lg);
  box-shadow: var(--z-shadow-card);
}

.overview-item--c1,
.overview-item--c2 {
  background-image: none;
  background-color: var(--z-surface);
}

.overview-box .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-right: 16px;
  border-radius: 12px;
  background: var(--z-primary-tint);
}

.overview-box .icon i,
.overview-item .overview-box .icon i {
  font-size: 22px;
  color: var(--z-primary);
}

.overview-box .text h2,
.overview-item .overview-box .text h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--z-ink);
  font-variant-numeric: tabular-nums;
}

.overview-box .text span,
.overview-item .overview-box .text span {
  font-size: 13px;
  font-weight: 600;
  color: var(--z-ink-3);
  opacity: 1;
}

// ---------- Buttons ----------
.btn {
  border-radius: var(--z-radius-sm);
  font-weight: 600;
  transition: background-color 0.15s var(--z-ease), border-color 0.15s var(--z-ease), color 0.15s var(--z-ease), box-shadow 0.15s var(--z-ease);
}

.btn-primary,
.au-btn--green {
  background: var(--z-primary);
  border-color: var(--z-primary);
  color: #fff;
}

.btn-primary:hover,
.au-btn--green:hover,
.btn-primary:not(:disabled):not(.disabled):active {
  background: var(--z-primary-hover);
  border-color: var(--z-primary-hover);
  color: #fff;
}

.btn-secondary,
.btn-outline-secondary {
  background: var(--z-surface);
  border-color: var(--z-line-strong);
  color: var(--z-ink-2);
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
  background: var(--z-surface-2);
  border-color: var(--z-line-strong);
  color: var(--z-ink);
}

.btn-outline-danger {
  color: var(--z-danger);
  border-color: var(--z-danger-line);
}

.btn-outline-danger:hover {
  background: var(--z-danger);
  border-color: var(--z-danger);
  color: #fff;
}

.au-btn {
  border-radius: var(--z-radius-sm);
}

.btn:focus,
.btn.focus {
  box-shadow: none;
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
.form-control:focus,
.au-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--z-primary-ring) !important;
}

// ---------- Lists (DataTables) ----------
.z-list .dataTables_wrapper {
  color: var(--z-ink-2);
}

.z-list .dataTables_length label,
.z-list .dataTables_filter label {
  font-size: 13.5px;
  color: var(--z-ink-2);
}

.z-list .dataTables_length select {
  height: 36px;
  margin: 0 6px;
  border-radius: var(--z-radius-sm);
}

.z-list .dataTables_filter input {
  width: 260px;
  height: 38px;
  margin-left: 0;
  padding-left: 36px;
  border-radius: var(--z-radius-sm);
  background: var(--z-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6779' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center / 16px;
}

.z-list .table {
  margin: 12px 0 !important;
  background: var(--z-surface);
  border: 1px solid var(--z-line);
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: var(--z-radius-lg);
  box-shadow: var(--z-shadow-card);
  overflow: hidden;
}

.z-list .table td,
.z-list .table th {
  text-align: left !important;
  vertical-align: middle;
  border-left: none !important;
  border-right: none !important;
  border-top: none;
  border-bottom: 1px solid var(--z-line);
  padding: 10px 20px;
}

.z-list .table tbody tr:last-child td {
  border-bottom: none;
}

.z-list .table thead th {
  background: var(--z-surface-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--z-ink);
  border-bottom: 1px solid var(--z-line) !important;
}

.z-list .table-striped tbody tr:nth-of-type(odd) {
  background: var(--z-surface);
}

.z-list .table-striped tbody tr:nth-of-type(even) {
  background: #fbfcfe;
}

.z-list .table tbody tr:hover {
  background: var(--z-primary-tint);
}

.z-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--z-ink);
}

a.z-name:hover {
  color: var(--z-primary);
  text-decoration: none;
}

.z-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--z-radius-sm);
  background: var(--z-surface-2);
  border: 1px solid var(--z-line);
  color: var(--z-ink-3);
  font-size: 14px;
}

.z-chip img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

// Edit / Delete: quiet outlines that fill on hover.
.table .btn-xs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
}

.table .btn-info {
  color: var(--z-primary);
  background: var(--z-surface);
  border-color: var(--z-primary-soft);
}

.table .btn-info:hover {
  color: #fff;
  background: var(--z-primary);
  border-color: var(--z-primary);
}

.table .btn-danger {
  color: var(--z-danger);
  background: var(--z-surface);
  border-color: var(--z-danger-line);
}

.table .btn-danger:hover {
  color: #fff;
  background: var(--z-danger);
  border-color: var(--z-danger);
}

.z-list .dataTables_info {
  padding-top: 14px !important;
  font-size: 13px;
  color: var(--z-ink-3);
}

.pagination {
  gap: 6px;
}

.page-link,
.page-item:first-child .page-link,
.page-item:last-child .page-link {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--z-ink-2);
  background: var(--z-surface);
  border: 1px solid var(--z-line);
  border-radius: var(--z-radius-sm);
}

.page-link:hover {
  color: var(--z-primary);
  background: var(--z-primary-tint);
  border-color: var(--z-primary-soft);
}

.page-item.active .page-link {
  color: #fff;
  background: var(--z-primary);
  border-color: var(--z-primary);
}

.page-item.disabled .page-link {
  color: var(--z-line-strong);
  background: var(--z-surface);
  border-color: var(--z-line);
}

.alert-info {
  color: var(--z-ink-2);
  background: var(--z-primary-tint);
  border-color: var(--z-primary-soft);
  border-radius: var(--z-radius);
}

// ---------- Forms (create / edit pages) ----------
.section__content .card {
  border: 1px solid var(--z-line);
  border-radius: var(--z-radius-lg);
  box-shadow: var(--z-shadow-card);
  overflow: hidden;
}

.section__content .card-body {
  padding: 24px;
}

.section__content .card-footer {
  display: flow-root;
  margin: 16px -24px -24px;
  padding: 16px 24px;
  background: var(--z-surface-2);
  border-top: 1px solid var(--z-line);
}

// Pack / new-product blocks (inline border from the views overridden).
.section__content .details {
  border: 1px solid var(--z-line) !important;
  border-radius: var(--z-radius);
  background: #fbfcfe;
  padding: 16px !important;
}

.card .btn > i.fas,
.card .btn > i.far,
.card .btn > i.fa {
  margin-right: 6px;
}

.form-control-label,
.form-horizontal label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--z-ink);
}

.form-control,
.au-input {
  min-height: 40px;
  border-color: var(--z-line-strong);
  border-radius: var(--z-radius-sm);
  color: var(--z-ink);
}

.form-control:focus,
.au-input:focus {
  border-color: var(--z-primary);
}

.form-control::placeholder,
.au-input::placeholder {
  color: var(--z-ink-3);
  opacity: 1;
}

// ---------- Footer ----------
.copyright p {
  font-size: 12.5px;
  color: var(--z-ink-3);
}

// ---------- Login ----------
.page-content--bge5 {
  background:
    radial-gradient(1000px 460px at 15% -10%, #dbe7fb 0, rgba(219, 231, 251, 0) 62%),
    var(--z-canvas);
}

.login-content {
  max-width: 440px;
  margin: 0 auto;
  padding: 36px 32px;
  border: 1px solid var(--z-line);
  border-radius: var(--z-radius-lg);
  box-shadow: var(--z-shadow-card);
}

.login-logo {
  margin-bottom: 28px;
}

.login-logo h1 {
  margin: 0;
}

.login-logo .z-logo {
  font-size: 26px;
}

.login-form label {
  color: var(--z-ink);
  font-size: 13.5px;
  font-weight: 600;
}

.login-form .au-btn--block {
  height: 46px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 46px;
}

// ---------- Modals (delete confirmations) ----------
.modal-content {
  border: none;
  border-radius: var(--z-radius-lg);
  box-shadow: 0 24px 56px rgba(15, 27, 45, 0.22);
}

.modal-header,
.modal-footer {
  border-color: var(--z-line);
}

.modal-title {
  color: var(--z-ink);
  font-weight: 800;
}

@media (max-width: 991px) {
  .section__content--p30 {
    padding: 0 16px;
  }

  .header-wrap2 {
    align-items: center;
    justify-content: space-between;
  }

  .header-desktop2 .logo a {
    display: flex;
    align-items: center;
    height: 64px;
  }

  .au-breadcrumb-content {
    align-items: flex-start;
  }

  .z-page-head__title {
    font-size: 24px;
  }

  .z-list .dataTables_filter input {
    width: 100%;
  }
}
