html[data-app-theme='modern'] {
  --color-bg-primary: #f3f6fb;
  --color-bg-secondary: #ffffff;
  --color-sidebar: #152235;
  --color-sidebar-hover: #1d2f47;
  --color-sidebar-section-active: #20364f;
  --color-sidebar-active: #26405f;
  --color-accent-primary: #4f46e5;
  --color-accent-secondary: #f97316;
  --color-text-primary: #0f172a;
  --color-text-secondary: #64748b;
  --color-text-light: #94a3b8;
  --color-border: #dbe4f0;
  --color-shadow: rgba(15, 23, 42, 0.12);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --modern-surface: rgba(255, 255, 255, 0.82);
  --modern-surface-strong: #ffffff;
  --modern-surface-muted: #eef2ff;
  --modern-border-strong: #cbd5e1;
}

html[data-app-theme='modern'] body {
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.08), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

html[data-app-theme='modern'] .app-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

html[data-app-theme='modern'] .app-header-logo,
html[data-app-theme='modern'] .app-header-user-name {
  letter-spacing: -0.02em;
}

html[data-app-theme='modern'] .app-header-user-button {
  border: 1px solid transparent;
}

html[data-app-theme='modern'] .app-header-user-button:hover {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.1);
}

html[data-app-theme='modern'] .app-sidebar {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

html[data-app-theme='modern'] .app-content {
  padding-top: 2.25rem;
}

html[data-app-theme='modern'] h1,
html[data-app-theme='modern'] h2,
html[data-app-theme='modern'] h3,
html[data-app-theme='modern'] h4 {
  letter-spacing: -0.025em;
}

html[data-app-theme='modern'] .uk-card-default,
html[data-app-theme='modern'] .card {
  background: var(--modern-surface);
  border: 1px solid rgba(219, 228, 240, 0.95);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04);
}

html[data-app-theme='modern'] .uk-card-body,
html[data-app-theme='modern'] .card-body {
  padding: 1.5rem;
}

html[data-app-theme='modern'] .uk-card-small .uk-card-body {
  padding: 1rem 1.25rem;
}

html[data-app-theme='modern'] .uk-card-title {
  margin-bottom: 0.35rem;
}

