.app-shell {
    width: calc(100% - 24px);
    max-width: none;
    min-height: calc(100vh - 24px);
    margin: 12px;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-xl);
    background: rgba(240, 247, 252, 0.9);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
}

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

.login-shell {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 22px;
}

.login-brand-panel,
.login-form-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.login-brand-panel {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-brand-top img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.88);
}

.login-brand-top h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 40px);
}

.brand-pill {
    width: fit-content;
    margin: 8px 0 0;
    border: 1px solid rgba(11, 122, 122, 0.25);
    border-radius: 999px;
    padding: 6px 11px;
    color: var(--brand-strong);
    background: var(--brand-soft);
    font-size: 13px;
    font-weight: 700;
}

.login-brand-body {
    max-width: 680px;
    margin: 42px 0;
}

.login-brand-body h2,
.login-form-panel h2 {
    margin-bottom: 10px;
    font-size: clamp(30px, 4vw, 44px);
}

.login-brand-body > p:not(.eyebrow),
.login-brand-body li,
.login-hint,
.support-note {
    color: var(--ink-soft);
    line-height: 1.6;
}

.login-brand-body ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding-left: 22px;
}

.login-brand-footer {
    margin: 0;
    color: var(--ink-muted);
    font-size: 13px;
    font-weight: 600;
}

.login-form-panel {
    align-self: center;
}

.login-form-panel form {
    display: grid;
    gap: 15px;
    margin-top: 22px;
}

.login-form-panel .primary-button {
    margin-top: 4px;
}

.form-error {
    min-height: 22px;
    margin: 10px 0 2px;
    color: var(--danger);
    font-size: 13px;
}

.support-note {
    margin-bottom: 0;
    font-size: 13px;
}

.login-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 12px;
}

.login-legal-links a {
    color: var(--brand-strong);
    font-weight: 700;
    text-decoration: none;
}

.login-legal-links a:hover {
    text-decoration: underline;
}

.sidebar {
    position: sticky;
    top: 12px;
    height: calc(100vh - 24px);
    min-height: 0;
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px 18px;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 37, 58, 0.98), rgba(13, 61, 77, 0.96));
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
}

.brand-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
}

.brand-module {
    margin: 4px 0 0;
    color: #9ee1df;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.module-navigation {
    display: grid;
    gap: 6px;
    padding-top: 14px;
}

.nav-heading {
    margin: 16px 10px 2px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-item {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 9px 12px;
    text-align: left;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.78);
}

.nav-item.active {
    color: #fff;
    background: rgba(11, 122, 122, 0.72);
    box-shadow: inset 3px 0 0 #a6f0eb;
}

.nav-item:disabled {
    cursor: not-allowed;
    opacity: 0.64;
}

.sidebar-note {
    margin: auto 8px 0;
    padding-top: 18px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
}

.main-panel {
    min-width: 0;
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
}

.user-identity {
    margin: 6px 0 0;
    color: var(--ink-soft);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge,
.soft-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.pending {
    color: var(--ink-soft);
    background: var(--blue-soft);
}

.status-badge.ok {
    color: var(--ok);
    background: #e5f5eb;
}

.status-badge.warning {
    color: var(--warning);
    background: #fff3d9;
}

.hero-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(11, 122, 122, 0.24);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(225, 246, 244, 0.9));
    box-shadow: var(--shadow-md);
}

.hero-card h2 {
    max-width: 780px;
    margin-bottom: 10px;
    font-size: clamp(26px, 3vw, 42px);
}

