/* ==========================================================================
   Eco Theme — global UI layer
   --------------------------------------------------------------------------
   Loaded after AdminLTE (and after common/board/header.php, which re-links
   adminlte.min.css inside <body>) so these rules win the cascade without
   touching any markup hooks the page scripts rely on.

   Everything inside #InvoicePDF (the on-screen PDF previews on the Share
   pages) is deliberately left alone — see "PDF preview guard" at the end.
   ========================================================================== */

:root {
  --eco-primary:        #733dd9;
  --eco-primary-600:    #6532c7;
  --eco-primary-700:    #5427a8;
  --eco-primary-400:    #8f63e6;
  --eco-primary-300:    #b596f0;
  --eco-primary-200:    #d8c9f8;
  --eco-primary-100:    #ece5fc;
  --eco-primary-50:     #f6f2fe;

  --eco-ink:            #1c1830;
  --eco-text:           #3b3851;
  --eco-muted:          #6e6b85;
  --eco-subtle:         #9a97b0;

  --eco-bg:             #f5f4fa;
  --eco-surface:        #ffffff;
  --eco-surface-2:      #fafafd;
  --eco-border:         #e7e5f0;
  --eco-border-soft:    #efedf6;
  --eco-border-strong:  #d9d6e6;

  --eco-success:        #16a34a;
  --eco-success-50:     #ecfdf3;
  --eco-danger:         #e11d48;
  --eco-danger-50:      #fff1f3;
  --eco-warning:        #d97706;
  --eco-warning-50:     #fffbeb;
  --eco-info:           #0284c7;
  --eco-info-50:        #f0f9ff;

  --eco-radius-sm:      8px;
  --eco-radius:         10px;
  --eco-radius-lg:      14px;
  --eco-radius-xl:      18px;

  --eco-shadow-xs:      0 1px 2px rgba(28, 24, 48, .05);
  --eco-shadow-sm:      0 1px 3px rgba(28, 24, 48, .06), 0 1px 2px rgba(28, 24, 48, .04);
  --eco-shadow:         0 4px 12px -2px rgba(28, 24, 48, .08), 0 2px 4px -2px rgba(28, 24, 48, .04);
  --eco-shadow-lg:      0 18px 40px -12px rgba(28, 24, 48, .22);
  --eco-ring:           0 0 0 3px rgba(115, 61, 217, .16);

  --eco-font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --eco-topbar-h:       64px;
}

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */
body {
  font-family: var(--eco-font);
  font-size: .875rem;
  color: var(--eco-text);
  background: var(--eco-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.003em;
}

::selection { background: var(--eco-primary-100); color: var(--eco-primary-700); }

a { color: var(--eco-primary-600); }
a:hover { color: var(--eco-primary-700); }

.text-muted { color: var(--eco-muted) !important; }
.text-primary { color: var(--eco-primary) !important; }
.bg-primary { background-color: var(--eco-primary) !important; }

code { color: var(--eco-primary-700); }

input[type="radio"],
input[type="checkbox"] { accent-color: var(--eco-primary); }

/* Thin, quiet scrollbars — scoped, so OverlayScrollbars (sidebar) keeps
   hiding its native bars correctly */
.table-responsive, .eco-table-responsive, .modal, .dropdown-menu,
.select2-results__options, .autocomplete-suggestions, textarea {
  scrollbar-width: thin; scrollbar-color: #cfcbe0 transparent;
}

/* --------------------------------------------------------------------------
   2. Layout shell
   -------------------------------------------------------------------------- */
.content-wrapper { background: var(--eco-bg); }
.content-wrapper > .content-header { padding: 6px .5rem 0; min-height: 0; }
.content-wrapper > .content { padding: 0 .5rem 1.25rem; }
@media (min-width: 768px) {
  .content-wrapper > .content-header { padding: 10px 1rem 0; }
  .content-wrapper > .content { padding: 0 1rem 1.75rem; }
}

/* Preloader */
.preloader { background: var(--eco-surface) !important; }
.eco-loader { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.eco-loader-logo { height: 34px; width: auto; }
.eco-loader-bar {
  position: relative; width: 140px; height: 4px; border-radius: 99px;
  background: var(--eco-primary-100); overflow: hidden;
}
.eco-loader-bar span {
  position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, var(--eco-primary-400), var(--eco-primary));
  animation: eco-loader-slide 1.1s ease-in-out infinite;
}
@keyframes eco-loader-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}

/* --------------------------------------------------------------------------
   3. Top bar
   -------------------------------------------------------------------------- */
.main-header.navbar {
  min-height: var(--eco-topbar-h);
  padding: 0 1rem 0 .75rem;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--eco-border) !important;
  position: sticky;
  top: 0;
  z-index: 1034;
}
.main-header .navbar-nav .nav-link { color: var(--eco-muted); }

.eco-icon-btn.nav-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0 !important; border-radius: var(--eco-radius);
  color: var(--eco-muted) !important; transition: background .15s, color .15s;
}
.eco-icon-btn.nav-link:hover { background: var(--eco-primary-50); color: var(--eco-primary) !important; }

.eco-greeting { display: flex; flex-direction: column; justify-content: center; line-height: 1.25; padding-left: .5rem; }
.eco-greeting-title { font-size: .95rem; font-weight: 600; color: var(--eco-ink); }
.eco-greeting-title strong { font-weight: 700; color: var(--eco-primary-700); }
.eco-greeting-date { font-size: .75rem; color: var(--eco-subtle); font-weight: 500; }