html[data-app-theme='modern'] .uk-button {
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 18px;
  height: 38px;
  line-height: 38px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

html[data-app-theme='modern'] .uk-button-primary {
  background: linear-gradient(180deg, #5b54ea 0%, var(--color-accent-primary) 100%);
  border: none;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}

html[data-app-theme='modern'] .uk-button-primary:hover,
html[data-app-theme='modern'] .uk-button-primary:focus {
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.28);
  transform: translateY(-1px);
}

html[data-app-theme='modern'] .uk-button-primary:active {
  transform: translateY(0);
}

html[data-app-theme='modern'] .uk-button-default {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

html[data-app-theme='modern'] .uk-button-default:hover,
html[data-app-theme='modern'] .uk-button-default:focus {
  background: #f8fbff;
  border-color: var(--modern-border-strong);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

html[data-app-theme='modern'] .uk-button-secondary {
  background: #475569;
  border-color: #475569;
  box-shadow: 0 8px 18px rgba(71, 85, 105, 0.16);
}

html[data-app-theme='modern'] .uk-button-secondary:hover,
html[data-app-theme='modern'] .uk-button-secondary:focus {
  background: #334155;
  border-color: #334155;
  transform: translateY(-1px);
}

html[data-app-theme='modern'] .uk-button-danger {
  border-radius: 10px;
}

html[data-app-theme='modern'] .uk-button.uk-disabled,
html[data-app-theme='modern'] .uk-button:disabled {
  opacity: 0.48;
  box-shadow: none;
  transform: none;
}

html[data-app-theme='modern'] .uk-input,
html[data-app-theme='modern'] .uk-select,
html[data-app-theme='modern'] .uk-textarea {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.98);
  color: var(--color-text-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

html[data-app-theme='modern'] .uk-input,
html[data-app-theme='modern'] .uk-select {
  height: 40px;
}

html[data-app-theme='modern'] .uk-textarea {
  padding: 10px 12px;
}

html[data-app-theme='modern'] .uk-form-small.uk-input,
html[data-app-theme='modern'] .uk-form-small.uk-select,
html[data-app-theme='modern'] .uk-form-small.uk-textarea {
  border-radius: 8px;
  font-size: 13px;
}

html[data-app-theme='modern'] .uk-form-small.uk-input,
html[data-app-theme='modern'] .uk-form-small.uk-select {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
}

html[data-app-theme='modern'] .uk-form-small.uk-textarea {
  padding: 7px 10px;
}

html[data-app-theme='modern'] .uk-button.uk-button-small {
  border-radius: 8px;
  font-size: 12.5px;
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
}

html[data-app-theme='modern'] .uk-input:focus,
html[data-app-theme='modern'] .uk-select:focus,
html[data-app-theme='modern'] .uk-textarea:focus,
html[data-app-theme='modern'] .musa-quill-shell .ql-container.ql-snow:focus-within,
html[data-app-theme='modern'] .musa-quill-shell .ql-toolbar.ql-snow:focus-within {
  border-color: rgba(79, 70, 229, 0.48);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

html[data-app-theme='modern'] .uk-input::placeholder,
html[data-app-theme='modern'] .uk-textarea::placeholder {
  color: #94a3b8;
}

html[data-app-theme='modern'] .uk-form-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

html[data-app-theme='modern'] .uk-checkbox,
html[data-app-theme='modern'] .uk-radio {
  accent-color: var(--color-accent-primary);
}

html[data-app-theme='modern'] .uk-table {
  font-size: 13.5px;
}

html[data-app-theme='modern'] .uk-table th {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  padding: 10px 14px;
  border-bottom-color: var(--color-border);
}

html[data-app-theme='modern'] .uk-table td {
  padding: 11px 14px;
}

html[data-app-theme='modern'] .uk-table.uk-table-small th {
  font-size: 11px;
  padding: 7px 10px;
}

html[data-app-theme='modern'] .uk-table.uk-table-small td {
  padding: 7px 10px;
  line-height: 1.3;
  vertical-align: middle;
}

html[data-app-theme='modern'] .uk-table td {
  vertical-align: middle;
}

html[data-app-theme='modern'] .uk-table.uk-table-small td .uk-button.uk-button-small,
html[data-app-theme='modern'] .uk-table.uk-table-small td a.uk-button.uk-button-small {
  height: 26px;
  line-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  vertical-align: middle;
}

html[data-app-theme='modern'] .uk-table.uk-table-small td .uk-button-group .uk-button.uk-button-small {
  height: 26px;
  line-height: 26px;
}

html[data-app-theme='modern'] .uk-table-divider > tr:not(:last-child) > td,
html[data-app-theme='modern'] .uk-table-divider > :not(:last-child) > tr > td,
html[data-app-theme='modern'] .uk-table-divider > tr:not(:last-child) > th,
html[data-app-theme='modern'] .uk-table-divider > :not(:last-child) > tr > th {
  border-bottom-color: rgba(219, 228, 240, 0.92);
}

html[data-app-theme='modern'] .uk-table tbody tr {
  transition: background-color 0.12s ease;
}

html[data-app-theme='modern'] .uk-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.05);
}

html[data-app-theme='modern'] .uk-card .uk-overflow-auto {
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

html[data-app-theme='modern'] .uk-card .uk-overflow-auto .uk-table {
  margin: 0;
}

html[data-app-theme='modern'] #physical-inventory-htmx-list .list-view-table-wrapper {
  padding: 0 8px 8px;
}

html[data-app-theme='modern'] #physical-inventory-htmx-list .physical-inventory-actions-col {
  width: 1%;
  white-space: nowrap;
}

html[data-app-theme='modern'] #physical-inventory-htmx-list .physical-inventory-actions-cell {
  min-height: 0;
  line-height: 1;
}

html[data-app-theme='modern'] #physical-inventory-htmx-list .physical-inventory-action-button {
  min-width: 0;
  min-height: 0;
  width: 18px;
  height: 18px;
  line-height: 1;
  padding: 0;
  flex: 0 0 18px;
}

html[data-app-theme='modern'] #physical-inventory-htmx-list .physical-inventory-action-button [uk-icon] svg,
html[data-app-theme='modern'] #physical-inventory-htmx-list .physical-inventory-action-button.uk-icon svg,
html[data-app-theme='modern'] #physical-inventory-htmx-list .physical-inventory-action-button svg {
  width: 16px;
  height: 16px;
}

html[data-app-theme='modern'] #physical-inventory-htmx-list .uk-table.uk-table-small th {
  font-size: 11px;
  padding: 5px 8px;
}

html[data-app-theme='modern'] #physical-inventory-htmx-list .uk-table.uk-table-small td {
  padding: 5px 8px;
  line-height: 1.25;
}

html[data-app-theme='modern'] #physical-inventory-page .uk-tab {
  border-bottom-color: rgba(15, 23, 42, 0.12);
  margin-top: 1rem !important;
}

html[data-app-theme='modern'] #physical-inventory-page .uk-tab > * > a {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: -1px;
  padding: 10px 12px;
}

html[data-app-theme='modern'] #physical-inventory-page .uk-tab > *:first-child > a {
  padding-left: 0;
}

html[data-app-theme='modern'] #physical-inventory-page .uk-tab > * > a:hover {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(79, 70, 229, 0.2);
  color: var(--color-text-primary);
}

html[data-app-theme='modern'] #physical-inventory-page .uk-tab > .uk-active > a {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-accent-primary);
  color: var(--color-text-primary);
}

html[data-app-theme='modern'] #physical-inventory-page #physical-inventory-content {
  margin-top: 1rem !important;
}

html[data-app-theme='modern'] #physical-inventory-page .list-view-container {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
}

html[data-app-theme='modern'] #physical-inventory-page .list-view-container > .uk-card-body.uk-padding-small {
  padding: 12px 14px;
}

html[data-app-theme='modern'] #physical-inventory-page .list-view-container .uk-form-label {
  font-size: 12px;
  margin-bottom: 4px;
}

