/* ============================================================
   CLARITY ECO CARE — Design System v1.0
   clarity-ds.css
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  /* Brand */
  --ds-primary:       #00a89e;
  --ds-primary-dark:  #008d85;
  --ds-primary-hover: #007a73;
  --ds-primary-light: rgba(0, 168, 158, 0.10);
  --ds-accent:        #9ac33c;
  --ds-accent-dark:   #82a532;
  --ds-accent-light:  rgba(154, 195, 60, 0.12);

  /* Semantics */
  --ds-success:       #1cbb8c;
  --ds-success-light: rgba(28, 187, 140, 0.12);
  --ds-warning:       #fcb92c;
  --ds-warning-light: rgba(252, 185, 44, 0.12);
  --ds-danger:        #fc5b6f;
  --ds-danger-light:  rgba(252, 91, 111, 0.12);
  --ds-info:          #4fc6e1;
  --ds-info-light:    rgba(79, 198, 225, 0.12);

  /* Neutrals */
  --ds-bg:            #f4f7f6;
  --ds-surface:       #ffffff;
  --ds-surface-2:     #f8faf9;
  --ds-text:          #1a2332;
  --ds-text-secondary:#4a5568;
  --ds-text-muted:    #6c7a8a;
  --ds-border:        #e2e8f0;
  --ds-border-light:  #f0f4f3;

  /* Layout */
  --ds-sidebar-width:      260px;
  --ds-sidebar-mini-width: 72px;
  --ds-topbar-height:      60px;
  --ds-bottom-nav-height:  64px;

  /* Spacing scale */
  --ds-space-xs:  4px;
  --ds-space-sm:  8px;
  --ds-space-md:  16px;
  --ds-space-lg:  24px;
  --ds-space-xl:  32px;
  --ds-space-2xl: 48px;

  /* Border radius */
  --ds-radius-sm:   6px;
  --ds-radius-md:   10px;
  --ds-radius-lg:   14px;
  --ds-radius-xl:   20px;
  --ds-radius-full: 9999px;

  /* Shadows */
  --ds-shadow-xs: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --ds-shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --ds-shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --ds-shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --ds-shadow-xl: 0 16px 48px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.08);

  /* Transitions */
  --ds-transition: 0.2s ease;
  --ds-transition-slow: 0.35s ease;

  /* Typography */
  --ds-font:         'Inter', system-ui, -apple-system, sans-serif;
  --ds-font-mono:    'SFMono-Regular', Consolas, monospace;
  --ds-text-xs:      0.75rem;
  --ds-text-sm:      0.875rem;
  --ds-text-base:    1rem;
  --ds-text-lg:      1.125rem;
  --ds-text-xl:      1.375rem;
  --ds-text-2xl:     1.75rem;
  --ds-text-3xl:     2.25rem;
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ds-font);
  font-size: var(--ds-text-base);
  color: var(--ds-text);
  background-color: var(--ds-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout Shell ── */
.ds-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.ds-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--ds-sidebar-width);
  height: 100vh;
  background: #0f2533;
  display: flex;
  flex-direction: column;
  z-index: 1030;
  transition: transform var(--ds-transition-slow), width var(--ds-transition-slow);
  overflow: hidden;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.ds-sidebar__brand {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: var(--ds-topbar-height);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  gap: 12px;
  text-decoration: none;
}

.ds-sidebar__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--ds-radius-md);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.ds-sidebar__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.ds-sidebar__brand-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ds-sidebar__brand-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-sidebar__brand-tagline {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  white-space: nowrap;
}

/* Sidebar nav */
.ds-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.ds-sidebar__nav::-webkit-scrollbar { width: 4px; }
.ds-sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.ds-sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.ds-nav-section {
  margin-bottom: 4px;
}

.ds-nav-section__label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.30);
  padding: 10px 20px 4px;
  white-space: nowrap;
  overflow: hidden;
}

.ds-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--ds-transition);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.ds-nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.ds-nav-item.active {
  color: #fff;
  background: rgba(0, 168, 158, 0.18);
}

.ds-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--ds-primary);
  border-radius: 0 3px 3px 0;
}