.eco-user-chip.nav-link {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 4px 10px 4px 4px !important;
  border: 1px solid var(--eco-border); border-radius: 999px;
  background: var(--eco-surface); transition: border-color .15s, box-shadow .15s;
}
.eco-user-chip.nav-link:hover,
.show > .eco-user-chip.nav-link { border-color: var(--eco-primary-200); box-shadow: var(--eco-ring); }
.eco-user-meta { flex-direction: column; line-height: 1.2; max-width: 180px; }
.eco-user-name { font-size: .8125rem; font-weight: 600; color: var(--eco-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-user-email { font-size: .72rem; color: var(--eco-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-caret { font-size: .65rem; color: var(--eco-subtle); }

.eco-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--eco-primary-400), var(--eco-primary-700));
  color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.eco-avatar-lg { width: 44px; height: 44px; font-size: .95rem; }

.eco-user-menu.dropdown-menu { min-width: 270px; padding: 6px; margin-top: 8px !important; }
.eco-user-menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; }
.eco-user-menu-head .eco-user-menu-name { font-weight: 700; color: var(--eco-ink); font-size: .9rem; line-height: 1.3; }
.eco-user-menu-head .eco-user-menu-email { font-size: .78rem; color: var(--eco-muted); word-break: break-all; }
.eco-user-menu .dropdown-item i { width: 18px; text-align: center; margin-right: 8px; color: var(--eco-subtle); }
.eco-user-menu .dropdown-item.eco-logout,
.eco-user-menu .dropdown-item.eco-logout i { color: var(--eco-danger); }
.eco-user-menu .dropdown-item.eco-logout:hover { background: var(--eco-danger-50); }

/* --------------------------------------------------------------------------
   4. Sidebar — quiet list, tinted active row, pinned profile footer
   -------------------------------------------------------------------------- */
body .main-sidebar {
  --sb-foot-h: 60px;
  background: var(--eco-surface) !important;
  border-right: 1px solid var(--eco-border);
  box-shadow: none !important;
  overflow-x: hidden !important; /* the 1px border would otherwise trigger a horizontal scrollbar */
}
.main-sidebar .eco-brand.brand-link {
  display: flex; align-items: center;
  height: var(--eco-topbar-h); padding: 0 1.25rem;
  border-bottom: 1px solid var(--eco-border-soft) !important;
  overflow: hidden; background: var(--eco-surface);
}
.main-sidebar .eco-brand .brand-image {
  float: none; margin: 0 !important; max-height: 28px; width: auto; max-width: none;
  box-shadow: none !important;
}
/* Leave room for the pinned footer */
.layout-fixed .wrapper .main-sidebar .sidebar { height: calc(100% - var(--eco-topbar-h) - var(--sb-foot-h)); }
.main-sidebar .sidebar { padding: 8px .5rem 12px; }

/* Section labels */
.nav-sidebar .nav-header {
  padding: 18px 12px 6px !important;
  font-size: .64rem !important; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #aaa6bf !important;
  white-space: nowrap; overflow: hidden;
}
.nav-sidebar > .nav-header:first-child { padding-top: 8px !important; }

/* Rows */
body .main-sidebar .nav-sidebar .nav-link {
  position: relative;
  display: flex; align-items: center;
  min-height: 38px; padding: 0 10px; margin-bottom: 1px;
  border-radius: 8px;
  color: #4a4763; font-size: .855rem; font-weight: 500;
  transition: background .15s, color .15s;
}
body .main-sidebar .nav-sidebar .nav-link > .nav-icon {
  font-size: .88rem; width: 1.5rem; margin-right: .55rem; text-align: center;
  color: #a19db8; transition: color .15s;
}
body .main-sidebar .nav-sidebar .nav-link > p { flex: 1 1 auto; margin: 0; line-height: 1.3; }
body .main-sidebar .nav-sidebar .nav-link > p > .right {
  top: 50%; right: .7rem; transform: translateY(-50%);
  font-size: .72rem; color: #b9b5cc; transition: transform .2s;
}
body .main-sidebar .nav-sidebar .menu-open > .nav-link > p > .right { transform: translateY(-50%) rotate(-90deg); }

body .main-sidebar .nav-sidebar .nav-link:hover { background: #f5f4fa; color: var(--eco-ink); }
body .main-sidebar .nav-sidebar .nav-link:hover > .nav-icon { color: var(--eco-text); }

/* Active row — soft tint + a thin accent bar at the sidebar edge */
body .main-sidebar .nav-sidebar .nav-link.active,
body .main-sidebar .nav-sidebar .nav-link.active:hover {
  background: var(--eco-primary-50) !important;
  color: var(--eco-primary-700) !important;
  font-weight: 600;
  box-shadow: none !important;
}
body .main-sidebar .nav-sidebar .nav-link.active > .nav-icon { color: var(--eco-primary) !important; }
body .main-sidebar .nav-sidebar > .nav-item > .nav-link.active::before {
  content: ""; position: absolute; left: -.5rem; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--eco-primary);
}

/* Parent of an open sub-menu — coloured text only; the child row carries the tint */
body .main-sidebar .nav-sidebar > .nav-item:has(> .nav-treeview) > .nav-link.active,
body .main-sidebar .nav-sidebar > .nav-item:has(> .nav-treeview) > .nav-link.active:hover {
  background: transparent !important;
}
body .main-sidebar .nav-sidebar > .nav-item:has(> .nav-treeview) > .nav-link.active::before { display: none; }
body .main-sidebar .nav-sidebar > .nav-item:has(> .nav-treeview) > .nav-link.active > p > .right { color: var(--eco-primary-300) !important; }

/* Sub-menu: guide line + dots */
body:not(.sidebar-collapse) .main-sidebar .nav-sidebar .nav-treeview,
.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-treeview,
.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar .nav-treeview {
  margin: 0 0 6px 1.3rem;
  padding-left: .45rem;
  border-left: 1px solid var(--eco-border-soft);
}
body:not(.sidebar-collapse) .main-sidebar .nav-sidebar .nav-treeview .nav-link,
.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-treeview .nav-link,
.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar .nav-treeview .nav-link { width: auto; }
body .main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link { min-height: 34px; font-size: .82rem; color: #5a5774; }
body .main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link > .nav-icon { font-size: .34rem; width: 1rem; margin-right: .45rem; color: #c6c2d6; }
body .main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link.active > .nav-icon::before { content: "\f111"; font-weight: 900; } /* filled dot */

/* Pinned footer: who is signed in + log out */
.eco-sidebar-foot {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--sb-foot-h);
  display: flex; align-items: center; gap: 6px;
  padding: 0 .75rem 0 .9rem;
  background: var(--eco-surface);
  border-top: 1px solid var(--eco-border-soft);
  overflow: hidden; white-space: nowrap;
}
.eco-sf-user {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 6px; margin-left: -6px; border-radius: 10px;
  color: inherit !important; text-decoration: none !important;
  transition: background .15s;
}
.eco-sf-user:hover { background: #f5f4fa; }
.eco-avatar.eco-avatar-sm { width: 32px; height: 32px; font-size: .72rem; }
.eco-sf-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.eco-sf-name { font-size: .82rem; font-weight: 600; color: var(--eco-ink); overflow: hidden; text-overflow: ellipsis; }
.eco-sf-sub { font-size: .72rem; color: var(--eco-subtle); }
.eco-sf-logout {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  color: var(--eco-subtle) !important; font-size: .85rem;
  transition: background .15s, color .15s;
}
.eco-sf-logout:hover { background: var(--eco-danger-50); color: var(--eco-danger) !important; }

/* Collapsed (mini) rail */
@media (min-width: 992px) {
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-sidebar .nav-header {
    display: block !important;
    font-size: 0 !important; height: 1px; padding: 0 !important; margin: 10px 12px;
    background: var(--eco-border-soft);
  }
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-sidebar > .nav-header:first-child { display: none !important; }
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-sidebar .nav-link { padding-left: 16px; }
  /* Show just the logo mark (left edge of the wordmark) in the mini rail */
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .eco-brand.brand-link { justify-content: center; padding: 0; }
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .eco-brand .brand-image {
    width: 21px; height: 28px; object-fit: cover; object-position: left center;
  }
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .eco-sidebar-foot { justify-content: center; padding: 0; }
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .eco-sf-user { flex: 0 0 auto; margin: 0; }
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .eco-sf-meta,
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .eco-sf-logout { display: none; }
}

/* --------------------------------------------------------------------------
   5. Footer
   -------------------------------------------------------------------------- */
.main-footer {
  background: transparent;
  border-top: 1px solid var(--eco-border);
  color: var(--eco-subtle);
  font-size: .78rem;
  padding: 14px 1.5rem;
}
.main-footer strong { font-weight: 600; color: var(--eco-muted); }
.main-footer a { color: var(--eco-primary-600); }

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.card {
  border: 1px solid var(--eco-border);
  border-radius: var(--eco-radius-lg);
  box-shadow: var(--eco-shadow-sm);
  background: var(--eco-surface);
  margin-bottom: 1.25rem;
}
.card .card { box-shadow: none; }
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--eco-border-soft);
  padding: 1rem 1.25rem;
}
.card > .card-header:first-child { border-radius: var(--eco-radius-lg) var(--eco-radius-lg) 0 0; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--eco-ink);
  letter-spacing: -.01em;
}
.card-body { padding: 1.25rem; }
.card-footer {
  background: var(--eco-surface-2);
  border-top: 1px solid var(--eco-border-soft);
  padding: .875rem 1.25rem;
}
.card > .card-footer:last-child { border-radius: 0 0 var(--eco-radius-lg) var(--eco-radius-lg); }

/* Page heading row (first header of a page card) */
.card-header.eco-page-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 16px;
  padding: 1.1rem 1.25rem;
}
.card-header.eco-page-head::after { display: none; }
.card-header.eco-page-head > .card-title { float: none; margin: 0; }
.card-header.eco-page-head > .card-tools {
  float: none; margin: 0 0 0 auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.card-header.eco-page-head > .card-tools.d-none { display: none !important; }
.card-header.eco-page-head > .card-tools > a { text-decoration: none; }

.eco-page-title { display: flex; align-items: center; gap: 12px; }
.eco-page-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--eco-primary-50); color: var(--eco-primary);
  font-size: 1rem; box-shadow: inset 0 0 0 1px var(--eco-primary-100);
}
.eco-page-text { display: flex; flex-direction: column; line-height: 1.25; }
.eco-page-name { font-size: 1.08rem; font-weight: 700; color: var(--eco-ink); }
.eco-page-sub { font-size: .78rem; font-weight: 500; color: var(--eco-muted); margin-top: 2px; letter-spacing: 0; }

