@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
  --sp-sidebar: 17rem;
  --sp-header: 4rem;
  --sp-navy: #0d1b3d;
  --sp-teal: #0fa6a6;
  --sp-lime: #7bc043;
  --sp-slate: #3d5a80;
  --sp-brand: #0fa6a6;
  --sp-brand-dark: #0d8a8a;
  --sp-accent: #7bc043;
  --sp-surface: #f2f4f7;
  --sp-card: #ffffff;
  --sp-ink: #0d1b3d;
  --sp-muted: #3d5a80;
  --sp-border: #e2e8f0;
  --sp-radius: 0.875rem;
  --sp-shadow: 0 1px 3px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.06);
  --sp-shadow-lg: 0 4px 6px rgb(15 23 42 / 0.04), 0 20px 48px rgb(79 70 229 / 0.12);
}

* { box-sizing: border-box; }

html {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { color: var(--sp-ink); }

/* Scrollbar */
.sp-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.sp-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--sp-brand);
  outline-offset: 2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sp-teal) 0%, var(--sp-brand-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgb(15 166 166 / 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgb(15 166 166 / 0.45);
}
.btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid var(--sp-border);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
.btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-ghost {
  background: transparent;
  color: #475569;
}
.btn-ghost:hover { background: rgb(15 23 42 / 0.05); color: #0f172a; }
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px rgb(239 68 68 / 0.3);
}
.btn-danger:hover { transform: translateY(-1px); }
.btn-sm { padding: 0.4375rem 0.875rem; font-size: 0.8125rem; }
.btn-icon { padding: 0.5rem; border-radius: 0.625rem; }

/* Cards */
.card {
  background: var(--sp-card);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
}
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: var(--sp-shadow-lg);
}

/* Forms */
.sp-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}
.sp-input {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--sp-border);
  background: #fff;
  padding: 0.6875rem 1rem;
  font-size: 0.9375rem;
  color: var(--sp-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sp-input::placeholder { color: #94a3b8; }
.sp-input:hover { border-color: #cbd5e1; }
.sp-input:focus {
  outline: none;
  border-color: var(--sp-teal);
  box-shadow: 0 0 0 4px rgb(15 166 166 / 0.18);
}
.sp-input:disabled,
.sp-input[readonly] {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
}
textarea.sp-input { resize: vertical; min-height: 6rem; }
.sp-input[type="file"] {
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  font-size: 0.875rem;
}
.sp-input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--sp-teal), var(--sp-brand-dark));
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.sp-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  accent-color: var(--sp-teal);
}