.ds-nav-item__icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.ds-nav-item__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-nav-item__badge {
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--ds-danger);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--ds-radius-full);
  line-height: 1.4;
  flex-shrink: 0;
}

/* Sidebar dropdown */
.ds-nav-dropdown .ds-nav-item__arrow {
  font-size: 0.7rem;
  transition: transform var(--ds-transition);
  flex-shrink: 0;
}

.ds-nav-dropdown.open .ds-nav-item__arrow {
  transform: rotate(90deg);
}

.ds-nav-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.ds-nav-dropdown.open .ds-nav-submenu {
  max-height: 600px;
}

.ds-nav-submenu .ds-nav-item {
  padding-left: 52px;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.50);
}

.ds-nav-submenu .ds-nav-item:hover { color: rgba(255,255,255,0.85); }
.ds-nav-submenu .ds-nav-item.active { color: var(--ds-primary); background: rgba(0,168,158,0.10); }

/* Sidebar footer (filial) */
.ds-sidebar__footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 16px;
  flex-shrink: 0;
}

.ds-filial-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--ds-radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: background var(--ds-transition);
  text-decoration: none;
}

.ds-filial-pill:hover { background: rgba(255,255,255,0.10); }

.ds-filial-pill__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ds-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #fff;
}

.ds-filial-pill__info { flex: 1; overflow: hidden; }

.ds-filial-pill__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.ds-filial-pill__role {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.40);
  white-space: nowrap;
}

/* ── Topbar ── */
.ds-topbar {
  position: fixed;
  top: 0;
  left: var(--ds-sidebar-width);
  right: 0;
  height: var(--ds-topbar-height);
  background: var(--ds-surface);
  border-bottom: 1px solid var(--ds-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 1020;
  gap: 16px;
  transition: left var(--ds-transition-slow);
  box-shadow: var(--ds-shadow-xs);
  overflow: visible;
}

.ds-topbar__hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ds-text-muted);
  font-size: 1.2rem;
  transition: all var(--ds-transition);
  flex-shrink: 0;
}

.ds-topbar__hamburger:hover {
  background: var(--ds-primary-light);
  color: var(--ds-primary);
}

.ds-topbar__breadcrumb {
  flex: 1;
  overflow: hidden;
}

.ds-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
  white-space: nowrap;
  overflow: hidden;
}

.ds-breadcrumb li { display: flex; align-items: center; gap: 6px; }

.ds-breadcrumb li:not(:last-child)::after {
  content: '›';
  color: var(--ds-border);
  font-size: 1rem;
}

.ds-breadcrumb a {
  color: var(--ds-text-muted);
  text-decoration: none;
  transition: color var(--ds-transition);
}

.ds-breadcrumb a:hover { color: var(--ds-primary); }
.ds-breadcrumb li:last-child { color: var(--ds-text); font-weight: 500; }

.ds-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  overflow: visible;
}

.ds-topbar__actions .dropdown {
  position: relative;
}

.ds-topbar__actions .dropdown-menu {
  z-index: 1060;
  margin: 0;
}

.ds-topbar__actions .dropdown-menu.show {
  display: block;
}

.ds-topbar__btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-text-muted);
  font-size: 1rem;
  transition: all var(--ds-transition);
  position: relative;
  text-decoration: none;
}

.ds-topbar__btn:hover {
  background: var(--ds-primary-light);
  color: var(--ds-primary);
}

.ds-topbar__notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 3px;
  border: 2px solid var(--ds-surface);
}

.ds-topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--ds-radius-full);
  cursor: pointer;
  border: none;
  background: none;
  transition: background var(--ds-transition);
  text-decoration: none;
  color: var(--ds-text);
}

.ds-topbar__user:hover { background: var(--ds-surface-2); }

.ds-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-dark));
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow: hidden;
}

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

.ds-avatar--sm { width: 28px; height: 28px; font-size: 0.65rem; }
.ds-avatar--lg { width: 48px; height: 48px; font-size: 1rem; }
.ds-avatar--xl { width: 72px; height: 72px; font-size: 1.4rem; }
.ds-avatar--2xl { width: 96px; height: 96px; font-size: 1.8rem; }