/* Sub-section heading inside a form */
.eco-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: .95rem; font-weight: 700; color: var(--eco-ink);
  margin: 0 0 1rem; padding-bottom: .65rem;
  border-bottom: 1px dashed var(--eco-border);
}
.eco-section-title i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--eco-primary-50); color: var(--eco-primary); font-size: .8rem;
}
.eco-section-title small { font-weight: 500; color: var(--eco-muted); font-size: .78rem; }

/* Filter / search strip under the page heading */
.card-header.eco-filter-bar {
  background: var(--eco-surface-2);
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--eco-border-soft) !important;
}
.card-header.eco-filter-bar::after { display: none; }
.card-header.eco-filter-bar label { font-size: .72rem !important; font-weight: 600 !important; color: var(--eco-muted) !important; text-transform: uppercase; letter-spacing: .05em; }
.card-header.eco-filter-bar .row { margin-left: -6px; margin-right: -6px; }
.card-header.eco-filter-bar .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; margin-bottom: 4px; }
.card-header.eco-filter-bar .eco-filter-note { font-size: .8rem; color: var(--eco-muted); display: flex; gap: 8px; align-items: flex-start; }
.card-header.eco-filter-bar .eco-filter-note i { color: var(--eco-primary); margin-top: 2px; }

/* Stand-alone search box */
.eco-search { position: relative; width: 100%; max-width: 320px; margin-left: auto; }
.eco-search .eco-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--eco-subtle); font-size: .8rem; pointer-events: none; z-index: 4;
}
.eco-search .form-control { padding-left: 34px !important; }
.eco-search.input-group > .form-control {
  border-top-left-radius: var(--eco-radius-sm) !important;
  border-bottom-left-radius: var(--eco-radius-sm) !important;
}
.eco-search.input-group > .input-group-append > .btn { font-weight: 600; padding-left: .9rem; padding-right: .9rem; }

