:root {
    --posm-bg: #f3f6fb;
    --posm-panel: rgba(255, 255, 255, .74);
    --posm-card: #ffffff;
    --posm-sidebar: rgba(248, 247, 253, .88);
    --posm-text: #272636;
    --posm-muted: #8c8a9d;
    --posm-border: #eceaf4;
    --posm-pink: #2563eb;
    --posm-blue: #2563eb;
    --posm-purple: #1d4ed8;
    --posm-green: #3b82f6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .75), transparent 32%),
        linear-gradient(135deg, #eef4ff 0%, #f7f9fd 48%, #edf4ff 100%) !important;
    color: var(--posm-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.posm-shell {
    width: 100vw;
    height: 100vh;
    margin: 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    border-radius: 0;
    background: rgba(255, 255, 255, .34);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

.posm-sidebar {
    background: rgba(255, 255, 255, .88);
    border-right: 1px solid rgba(226, 232, 240, .78);
    padding: 28px 0;
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
}

.posm-sidebar-backdrop,
.posm-menu-toggle {
    display: none;
}

.posm-brand {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    border-bottom: 1px solid rgba(226, 232, 240, .72);
    color: #282536;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -.01em;
}

.posm-brand-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
}

.posm-brand-text strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: 0;
    white-space: nowrap;
}

.posm-brand-text small {
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: normal;
}

.posm-brand img {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.posm-brand.has-logo::before {
    display: none;
}

.posm-brand.no-logo::before {
    display: none;
}

.posm-login-emblem img {
    width: 74px;
    height: 74px;
    object-fit: contain;
}

.posm-brand::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 7px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}

.posm-nav {
    padding: 18px 12px 28px;
}

.posm-nav-section {
    margin: 22px 28px 8px;
    color: #a1a0b1;
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.posm-nav-group {
    margin: 4px 0;
}

.posm-nav-group summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    color: #475569;
    font-size: 11.5px;
    font-weight: 1000;
    cursor: pointer;
    list-style: none;
    border-radius: 12px;
    user-select: none;
}

.posm-nav-group summary::-webkit-details-marker {
    display: none;
}

.posm-nav-group summary > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.posm-nav-group summary i:first-child {
    width: 15px;
    text-align: center;
    color: #8b89a0;
}

.posm-nav-group summary:hover,
.posm-nav-group.is-active summary {
    color: var(--posm-blue);
    background: rgba(37, 99, 235, .09);
}

.posm-nav-group.is-active summary i:first-child {
    color: var(--posm-blue);
}

.posm-nav-chevron {
    width: 12px;
    color: #b1afc0;
    font-size: 10px;
    transition: transform .18s ease;
}

.posm-nav-group[open] .posm-nav-chevron {
    transform: rotate(180deg);
}

.posm-nav-children {
    margin: 4px 0 8px;
    padding-left: 12px;
}

.posm-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 38px;
    padding: 0 12px 0 20px;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 10px;
}

.posm-nav a:hover,
.posm-nav a.active {
    color: #1d4ed8;
    background: rgba(37, 99, 235, .1);
    border-left-color: #2563eb;
}

.posm-nav i {
    width: 15px;
    text-align: center;
}

.posm-main {
    min-width: 0;
    height: 100vh;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

.posm-topbar {
    flex: 0 0 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0 22px;
    border-bottom: 1px solid rgba(226, 232, 240, .75);
    background: rgba(255, 255, 255, .76);
    backdrop-filter: blur(16px);
}

.posm-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 320px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(226, 232, 240, .85);
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
    color: var(--posm-muted);
    font-size: 12px;
}

.posm-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #2f2d3a;
    font-size: 13px;
    font-weight: 700;
}

.posm-search input::placeholder {
    color: #8c8a9d;
    font-weight: 600;
}

.posm-search button {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transform: translateX(4px);
    transition: .18s ease;
}

.posm-search:focus-within button,
.posm-search input:not(:placeholder-shown) + button {
    opacity: 1;
    transform: translateX(0);
}

.posm-top-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #475569;
    font-size: 12.5px;
}

.posm-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
}

.posm-avatar {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
}

.posm-content {
    width: 100%;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 22px 46px;
}

.posm-content > .mb-6:first-child {
    min-height: auto;
    margin-bottom: 22px !important;
}