.ds-avatar--accent { background: linear-gradient(135deg, var(--ds-accent), var(--ds-accent-dark)); }
.ds-avatar--success { background: linear-gradient(135deg, var(--ds-success), #14a07a); }
.ds-avatar--warning { background: linear-gradient(135deg, var(--ds-warning), #e0a120); }
.ds-avatar--danger  { background: linear-gradient(135deg, var(--ds-danger),  #e04055); }
.ds-avatar--info    { background: linear-gradient(135deg, var(--ds-info),    #35aecb); }

.ds-topbar__user-name {
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ── */
.ds-main {
  margin-left: var(--ds-sidebar-width);
  padding-top: var(--ds-topbar-height);
  min-height: 100vh;
  transition: margin-left var(--ds-transition-slow);
}

.ds-page {
  padding: 24px;
}

/* ── Sidebar Overlay (mobile) ── */
.ds-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1029;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}

/* ── Bottom Navigation (mobile) ── */
.ds-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--ds-bottom-nav-height);
  background: var(--ds-surface);
  border-top: 1px solid var(--ds-border);
  z-index: 1025;
  padding: 0 4px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.ds-bottom-nav__inner {
  display: flex;
  height: 100%;
  align-items: stretch;
}

.ds-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--ds-text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: var(--ds-radius-md);
  margin: 6px 2px;
  transition: all var(--ds-transition);
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.ds-bottom-nav__item:hover { color: var(--ds-primary); }

.ds-bottom-nav__item.active {
  color: var(--ds-primary);
}

.ds-bottom-nav__item.active .ds-bottom-nav__icon {
  background: var(--ds-primary-light);
}

.ds-bottom-nav__icon {
  width: 36px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.1rem;
  transition: background var(--ds-transition);
  position: relative;
}

.ds-bottom-nav__dot {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ds-danger);
  border: 1.5px solid var(--ds-surface);
}

.ds-bottom-nav__label { line-height: 1; }

/* ── Page Header ── */
.ds-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ds-page-header__title {
  font-size: var(--ds-text-xl);
  font-weight: 700;
  color: var(--ds-text);
  margin: 0 0 4px;
  line-height: 1.3;
}

.ds-page-header__sub {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
  margin: 0;
}

.ds-page-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Card ── */
.ds-card {
  background: var(--ds-surface);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
  border: 1px solid var(--ds-border-light);
  overflow: hidden;
  transition: box-shadow var(--ds-transition);
}

.ds-card:hover { box-shadow: var(--ds-shadow-md); }

.ds-card__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ds-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ds-card__header--teal {
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-dark));
  border-bottom: none;
}

.ds-card__header--teal .ds-card__title,
.ds-card__header--teal .ds-card__subtitle { color: #fff; }

.ds-card__header--teal .ds-card__subtitle { opacity: 0.75; }

.ds-card__title {
  font-size: var(--ds-text-base);
  font-weight: 600;
  color: var(--ds-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-card__subtitle {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-muted);
  margin: 2px 0 0;
}

.ds-card__body { padding: 20px; }
.ds-card__body--compact { padding: 14px 16px; }
.ds-card__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--ds-border-light);
  background: var(--ds-surface-2);
}

/* ── Stats Card ── */
.ds-stats-card {
  background: var(--ds-surface);
  border-radius: var(--ds-radius-lg);
  padding: 20px;
  box-shadow: var(--ds-shadow-sm);
  border: 1px solid var(--ds-border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--ds-transition);
  position: relative;
  overflow: hidden;
}

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

.ds-stats-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.ds-stats-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--ds-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ds-stats-card__icon--teal    { background: var(--ds-primary-light); color: var(--ds-primary); }
.ds-stats-card__icon--accent  { background: var(--ds-accent-light);  color: var(--ds-accent-dark); }
.ds-stats-card__icon--success { background: var(--ds-success-light); color: var(--ds-success); }
.ds-stats-card__icon--warning { background: var(--ds-warning-light); color: var(--ds-warning); }
.ds-stats-card__icon--danger  { background: var(--ds-danger-light);  color: var(--ds-danger); }
.ds-stats-card__icon--info    { background: var(--ds-info-light);    color: var(--ds-info); }

.ds-stats-card__trend {
  font-size: var(--ds-text-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--ds-radius-full);
}

.ds-stats-card__trend--up   { background: var(--ds-success-light); color: var(--ds-success); }
.ds-stats-card__trend--down { background: var(--ds-danger-light);  color: var(--ds-danger); }
.ds-stats-card__trend--flat { background: var(--ds-border-light);  color: var(--ds-text-muted); }

.ds-stats-card__value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ds-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ds-stats-card__label {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
  font-weight: 500;
}

/* ── Buttons ── */
.btn-ds,
.btn-ds-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--ds-font);
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--ds-transition);
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.btn-ds {
  padding: 9px 18px;
  font-size: var(--ds-text-sm);
}

.btn-ds-sm {
  padding: 6px 12px;
  font-size: var(--ds-text-xs);
  gap: 5px;
}

/* Primary */
.btn-ds-primary {
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,168,158,0.25);
}
.btn-ds-primary:hover {
  background: linear-gradient(135deg, var(--ds-primary-dark), var(--ds-primary-hover));
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,168,158,0.35);
  transform: translateY(-1px);
}
.btn-ds-primary:active { transform: translateY(0); }