/* Tables that sit directly in a card body: let the card own the frame */
.card > .card-body > .eco-table-wrap,
.card > .card-body > div > .eco-table-wrap {
  border-radius: 0; box-shadow: none; background: transparent;
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  font-weight: 600;
  font-size: .8438rem;
  border-radius: var(--eco-radius);
  padding: .5rem 1rem;
  line-height: 1.35;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn-sm, .btn-group-sm > .btn { padding: .38rem .8rem; font-size: .8rem; border-radius: var(--eco-radius-sm); }
.btn-lg { padding: .7rem 1.35rem; font-size: .95rem; border-radius: 12px; }
.btn:focus, .btn.focus { box-shadow: var(--eco-ring) !important; }
.btn i + span, .btn .fas, .btn .far { line-height: inherit; }

.btn-primary {
  background: var(--eco-primary); border-color: var(--eco-primary); color: #fff;
  box-shadow: 0 1px 2px rgba(84, 39, 168, .25), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:hover { background: var(--eco-primary-600); border-color: var(--eco-primary-600); color: #fff; }
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active { background: var(--eco-primary-700); border-color: var(--eco-primary-700); }
.btn-primary.disabled, .btn-primary:disabled { background: var(--eco-primary-300); border-color: var(--eco-primary-300); }

.btn-default {
  background: var(--eco-surface); border: 1px solid var(--eco-border-strong); color: var(--eco-text);
  box-shadow: var(--eco-shadow-xs);
}
.btn-default:hover,
.btn-default:focus { background: var(--eco-primary-50); border-color: var(--eco-primary-200); color: var(--eco-primary-700); }
.btn-default i { color: inherit; }

.btn-secondary { background: #f0eff6; border-color: #f0eff6; color: var(--eco-text); }
.btn-secondary:hover,
.btn-secondary:focus { background: #e5e3ef; border-color: #e5e3ef; color: var(--eco-ink); }
.btn-secondary:not(:disabled):not(.disabled):active { background: #dcd9e8; border-color: #dcd9e8; color: var(--eco-ink); }

.btn-success { background: var(--eco-success); border-color: var(--eco-success); }
.btn-success:hover { background: #15803d; border-color: #15803d; }
.btn-info { background: var(--eco-info); border-color: var(--eco-info); color: #fff; }
.btn-info:hover { background: #0369a1; border-color: #0369a1; color: #fff; }
.btn-danger { background: var(--eco-danger); border-color: var(--eco-danger); }
.btn-danger:hover { background: #be123c; border-color: #be123c; }

.btn-outline-primary { color: var(--eco-primary); border-color: var(--eco-primary-200); }
.btn-outline-primary:hover { background: var(--eco-primary); border-color: var(--eco-primary); color: #fff; }

/* Legacy "action-btn" used across the document screens */
.btn.action-btn,
.action-btn {
  background-color: var(--eco-primary);
  color: #fff;
  border: 1px solid var(--eco-primary);
  border-radius: var(--eco-radius);
  font-weight: 600;
  padding: .5rem 1rem !important;
}
.btn.action-btn:hover,
.action-btn:hover { background-color: var(--eco-primary-600); border-color: var(--eco-primary-600); color: #fff; }
.btn.action-btn.bg-transparent,
.btn.action-btn.bg-white {
  border: 1px solid var(--eco-border-strong) !important;
  color: var(--eco-text) !important;
}
.btn.action-btn.bg-transparent:hover,
.btn.action-btn.bg-white:hover { background: var(--eco-primary-50) !important; border-color: var(--eco-primary-200) !important; color: var(--eco-primary-700) !important; }
.btn.action-btn.purple-new { background: transparent; color: var(--eco-primary) !important; border-color: var(--eco-primary-200) !important; }
.btn.action-btn.purple-new:hover { background: var(--eco-primary-50) !important; }

/* Card-tool buttons (e.g. Share page toolbar) */
.btn.btn-tool.bg-white {
  color: var(--eco-text); border: 1px solid var(--eco-border-strong);
  border-radius: var(--eco-radius-sm); padding: .35rem .7rem; font-size: .8rem;
}
.btn.btn-tool.bg-white:hover { color: var(--eco-primary-700); border-color: var(--eco-primary-200); background: var(--eco-primary-50) !important; }

/* Row action icons from eco-tables.css — softer, rounder */
.btn-eco { width: 32px; height: 32px; border-radius: 9px; }
.btn-eco:hover { transform: translateY(-1px); }
.btn-eco-view { background: var(--eco-primary-50); color: var(--eco-primary); }
.btn-eco-view:hover { background: var(--eco-primary); color: #fff; box-shadow: 0 4px 10px rgba(115, 61, 217, .35); }
.eco-table-wrap .eco-table tbody td.eco-actions { white-space: nowrap; }

/* Document preview modal (View button on Invoice / Quotation / PO lists) */
.eco-doc-modal .modal-dialog { max-width: min(1040px, calc(100vw - 2rem)); }
.eco-doc-modal .modal-content { height: calc(100vh - 3.5rem); overflow: hidden; }
.eco-doc-modal .modal-header { flex-wrap: wrap; gap: 12px; padding: .9rem 1.1rem; }
.eco-doc-head { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 260px; }
.eco-doc-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--eco-danger-50); color: var(--eco-danger); font-size: 1rem;
}
.eco-doc-text { min-width: 0; }
.eco-doc-text .modal-title { font-size: 1rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-doc-meta { font-size: .78rem; color: var(--eco-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-doc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.eco-doc-actions .close { margin: 0 0 0 4px; }
.eco-doc-modal .modal-body { position: relative; flex: 1 1 auto; padding: 0; background: #f1f0f6; }
.eco-doc-frame { display: block; width: 100%; height: 100%; border: 0; background: #f1f0f6; opacity: 0; transition: opacity .2s; }
.eco-doc-frame.is-ready { opacity: 1; }
.eco-doc-state {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center; color: var(--eco-muted); font-size: .9rem;
}
.eco-doc-state[hidden] { display: none; }
.eco-doc-state > i { font-size: 1.8rem; color: var(--eco-primary-300); }
.eco-doc-error > i { color: var(--eco-danger); }
.eco-doc-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--eco-primary-100); border-top-color: var(--eco-primary);
  animation: eco-spin .8s linear infinite;
}
@keyframes eco-spin { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) {
  .eco-doc-modal .modal-content { height: auto; min-height: 320px; }
  .eco-doc-modal .modal-body { min-height: 220px; }
  .eco-doc-actions { width: 100%; }
  .eco-doc-actions .btn { flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   8. Forms
   -------------------------------------------------------------------------- */
label:not(.form-check-label):not(.custom-control-label):not(.custom-file-label) {
  font-size: .8125rem;
  font-weight: 600;
  color: #3f3c55;
  margin-bottom: .4rem;
}
.col-form-label { font-size: .8125rem; font-weight: 600 !important; color: #4a4763 !important; }
.form-group { margin-bottom: 1.1rem; }

.form-control {
  height: calc(2.5rem + 2px);
  padding: .5rem .8rem;
  font-size: .875rem;
  color: var(--eco-ink);
  background-color: var(--eco-surface);
  border: 1px solid var(--eco-border-strong);
  border-radius: var(--eco-radius);
  box-shadow: var(--eco-shadow-xs);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-control::placeholder { color: #a9a6bd; font-weight: 400; }
.form-control:hover:not(:focus):not(:disabled):not([readonly]) { border-color: #c9c5da; }
.form-control:focus {
  border-color: var(--eco-primary-300);
  box-shadow: var(--eco-ring);
  color: var(--eco-ink);
}
.form-control:disabled,
.form-control[readonly] { background-color: #f6f5fa; color: var(--eco-muted); }
.form-control.datepicker[readonly] { background-color: var(--eco-surface); color: var(--eco-ink); }
textarea.form-control { height: auto; min-height: calc(2.5rem + 2px); line-height: 1.5; }
select.form-control { padding-right: 2rem; }
select.form-control:not([multiple]):not([size]) {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6b85' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 12px;
}
.form-control-sm {
  height: calc(2rem + 2px);
  padding: .3rem .65rem;
  font-size: .8125rem;
  border-radius: var(--eco-radius-sm);
}
select.form-control-sm:not([multiple]):not([size]) { background-position: right .55rem center; padding-right: 1.75rem; }

/* "Underline" inputs on the document headers → boxed, like everything else */
.form-control.form-control-border {
  border: 1px solid var(--eco-border-strong) !important;
  border-radius: var(--eco-radius) !important;
  box-shadow: var(--eco-shadow-xs) !important;
}
.form-control.form-control-border:focus {
  border-color: var(--eco-primary-300) !important;
  box-shadow: var(--eco-ring) !important;
}

/* Validation (jquery-validate adds .is-invalid + .invalid-feedback) */
.form-control.is-invalid,
.was-validated .form-control:invalid { border-color: #f4a3b4 !important; background-image: none; padding-right: .8rem; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(225, 29, 72, .14) !important; }
.invalid-feedback, label.error, span.error { font-size: .76rem; font-weight: 500 !important; color: var(--eco-danger) !important; margin-top: .3rem; }
/* jquery-validate appends its message to .form-group and toggles it with inline
   display, so it may not sit right after the input (e.g. inside .eco-pass-wrap) */
.form-group > .invalid-feedback { display: block; }

/* Password field with show/hide button */
.eco-pass-wrap { position: relative; }
.eco-pass-wrap .form-control { padding-right: 46px; }
.eco-pass-wrap .eco-pass-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--eco-subtle); cursor: pointer;
  transition: background .15s, color .15s;
}
.eco-pass-wrap .eco-pass-btn:hover { background: var(--eco-primary-50); color: var(--eco-primary); }
.eco-pass-wrap .eco-pass-btn:focus { outline: none; box-shadow: var(--eco-ring); }

/* Native file inputs */
.form-control-file {
  display: block; width: 100%;
  padding: 10px;
  border: 1.5px dashed var(--eco-border-strong);
  border-radius: var(--eco-radius);
  background: var(--eco-surface-2);
  color: var(--eco-muted);
  font-size: .84rem;
  cursor: pointer;
}
.form-control-file:hover { border-color: var(--eco-primary-300); background: var(--eco-primary-50); }
.form-control-file::file-selector-button {
  margin-right: 12px; padding: 6px 14px;
  border: 0; border-radius: 8px;
  background: var(--eco-primary); color: #fff;
  font-weight: 600; font-size: .8rem; cursor: pointer;
}

/* Side note panel next to a form */
.eco-aside {
  height: 100%;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--eco-primary-50) 0%, #fbf9ff 100%);
  border: 1px solid var(--eco-primary-100);
}
.eco-aside h6 { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--eco-primary-700); margin: 0 0 .75rem; }
.eco-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.eco-aside li { display: flex; gap: 10px; font-size: .82rem; color: var(--eco-text); line-height: 1.5; }
.eco-aside li i { color: var(--eco-primary-300); margin-top: 7px; font-size: .4rem; flex: 0 0 auto; }

.input-group-text {
  background: var(--eco-surface-2);
  border-color: var(--eco-border-strong);
  color: var(--eco-muted);
  font-size: .85rem;
}
.input-group > .form-control { box-shadow: none; }
.input-group > .input-group-append > .btn,
.input-group > .input-group-prepend > .btn { box-shadow: none; }
.input-group-sm > .input-group-append > .btn { height: calc(2rem + 2px); padding-top: 0; padding-bottom: 0; }
.input-group-sm > .input-group-append > .btn:not(:last-child) { border-radius: 0; }
.input-group-sm > .input-group-append > .btn:last-child { border-radius: 0 var(--eco-radius-sm) var(--eco-radius-sm) 0; }
.input-group-sm > .form-control:first-child { border-radius: var(--eco-radius-sm) 0 0 var(--eco-radius-sm); }

/* Checkboxes & radios */
.custom-control-label::before { border-color: var(--eco-border-strong); }
.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--eco-primary); border-color: var(--eco-primary);
}
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: var(--eco-ring); }
.custom-control-label { font-weight: 500 !important; color: var(--eco-text); cursor: pointer; }
.form-check-label { cursor: pointer; color: var(--eco-text); }
[class*="icheck-"] > input:first-child:checked + label::before,
[class*="icheck-"] > input:first-child:checked + input[type="hidden"] + label::before {
  background-color: var(--eco-primary) !important; border-color: var(--eco-primary) !important;
}
[class*="icheck-"] > input:first-child:not(:checked):not(:disabled):hover + label::before { border-color: var(--eco-primary-300) !important; }

/* Radio "tiles" (GST type pickers, tax type pickers) */
.modal .form-check,
.eco-choice .form-check {
  position: relative;
  padding: .75rem .9rem .75rem 2.4rem;
  border: 1px solid var(--eco-border);
  border-radius: 12px;
  height: 100%;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.modal .form-check .form-check-input,
.eco-choice .form-check .form-check-input { margin-left: -1.55rem; margin-top: .3rem; }
.modal .form-check:hover,
.eco-choice .form-check:hover { border-color: var(--eco-primary-200); }
.modal .form-check:has(.form-check-input:checked),
.eco-choice .form-check:has(.form-check-input:checked) {
  border-color: var(--eco-primary-300);
  background: var(--eco-primary-50);
  box-shadow: var(--eco-ring);
}
.eco-choice .form-check + .form-check { margin-top: 8px; }

/* Select2 (header.php forces 38px heights with !important — match the inputs) */
body .select2-container--default .select2-selection--single,
body .select2-container--default .select2-selection--multiple {
  height: calc(2.5rem + 2px) !important;
  border: 1px solid var(--eco-border-strong) !important;
  border-radius: var(--eco-radius) !important;
  box-shadow: var(--eco-shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
body .select2-container--default .select2-selection--multiple { height: auto !important; min-height: calc(2.5rem + 2px); }
body .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: calc(2.5rem) !important;
  padding-left: .8rem; padding-right: 2rem;
  color: var(--eco-ink); font-size: .875rem;
}
body .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #a9a6bd; }
body .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(2.5rem) !important; right: 8px;
}
body .select2-container--default.select2-container--focus .select2-selection--single,
body .select2-container--default.select2-container--open .select2-selection--single,
body .select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--eco-primary-300) !important;
  box-shadow: var(--eco-ring);
}
.select2-dropdown {
  border: 1px solid var(--eco-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--eco-shadow-lg);
  overflow: hidden;
}
.select2-container--open .select2-dropdown--below { margin-top: 4px; }
.select2-container--open .select2-dropdown--above { margin-top: -4px; }
.select2-search--dropdown { padding: 8px; }
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--eco-border-strong); border-radius: var(--eco-radius-sm); padding: 6px 10px; outline: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--eco-primary-300); box-shadow: var(--eco-ring); }
.select2-results__option { padding: 8px 12px; font-size: .86rem; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--eco-primary) !important; color: #fff !important;
}
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option--selected { background: var(--eco-primary-50); color: var(--eco-primary-700); }

/* Autocomplete suggestion boxes on line items */
.autocomplete-suggestions {
  border: 1px solid var(--eco-border) !important;
  border-radius: 10px !important;
  box-shadow: var(--eco-shadow-lg) !important;
  padding: 4px;
}
.autocomplete-suggestions .autocomplete-item { border-radius: 7px; border-bottom: 0 !important; font-size: .84rem; }
.autocomplete-suggestions .autocomplete-item:hover { background: var(--eco-primary-50) !important; color: var(--eco-primary-700) !important; }

/* --------------------------------------------------------------------------
   9. Tables
   -------------------------------------------------------------------------- */
.table { color: var(--eco-text); }
.table thead th {
  background: var(--eco-surface-2);
  color: var(--eco-muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--eco-border) !important;
  border-top: 0;
  white-space: nowrap;
}
.table td, .table th { border-color: var(--eco-border-soft); vertical-align: middle; }
.table-bordered, .table-bordered td, .table-bordered th { border-color: var(--eco-border-soft); }
.table-hover tbody tr:hover { background: var(--eco-primary-50); }

.eco-table-wrap .eco-table thead th {
  background: var(--eco-surface-2);
  color: var(--eco-muted);
  font-size: .69rem;
  border-bottom: 1px solid var(--eco-border);
  padding: 12px 14px;
}
.eco-table-wrap .eco-table thead th:first-child,
.eco-table-wrap .eco-table tbody td:first-child { padding-left: 20px; }
.eco-table-wrap .eco-table thead th:last-child,
.eco-table-wrap .eco-table tbody td:last-child { padding-right: 20px; }
.eco-table-wrap .eco-table tbody td {
  color: var(--eco-text); border-top-color: var(--eco-border-soft);
  padding: 12px 14px; font-size: .8125rem;
}
.eco-table-wrap .eco-table tbody td.eco-nowrap { white-space: nowrap; }
.eco-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.eco-table-wrap .eco-table tbody tr:nth-child(even) { background-color: transparent; }
.eco-table-wrap .eco-table tbody tr:hover,
.eco-table-wrap .eco-table tbody tr:nth-child(even):hover { background-color: #faf8ff; }
.eco-table-wrap .eco-table tbody td strong { color: var(--eco-ink); font-weight: 600; }
.eco-doc-no { color: var(--eco-primary-600); }
.eco-amount { color: var(--eco-ink); }
.eco-empty-state { padding: 64px 24px; }
.eco-empty-state .eco-empty-icon {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px;
  background: var(--eco-primary-50); color: var(--eco-primary-300) !important; font-size: 1.6rem !important;
}
.eco-empty-state p { color: var(--eco-muted); font-size: .9rem; }

/* Document line-item grid */
.eco-invoice-table thead tr { border-bottom: 1px solid var(--eco-primary-200); }
.eco-invoice-table thead th { color: var(--eco-primary-600); font-size: .68rem; background: var(--eco-primary-50) !important; }
.eco-invoice-table thead th:first-child { border-radius: 8px 0 0 0; }
.eco-invoice-table thead th:last-child { border-radius: 0 8px 0 0; }
.eco-invoice-table tbody tr { border-bottom: 1px solid var(--eco-border-soft); }
.eco-invoice-table .form-control,
.eco-invoice-table select.form-control { border-bottom-color: var(--eco-border-strong); box-shadow: none; }
.btn-add-row { border-radius: var(--eco-radius); }

/* --------------------------------------------------------------------------
   10. Pagination (CI pager renders <ul><li><a> without .page-link)
   -------------------------------------------------------------------------- */
.card-footer .pagination,
.pagination { gap: 4px; align-items: center; flex-wrap: wrap; }
.pagination nav { display: contents; }
.pagination li > a,
.pagination .page-link,
ul.pagination > li > a {
  display: inline-flex !important; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 10px !important;
  margin: 0 !important;
  border: 1px solid var(--eco-border) !important;
  border-radius: 8px !important;
  background: var(--eco-surface);
  color: var(--eco-text) !important;
  font-size: .8rem !important; font-weight: 600 !important; line-height: 1 !important;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.pagination li > a:hover,
.pagination .page-link:hover,
ul.pagination > li > a:not(.btn):hover {
  background: var(--eco-primary-50);
  border-color: var(--eco-primary-200) !important;
  color: var(--eco-primary-700) !important;
}
.pagination li.active > a,
ul.pagination > li.active > a,
.pagination .page-item.active .page-link,
ul.pagination > li.active > a:not(.btn):hover {
  background: var(--eco-primary) !important;
  border-color: var(--eco-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px -4px rgba(115, 61, 217, .6);
}
.per-page-selector { display: flex; align-items: center; gap: 8px; color: var(--eco-muted) !important; font-size: .8rem !important; }
.per-page-selector select { min-width: 72px; }

/* --------------------------------------------------------------------------
   11. Dropdowns, modals, badges, alerts
   -------------------------------------------------------------------------- */
.dropdown-menu {
  border: 1px solid var(--eco-border);
  border-radius: 12px;
  box-shadow: var(--eco-shadow-lg);
  padding: 6px;
  font-size: .86rem;
}
.dropdown-item {
  border-radius: 8px;
  padding: .5rem .75rem;
  color: var(--eco-text);
  font-weight: 500;
}
.dropdown-item:hover,
.dropdown-item:focus { background: var(--eco-primary-50); color: var(--eco-primary-700); }
.dropdown-item:active { background: var(--eco-primary); color: #fff; }
.dropdown-divider { border-top-color: var(--eco-border-soft); margin: 4px 0; }

.modal-backdrop.show { opacity: .5; background: #1c1830; }
.modal-content {
  border: 0;
  border-radius: var(--eco-radius-xl);
  box-shadow: 0 30px 70px -20px rgba(28, 24, 48, .45);
}
.modal-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--eco-border-soft);
  align-items: center;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--eco-ink); }
.modal-header .close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; margin: -4px -6px -4px auto;
  border-radius: 8px; opacity: .6; font-size: 1.35rem; text-shadow: none;
  transition: background .15s, opacity .15s;
}
.modal-header .close:hover { background: #f0eff6; opacity: 1; }
.modal-body { padding: 1.4rem; }
.modal-footer {
  padding: .9rem 1.4rem;
  background: var(--eco-surface-2);
  border-top: 1px solid var(--eco-border-soft);
  border-radius: 0 0 var(--eco-radius-xl) var(--eco-radius-xl);
  gap: 8px;
}
.modal-footer > * { margin: 0; }

.badge { font-weight: 600; border-radius: 999px; padding: .35em .7em; letter-spacing: .01em; }
.badge-primary { background: var(--eco-primary); }
.badge-success { background: var(--eco-success); }
.badge-danger { background: var(--eco-danger); }
.badge-warning { background: #fbbf24; color: #4a3200; }

.alert { border-radius: 12px; border: 1px solid transparent; font-size: .86rem; }
.alert-info { background: var(--eco-info-50); border-color: #bae6fd; color: #075985; }
.alert-success { background: var(--eco-success-50); border-color: #bbf7d0; color: #166534; }
.alert-danger { background: var(--eco-danger-50); border-color: #fecdd3; color: #9f1239; }
.alert-warning { background: var(--eco-warning-50); border-color: #fde68a; color: #92400e; }

/* --------------------------------------------------------------------------
   12. Third-party widgets
   -------------------------------------------------------------------------- */
/* Toastr */
#toast-container > div {
  width: 340px;
  padding: 14px 16px 14px 52px;
  border-radius: 12px;
  opacity: 1;
  box-shadow: 0 16px 34px -12px rgba(28, 24, 48, .45) !important;
  font-family: var(--eco-font);
  font-size: .86rem;
  font-weight: 500;
  background-position: 18px center;
}
#toast-container > div:hover { box-shadow: 0 18px 40px -12px rgba(28, 24, 48, .55) !important; }
#toast-container > .toast-success { background-color: #15803d; }
#toast-container > .toast-error { background-color: #be123c; }
#toast-container > .toast-info { background-color: var(--eco-primary-600); }
#toast-container > .toast-warning { background-color: #b45309; }
#toast-container.toast-top-right { top: 76px; right: 18px; }
.toast-progress { opacity: .25; }

/* SweetAlert2 */
.swal2-popup {
  border-radius: 20px !important;
  font-family: var(--eco-font) !important;
  padding: 1.6rem 1.4rem 1.4rem !important;
}
.swal2-title { color: var(--eco-ink) !important; font-size: 1.3rem !important; font-weight: 700 !important; }
.swal2-html-container, .swal2-content { color: var(--eco-muted) !important; font-size: .92rem !important; }
.swal2-styled { border-radius: var(--eco-radius) !important; font-weight: 600 !important; padding: .6rem 1.3rem !important; }
.swal2-styled.swal2-confirm { background-color: var(--eco-primary) !important; border-color: var(--eco-primary) !important; }
.swal2-styled.swal2-confirm:hover { background-color: var(--eco-primary-600) !important; }
.swal2-styled.swal2-cancel { background-color: #f0eff6 !important; color: var(--eco-text) !important; border-color: #f0eff6 !important; }
.swal2-styled:focus { box-shadow: var(--eco-ring) !important; }
.swal2-input, .swal2-textarea, .swal2-select {
  border-radius: var(--eco-radius) !important; border: 1px solid var(--eco-border-strong) !important; box-shadow: none !important; font-size: .95rem !important;
}
.swal2-input:focus { border-color: var(--eco-primary-300) !important; box-shadow: var(--eco-ring) !important; }
.swal2-icon.swal2-question { border-color: var(--eco-primary-200) !important; color: var(--eco-primary) !important; }

/* jQuery UI datepicker */
.ui-datepicker {
  padding: 10px !important;
  border: 1px solid var(--eco-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--eco-shadow-lg);
  font-family: var(--eco-font) !important;
  font-size: .82rem !important;
  background: var(--eco-surface) !important;
  z-index: 1060 !important;
}
.ui-datepicker .ui-datepicker-header {
  background: var(--eco-primary-50) !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: var(--eco-primary-700) !important;
  padding: .4rem 0 !important;
}
.ui-datepicker .ui-datepicker-title { font-weight: 700; }
.ui-datepicker .ui-datepicker-title select { border: 1px solid var(--eco-border-strong); border-radius: 6px; padding: 1px 4px; font-size: .8rem; }
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next { top: 5px !important; border-radius: 8px !important; cursor: pointer; }
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover { background: #fff !important; border: 1px solid var(--eco-primary-200) !important; }
.ui-datepicker th { color: var(--eco-subtle); font-weight: 600; font-size: .72rem; }
.ui-datepicker td a.ui-state-default,
.ui-datepicker td span.ui-state-default {
  text-align: center !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--eco-text) !important;
  padding: .38rem 0 !important;
}
.ui-datepicker td a.ui-state-default:hover { background: var(--eco-primary-50) !important; color: var(--eco-primary-700) !important; }
.ui-datepicker td a.ui-state-highlight { background: var(--eco-primary-100) !important; color: var(--eco-primary-700) !important; font-weight: 700; }
.ui-datepicker td a.ui-state-active { background: var(--eco-primary) !important; color: #fff !important; font-weight: 700; }

/* daterangepicker */
.daterangepicker { border: 1px solid var(--eco-border); border-radius: 14px; box-shadow: var(--eco-shadow-lg); font-family: var(--eco-font); }
.daterangepicker td.active, .daterangepicker td.active:hover { background-color: var(--eco-primary); }
.daterangepicker td.in-range { background-color: var(--eco-primary-50); color: var(--eco-primary-700); }

/* --------------------------------------------------------------------------
   13. Document screens (Invoice / Quotation / PO / DC)
   -------------------------------------------------------------------------- */
/* 3-step progress strip */
.card-header.numerical-progress {
  background: var(--eco-surface-2);
  padding: .9rem 1.25rem .8rem;
  border-bottom: 1px solid var(--eco-border-soft) !important;
}
.numerical-progress .row > [class*="col-"] > div { align-items: center !important; }
.numerical-progress .outer-circle {
  top: 0 !important; width: 32px !important; height: 32px !important; flex: 0 0 auto;
}
.numerical-progress .small-circle {
  position: static !important;
  width: 32px !important; height: 32px !important;
  border: 2px solid var(--eco-border-strong) !important;
  background: var(--eco-surface);
  color: var(--eco-subtle);
  font-size: .8rem !important; font-weight: 700 !important;
  transition: all .2s;
}
.numerical-progress .small-circle.active {
  background: var(--eco-primary) !important;
  border-color: var(--eco-primary) !important;
  color: #fff !important;
  box-shadow: 0 0 0 4px var(--eco-primary-100);
}
.numerical-progress .row > [class*="col-"] > div > span { font-size: .84rem; font-weight: 600; color: var(--eco-muted); }
.numerical-progress .outer-circle:has(.small-circle.active) + span { color: var(--eco-ink); }
.numerical-progress .fa-angle-right { color: var(--eco-border-strong); margin-left: auto; }

/* Document sheet */
.card.invoice-form {
  border: 1px solid var(--eco-primary-100) !important;
  border-radius: 16px;
  box-shadow: 0 10px 30px -18px rgba(84, 39, 168, .35) !important;
}
.card.invoice-form > .card-header.invoice-header-bg {
  background: linear-gradient(120deg, #f4efff 0%, #ede5ff 55%, #f7f3ff 100%) !important;
  border-bottom: 1px solid var(--eco-primary-100) !important;
  box-shadow: none !important;
  padding: .95rem 1.25rem;
}
.invoice-header-bg h3 { font-size: 1.15rem; margin: 0; padding: 0 !important; color: var(--eco-primary-700); letter-spacing: .02em; }
.invoice-header-bg .card-title { color: var(--eco-primary-700); }
.card.element-border {
  border: 1px solid var(--eco-border) !important;
  border-radius: 12px;
  box-shadow: none;
  background: var(--eco-surface);
}
.card.element-border > .card-header .card-title { font-size: .95rem; }
.row.divider-line { border-top: 1px dashed var(--eco-primary-200) !important; margin-left: 0; margin-right: 0; }
.card.invoice-form .card-footer { background: var(--eco-surface-2); border-top: 1px solid var(--eco-border-soft); }
.card.invoice-form .card-footer .btn + .btn { margin-left: 6px; }
.card-faint-border { border: 1px solid var(--eco-border) !important; border-radius: 12px; }
.card-faint-border > .card-header { border-bottom-color: var(--eco-border-soft) !important; }
.card-faint-border h5 { font-size: 1rem; line-height: 1.4; color: var(--eco-ink); }
.card-faint-border h5 span { font-size: .84rem !important; font-weight: 400; }

/* Totals summary */
.eco-summary-box { border-radius: 14px; border: 1px solid var(--eco-primary-100) !important; }
.eco-summary-total.total-pay-bg {
  background: var(--eco-surface) !important;
  border: 1px solid var(--eco-primary-200) !important;
  border-radius: 10px;
  padding: 12px 14px !important;
  margin-top: 10px !important;
}
.total-pay-bg { background-color: var(--eco-primary-50) !important; }

/* Section headings inside the document sheet (e.g. "Additional Note") */
.card.invoice-form .card-header > h4 { font-size: 1rem; margin: 0; color: var(--eco-ink); }
.card.invoice-form .card-header > h4 i { font-size: .9rem; }

/* Horizontal form labels line up with the 42px inputs */
.col-form-label { padding-top: 11px; padding-bottom: 11px; line-height: 20px; }

/* Edit pages: the document keeps the GST rates it was saved with (eco-tax.js) */
.eco-tax-lock-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px; padding: 10px 14px;
  border-radius: 10px;
  background: var(--eco-info-50); border: 1px solid #bae6fd;
  color: #075985; font-size: .8rem; line-height: 1.5;
}
.eco-tax-lock-note i { margin-top: 3px; font-size: .75rem; }

/* Billed-by / billed-to detail blocks (partials injected into these cards) */
.card.element-border .card-body > div > h5:first-child {
  margin: 16px 0 10px; padding-top: 14px;
  border-top: 1px dashed var(--eco-border);
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--eco-muted);
}
.card.element-border .card-body > div > h5:first-child strong { font-weight: 700; }
.card.element-border .card-body > div > .row.mb-1 { margin-bottom: 6px !important; }
.card.element-border .card-body > div > .row.mb-1 > div:first-child span { color: var(--eco-muted); font-size: .8rem; font-weight: 500; }
.card.element-border .card-body > div > .row.mb-1 > div:last-child span { color: var(--eco-ink); font-size: .84rem; font-weight: 500; }
.company_not_exits h5,
.client_not_exits h5 { font-size: .9rem; color: var(--eco-muted) !important; font-weight: 600; }

/* --------------------------------------------------------------------------
   14. Page-specific helpers
   -------------------------------------------------------------------------- */
/* Downloads page tiles */
.eco-tile {
  height: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 1.25rem;
  border: 1px solid var(--eco-border);
  border-radius: 14px;
  background: var(--eco-surface);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.eco-tile:hover { border-color: var(--eco-primary-200); box-shadow: var(--eco-shadow); transform: translateY(-2px); }
.eco-tile-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 6px;
  background: var(--eco-primary-50); color: var(--eco-primary); font-size: 1.1rem;
}
.eco-tile h5 { font-size: 1rem; font-weight: 700; color: var(--eco-ink); margin: 0; }
.eco-tile p { font-size: .82rem; color: var(--eco-muted); margin: 0 0 .75rem; }
.eco-tile .btn { margin-top: auto; }

/* Status pills (users list etc.) */
.eco-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
}
.eco-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.eco-pill-success { background: var(--eco-success-50); color: var(--eco-success); }
.eco-pill-danger { background: var(--eco-danger-50); color: var(--eco-danger); }

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  /* scroll wide list tables sideways instead of crushing every column */
  .eco-table-responsive > .eco-table { min-width: 760px; }
  .card-header.eco-page-head > .card-tools { margin-left: 0; width: 100%; }
  .eco-search { max-width: none; }
  .card-body { padding: 1rem; }
  .card-header { padding: .9rem 1rem; }
  .eco-page-icon { width: 36px; height: 36px; border-radius: 10px; }
  .main-header.navbar { padding: 0 .5rem; }
  .numerical-progress .fa-angle-right { display: none; }
  .numerical-progress .row > [class*="col-"] { margin-bottom: 6px; }
  .col-md-6.pl-5 { padding-left: 15px !important; }
}

/* --------------------------------------------------------------------------
   16. PDF preview guard — the Share pages render the PDF template inline.
   Restore the inherited defaults it was designed against so the preview
   keeps matching the generated PDF exactly.
   -------------------------------------------------------------------------- */
#InvoicePDF {
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  letter-spacing: normal;
  -webkit-font-smoothing: auto;
}
#InvoicePDF a { color: inherit; }

/* --------------------------------------------------------------------------
   17. Sign-in page
   -------------------------------------------------------------------------- */
.eco-auth-body { background: var(--eco-bg); min-height: 100vh; margin: 0; }
.eco-auth-body #toast-container.toast-top-right { top: 18px; }
.eco-auth { display: flex; min-height: 100vh; }

/* Brand panel */
.eco-auth-hero {
  position: relative;
  flex: 0 0 46%;
  max-width: 660px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 520px at -15% -10%, rgba(165, 124, 245, .9) 0%, transparent 60%),
    radial-gradient(700px 480px at 115% 110%, rgba(40, 14, 102, .95) 0%, transparent 60%),
    linear-gradient(150deg, #6d36d8 0%, #5427a8 55%, #3b1b84 100%);
}
.eco-auth-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85) 0%, transparent 70%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85) 0%, transparent 70%);
}
.eco-auth-hero::after {
  content: "";
  position: absolute; width: 420px; height: 420px; right: -140px; top: 18%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .03), 0 0 0 120px rgba(255, 255, 255, .025);
}
.eco-auth-hero-inner {
  position: relative; z-index: 1;
  min-height: 100%;
  display: flex; flex-direction: column;
  padding: 36px 48px 30px;
}
.eco-auth-brand {
  align-self: flex-start;
  display: inline-flex; align-items: center;
  padding: 10px 16px; border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .45);
}
.eco-auth-brand img { height: 28px; width: auto; }

/* Floating preview */
.eco-auth-preview {
  position: relative;
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  min-height: 250px;
  margin: 24px 0;
}
.eco-auth-preview-card {
  width: 310px; max-width: 100%;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  color: var(--eco-ink);
  box-shadow: 0 40px 70px -28px rgba(10, 4, 30, .7);
  transform: rotate(-4deg);
}
.eco-apc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--eco-border); }
.eco-apc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--eco-primary-50); color: var(--eco-primary);
}
.eco-apc-title { font-weight: 700; font-size: .92rem; }
.eco-apc-meta { font-size: .72rem; color: var(--eco-muted); }
.eco-apc-badge {
  margin-left: auto; padding: 3px 10px; border-radius: 999px;
  background: var(--eco-success-50); color: var(--eco-success);
  font-size: .7rem; font-weight: 700;
}
.eco-apc-rows { padding: 14px 0 6px; display: grid; gap: 10px; }
.eco-apc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eco-apc-row span { height: 8px; width: 75%; border-radius: 99px; background: #eceaf4; }
.eco-apc-row span.w60 { width: 58%; }
.eco-apc-row span.w40 { width: 42%; }
.eco-apc-row em { height: 8px; width: 48px; border-radius: 99px; background: var(--eco-primary-100); }
.eco-apc-total {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 10px; padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--eco-primary-50), #efe8fd);
}
.eco-apc-total span { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--eco-primary-600); }
.eco-apc-total strong { font-size: .95rem; color: var(--eco-ink); }

.eco-auth-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: #fff; color: var(--eco-ink);
  font-size: .78rem; font-weight: 600;
  box-shadow: 0 18px 36px -16px rgba(10, 4, 30, .65);
}
.eco-auth-chip i { color: var(--eco-primary); }
.eco-auth-chip--a { top: 14%; right: 6%; }
.eco-auth-chip--a i { color: var(--eco-success); }
.eco-auth-chip--b { bottom: 12%; left: 4%; }

/* Copy */
.eco-auth-copy { max-width: 470px; }
.eco-auth-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: .74rem; font-weight: 600; letter-spacing: .02em;
}
.eco-auth-kicker i { color: #fcd34d; }
.eco-auth-copy h2 {
  font-size: 1.95rem; font-weight: 800; line-height: 1.2; letter-spacing: -.025em;
  margin: 16px 0 12px; color: #fff;
}
.eco-auth-copy p { color: rgba(255, 255, 255, .78); font-size: .95rem; line-height: 1.65; margin: 0; }
.eco-auth-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.eco-auth-points li { display: flex; align-items: center; gap: 12px; font-size: .9rem; font-weight: 500; color: rgba(255, 255, 255, .92); }
.eco-auth-points li i {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .16);
  font-size: .8rem;
}
.eco-auth-foot { margin-top: 30px; font-size: .75rem; color: rgba(255, 255, 255, .6); }

/* Form side */
.eco-auth-main {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(115, 61, 217, .06), transparent 70%),
    var(--eco-surface);
}
.eco-auth-card { width: 100%; max-width: 400px; }
.eco-auth-logo-mobile { display: none; height: 30px; width: auto; margin-bottom: 30px; }
.eco-auth-card h1 {
  font-size: 1.85rem; font-weight: 800; color: var(--eco-ink);
  letter-spacing: -.025em; margin: 0 0 6px;
}
.eco-auth-sub { color: var(--eco-muted); font-size: .94rem; margin-bottom: 30px; }
.eco-auth-card label:not(.form-check-label) { font-size: .82rem; color: #3f3c55; }

.eco-input-icon { position: relative; }
.eco-input-icon > i {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--eco-subtle); font-size: .92rem; pointer-events: none; z-index: 2;
  transition: color .15s;
}
.eco-input-icon:focus-within > i { color: var(--eco-primary); }
.eco-input-icon .form-control {
  height: 50px; padding-left: 44px;
  border-radius: 12px; font-size: .93rem;
  background: var(--eco-surface);
}
.eco-input-icon.has-toggle .form-control { padding-right: 50px; }
.eco-pass-toggle {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: 9px;
  background: transparent; color: var(--eco-subtle); cursor: pointer;
  transition: background .15s, color .15s;
}
.eco-pass-toggle:hover { background: var(--eco-primary-50); color: var(--eco-primary); }
.eco-pass-toggle:focus { outline: none; box-shadow: var(--eco-ring); }