html[data-app-theme='modern'] #physical-inventory-page .list-view-container .uk-input.uk-form-small,
html[data-app-theme='modern'] #physical-inventory-page .list-view-container .uk-select.uk-form-small {
  height: 30px;
  min-height: 30px;
  padding-top: 0;
  padding-bottom: 0;
}

html[data-app-theme='modern'] #physical-inventory-page .list-view-container .uk-grid-small {
  margin-left: -8px;
}

html[data-app-theme='modern'] #physical-inventory-page .list-view-container .uk-grid-small > * {
  padding-left: 8px;
}

html[data-app-theme='modern'] #physical-inventory-page .list-view-table-wrapper thead th {
  background: rgba(255, 255, 255, 0.96);
}

html[data-app-theme='modern'] .uk-alert {
  border-radius: 10px;
  border-left: 4px solid transparent;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

html[data-app-theme='modern'] .uk-alert-success {
  background: #f0fdf4;
  border-left-color: #22c55e;
  color: #166534;
}

html[data-app-theme='modern'] .uk-alert-warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

html[data-app-theme='modern'] .uk-alert-danger {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #991b1b;
}

html[data-app-theme='modern'] .uk-alert-primary {
  background: #eef2ff;
  border-left-color: var(--color-accent-primary);
  color: #3730a3;
}

html[data-app-theme='modern'] .uk-label {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 9px;
}

html[data-app-theme='modern'] .uk-label-success {
  background: #dcfce7;
  color: #166534;
}

html[data-app-theme='modern'] .uk-label-warning {
  background: #fef3c7;
  color: #92400e;
}

html[data-app-theme='modern'] .uk-label-danger {
  background: #fee2e2;
  color: #991b1b;
}

html[data-app-theme='modern'] .uk-dropdown {
  border-radius: 12px;
  border: 1px solid rgba(219, 228, 240, 0.95);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.98);
}

html[data-app-theme='modern'] .uk-nav-dropdown > li > a {
  border-radius: 8px;
  font-size: 13.5px;
}

html[data-app-theme='modern'] .uk-nav-dropdown > li > a:hover {
  background: #f1f5f9;
  color: var(--color-accent-primary);
}

html[data-app-theme='modern'] .uk-tooltip {
  border-radius: 8px;
  font-size: 12px;
  padding: 6px 10px;
  background: #1e293b;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

html[data-app-theme='modern'] .uk-pagination > * > * {
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.96);
}

html[data-app-theme='modern'] .uk-pagination > * > :hover {
  background: #f8fbff;
  border-color: var(--modern-border-strong);
  color: var(--color-accent-primary);
}

html[data-app-theme='modern'] .uk-pagination > .uk-active > * {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.18);
}

html[data-app-theme='modern'] .uk-modal-dialog {
  border-radius: 16px;
  border: 1px solid rgba(219, 228, 240, 0.95);
  box-shadow: 0 26px 64px rgba(15, 23, 42, 0.18), 0 6px 18px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

html[data-app-theme='modern'] .uk-modal-header,
html[data-app-theme='modern'] .uk-modal-footer {
  background: #fafcff;
  border-color: rgba(219, 228, 240, 0.92);
}

html[data-app-theme='modern'] .uk-modal-title {
  font-size: 17px;
  letter-spacing: -0.02em;
}

html[data-app-theme='modern'] .uk-modal-close-default:hover {
  background: rgba(15, 23, 42, 0.06);
}

html[data-app-theme='modern'] .uk-breadcrumb > * > * {
  color: var(--color-text-light);
}

html[data-app-theme='modern'] .uk-breadcrumb > * > a:hover {
  color: var(--color-accent-primary);
}

html[data-app-theme='modern'] .uk-breadcrumb > :last-child > * {
  color: var(--color-text-primary);
}

html[data-app-theme='modern'] .uk-tab {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(219, 228, 240, 0.95);
}

html[data-app-theme='modern'] .uk-tab > * > a {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: -1px;
  padding: 10px 12px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

html[data-app-theme='modern'] .uk-tab > * > a:hover {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(79, 70, 229, 0.2);
  color: var(--color-text-primary);
}

html[data-app-theme='modern'] .uk-tab > .uk-active > a {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-accent-primary);
  color: var(--color-text-primary);
}

html[data-app-theme='modern'] .uk-switcher {
  margin-top: 1rem;
}

html[data-app-theme='modern'] .list-view-container {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
}

html[data-app-theme='modern'] .list-view-container > .uk-card-body.uk-padding-small {
  padding: 12px 14px;
}

html[data-app-theme='modern'] .list-view-table-wrapper {
  padding: 0 12px 10px;
}

html[data-app-theme='modern'] .list-view-container .uk-form-label {
  font-size: 12px;
  margin-bottom: 4px;
}

html[data-app-theme='modern'] .uk-text-muted,
html[data-app-theme='modern'] .text-muted,
html[data-app-theme='modern'] .uk-text-meta {
  color: var(--color-text-secondary);
}

html[data-app-theme='modern'] a:focus-visible,
html[data-app-theme='modern'] button:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}