/* Accent */
.btn-ds-accent {
  background: linear-gradient(135deg, var(--ds-accent), var(--ds-accent-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(154,195,60,0.25);
}
.btn-ds-accent:hover {
  filter: brightness(1.07);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(154,195,60,0.35);
}

/* Secondary */
.btn-ds-secondary {
  background: var(--ds-surface);
  color: var(--ds-text);
  border-color: var(--ds-border);
  box-shadow: var(--ds-shadow-xs);
}
.btn-ds-secondary:hover {
  background: var(--ds-surface-2);
  border-color: var(--ds-primary);
  color: var(--ds-primary);
}

/* Ghost */
.btn-ds-ghost {
  background: transparent;
  color: var(--ds-text-muted);
  border-color: transparent;
}
.btn-ds-ghost:hover {
  background: var(--ds-primary-light);
  color: var(--ds-primary);
}

/* Danger */
.btn-ds-danger {
  background: var(--ds-danger);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(252,91,111,0.20);
}
.btn-ds-danger:hover {
  filter: brightness(1.08);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(252,91,111,0.35);
}

/* Success */
.btn-ds-success {
  background: var(--ds-success);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(28,187,140,0.20);
}
.btn-ds-success:hover {
  filter: brightness(1.08);
  color: #fff;
  transform: translateY(-1px);
}

/* Icon-only */
.btn-ds-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--ds-radius-md);
  border: 1.5px solid var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all var(--ds-transition);
  text-decoration: none;
}

.btn-ds-icon:hover {
  border-color: var(--ds-primary);
  color: var(--ds-primary);
  background: var(--ds-primary-light);
}

.btn-ds-icon--danger:hover {
  border-color: var(--ds-danger);
  color: var(--ds-danger);
  background: var(--ds-danger-light);
}

.btn-ds-icon--sm {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
  border-radius: var(--ds-radius-sm);
}

/* Disabled state */
.btn-ds:disabled,
.btn-ds-sm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Badges ── */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--ds-radius-full);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.ds-badge--dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