.eco-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 24px; }
.eco-auth-row .icheck-primary { margin: 0 !important; display: flex; align-items: center; }
.eco-auth-row .icheck-primary label { font-size: .84rem !important; font-weight: 500 !important; color: var(--eco-text) !important; margin: 0 !important; line-height: 22px; }
.eco-auth-row .eco-auth-link { line-height: 22px; }
.eco-auth-link { font-size: .84rem; font-weight: 600; color: var(--eco-primary-600); }
.eco-auth-link:hover { color: var(--eco-primary-700); text-decoration: none; }

.eco-auth-submit.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; border-radius: 12px;
  font-size: .95rem; font-weight: 700;
  background: linear-gradient(135deg, var(--eco-primary) 0%, var(--eco-primary-400) 100%);
  border: 0;
  box-shadow: 0 12px 24px -12px rgba(115, 61, 217, .8);
}
.eco-auth-submit.btn:hover { background: linear-gradient(135deg, var(--eco-primary-600) 0%, var(--eco-primary) 100%); box-shadow: 0 14px 28px -12px rgba(115, 61, 217, .9); }
.eco-auth-submit.btn i { transition: transform .2s; }
.eco-auth-submit.btn:hover i { transform: translateX(3px); }
.eco-auth-submit.is-loading { pointer-events: none; opacity: .9; }
.eco-auth-submit.is-loading i::before { content: "\f110"; }
.eco-auth-submit.is-loading i { animation: fa-spin 1s linear infinite; transform: none; }