/* Entry forms */
.sp-form {
  padding: 0;
  overflow: hidden;
}
.sp-form-body {
  padding: 1.5rem 1.5rem 0.5rem;
}
@media (min-width: 640px) {
  .sp-form-body { padding: 1.75rem 2rem 0.75rem; }
}
.sp-form-section + .sp-form-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sp-border);
}
.sp-form-section-title {
  margin: 0 0 1.125rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sp-teal);
}
.sp-form-grid {
  display: grid;
  gap: 1.125rem 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .sp-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .sp-form-grid.sp-form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sp-form-grid .sp-span-full { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .sp-form-grid.sp-form-grid--4 .sp-span-3 { grid-column: span 3; }
  .sp-form-grid.sp-form-grid--4 .sp-span-2 { grid-column: span 2; }
}
.sp-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.sp-field-error,
.sp-form .field-validation-error {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #dc2626;
  line-height: 1.25;
}
.sp-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--sp-border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
@media (min-width: 640px) {
  .sp-form-actions { padding: 1.125rem 2rem 1.75rem; }
}
.sp-form .sp-alert { margin-bottom: 1.25rem; }
.sp-inline-input {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.sp-inline-input .sp-input { flex: 1; min-width: 0; }
.sp-lr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}
.sp-lr-tag {
  user-select: none;
}
.sp-lr-remove {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 1;
}
.sp-lr-remove:focus-visible {
  outline: 2px solid var(--sp-teal);
  outline-offset: 1px;
}
.sp-readonly-box {
  border-radius: 0.75rem;
  border: 1px solid var(--sp-border);
  background: #f8fafc;
  padding: 0.6875rem 1rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}

/* Tables */
.sp-table-wrap {
  overflow: hidden;
  border-radius: var(--sp-radius);
  border: 1px solid var(--sp-border);
  background: #fff;
}
.sp-table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
.sp-table thead { background: linear-gradient(180deg, #f8fafc, #f1f5f9); }
.sp-table th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.sp-table td {
  padding: 1rem 1.25rem;
  border-top: 1px solid #f1f5f9;
  color: #334155;
}
.sp-table tbody tr:hover { background: #fafbff; }

.sp-page-body__scroll .sp-table-wrap {
  overflow-x: auto;
}

.sp-table th.sp-table__col-actions,
.sp-table td.sp-table__col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  white-space: nowrap;
  box-shadow: -6px 0 10px -6px rgba(15, 23, 42, 0.12);
}

.sp-table thead th.sp-table__col-actions {
  background: #f1f5f9;
}

.sp-table tbody tr:hover td.sp-table__col-actions {
  background: #fafbff;
}

#lots-pagination .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sp-tab-link {
    display: inline-block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.sp-tab-link:hover { color: var(--sp-brand); }
.sp-tab-link--active {
    color: var(--sp-brand);
    border-bottom-color: var(--sp-teal);
}

/* Alerts */
.sp-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.sp-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.sp-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.sp-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* Toast notifications (top-right) */
.sp-toast-root {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}
.sp-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  background: #fff;
  border: 1px solid var(--sp-border);
  box-shadow: 0 10px 40px rgb(13 27 61 / 0.12);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sp-toast-enter {
  animation: sp-toast-in 0.35s ease forwards;
}
.sp-toast-exit {
  opacity: 0;
  transform: translateX(1rem);
}
.sp-toast-icon { flex-shrink: 0; margin-top: 0.125rem; }
.sp-toast-message {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sp-ink);
  line-height: 1.4;
}
.sp-toast-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}
.sp-toast-close:hover { color: #64748b; }
.sp-toast-success { border-left: 4px solid #7bc043; }
.sp-toast-success .sp-toast-icon { color: #15803d; }
.sp-toast-error { border-left: 4px solid #dc2626; }
.sp-toast-error .sp-toast-icon { color: #dc2626; }
.sp-toast-warning { border-left: 4px solid #f59e0b; }
.sp-toast-warning .sp-toast-icon { color: #d97706; }
.sp-toast-info { border-left: 4px solid var(--sp-teal); }
.sp-toast-info .sp-toast-icon { color: var(--sp-teal); }

@keyframes sp-toast-in {
  from { opacity: 0; transform: translateX(1.25rem); }
  to { opacity: 1; transform: translateX(0); }
}

/* Confirm dialog */
.sp-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgb(13 27 61 / 0.55);
  backdrop-filter: blur(4px);
}
.sp-confirm-modal.hidden,
.sp-confirm-backdrop.hidden {
  display: none !important;
}
.sp-confirm-modal.flex {
  display: flex;
}
.sp-confirm-panel {
  animation: sp-fade-in 0.25s ease forwards;
}
.sp-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 110;
}
.sp-modal-layer.flex {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.sp-modal-layer.hidden {
  display: none !important;
}
.sp-modal-layer .sp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.5);
  backdrop-filter: blur(4px);
}
.sp-modal-layer .sp-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 32rem;
  margin: auto;
  border-radius: 1rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.25);
  animation: sp-fade-in 0.25s ease forwards;
}
.sp-modal-layer .sp-modal-panel--wide {
  max-width: 42rem;
}

/* Tall modals — use viewport below header (challan, design picker, etc.) */
.sp-modal-layer--tall.flex {
  align-items: stretch;
  padding: 0.75rem 1rem;
}

.sp-modal-panel--tall {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(56rem, calc(100vw - 2rem));
  min-height: calc(100dvh - var(--sp-header) - 1.5rem);
  max-height: calc(100dvh - var(--sp-header) - 1.5rem);
  margin: 0 auto;
  overflow: hidden;
}

.challan-modal-body {
  flex: 1 1 auto;
  min-height: 0;
}

.challan-modal-main {
  min-height: 0;
}

.challan-meter-scroll {
  min-height: 10rem;
}

.challan-design-window__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: 0.75rem;
  border: 1px solid var(--sp-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #f8fafc;
}

.challan-design-window__img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.challan-design-window__empty {
  padding: 0.75rem;
}

@media (min-width: 1024px) {
  .challan-design-window__frame {
    min-height: 0;
  }
}

/* Full-height production pages */
.sp-page-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--sp-header) - 2.5rem);
}
.sp-page-shell > .card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.sp-page-header {
  flex-shrink: 0;
  padding: 1.25rem 1.5rem 0;
  border-bottom: 1px solid var(--sp-border);
}
@media (min-width: 640px) {
  .sp-page-header { padding: 1.5rem 2rem 0; }
}
.sp-page-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}
@media (min-width: 640px) {
  .sp-page-toolbar { padding: 1rem 2rem; }
}
.sp-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
}
.sp-page-body__scroll {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
}
.sp-page-footer {
  flex-shrink: 0;
  padding: 0.875rem 1.5rem;
  border-top: 1px solid var(--sp-border);
  background: #fafbff;
}
@media (min-width: 640px) {
  .sp-page-footer { padding: 0.875rem 2rem; }
}
.sp-empty-state {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.sp-empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #e0e7ff 0%, #ccfbf1 100%);
  color: var(--sp-brand);
}
.sp-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 1rem;
}