.ds-badge-primary  { background: var(--ds-primary-light); color: var(--ds-primary-dark); }
.ds-badge-accent   { background: var(--ds-accent-light);  color: var(--ds-accent-dark); }
.ds-badge-success  { background: var(--ds-success-light); color: #0f8a67; }
.ds-badge-warning  { background: var(--ds-warning-light); color: #b87e0a; }
.ds-badge-danger   { background: var(--ds-danger-light);  color: #c03040; }
.ds-badge-info     { background: var(--ds-info-light);    color: #1e8eab; }
.ds-badge-neutral  { background: rgba(108,122,138,0.12);  color: var(--ds-text-secondary); }

/* Status badges */
.ds-badge-ativo     { background: var(--ds-success-light); color: #0f8a67; }
.ds-badge-inativo   { background: rgba(108,122,138,0.12);  color: var(--ds-text-muted); }
.ds-badge-pendente  { background: var(--ds-warning-light); color: #b87e0a; }
.ds-badge-atrasado  { background: var(--ds-danger-light);  color: #c03040; }
.ds-badge-cancelado { background: rgba(108,122,138,0.12);  color: var(--ds-text-muted); }
.ds-badge-pago      { background: var(--ds-success-light); color: #0f8a67; }
.ds-badge-recebido  { background: var(--ds-info-light);    color: #1e8eab; }

/* Role badges */
.ds-badge-admin     { background: rgba(138, 63, 252, 0.12); color: #6b2fcc; }
.ds-badge-gerente   { background: var(--ds-primary-light);  color: var(--ds-primary-dark); }
.ds-badge-matriz    { background: rgba(252,185,44,0.18);    color: #a0700a; }
.ds-badge-filial    { background: var(--ds-info-light);     color: #1e8eab; }
.ds-badge-master    { background: var(--ds-danger-light);   color: #c03040; }

/* ── Tables ── */
.ds-table-wrap {
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
  border: 1px solid var(--ds-border-light);
  box-shadow: var(--ds-shadow-sm);
}

.table-ds {
  width: 100%;
  border-collapse: collapse;
  background: var(--ds-surface);
  font-size: var(--ds-text-sm);
}

.table-ds thead th {
  background: var(--ds-surface-2);
  color: var(--ds-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 11px 16px;
  border-bottom: 1px solid var(--ds-border);
  white-space: nowrap;
  vertical-align: middle;
}

.table-ds tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--ds-border-light);
  color: var(--ds-text);
  vertical-align: middle;
}

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

.table-ds tbody tr {
  transition: background var(--ds-transition);
}

.table-ds tbody tr:hover { background: var(--ds-primary-light); }

.table-ds .ds-actions-cell {
  white-space: nowrap;
  text-align: right;
}

.table-ds .ds-actions-cell .ds-actions-group {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

/* Table responsive — cards on mobile */
@media (max-width: 767.98px) {
  .ds-table-mobile .table-ds thead { display: none; }
  .ds-table-mobile .table-ds tbody tr {
    display: block;
    border-radius: var(--ds-radius-md);
    border: 1px solid var(--ds-border-light);
    margin-bottom: 10px;
    box-shadow: var(--ds-shadow-xs);
    background: var(--ds-surface);
  }
  .ds-table-mobile .table-ds tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ds-border-light);
    font-size: var(--ds-text-sm);
  }
  .ds-table-mobile .table-ds tbody td:last-child { border-bottom: none; }
  .ds-table-mobile .table-ds tbody td[data-label]::before {
    content: attr(data-label);
    font-size: var(--ds-text-xs);
    font-weight: 700;
    color: var(--ds-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-right: 8px;
  }
  .ds-table-mobile .table-ds tbody td.ds-actions-cell {
    justify-content: flex-end;
  }
}

/* ── Inline loading state for inputs (e.g. CEP lookup) ── */
.ds-loading-inline {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%236c757d' stroke-width='3' stroke-dasharray='31.4' stroke-dashoffset='10'%3E%3CanimateTransform attributeName='transform' type='rotate' values='0 12 12;360 12 12' dur='0.7s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
  padding-right: 36px !important;
  opacity: 0.7;
}

/* ── Forms ── */
.form-ds .form-floating {
  position: relative;
}

.form-ds .form-floating > .form-control,
.form-ds .form-floating > .form-select {
  height: 54px;
  border: 1.5px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font);
  font-size: var(--ds-text-sm);
  color: var(--ds-text);
  background: var(--ds-surface);
  padding: 16px 14px 6px;
  transition: border-color var(--ds-transition), box-shadow var(--ds-transition);
}

.form-ds .form-control,
.form-ds .form-select {
  border: 1.5px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font);
  font-size: var(--ds-text-sm);
  color: var(--ds-text);
  background: var(--ds-surface);
  transition: border-color var(--ds-transition), box-shadow var(--ds-transition);
}

.form-ds .form-control:focus,
.form-ds .form-select:focus,
.form-ds .form-floating > .form-control:focus,
.form-ds .form-floating > .form-select:focus {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 158, 0.12);
  outline: none;
}

.form-ds .form-floating > label {
  color: var(--ds-text-muted);
  font-size: var(--ds-text-sm);
  padding: 16px 14px;
}

.form-ds .form-floating > .form-control:focus ~ label,
.form-ds .form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-ds .form-floating > .form-select ~ label {
  transform: scale(0.78) translateY(-10px);
  color: var(--ds-primary);
}

.form-ds .form-label {
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--ds-text-secondary);
  margin-bottom: 6px;
}

.form-ds .form-control.is-invalid,
.form-ds .form-select.is-invalid { border-color: var(--ds-danger); }

.form-ds .form-control.is-valid,
.form-ds .form-select.is-valid { border-color: var(--ds-success); }

.form-ds .invalid-feedback {
  font-size: var(--ds-text-xs);
  color: var(--ds-danger);
  margin-top: 4px;
}

.form-ds .form-text {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-muted);
}

/* Section label inside form */
.ds-form-section {
  padding-top: 4px;
  margin-bottom: 16px;
}

.ds-form-section__title {
  font-size: var(--ds-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ds-text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ds-border-light);
  margin-bottom: 16px;
}

/* ── Alerts ── */
.ds-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--ds-radius-md);
  border: 1px solid transparent;
  font-size: var(--ds-text-sm);
  animation: slideInDown 0.3s ease;
}

.ds-alert__icon { font-size: 1rem; flex-shrink: 0; line-height: 1.5; }
.ds-alert__body { flex: 1; }
.ds-alert__title { font-weight: 600; margin-bottom: 2px; }
.ds-alert__close {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 2px;
  transition: opacity var(--ds-transition);
  color: inherit;
}
.ds-alert__close:hover { opacity: 1; }

.ds-alert--success { background: var(--ds-success-light); border-color: rgba(28,187,140,0.25); color: #0a6b52; }
.ds-alert--warning { background: var(--ds-warning-light); border-color: rgba(252,185,44,0.30); color: #8a620a; }
.ds-alert--danger  { background: var(--ds-danger-light);  border-color: rgba(252,91,111,0.25); color: #a02030; }
.ds-alert--info    { background: var(--ds-info-light);    border-color: rgba(79,198,225,0.25); color: #127890; }

/* ── Empty State ── */
.ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
}

.ds-empty__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--ds-radius-xl);
  background: var(--ds-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--ds-primary);
  margin-bottom: 20px;
}

.ds-empty__title {
  font-size: var(--ds-text-lg);
  font-weight: 700;
  color: var(--ds-text);
  margin: 0 0 8px;
}

.ds-empty__subtitle {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
  margin: 0 0 24px;
  max-width: 340px;
}

/* ── Filter Card (colapsável) ── */
.ds-filter-card {
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border-light);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.ds-filter-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  cursor: pointer;
  user-select: none;
  transition: background var(--ds-transition);
}

.ds-filter-card__header:hover { background: var(--ds-surface-2); }

.ds-filter-card__title {
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-filter-card__chevron {
  color: var(--ds-text-muted);
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.ds-filter-card.open .ds-filter-card__chevron { transform: rotate(180deg); }

.ds-filter-card__body {
  padding: 16px 18px;
  border-top: 1px solid var(--ds-border-light);
  display: none;
}

.ds-filter-card.open .ds-filter-card__body { display: block; }

/* ── Skeleton Loader ── */
.ds-skeleton {
  background: linear-gradient(90deg, var(--ds-border-light) 25%, #edf2f0 50%, var(--ds-border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--ds-radius-sm);
}

.ds-skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.ds-skeleton-text--wide { width: 80%; }
.ds-skeleton-text--mid  { width: 55%; }
.ds-skeleton-text--short { width: 30%; }

.ds-skeleton-card {
  background: var(--ds-surface);
  border-radius: var(--ds-radius-lg);
  padding: 20px;
  box-shadow: var(--ds-shadow-sm);
  border: 1px solid var(--ds-border-light);
}

.ds-skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Preloader ── */
#ds-preloader {
  position: fixed;
  inset: 0;
  background: var(--ds-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#ds-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ds-preloader__spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ds-preloader__ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--ds-border);
  border-top-color: var(--ds-primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.ds-preloader__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--ds-radius-md);
  background: #fff;
  box-shadow: var(--ds-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ds-preloader__logo img { width: 100%; object-fit: contain; padding: 4px; }

/* ── Modal ── */
.modal-content {
  border: none;
  border-radius: var(--ds-radius-xl);
  box-shadow: var(--ds-shadow-xl);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-dark));
  color: #fff;
  border-bottom: none;
  padding: 18px 20px;
}

.modal-header .modal-title {
  font-size: var(--ds-text-base);
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

.modal-header .btn-close:hover { opacity: 1; }

.modal-body { padding: 22px 20px; }

.modal-footer {
  padding: 14px 20px;
  background: var(--ds-surface-2);
  border-top: 1px solid var(--ds-border-light);
  gap: 10px;
}

/* ── Tabs ── */
.ds-nav-tabs {
  border-bottom: 2px solid var(--ds-border-light);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ds-nav-tabs::-webkit-scrollbar { display: none; }

.ds-nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--ds-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ds-transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.ds-nav-tab:hover { color: var(--ds-primary); }

.ds-nav-tab.active {
  color: var(--ds-primary);
  font-weight: 600;
  border-bottom-color: var(--ds-primary);
}

/* ── Pagination ── */
.ds-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--ds-border-light);
  flex-wrap: wrap;
  gap: 12px;
}

.ds-pagination__info {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-muted);
}

.ds-pagination .pagination {
  margin: 0;
  gap: 4px;
}

.ds-pagination .page-link {
  border-radius: var(--ds-radius-sm) !important;
  border: 1.5px solid var(--ds-border);
  color: var(--ds-text-secondary);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  padding: 5px 11px;
  transition: all var(--ds-transition);
}

.ds-pagination .page-link:hover {
  background: var(--ds-primary-light);
  border-color: var(--ds-primary);
  color: var(--ds-primary);
}

.ds-pagination .page-item.active .page-link {
  background: var(--ds-primary);
  border-color: var(--ds-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,168,158,0.30);
}

/* ── Icon Box ── */
.ds-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--ds-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ds-icon-box--teal    { background: var(--ds-primary-light); color: var(--ds-primary); }
.ds-icon-box--accent  { background: var(--ds-accent-light);  color: var(--ds-accent-dark); }
.ds-icon-box--success { background: var(--ds-success-light); color: var(--ds-success); }
.ds-icon-box--warning { background: var(--ds-warning-light); color: var(--ds-warning); }
.ds-icon-box--danger  { background: var(--ds-danger-light);  color: var(--ds-danger); }
.ds-icon-box--info    { background: var(--ds-info-light);    color: var(--ds-info); }
.ds-icon-box--lg { width: 52px; height: 52px; font-size: 1.3rem; border-radius: var(--ds-radius-lg); }

/* ── Dropdown ── */
.ds-dropdown-menu {
  border: 1px solid var(--ds-border-light);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-lg);
  padding: 6px;
  background: var(--ds-surface);
  min-width: 200px;
  animation: scaleIn 0.15s ease;
  transform-origin: top right;
}

.ds-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--ds-radius-md);
  font-size: var(--ds-text-sm);
  color: var(--ds-text);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ds-transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.ds-dropdown-item:hover { background: var(--ds-surface-2); color: var(--ds-text); }
.ds-dropdown-item--danger { color: var(--ds-danger); }
.ds-dropdown-item--danger:hover { background: var(--ds-danger-light); }

.ds-dropdown-divider {
  height: 1px;
  background: var(--ds-border-light);
  margin: 4px 0;
}

/* ── Notification Dropdown ── */
.ds-notif-dropdown {
  width: 340px;
  padding: 0;
  overflow: hidden;
}

.ds-notif-dropdown__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ds-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ds-notif-item {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ds-border-light);
  transition: background var(--ds-transition);
  cursor: pointer;
  align-items: flex-start;
}

.ds-notif-item:hover { background: var(--ds-surface-2); }
.ds-notif-item:last-child { border-bottom: none; }
.ds-notif-item--unread { background: var(--ds-primary-light); }

.ds-notif-item__text {
  flex: 1;
  font-size: var(--ds-text-sm);
  color: var(--ds-text);
  line-height: 1.45;
}

.ds-notif-item__time {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Utilities ── */
.ds-text-primary { color: var(--ds-primary) !important; }
.ds-text-accent  { color: var(--ds-accent)  !important; }
.ds-text-muted   { color: var(--ds-text-muted) !important; }

.ds-bg-teal-soft { background: var(--ds-primary-light); }

.ds-divider {
  height: 1px;
  background: var(--ds-border-light);
  margin: 16px 0;
}

.ds-transition { transition: all var(--ds-transition); }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.ds-animate-fade-up  { animation: fadeInUp 0.45s ease both; }
.ds-animate-scale-in { animation: scaleIn  0.3s ease  both; }

.ds-stagger-1 { animation-delay: 0.05s; }
.ds-stagger-2 { animation-delay: 0.10s; }
.ds-stagger-3 { animation-delay: 0.15s; }
.ds-stagger-4 { animation-delay: 0.20s; }
.ds-stagger-5 { animation-delay: 0.25s; }
.ds-stagger-6 { animation-delay: 0.30s; }

/* ── Form Submit Overlay ── */
#ds-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 37, 51, 0.55);
  backdrop-filter: blur(3px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.25s ease;
}

#ds-form-overlay.visible { display: flex; }

#ds-form-overlay .ds-overlay__card {
  background: var(--ds-surface);
  border-radius: var(--ds-radius-xl);
  padding: 32px 40px;
  box-shadow: var(--ds-shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 220px;
}

#ds-form-overlay .ds-overlay__ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--ds-border);
  border-top-color: var(--ds-primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

#ds-form-overlay .ds-overlay__text {
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text-secondary);
  text-align: center;
}

/* ── Responsive — Mobile ── */
@media (max-width: 991.98px) {
  .ds-sidebar {
    transform: translateX(-100%);
    width: var(--ds-sidebar-width);
  }

  .ds-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--ds-shadow-xl);
  }

  .ds-sidebar-overlay { display: block; }

  .ds-topbar {
    left: 0;
    padding: 0 16px;
  }

  .ds-topbar__hamburger { display: flex; }

  .ds-main {
    margin-left: 0;
    padding-bottom: var(--ds-bottom-nav-height);
  }

  .ds-page { padding: 16px; }

  .ds-bottom-nav { display: block; }

  .ds-page-header { margin-bottom: 16px; }
  .ds-page-header__title { font-size: var(--ds-text-lg); }

  .ds-notif-dropdown { width: calc(100vw - 32px); max-width: 340px; }
}

/* ── Responsive — Tablet ── */
@media (min-width: 992px) {
  .ds-sidebar-overlay { display: none !important; }
}

/* ── Bootstrap overrides ── */
.card { border-color: var(--ds-border-light); border-radius: var(--ds-radius-lg); }
.form-control:focus, .form-select:focus {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 158, 0.12);
}
.btn-primary {
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-dark));
  border-color: var(--ds-primary-dark);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--ds-primary-dark), var(--ds-primary-hover));
  border-color: var(--ds-primary-hover);
}
.btn-primary:focus, .btn-primary:active {
  background: var(--ds-primary-dark);
  border-color: var(--ds-primary-hover);
  box-shadow: 0 0 0 3px rgba(0,168,158,0.25);
}
.text-primary { color: var(--ds-primary) !important; }
.bg-primary   { background-color: var(--ds-primary) !important; }
.border-primary { border-color: var(--ds-primary) !important; }

/* DataTables override */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font);
  font-size: var(--ds-text-sm);
  padding: 6px 10px;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px rgba(0,168,158,0.12);
  outline: none;
}

/* Select2 override */
.select2-container--default .select2-selection--multiple {
  border: 1.5px solid var(--ds-border) !important;
  border-radius: var(--ds-radius-md) !important;
  min-height: 42px !important;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--ds-primary) !important;
  box-shadow: 0 0 0 3px rgba(0,168,158,0.12) !important;
}
.select2-container--default .select2-results__option--highlighted {
  background-color: var(--ds-primary) !important;
}