.eco-auth-note { text-align: center; margin: 28px 0 0; font-size: .84rem; color: var(--eco-muted); }
.eco-auth-note span { color: var(--eco-ink); font-weight: 600; }

@media (max-width: 1199.98px) {
  .eco-auth-hero-inner { padding: 32px 36px 26px; }
  .eco-auth-copy h2 { font-size: 1.65rem; }
}

/* Desktop: the sign-in screen is exactly one viewport tall and never scrolls.
   The brand panel compacts itself on shorter screens instead of overflowing;
   only on an extremely short window does the form column scroll internally. */
@media (min-width: 992px) {
  .eco-auth-html,
  .eco-auth-html > .eco-auth-body { height: 100%; overflow: hidden; }
  .eco-auth { height: 100vh; height: 100dvh; min-height: 0; }
  .eco-auth-hero { height: 100%; }
  .eco-auth-hero-inner { height: 100%; min-height: 0; }
  .eco-auth-preview { min-height: 0; }
  .eco-auth-main { height: 100%; overflow-y: auto; align-items: flex-start; }
  .eco-auth-card { margin: auto 0; } /* centres vertically, but stays reachable if taller than the window */
}
@media (min-width: 992px) and (max-height: 860px) {
  .eco-auth-hero-inner { padding: 24px 44px 20px; }
  .eco-auth-preview { margin: 10px 0; }
  .eco-auth-preview-card { transform: rotate(-4deg) scale(.88); }
  .eco-auth-copy h2 { font-size: 1.55rem; margin: 12px 0 8px; }
  .eco-auth-copy p { font-size: .9rem; line-height: 1.55; }
  .eco-auth-points { margin-top: 14px; gap: 8px; }
  .eco-auth-points li i { width: 28px; height: 28px; }
  .eco-auth-foot { margin-top: 16px; }
}
@media (min-width: 992px) and (max-height: 700px) {
  .eco-auth-preview { display: none; }
  .eco-auth-copy { margin-top: auto; }
}
@media (min-width: 992px) and (max-height: 560px) {
  .eco-auth-copy p,
  .eco-auth-points { display: none; }
}
@media (max-width: 991.98px) {
  .eco-auth-hero { display: none; }
  .eco-auth-logo-mobile { display: block; }
  .eco-auth-main { align-items: flex-start; padding-top: 12vh; }
}