/* Sidebar nav */
.sp-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  transition: all 0.15s ease;
}
.sp-nav-link:hover {
  background: rgb(255 255 255 / 0.06);
  color: #e2e8f0;
}
.sp-nav-link.active {
  background: linear-gradient(135deg, rgb(15 166 166 / 0.28), rgb(123 192 67 / 0.12));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(15 166 166 / 0.45);
}
.sp-nav-section {
  margin-top: 1.25rem;
  padding: 0 0.75rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

/* Dashboard module tiles */
.sp-tile {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.5rem;
  color: #fff;
  min-height: 8.5rem;
}
.sp-tile::after {
  content: '';
  position: absolute;
  right: -1rem;
  bottom: -1rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
}
.sp-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.2);
  backdrop-filter: blur(4px);
}

/* Production activity dashboard */
.sp-activity-kpi {
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.sp-activity-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.25rem;
}
.sp-activity-pipeline__item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.sp-activity-pipeline__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sp-activity-pipeline__card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(15 23 42 / 0.08);
}
.sp-activity-pipeline__count {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}
.sp-activity-pipeline__label {
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}
.sp-activity-pipeline__arrow {
  width: 1rem;
  height: 1rem;
  color: #cbd5e1;
  flex-shrink: 0;
}
.sp-activity-timeline__item:hover {
  background: #fafbff;
}
.sp-activity-timeline__dot {
  margin-top: 0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px currentColor;
}
.sp-activity-timeline__dot--order { color: #4f46e5; background: #4f46e5; }
.sp-activity-timeline__dot--group { color: #7c3aed; background: #7c3aed; }
.sp-activity-timeline__dot--rfd { color: #0284c7; background: #0284c7; }
.sp-activity-timeline__dot--dye { color: #0891b2; background: #0891b2; }
.sp-activity-timeline__dot--print { color: #d97706; background: #d97706; }
.sp-activity-timeline__dot--challan { color: #0d9488; background: #0d9488; }
.sp-activity-timeline__dot--issue { color: #64748b; background: #64748b; }

/* Login page */
.sp-auth-bg {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgb(99 102 241 / 0.35), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgb(245 158 11 / 0.2), transparent 45%),
    linear-gradient(160deg, #0f172a 0%, #1e1b4b 40%, #312e81 100%);
}
.sp-auth-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.sp-glass {
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgb(255 255 255 / 0.5);
}

/* Permission chips on edit screen */
.sp-perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--sp-border);
  background: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.sp-perm-chip:has(input:checked) {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #3730a3;
}
.sp-perm-chip input { accent-color: #4f46e5; }

/* Role permissions editor */
.sp-role-perm-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  height: 100%;
}
.sp-role-perm-card--highlight {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
}
.sp-role-perm-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--sp-border);
}
.sp-role-perm-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.sp-role-perm-card__hint {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}
.sp-role-perm-card__count {
  flex-shrink: 0;
  min-width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}
.sp-role-perm-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sp-role-perm-card__actions .sp-perm-chip span {
  line-height: 1.2;
}

/* Animations */
@keyframes sp-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-animate-in { animation: sp-fade-in 0.45s ease forwards; }
.sp-delay-1 { animation-delay: 0.05s; opacity: 0; }
.sp-delay-2 { animation-delay: 0.1s; opacity: 0; }
.sp-delay-3 { animation-delay: 0.15s; opacity: 0; }

/* Mobile sidebar overlay */
#sp-sidebar-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}
#sp-sidebar[data-open="true"] { transform: translateX(0); }
