:root {
    --app-font-sans: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    --app-color-primary: #2563eb;
    --app-color-secondary: #64748b;
    --app-color-success: #16a34a;
    --app-color-warning: #f59e0b;
    --app-color-danger: #dc2626;
    --app-color-info: #0f766e;
    --app-bg: #f8fafc;
    --app-bg-soft: #f1f5f9;
    --app-surface: #ffffff;
    --app-surface-muted: rgba(255, 255, 255, 0.82);
    --app-border: #dbe4f0;
    --app-border-strong: #cbd5e1;
    --app-text: #0f172a;
    --app-text-muted: #475569;
    --app-text-soft: #64748b;
    --app-ring: rgba(37, 99, 235, 0.16);
    --app-shadow-xs: 0 8px 18px rgba(15, 23, 42, 0.05);
    --app-shadow-sm: 0 16px 40px rgba(15, 23, 42, 0.08);
    --app-shadow-md: 0 26px 70px rgba(15, 23, 42, 0.12);
    --app-shadow-lg: 0 36px 110px rgba(15, 23, 42, 0.16);
    --app-radius-sm: 12px;
    --app-radius-md: 18px;
    --app-radius-lg: 24px;
    --app-radius-xl: 32px;
}

html,
body {
    min-height: 100%;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: var(--app-font-sans);
}

body.app-shell {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 45%, #eef3f9 100%);
}