.posm-content h1 {
    color: #292738;
    font-size: 24px !important;
    font-weight: 900 !important;
}

.posm-content .text-rose-600 {
    color: var(--posm-pink) !important;
}

.posm-content .rounded-lg {
    border-radius: 14px !important;
    border-color: rgba(226, 232, 240, .92) !important;
    background: rgba(255, 255, 255, .93) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .055) !important;
}

.posm-content > .rounded-lg,
.posm-content > form {
    border-radius: 18px !important;
}

.posm-content table thead {
    background: #f8fafc !important;
}

.posm-content th {
    color: #64748b !important;
    font-size: 11px !important;
    letter-spacing: .035em;
    font-weight: 900 !important;
}

.posm-content td {
    color: #1f2937;
    border-top-color: rgba(226, 232, 240, .72) !important;
}

.posm-content tbody tr {
    transition: background-color .14s ease, box-shadow .14s ease;
}

.posm-content tbody tr:hover {
    background: rgba(239, 246, 255, .55);
}

.posm-content input,
.posm-content select,
.posm-content textarea {
    border-color: #dbe3ef !important;
    color: #1f2937;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.posm-content input:focus,
.posm-content select:focus,
.posm-content textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
    outline: none;
}

.posm-content label span {
    color: #334155;
}

.posm-content .overflow-x-auto {
    max-width: 100%;
}

.posm-content table {
    width: 100%;
}

.posm-content a[href*="create"],
.posm-content button:not([disabled]) {
    border-radius: 10px !important;
}

.posm-content a[href*="create"] {
    background: linear-gradient(135deg, #60a5fa, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 14px 26px rgba(37, 99, 235, .2);
}

.posm-content a[class*="bg-blue-"],
.posm-content button[class*="bg-blue-"],
.posm-content a[class*="bg-rose-"],
.posm-content button[class*="bg-rose-"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 14px 26px rgba(37, 99, 235, .18) !important;
}

.posm-content a[class*="bg-slate-900"],
.posm-content button[class*="bg-slate-900"] {
    background: #172033 !important;
    border-color: #172033 !important;
    color: #fff !important;
}

.posm-content a[class*="bg-blue-"] *,
.posm-content button[class*="bg-blue-"] *,
.posm-content a[class*="bg-rose-"] *,
.posm-content button[class*="bg-rose-"] *,
.posm-content a[class*="bg-slate-900"] *,
.posm-content button[class*="bg-slate-900"] * {
    color: inherit !important;
}

.posm-content button[disabled] {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

.posm-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
    gap: 14px;
    align-items: stretch;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
}

.posm-dashboard-hero h2 {
    color: var(--posm-pink);
    font-size: 22px;
    font-weight: 900;
}

.posm-step-card {
    border-radius: 14px;
    padding: 16px;
    color: #fff;
    box-shadow: 0 16px 28px rgba(88, 85, 125, .16);
}

.posm-step-card.pink { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.posm-step-card.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.posm-step-card.purple { background: linear-gradient(135deg, #2563eb, #1e40af); }

.posm-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.posm-stat-grid-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.posm-stat-card,
.posm-shortcut-card {
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 26px rgba(95, 91, 124, .07);
}

.posm-stat-card {
    min-height: 102px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.posm-stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 25px;
    letter-spacing: -.03em;
}

.posm-stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
}

.posm-analytics-kpi {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.posm-analytics-kpi > div {
    min-height: 104px;
    padding: 18px !important;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .9) !important;
    box-shadow: 0 14px 30px rgba(95, 91, 124, .07) !important;
}

.posm-analytics-kpi span,
.posm-analytics-kpi small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.posm-analytics-kpi strong {
    display: block;
    margin: 10px 0 6px;
    color: #1f2937;
    font-size: 25px;
    font-weight: 950;
    line-height: 1.15;
}

.posm-analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.posm-chart-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 38px rgba(95, 91, 124, .08);
}

.posm-chart-card-wide {
    grid-column: span 2;
}

.posm-chart-box {
    height: 260px;
    padding: 4px 16px 18px;
}

.posm-chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}

.posm-dashboard-tables {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
    padding-bottom: 18px;
}

.posm-mini-table {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 38px rgba(95, 91, 124, .08);
}

.posm-mini-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
}

.posm-mini-table-head h3 {
    margin: 0;
    color: #292738;
    font-size: 15px;
    font-weight: 900;
}