.hero-card p:last-child {
    max-width: 780px;
    margin-bottom: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.hero-mark {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(145deg, var(--brand), var(--ink));
    font-family: var(--font-display);
    font-size: 40px;
    box-shadow: 0 18px 32px rgba(11, 122, 122, 0.24);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.metric-card,
.panel {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.metric-card {
    display: grid;
    gap: 5px;
    padding: 18px;
}

.metric-card span,
.metric-card small {
    color: var(--ink-muted);
}

.metric-card strong {
    font-size: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 18px;
    margin-top: 18px;
}

.panel {
    padding: 18px;
}

.panel-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.panel h2 {
    margin-bottom: 10px;
}

.soft-chip {
    color: var(--brand-strong);
    background: var(--brand-soft);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.module-card {
    display: grid;
    gap: 6px;
    min-height: 96px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: rgba(247, 252, 255, 0.9);
}

.module-card span,
.next-step-panel p,
.next-step-panel li {
    color: var(--ink-soft);
    line-height: 1.5;
}

.next-step-panel ul {
    padding-left: 20px;
}

.phase-warning {
    margin: 18px 0 0;
    padding: 12px;
    border-left: 3px solid var(--brand);
    border-radius: 0 8px 8px 0;
    background: var(--brand-soft);
    font-size: 13px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.form-message,
.empty-note,
.panel-copy {
    color: var(--ink-soft);
    line-height: 1.55;
}

.form-message {
    font-size: 13px;
}

.support-layout,
.management-grid,
.support-platform-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.platform-management-wide {
    grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.8fr);
}

.ticket-detail {
    width: calc((100% - 14px) / 2);
    margin-top: 18px;
}

.ticket-list,
.conversation {
    display: grid;
    gap: 9px;
    margin-top: 15px;
}

.ticket-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 11px;
    padding: 12px;
    color: var(--ink);
    text-align: left;
    background: var(--blue-soft);
    cursor: pointer;
}

.ticket-row:hover {
    border-color: rgba(11, 122, 122, 0.45);
    background: var(--brand-soft);
}

.ticket-row > span,
.ticket-meta,
.message-card > div {
    display: grid;
    gap: 4px;
}

.ticket-meta {
    justify-items: end;
}

.ticket-row small,
.message-card small,
table small {
    display: block;
    color: var(--ink-muted);
    font-size: 12px;
}

.state-chip {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--brand-strong);
    background: var(--brand-soft);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    text-transform: capitalize;
}

.message-card {
    max-width: 82%;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 13px;
    background: var(--blue-soft);
}

.message-card.from-platform {
    margin-left: auto;
    background: var(--brand-soft);
}

.message-card.internal-note {
    max-width: 100%;
    border-style: dashed;
    border-color: rgba(163, 105, 18, 0.45);
    background: #fff8e8;
}

.message-card p {
    margin: 8px 0 0;
    white-space: pre-wrap;
}

.reply-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label input {
    width: auto;
}

.platform-shell {
    grid-template-columns: 280px minmax(0, 1fr);
}

.platform-sidebar {
    background: linear-gradient(180deg, #081f33, #0a5960);
}

.platform-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 18px;
    border-radius: 10px;
    padding: 11px 13px;
    color: var(--ok);
    background: #e5f5eb;
}

.platform-notice > span,
.dismissible-inline > span {
    min-width: 0;
    flex: 1;
}

.notice-close {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 0;
    border-radius: 7px;
    padding: 0;
    color: currentColor;
    background: rgba(15, 37, 58, 0.12);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.dismissible-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff3d9;
}

.dismissible-inline.error { color: var(--danger); background: #fdecea; }

.platform-notice.warning {
    color: var(--warning);
    background: #fff3d9;
}

.platform-notice.error {
    color: var(--danger);
    background: #fdecea;
}

.platform-section > .panel,
.platform-section > .management-grid,
.platform-section > .support-platform-grid {
    margin-top: 18px;
}

.table-panel {
    min-width: 0;
}

.table-scroll {
    overflow-x: auto;
    margin-top: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 11px 9px;
    text-align: left;
    vertical-align: top;
}

.nowrap-table th,
.nowrap-table td,
.nowrap,
.table-actions button {
    white-space: nowrap;
}

.nowrap-table small {
    display: inline;
    margin-left: 6px;
}

th {
    color: var(--ink-muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.active-access {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    border: 1px solid rgba(163, 105, 18, 0.3);
    border-radius: 12px;
    padding: 16px;
    background: #fff8e8;
}

.active-access .danger-button {
    width: fit-content;
    margin-top: 6px;
}

.inventory-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.inventory-toolbar h2 {
    margin-bottom: 0;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.toolbar-actions input[type="search"] {
    width: min(320px, 70vw);
}

.file-button {
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 10px;
    padding: 11px 15px;
    color: #fff;
    background: var(--brand);
    cursor: pointer;
    font-weight: 700;
}

.file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.inventory-forms {
    margin-bottom: 24px;
}

.inventory-section {
    margin-top: 24px;
}

.product-catalog {
    margin-top: 0;
}

.product-catalog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.product-catalog-heading h2 {
    margin-bottom: 0;
}

.product-filters {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 12px;
    background: var(--blue-soft);
}

.product-filter-row {
    display: grid;
    align-items: end;
    gap: 10px;
}

.product-filter-primary-row {
    grid-template-columns:
        minmax(220px, 1.25fr)
        repeat(2, minmax(134px, 0.72fr))
        minmax(126px, 0.7fr)
        minmax(132px, 0.72fr)
        minmax(108px, 0.58fr)
        auto;
}

.product-filter-numeric-row {
    grid-template-columns: repeat(3, minmax(260px, 310px)) minmax(12px, 1fr) auto;
}

.product-filter-primary-row > label,
.product-filter-numeric-row > fieldset {
    min-width: 0;
}

.product-search-control span {
    visibility: hidden;
}

.catalog-file-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.catalog-file-actions .secondary-button,
.catalog-file-actions .file-button {
    min-height: 42px;
    padding: 10px 12px;
}

.stock-report-filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 12px;
    background: var(--blue-soft);
}

.stock-report-filters > label {
    width: auto;
    min-width: 138px;
}

.numeric-filter {
    min-width: 250px;
    display: grid;
    grid-template-columns: minmax(112px, 1.2fr) minmax(72px, 0.8fr) minmax(72px, 0.8fr);
    gap: 7px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 7px;
}

.numeric-filter legend {
    padding: 0 5px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.numeric-filter input,
.numeric-filter select {
    min-width: 0;
    padding: 9px;
}

.product-filter-numeric-row .numeric-filter {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(92px, 1.1fr) minmax(64px, 0.8fr) minmax(64px, 0.8fr);
    gap: 6px;
    padding: 6px;
}

.product-filter-numeric-row .filter-actions {
    grid-column: 5;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stock-workspace {
    gap: 22px;
}

.stock-existence-controls {
    margin-top: 22px;
    margin-bottom: 0;
}

.category-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.category-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(247, 252, 255, 0.9);
}

.category-list span {
    display: grid;
    gap: 3px;
}

.category-list small {
    color: var(--ink-muted);
}

.inventory-table,
.movement-panel {
    margin-top: 18px;
}

.stock-chip {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.stock-chip.disponible {
    color: var(--ok);
    background: #e5f5eb;
}

.stock-chip.bajo {
    color: var(--warning);
    background: #fff3d9;
}

.stock-chip.agotado {
    color: var(--danger);
    background: #fdecea;
}

.metric-card.alert-low {
    border-color: rgba(163, 105, 18, 0.28);
}

.metric-card.alert-out {
    border-color: rgba(196, 48, 43, 0.3);
}

.purchase-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.62fr) minmax(0, 1.48fr);
    gap: 24px;
}

#purchaseMetrics {
    margin-bottom: 26px;
}

.purchase-line-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(78px, 0.7fr) minmax(90px, 0.68fr) minmax(104px, 0.8fr);
    align-items: end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.purchase-line-form .secondary-button {
    width: 100%;
    min-width: 104px;
}

.supplier-management-grid {
    grid-template-columns: minmax(340px, 0.65fr) minmax(0, 1.35fr);
    gap: 22px;
}

.supplier-management-grid tbody td {
    padding-top: 8px;
    padding-bottom: 8px;
    line-height: 1.25;
}

.supplier-management-grid .table-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.purchase-lines {
    margin-top: 15px;
}

.purchase-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin: 14px 0;
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--ink-soft);
    background: var(--brand-soft);
}

.purchase-total strong,
.detail-total {
    color: var(--brand-strong);
    font-size: 21px;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: var(--brand-soft);
}

#purchaseDetail {
    margin-top: 18px;
}

#purchaseDetail .panel-heading > div:last-child {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.detail-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.annul-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}

.annul-form label {
    flex: 1 1 320px;
}

.cash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(520px, 0.95fr);
    gap: 14px;
}