body.app-shell--pos {
    background:
        radial-gradient(circle at 10% 10%, rgba(22, 163, 74, 0.12), transparent 30%),
        radial-gradient(circle at 92% 4%, rgba(37, 99, 235, 0.1), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

a,
button,
input,
select,
textarea {
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

a {
    color: inherit;
}

a:hover,
a:focus {
    text-decoration: none;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
.btn:focus,
.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    outline: none;
}

.content,
.content-wrapper,
.wrapper,
.main-content {
    background: transparent !important;
}

.content {
    padding: 26px 24px 16px;
}

.content-header {
    padding: 18px 24px 4px;
}

.content-header > h1,
h1,
.page-title {
    margin-top: 0;
    color: var(--app-text);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.content-header > h1 small,
.page-subtitle,
.help-block,
.text-muted,
small.text-muted {
    color: var(--app-text-soft) !important;
}

.box,
.nav-tabs-custom,
.small-box,
.info-box,
.modal-content,
.dropdown-menu,
.well,
.callout,
.box-widget,
.invoice {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-xs);
}

.box,
.nav-tabs-custom,
.box-widget {
    overflow: hidden;
}

.box {
    border-top: 0 !important;
}

.box-header,
.nav-tabs-custom > .nav-tabs,
.modal-header,
.box.box-widget > .box-header,
.box-tools {
    border-color: rgba(203, 213, 225, 0.7) !important;
}

.box-header,
.modal-header,
.modal-footer {
    padding: 18px 22px;
}

.box-body,
.modal-body {
    padding: 22px;
}

.box-title,
.modal-title,
.nav-tabs-custom > .nav-tabs > li > a,
.box-header .box-title {
    color: var(--app-text);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.box-tools .btn-box-tool,
.modal-header .close,
.close {
    color: var(--app-text-soft);
    opacity: 1;
}

.box-tools .btn-box-tool:hover,
.modal-header .close:hover,
.close:hover {
    color: var(--app-text);
}

.label,
.badge {
    border-radius: 999px;
    font-weight: 700;
}

.table .label,
.table .badge,
table.dataTable .label,
table.dataTable .badge,
.table .status-label,
table.dataTable .status-label,
.payment-status-label .label,
.payment-status .label,
.edit-po-status.label,
.edit-so-status.label,
.stock_transfer_status .label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    color: #0f172a !important;
}

.table .label.bg-yellow,
.table .badge.bg-yellow,
table.dataTable .label.bg-yellow,
table.dataTable .badge.bg-yellow,
.table .status-label.bg-yellow,
table.dataTable .status-label.bg-yellow,
.payment-status-label .label.bg-yellow,
.payment-status .label.bg-yellow,
.edit-po-status.label.bg-yellow,
.edit-so-status.label.bg-yellow,
.stock_transfer_status .label.bg-yellow {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(217, 119, 6, 0.2) !important;
    color: #92400e !important;
}

.table .label.bg-aqua,
.table .badge.bg-aqua,
table.dataTable .label.bg-aqua,
table.dataTable .badge.bg-aqua,
.table .status-label.bg-aqua,
table.dataTable .status-label.bg-aqua,
.payment-status-label .label.bg-aqua,
.payment-status .label.bg-aqua,
.edit-po-status.label.bg-aqua,
.edit-so-status.label.bg-aqua,
.stock_transfer_status .label.bg-aqua,
.table .label.label-info,
.table .badge.label-info,
table.dataTable .label.label-info,
table.dataTable .badge.label-info,
.table .status-label.label-info,
table.dataTable .status-label.label-info {
    background: rgba(6, 182, 212, 0.15) !important;
    border-color: rgba(8, 145, 178, 0.2) !important;
    color: #155e75 !important;
}

.table .label.bg-light-green,
.table .badge.bg-light-green,
table.dataTable .label.bg-light-green,
table.dataTable .badge.bg-light-green,
.table .status-label.bg-light-green,
table.dataTable .status-label.bg-light-green,
.payment-status-label .label.bg-light-green,
.payment-status .label.bg-light-green,
.edit-po-status.label.bg-light-green,
.edit-so-status.label.bg-light-green,
.stock_transfer_status .label.bg-light-green,
.table .label.bg-green,
.table .badge.bg-green,
table.dataTable .label.bg-green,
table.dataTable .badge.bg-green,
.table .status-label.bg-green,
table.dataTable .status-label.bg-green,
.table .label.label-success,
.table .badge.label-success,
table.dataTable .label.label-success,
table.dataTable .badge.label-success,
.table .status-label.label-success,
table.dataTable .status-label.label-success {
    background: rgba(22, 163, 74, 0.14) !important;
    border-color: rgba(21, 128, 61, 0.2) !important;
    color: #166534 !important;
}

.table .label.bg-red,
.table .badge.bg-red,
table.dataTable .label.bg-red,
table.dataTable .badge.bg-red,
.table .status-label.bg-red,
table.dataTable .status-label.bg-red,
.payment-status-label .label.bg-red,
.payment-status .label.bg-red,
.edit-po-status.label.bg-red,
.edit-so-status.label.bg-red,
.stock_transfer_status .label.bg-red,
.table .label.label-danger,
.table .badge.label-danger,
table.dataTable .label.label-danger,
table.dataTable .badge.label-danger,
.table .status-label.label-danger,
table.dataTable .status-label.label-danger {
    background: rgba(220, 38, 38, 0.13) !important;
    border-color: rgba(185, 28, 28, 0.18) !important;
    color: #991b1b !important;
}

.table .label.bg-light-blue,
.table .badge.bg-light-blue,
table.dataTable .label.bg-light-blue,
table.dataTable .badge.bg-light-blue,
.table .status-label.bg-light-blue,
table.dataTable .status-label.bg-light-blue,
.payment-status-label .label.bg-light-blue,
.payment-status .label.bg-light-blue,
.edit-po-status.label.bg-light-blue,
.edit-so-status.label.bg-light-blue,
.stock_transfer_status .label.bg-light-blue,
.table .label.bg-primary,
.table .badge.bg-primary,
table.dataTable .label.bg-primary,
table.dataTable .badge.bg-primary,
.table .status-label.bg-primary,
table.dataTable .status-label.bg-primary,
.table .label.label-primary,
.table .badge.label-primary,
table.dataTable .label.label-primary,
table.dataTable .badge.label-primary,
.table .status-label.label-primary,
table.dataTable .status-label.label-primary {
    background: rgba(37, 99, 235, 0.14) !important;
    border-color: rgba(29, 78, 216, 0.18) !important;
    color: #1d4ed8 !important;
}

.table .label.bg-gray,
.table .badge.bg-gray,
table.dataTable .label.bg-gray,
table.dataTable .badge.bg-gray,
.table .status-label.bg-gray,
table.dataTable .status-label.bg-gray,
.table .label.label-default,
.table .badge.label-default,
table.dataTable .label.label-default,
table.dataTable .badge.label-default,
.table .status-label.label-default,
table.dataTable .status-label.label-default {
    background: rgba(100, 116, 139, 0.14) !important;
    border-color: rgba(71, 85, 105, 0.16) !important;
    color: #475569 !important;
}

.table .label.bg-orange,
.table .badge.bg-orange,
table.dataTable .label.bg-orange,
table.dataTable .badge.bg-orange,
.table .status-label.bg-orange,
table.dataTable .status-label.bg-orange {
    background: rgba(249, 115, 22, 0.14) !important;
    border-color: rgba(194, 65, 12, 0.18) !important;
    color: #9a3412 !important;
}

.table .status-label,
.payment-status-label,
.payment-status,
.status-label,
.edit-po-status,
.edit-so-status,
.stock_transfer_status {
    color: inherit !important;
}

.label-warning,
.badge-warning {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #b45309 !important;
}

.label-success,
.badge-success {
    background: rgba(22, 163, 74, 0.14) !important;
    color: #166534 !important;
}

.label-danger,
.badge-danger {
    background: rgba(220, 38, 38, 0.12) !important;
    color: #991b1b !important;
}

.label-primary,
.badge-primary,
.bg-primary {
    background: var(--app-color-primary) !important;
    color: #fff !important;
}

.bg-gray,
.bg-light-gray,
.bg-gray-light {
    background: var(--app-bg-soft) !important;
}

.nav-tabs-custom > .nav-tabs > li.active {
    border-top-color: transparent !important;
}

.nav-tabs-custom > .nav-tabs > li > a {
    border-radius: 12px;
    margin: 10px 6px 0;
    padding: 10px 16px;
}

.nav-tabs-custom > .nav-tabs > li.active > a,
.nav-tabs-custom > .nav-tabs > li.active:hover > a {
    background: rgba(37, 99, 235, 0.08);
    color: var(--app-color-primary);
}

.modal-content {
    backdrop-filter: blur(18px);
}

.progress,
.progress-bar {
    border-radius: 999px;
}

.progress {
    background: rgba(148, 163, 184, 0.14);
    box-shadow: none;
}

.progress-bar-success {
    background: var(--app-color-success);
}

.progress-bar-warning {
    background: var(--app-color-warning);
}

.progress-bar-danger {
    background: var(--app-color-danger);
}

.text-primary,
.text-info {
    color: var(--app-color-primary) !important;
}

.text-success {
    color: var(--app-color-success) !important;
}

.text-warning {
    color: var(--app-color-warning) !important;
}

.text-danger {
    color: var(--app-color-danger) !important;
}

@media (max-width: 991px) {
    .content,
    .content-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .box-header,
    .box-body,
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}