.posm-mini-table-head a {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.posm-mini-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.posm-mini-table th {
    padding: 10px 20px;
    background: #f7f9fe;
    color: #8c8a9d;
    text-align: left;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.posm-mini-table td {
    padding: 13px 20px;
    border-top: 1px solid rgba(226, 232, 240, .75);
    color: #343243;
    vertical-align: top;
}

.posm-mini-table td a {
    display: block;
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

.posm-mini-table td small {
    display: block;
    margin-top: 3px;
    color: #9a98aa;
}

.posm-table-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 900;
    text-transform: capitalize;
    white-space: nowrap;
}

.posm-content span.rounded-full {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    border-radius: 999px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.2;
    white-space: nowrap;
}

.posm-content .text-emerald-700,
.posm-content .text-green-700 {
    color: #047857 !important;
}

.posm-content .bg-emerald-50,
.posm-content .bg-green-50 {
    background-color: #ecfdf5 !important;
}

.posm-content .border-emerald-200,
.posm-content .border-green-200 {
    border-color: #a7f3d0 !important;
}

.posm-content .text-amber-700 {
    color: #b45309 !important;
}

.posm-content .bg-amber-50 {
    background-color: #fffbeb !important;
}

.posm-content .border-amber-200 {
    border-color: #fde68a !important;
}

.posm-content .text-rose-700 {
    color: #be123c !important;
}

.posm-content .bg-rose-50 {
    background-color: #fff1f2 !important;
}

.posm-content .border-rose-200 {
    border-color: #fecdd3 !important;
}

.posm-content [class*="shadow-sm"] {
    box-shadow: 0 14px 34px rgba(15, 23, 42, .055) !important;
}

.posm-content .border-b {
    border-color: rgba(226, 232, 240, .8) !important;
}

.posm-content .text-slate-500 {
    color: #64748b !important;
}

.posm-content .text-slate-400 {
    color: #94a3b8 !important;
}

.posm-content .font-black,
.posm-content .font-bold {
    letter-spacing: 0;
}

.posm-content .grid > .rounded-lg,
.posm-content section > .rounded-lg {
    overflow: hidden;
}

.posm-content table {
    border-collapse: separate;
    border-spacing: 0;
}

.posm-content thead th:first-child {
    border-top-left-radius: 0;
}

.posm-content thead th:last-child {
    border-top-right-radius: 0;
}

.posm-empty-state {
    min-height: 110px;
    display: grid;
    place-items: center;
    gap: 6px;
    color: #8c8a9d !important;
    text-align: center;
    vertical-align: middle !important;
}

.posm-empty-state i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 18px;
}

.posm-empty-state strong {
    color: #334155;
    font-size: 14px;
}

.posm-empty-state span {
    color: #64748b;
    font-size: 12px;
}

.posm-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 26px 0 16px;
}

.posm-section-title h2 {
    font-size: 16px;
    font-weight: 900;
}

.posm-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.posm-shortcut-card {
    display: flex;
    gap: 14px;
    align-items: center;
    min-height: 68px;
    padding: 14px;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(236, 234, 244, .88);
}

.posm-shortcut-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f4f3fa;
}

body.posm-login-page {
    overflow: auto;
    background: #eaf6ff !important;
}

.posm-login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.posm-login-card {
    width: min(980px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(37, 99, 235, .16);
}

.posm-login-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 52px 60px;
    background: linear-gradient(160deg, #1454a8 0%, #1674d3 52%, #2490ec 100%);
    color: #fff;
}

.posm-login-left::after {
    display: none;
}

.posm-login-left::before {
    display: none;
}

.posm-login-copy {
    position: relative;
    z-index: 2;
    max-width: 390px;
    text-align: center;
}

.posm-login-kicker {
    margin-bottom: 22px;
    font-size: 21px;
    font-weight: 800;
}

.posm-login-emblem {
    display: none;
}

.posm-login-copy h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.22;
    font-weight: 1000;
    letter-spacing: 0;
}

.posm-login-powered {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
}

.posm-login-copy p:last-child {
    margin: 30px auto 0;
    max-width: 330px;
    color: rgba(255, 255, 255, .86);
    font-size: 14px;
    line-height: 1.55;
}

.posm-login-links {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    color: rgba(255, 255, 255, .82);
    font-size: 11px;
    font-weight: 800;
}