.product-picker > input[type="search"] {
    margin-top: 14px;
}

.cash-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.cash-product-list {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.cash-product-card.row-view {
    min-height: 52px;
    grid-template-columns: 120px minmax(220px, 1fr) 120px 100px;
    align-items: center;
    gap: 12px;
}

.cash-product-card {
    min-height: 138px;
    display: grid;
    align-content: start;
    gap: 7px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 13px;
    color: var(--ink);
    text-align: left;
    background: var(--blue-soft);
    cursor: pointer;
}

.cash-product-card:hover:not(:disabled) {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.cash-product-card em {
    margin-top: auto;
    color: var(--brand-strong);
    font-size: 17px;
    font-style: normal;
    font-weight: 700;
}

.cash-product-card small {
    color: var(--ink-muted);
}

.cash-product-card.unavailable {
    cursor: not-allowed;
    opacity: 0.62;
}

.cart-panel {
    position: sticky;
    top: 16px;
    align-self: start;
}

.cart-items {
    display: grid;
    gap: 9px;
    max-height: 390px;
    overflow-y: auto;
    margin-top: 14px;
}

.cart-row {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto 92px 30px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line-soft);
    padding: 9px 0;
}

.cart-row > div:first-child {
    grid-template-columns: minmax(150px, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.cart-row > div:first-child {
    display: grid;
    gap: 3px;
}

.cart-row small {
    color: var(--ink-muted);
}

.quantity-control {
    display: flex;
    align-items: center;
}

.quantity-control button,
.remove-cart {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    color: var(--ink);
    background: var(--blue-soft);
    cursor: pointer;
}

.quantity-control input {
    width: 62px;
    height: 30px;
    border-radius: 0;
    padding: 4px;
    text-align: center;
}

.remove-cart {
    border: 0;
    color: #fff;
    background: var(--danger);
    font-size: 20px;
}

.sale-totals {
    display: grid;
    gap: 9px;
    margin-top: 16px;
    border-top: 1px solid var(--line-soft);
    padding-top: 14px;
}

.sale-totals > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sale-totals .grand-total {
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    background: var(--ink);
}

.sale-totals .grand-total strong {
    font-size: 24px;
}

.payment-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-top: 15px;
}

.document-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
    border-top: 1px solid var(--line-soft);
    padding-top: 14px;
}

.document-panel .span-2 {
    grid-column: 1 / -1;
}

.inline-actions,
.inline-form,
.warehouse-row,
.pagination,
.modal-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pagination {
    justify-content: flex-end;
    margin-top: 14px;
    color: var(--ink-soft);
    font-size: 13px;
}

.pagination button,
.icon-button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 11px;
    color: var(--ink);
    background: var(--blue-soft);
    cursor: pointer;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(8, 31, 51, 0.58);
    backdrop-filter: blur(5px);
}

.modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 18px;
    padding: 22px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.modal-wide {
    width: min(1040px, 100%);
}

.modal-heading {
    justify-content: space-between;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 12px;
}

.icon-button {
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 24px;
    color: #fff;
    border-color: var(--ink-soft);
    background: var(--ink-soft);
}

.modal-section {
    margin-top: 20px;
    border-top: 1px solid var(--line-soft);
    padding-top: 18px;
}

.warehouse-editor {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.warehouse-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto auto;
    border-bottom: 1px solid var(--line-soft);
    padding: 8px 0;
}

.inline-form input:first-child {
    flex: 1;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 12px;
    background: var(--blue-soft);
}

.field-title {
    margin: 0 0 7px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.support-access-banner {
    position: relative;
    z-index: 900;
    max-width: min(720px, 48vw);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(163, 105, 18, 0.4);
    border-radius: 12px;
    padding: 11px 13px;
    color: #593a09;
    background: #fff4d5;
    box-shadow: var(--shadow-lg);
    cursor: move;
    touch-action: none;
    user-select: none;
}

.support-access-banner.dragged {
    position: fixed;
    right: auto;
    bottom: auto;
    max-width: min(760px, calc(100vw - 16px));
}

.support-access-banner span {
    flex: 1;
    font-size: 13px;
}

.support-access-banner button {
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    color: #fff;
    background: var(--danger);
    cursor: pointer;
}

.searchable-select {
    position: relative;
}

.search-options {
    position: absolute;
    z-index: 40;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 430px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.search-options button {
    width: 100%;
    min-height: 42px;
    display: grid;
    gap: 3px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 8px 10px;
    color: var(--ink);
    text-align: left;
    background: var(--blue-soft);
    cursor: pointer;
}

.search-options button:hover { background: var(--brand-soft); }
.search-options button span,
.search-options p { color: var(--ink-muted); font-size: 12px; }

.history-filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 11px;
    background: var(--blue-soft);
}

.history-filters > label {
    width: auto;
    min-width: 142px;
}

.history-filters input[type="date"] {
    min-width: 142px;
}

.filter-multiselect {
    position: relative;
    width: fit-content;
}

.filter-multiselect summary {
    width: max-content;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 11px;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 700;
}

.filter-multiselect summary span { color: var(--ink-muted); font-size: 11px; }
.filter-multiselect summary::-webkit-details-marker { display: none; }

.filter-popover {
    position: absolute;
    z-index: 35;
    top: calc(100% + 5px);
    left: 0;
    min-width: 220px;
    max-width: 340px;
    max-height: 330px;
    display: grid;
    gap: 7px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.filter-quick-actions {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 7px;
}

.filter-quick-actions button {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 5px 8px;
    color: var(--brand-strong);
    background: var(--brand-soft);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.technical-detail {
    margin-top: 6px;
    color: var(--ink-muted);
    white-space: normal;
}

.technical-detail summary { cursor: pointer; font-size: 11px; }
.technical-detail code { display: block; max-width: 420px; overflow-wrap: anywhere; margin-top: 5px; font-size: 10px; }

.audit-table td:last-child {
    min-width: 280px;
    max-width: 480px;
    white-space: normal;
}

.receipt-customer {
    display: flex;
    gap: 18px;
    margin: 12px 0;
    border-radius: 10px;
    padding: 11px 13px;
    background: var(--blue-soft);
}

.payment-panel .span-2 {
    grid-column: 1 / -1;
}

.change-display {
    display: grid;
    align-content: center;
    gap: 3px;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--ok);
    background: #e5f5eb;
}

.sale-button {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
}

.sales-metrics {
    margin-bottom: 18px;
}

#saleDetail {
    margin-top: 18px;
}

.sale-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 18px;
}