/* --------------------------------------------------------------------------
   Sortable list tables — Invoices / Quotations / Purchase Orders
   (DataTables, wired up by public/js/eco-doc-table.js)
   -------------------------------------------------------------------------- */
.eco-table-wrap .eco-table thead th.sorting,
.eco-table-wrap .eco-table thead th.sorting_asc,
.eco-table-wrap .eco-table thead th.sorting_desc { cursor: pointer; user-select: none; }
.eco-table-wrap .eco-table thead th.sorting:hover { color: var(--eco-primary-700); }
.eco-table-wrap .eco-table thead th:focus { outline: none; }
.eco-table-wrap .eco-table thead th.sorting::after,
.eco-table-wrap .eco-table thead th.sorting_asc::after,
.eco-table-wrap .eco-table thead th.sorting_desc::after {
  display: inline-block; margin-left: 6px; font-size: .85em; line-height: 1; color: var(--eco-primary);
}
.eco-table-wrap .eco-table thead th.sorting::after      { content: "\21C5"; opacity: .35; }
.eco-table-wrap .eco-table thead th.sorting_asc::after  { content: "\25B2"; font-size: .7em; }
.eco-table-wrap .eco-table thead th.sorting_desc::after { content: "\25BC"; font-size: .7em; }

/* "Show N entries" · "Showing x to y of z" · pager — in the card footer */
.eco-dt-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.eco-dt-foot .dataTables_length label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.eco-dt-foot .dataTables_length select { width: auto; min-width: 72px; }
.eco-dt-foot .eco-dt-info { color: var(--eco-muted); font-size: .8rem; }
.eco-dt-foot .dataTables_paginate { margin-left: auto; }
.eco-dt-foot .dataTables_paginate ul.pagination { margin: 0; }
.eco-dt-foot .pagination .page-item.disabled .page-link { opacity: .45; cursor: default; }

/* Row a list scrolled back to after you saved / closed a record (eco-list-state.js) */
@keyframes eco-row-restored { from { background-color: var(--eco-primary-100); } to { background-color: transparent; } }
.eco-table-wrap .eco-table tbody tr.eco-row-restored > td { animation: eco-row-restored 2.5s ease-out; }

/* From / To filter dates (eco-filter-dates.js): text box + calendar, yyyy-mm-dd */
.eco-filter-bar input.eco-date {
  padding-right: 32px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236e6b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.ui-datepicker { z-index: 1060 !important; }