.posm-login-links span + span {
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, .5);
}

.posm-login-right {
    display: grid;
    place-items: center;
    padding: 50px;
    background: #fff;
}

.posm-login-form {
    width: min(390px, 100%);
}

.posm-login-form-kicker {
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.posm-login-form h2 {
    margin: 8px 0 28px;
    color: #202033;
    font-size: 23px;
    font-weight: 1000;
}

.posm-login-alert {
    margin-bottom: 18px;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    background: #fff1f2;
    padding: 12px 14px;
    color: #be123c;
    font-size: 13px;
    font-weight: 800;
}

.posm-login-form label {
    display: block;
    margin-bottom: 18px;
}

.posm-login-form label span {
    display: block;
    margin-bottom: 8px;
    color: #25253a;
    font-size: 13px;
    font-weight: 800;
}

.posm-login-form input {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: #f0f4ff;
    padding: 0 18px;
    color: #202033;
    font-size: 14px;
    outline: none;
}

.posm-login-form input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.posm-login-form .posm-login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -2px 0 18px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.posm-login-form .posm-login-remember input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    accent-color: #2563eb;
}

.posm-login-form .posm-login-remember span {
    margin: 0;
    color: inherit;
}

.posm-login-form button {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #1d7ee6, #1262bd);
    color: #fff;
    font-size: 15px;
    font-weight: 1000;
    box-shadow: 0 14px 26px rgba(37, 99, 235, .24);
}