.payment-summary {
    border-radius: 12px;
    padding: 16px;
    background: var(--blue-soft);
}

.payment-summary h3 {
    margin-top: 0;
}

.payment-summary > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    border-bottom: 1px solid var(--line-soft);
    padding: 9px 0;
}

.payment-summary small {
    grid-column: 1 / -1;
    color: var(--ink-muted);
}

.payment-summary > p {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 0;
}

.dashboard-metrics {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compact-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 700;
}

.compact-filter select {
    min-width: 110px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.dashboard-wide {
    grid-column: 1 / -1;
}

.sales-trend {
    min-height: 250px;
    display: flex;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    margin-top: 14px;
    padding: 12px 2px 2px;
}

.trend-column {
    min-width: 32px;
    flex: 1 0 32px;
    display: grid;
    grid-template-rows: 18px 180px auto;
    gap: 5px;
    text-align: center;
}

.trend-value,
.trend-column small {
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 10px;
    white-space: nowrap;
}

.trend-bar {
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    border-radius: 7px;
    background: var(--blue-soft);
}

.trend-bar i {
    width: 100%;
    min-height: 2px;
    display: block;
    border-radius: 7px 7px 0 0;
    background: linear-gradient(180deg, #18a1a0, var(--brand-strong));
}

.stock-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.stock-kpi {
    display: grid;
    gap: 4px;
    border-radius: 12px;
    padding: 14px;
    background: var(--blue-soft);
}

.stock-kpi strong {
    font-size: 24px;
}

.stock-kpi span,
.stock-summary > p {
    color: var(--ink-muted);
    font-size: 12px;
}

.stock-kpi.warning { background: #fff3d9; }
.stock-kpi.danger { background: #fdecea; }
.stock-summary > p { grid-column: 1 / -1; }

.ranking-list {
    display: grid;
    gap: 13px;
    margin-top: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.rank-number {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--brand-strong);
    background: var(--brand-soft);
    font-weight: 800;
}

.ranking-row > div {
    display: grid;
    gap: 4px;
}

.ranking-row small {
    color: var(--ink-muted);
}

.rank-track {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--blue-soft);
}

.rank-track i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--brand);
}

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.report-tabs .active {
    border-color: var(--brand);
    color: #fff;
    background: var(--brand);
}

.report-filter-panel {
    padding: 16px 20px;
}

.report-filter-panel .history-filters {
    margin-top: 0;
}

.report-history-filters .compact-search {
    min-width: 210px;
}

.stock-report-filters {
    margin: 0;
}

.stock-report-filters .compact-search {
    min-width: 210px;
}

.report-numeric-filter {
    min-width: 280px;
}

.report-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.report-metrics {
    margin-bottom: 18px;
}