.posm-login-note {
    margin-top: 26px;
    color: #9ca3af;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .posm-dashboard-hero,
    .posm-stat-grid,
    .posm-shortcut-grid,
    .posm-dashboard-tables {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    body:not(.posm-login-page) {
        overflow: hidden;
    }

    .posm-login-wrap {
        padding: 14px;
    }

    .posm-login-card {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .posm-login-left {
        min-height: 320px;
        padding: 38px 28px;
    }

    .posm-login-left::before,
    .posm-login-left::after {
        display: none;
    }

    .posm-login-kicker {
        margin-bottom: 28px;
        font-size: 20px;
    }

    .posm-login-copy h1 {
        font-size: 21px;
    }

    .posm-login-copy p:last-child {
        margin-top: 22px;
    }

    .posm-login-right {
        padding: 34px 24px;
    }

    .posm-shell {
        width: 100vw;
        height: 100vh;
        min-height: 0;
        margin: 0;
        display: block;
        border-radius: 0;
        overflow: hidden;
    }

    .posm-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 60;
        width: min(82vw, 300px);
        height: 100vh;
        min-height: 100vh;
        transform: translateX(-102%);
        transition: transform .22s ease;
        border-right: 1px solid rgba(226, 232, 240, .95);
        border-bottom: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 20px 0 28px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 24px 0 55px rgba(15, 23, 42, .16);
        -webkit-overflow-scrolling: touch;
    }

    body.posm-sidebar-open .posm-sidebar {
        transform: translateX(0);
    }

    .posm-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        border: 0;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    body.posm-sidebar-open .posm-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.posm-sidebar-open {
        overflow: hidden;
    }

    .posm-brand {
        height: 44px;
        padding: 0 22px;
        font-size: 13px;
    }

    .posm-nav {
        display: block;
        padding: 18px 12px 28px;
        width: auto;
    }

    .posm-nav-section {
        display: block;
        margin: 20px 22px 8px;
        color: #8c8a9d;
        font-size: 10px;
        white-space: nowrap;
    }

    .posm-nav a {
        min-height: 40px;
        gap: 12px;
        padding: 0 12px 0 20px;
        white-space: nowrap;
        border-left: 2px solid transparent;
        border-bottom: 0;
        border-radius: 12px;
        font-size: 12px;
    }

    .posm-nav-group summary {
        min-height: 42px;
        padding: 0 12px;
    }

    .posm-nav-children {
        padding-left: 10px;
    }

    .posm-nav a.active,
    .posm-nav a:hover {
        border-left-color: var(--posm-blue);
        border-bottom-color: transparent;
    }

    .posm-main {
        width: 100vw;
        min-height: 0;
        height: 100vh;
        padding: 0;
    }

    .posm-topbar {
        position: sticky;
        top: 0;
        flex: 0 0 auto;
        height: auto;
        min-height: 58px;
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
    }

    .posm-menu-toggle {
        display: inline-grid;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        place-items: center;
        border: 0;
        border-radius: 12px;
        background: #2563eb;
        color: #fff;
        box-shadow: 0 12px 24px rgba(37, 99, 235, .18);
    }

    .posm-content {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0 12px 24px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .posm-search {
        min-width: 0;
        flex: 1 1 calc(100% - 52px);
        height: 38px;
        order: 0;
    }

    .posm-top-actions {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
        font-size: 11px;
    }

    .posm-top-actions > a[href*="dashboard"] {
        display: none;
    }

    .posm-user-chip {
        min-width: 0;
    }

    .posm-user-chip {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .posm-dashboard-hero,
    .posm-stat-grid,
    .posm-shortcut-grid,
    .posm-analytics-kpi,
    .posm-analytics-grid,
    .posm-dashboard-tables {
        grid-template-columns: 1fr;
    }

    .posm-chart-card-wide {
        grid-column: auto;
    }

    .posm-chart-box {
        height: 230px;
        padding: 0 12px 16px;
    }

    .posm-dashboard-hero {
        padding: 16px;
        gap: 10px;
        border-radius: 16px;
    }

    .posm-dashboard-hero h2 {
        font-size: 19px;
    }

    .posm-content h1 {
        font-size: 19px !important;
        line-height: 1.25;
    }

    .posm-content > .mb-6:first-child,
    .posm-content .mb-6.flex,
    .posm-content .mb-6.flex-wrap,
    .posm-content .mb-6.flex-col {
        align-items: stretch !important;
        gap: 12px;
    }

    .posm-content > .mb-6:first-child a,
    .posm-content > .mb-6:first-child button {
        justify-content: center;
        width: 100%;
    }

    .posm-stat-card {
        min-height: 92px;
        padding: 16px;
    }

    .posm-stat-card strong {
        font-size: 22px;
    }

    .posm-stat-icon {
        width: 42px;
        height: 42px;
    }

    .posm-shortcut-card {
        min-height: 62px;
    }

    .posm-mini-table {
        overflow: visible;
    }

    .posm-mini-table table,
    .posm-content table {
        min-width: 0 !important;
    }

    .posm-content th,
    .posm-content td {
        padding: 10px 12px !important;
        white-space: normal;
    }

    .posm-content td .font-bold,
    .posm-content td .font-semibold {
        white-space: normal;
    }

    .posm-content form {
        padding: 16px !important;
    }

    .posm-content input,
    .posm-content select,
    .posm-content textarea {
        max-width: 100%;
    }

    .posm-content .grid {
        gap: 14px;
    }
}

@media (max-width: 700px) {
    .posm-topbar {
        min-height: 112px;
        align-content: start;
    }

    .posm-search {
        flex: 1 1 calc(100% - 52px);
        padding: 0 12px;
    }

    .posm-search input {
        font-size: 12px;
    }

    .posm-search button {
        width: 30px;
        height: 30px;
        opacity: 1;
        transform: none;
    }

    .posm-top-actions {
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .posm-top-actions > * {
        flex: 0 0 auto;
    }

    .posm-user-chip {
        max-width: 150px;
    }

    .posm-content {
        padding: 14px 10px 26px;
    }

    .posm-content > .mb-6:first-child {
        margin-bottom: 14px !important;
    }

    .posm-content .rounded-lg,
    .posm-content > .rounded-lg,
    .posm-content > form,
    .posm-content section.rounded-lg,
    .posm-content .rounded-xl {
        border-radius: 14px !important;
    }

    .posm-content form {
        padding: 14px !important;
    }

    .posm-content form .grid,
    .posm-content .grid {
        grid-template-columns: 1fr !important;
    }

    .posm-content input,
    .posm-content select,
    .posm-content textarea,
    .posm-content button,
    .posm-content a[class*="px-"] {
        min-height: 42px;
    }

    .posm-content .overflow-x-auto {
        overflow: visible !important;
    }

    .posm-content table {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    .posm-content table thead {
        display: none;
    }

    .posm-content table tbody {
        display: grid;
        gap: 12px;
        width: 100%;
        padding: 12px;
    }

    .posm-content table tr {
        display: block;
        width: 100%;
        overflow: hidden;
        border: 1px solid rgba(226, 232, 240, .9);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
    }

    .posm-content table tr:hover {
        background: #fff;
    }

    .posm-content table td {
        display: grid;
        grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        width: 100%;
        min-height: 44px;
        border-top: 1px solid rgba(226, 232, 240, .72) !important;
        padding: 11px 12px !important;
        text-align: left !important;
        white-space: normal !important;
    }

    .posm-content table td:first-child {
        border-top: 0 !important;
    }

    .posm-content table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 10px;
        font-weight: 950;
        line-height: 1.3;
        text-transform: uppercase;
        letter-spacing: .035em;
    }

    .posm-content table td[data-label=""],
    .posm-content table td[data-full-row="1"] {
        display: block;
    }

    .posm-content table td[data-label=""]::before,
    .posm-content table td[data-full-row="1"]::before {
        content: none;
    }

    .posm-content table td .font-bold,
    .posm-content table td .font-semibold,
    .posm-content table td .font-black,
    .posm-content table td a,
    .posm-content table td span,
    .posm-content table td div {
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .posm-content table td input,
    .posm-content table td select,
    .posm-content table td textarea {
        width: 100% !important;
        min-width: 0;
    }

    .posm-content table td a.rounded-md,
    .posm-content table td button.rounded-md,
    .posm-content table td form {
        width: 100%;
    }

    .posm-content table td form.inline-flex {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .posm-empty-cell,
    .posm-content table td[colspan] {
        display: block !important;
        width: 100% !important;
    }

    .posm-empty-state {
        min-height: 96px;
    }

    .posm-step-card {
        padding: 14px;
    }

    .posm-chart-box {
        height: 210px;
    }
}

@media (max-width: 520px) {
    .posm-login-card {
        border-radius: 16px;
    }

    .posm-login-left {
        min-height: 260px;
        padding: 30px 20px;
    }

    .posm-login-emblem {
        width: 78px;
        height: 78px;
        font-size: 34px;
    }

    .posm-login-kicker {
        margin-bottom: 18px;
        font-size: 18px;
    }

    .posm-login-copy h1 {
        font-size: 18px;
    }

    .posm-login-copy p:last-child {
        font-size: 12px;
    }

    .posm-login-links {
        display: none;
    }

    .posm-login-right {
        padding: 26px 18px;
    }

    .posm-login-form h2 {
        font-size: 21px;
    }

    .posm-nav a span {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.posm-toast-root {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.posm-toast {
    display: grid;
    grid-template-columns: 34px 1fr 28px;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 12px 12px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    color: #1f2937;
    box-shadow: 0 22px 48px rgba(15, 23, 42, .14);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    animation: posmToastIn .22s ease-out;
}

.posm-toast.is-leaving {
    animation: posmToastOut .22s ease-in forwards;
}

.posm-toast-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
}

.posm-toast-success .posm-toast-icon {
    background: #dcfce7;
    color: #16a34a;
}

.posm-toast-error .posm-toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.posm-toast-message {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.posm-toast-close {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.posm-toast-close:hover {
    background: #f1f5f9;
    color: #334155;
}

.posm-loading-overlay,
.posm-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(8px);
}

.posm-loading-overlay[hidden],
.posm-confirm-modal[hidden] {
    display: none !important;
}

.posm-loading-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 24px 54px rgba(15, 23, 42, .22);
}

.posm-loading-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 999px;
    animation: posmSpin .75s linear infinite;
}

.posm-confirm-card {
    width: min(430px, 100%);
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .24);
}

.posm-confirm-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 20px;
}

.posm-confirm-card h3 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 900;
}

.posm-confirm-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.posm-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.posm-btn-soft,
.posm-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.posm-btn-soft {
    background: #f1f5f9;
    color: #334155;
}

.posm-btn-primary {
    background: #2563eb;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .22);
}

.posm-btn-primary:hover {
    background: #1d4ed8;
}

.posm-empty-cell {
    padding: 0 !important;
}

.posm-empty-state {
    display: grid;
    min-height: 130px;
    place-items: center;
    gap: 7px;
    padding: 28px 18px;
    color: #94a3b8 !important;
    text-align: center;
}

.posm-empty-state i {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 16px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 20px;
}

.posm-empty-state strong {
    color: #334155;
    font-size: 15px;
    font-weight: 900;
}

.posm-empty-state span {
    max-width: 340px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.45;
    white-space: normal;
}

@keyframes posmToastIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes posmToastOut {
    to {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }
}

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

@media (max-width: 820px) {
    .posm-toast-root {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .posm-confirm-card {
        padding: 20px;
        border-radius: 18px;
    }

    .posm-confirm-actions {
        flex-direction: column-reverse;
    }

    .posm-confirm-actions button,
    .posm-content a[class*="bg-"],
    .posm-content button[class*="bg-"] {
        width: 100%;
    }

    .posm-content .flex {
        min-width: 0;
    }

    .posm-content .overflow-x-auto {
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    #stockProductDropdown,
    #stockWarehouseDropdown,
    #taskWarehouseDropdown,
    #taskDestinationWarehouseDropdown,
    #taskDistributorDropdown {
        position: static !important;
        left: auto !important;
        right: auto !important;
        z-index: auto !important;
        width: 100% !important;
        max-height: 220px !important;
        margin-top: 8px !important;
        border-radius: 12px !important;
        box-shadow: none !important;
    }

    #stockProductDropdown button,
    #stockWarehouseDropdown button,
    #taskWarehouseDropdown button,
    #taskDestinationWarehouseDropdown button,
    #taskDistributorDropdown button {
        min-height: 42px;
        line-height: 1.35;
        white-space: normal;
    }

    #stockProductClear,
    #stockWarehouseClear,
    #taskWarehouseClear,
    #taskDestinationWarehouseClear,
    #taskDistributorClear {
        width: auto !important;
        min-height: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .task-items-table,
    .task-items-table tbody,
    .task-items-table tr,
    .task-items-table td,
    .distribution-items-table,
    .distribution-items-table tbody,
    .distribution-items-table tr,
    .distribution-items-table td,
    .event-loan-items-table,
    .event-loan-items-table tbody,
    .event-loan-items-table tr,
    .event-loan-items-table td {
        display: block;
        width: 100%;
    }

    .posm-content .task-items-table tbody,
    .posm-content .distribution-items-table tbody,
    .posm-content .event-loan-items-table tbody {
        display: block !important;
        padding: 0 !important;
    }

    .task-items-table thead,
    .distribution-items-table thead,
    .event-loan-items-table thead {
        display: none;
    }

    .task-items-table tr,
    .distribution-items-table tr,
    .event-loan-items-table tr {
        display: block !important;
        width: 100% !important;
        margin: 10px 0;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        background: #fff;
        padding: 10px;
        overflow: visible;
    }

    .task-items-table td,
    .distribution-items-table td,
    .event-loan-items-table td {
        display: block !important;
        grid-template-columns: none !important;
        border: 0;
        padding: 8px 0 !important;
        text-align: left !important;
        overflow: visible;
    }

    .posm-content .task-items-table td,
    .posm-content .distribution-items-table td,
    .posm-content .event-loan-items-table td {
        display: block !important;
        grid-template-columns: none !important;
        min-height: 0;
    }

    .task-items-table td::before,
    .distribution-items-table td::before,
    .event-loan-items-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: #64748b;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .posm-content .task-items-table td::before,
    .posm-content .distribution-items-table td::before,
    .posm-content .event-loan-items-table td::before {
        display: block !important;
        margin-bottom: 6px;
    }

    .posm-content .task-items-table td > *,
    .posm-content .distribution-items-table td > *,
    .posm-content .event-loan-items-table td > * {
        width: 100%;
        max-width: 100%;
    }

    .task-items-table .task-qty,
    .distribution-items-table .qty-request,
    .event-loan-items-table .qty-borrowed {
        width: 100%;
    }

    .task-items-table .remove-task-item,
    .distribution-items-table .remove-row,
    .event-loan-items-table .remove-row {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .task-product-dropdown,
    .distribution-product-dropdown,
    .event-loan-product-dropdown {
        width: calc(100% - 2px);
        max-height: min(38vh, 176px) !important;
        margin-top: 6px;
        margin-left: 1px;
        margin-right: 1px;
        border-radius: 12px;
        box-shadow: none;
        font-size: 13px;
    }

    .task-product-dropdown button,
    .distribution-product-dropdown button,
    .event-loan-product-dropdown button {
        min-height: 38px;
        padding: 9px 10px;
        line-height: 1.3;
        white-space: normal;
    }
}
