:root {
    --bg: #f3efe7;
    --panel: #fffdf8;
    --panel-strong: #f5efe4;
    --text: #182028;
    --muted: #5f6b76;
    --line: #ddd3c4;
    --brand: #0d5c63;
    --brand-strong: #07393c;
    --accent: #f2a541;
    --accent-soft: #f8d9a5;
    --success: #4f772d;
    --shadow: 0 20px 60px rgba(24, 32, 40, 0.12);
}

/* ChatGPT-like shell overrides */
:root {
    --bg: #f7f7f8;
    --panel: #ffffff;
    --panel-strong: #f0f0f0;
    --text: #1f1f1f;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #202123;
    --brand-strong: #171717;
    --accent: #10a37f;
    --accent-soft: #dbf4ec;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.06);
}

body {
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    background: var(--bg);
}

.text-input,
select,
textarea {
    font-size: 13px;
    border-radius: 12px;
    padding: 10px 12px;
}

.button,
.topbar-action {
    font-size: 12px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex: 0 0 260px;
    max-height: 100vh;
    position: sticky;
    top: 0;
    background: #171717;
    color: #ececec;
    padding: 12px 10px 10px;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 10px;
}

.brand-logo {
    width: 28px;
    height: 28px;
    max-width: none;
    flex: 0 0 28px;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-title {
    font-size: 14px;
    font-weight: 600;
    color: #f3f4f6;
}

.brand-meta,
.page-kicker,
.eyebrow {
    margin: 0;
    color: #9ca3af;
    letter-spacing: 0;
    text-transform: none;
    font-size: 11px;
}

.sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.nav {
    gap: 4px;
}

.nav a,
.nav-link {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    color: #ececec;
}

.nav a:hover,
.nav-link:hover {
    background: #2a2b2e;
}

.nav-link-active {
    background: #2f2f2f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nav-copy strong {
    font-size: 13px;
    font-weight: 500;
}

.nav-copy small {
    color: #9ca3af;
    font-size: 11px;
    margin-top: 2px;
}

.nav-link-active .nav-icon svg {
    fill: #ffffff;
}

.nav-link-active .nav-copy small {
    color: #d1d5db;
}

.sidebar-footer {
    gap: 8px;
    padding-top: 6px;
}

.sidebar-user-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: #202123;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #2b2c2f;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
}

.sidebar-user-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sidebar-user-copy strong {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-copy small,
.sidebar-copyright {
    color: #9ca3af;
    font-size: 11px;
}

.main-panel {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 18px 18px;
}

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

.topbar-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-title-group {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
}

.topbar-user {
    max-width: 88px;
    flex: 0 1 88px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-weight: 600;
}

.topbar-action-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #fff;
}

.page-title {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
    line-height: 1.2;
}

.page-body {
    gap: 18px;
}

html.sidebar-collapsed .sidebar {
    width: 72px;
    flex-basis: 72px;
    padding: 12px 8px 10px;
    align-items: center;
}

html.sidebar-collapsed .brand {
    justify-content: center;
}

html.sidebar-collapsed .brand-copy,
html.sidebar-collapsed .nav-copy,
html.sidebar-collapsed .sidebar-user-copy,
html.sidebar-collapsed .sidebar-copyright {
    display: none;
}

html.sidebar-collapsed .nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 10px 8px;
}

html.sidebar-collapsed .sidebar-user-card {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
}

@media (max-width: 960px) {
    .sidebar {
        position: fixed;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 40;
    }

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

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
    }

    .topbar-user {
        max-width: none;
    }
}

.nav-submenu {
    display: none;
    gap: 3px;
    margin: -2px 0 6px 28px;
}

.nav-submenu-open {
    display: grid;
}

html.setup-menu-expanded .nav-submenu {
    display: grid;
}

html.reports-menu-expanded #reportsSubmenu {
    display: grid;
}

.nav-sub-link {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    color: #b9bec7;
    font-size: 12px;
}

.nav-sub-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-sub-link-active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-link-expandable {
    grid-template-columns: 18px minmax(0, 1fr) 14px;
}

.nav-expand-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-expand-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-link-expandable[aria-expanded="true"] .nav-expand-icon {
    transform: rotate(90deg);
    color: #ffffff;
}

html.sidebar-collapsed .nav-submenu {
    display: none;
}

.barcode-print-sheet {
    margin-top: 24px;
}

.barcode-label-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    gap: 16px;
    justify-content: center;
}

.barcode-label-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 6px;
    width: 100%;
    max-width: 100%;
}

.barcode-label-card svg {
    width: 100%;
    height: 92px;
}

.barcode-pdf-export {
    background: #fff;
    padding: 18px;
}

.barcode-pdf-shell .barcode-print-sheet {
    margin: 0;
}

.barcode-label-price {
    color: var(--muted);
    font-size: 12px;
}

@media print {
    .sidebar,
    .topbar,
    .sidebar-backdrop {
        display: none !important;
    }

    .main-panel,
    .page-body {
        padding: 0 !important;
        margin: 0 !important;
    }

    .barcode-print-sheet {
        margin: 0;
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(242, 165, 65, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(13, 92, 99, 0.16), transparent 30%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-hero,
.login-panel,
.panel-card,
.sidebar,
.topbar,
.hero-banner,
.stat-card {
    backdrop-filter: blur(6px);
}

.login-hero {
    padding: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}

.login-hero h1 {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 1;
    margin: 0;
    max-width: 10ch;
}

.login-brand-logo {
    display: block;
    max-width: 100%;
    height: auto;
}

.login-brand-logo-full {
    width: min(420px, 100%);
    margin-bottom: 8px;
}

.login-hero p {
    max-width: 58ch;
    color: var(--muted);
    font-size: 0.925rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hero-card,
.panel-card,
.stat-card,
.roadmap-item {
    background: rgba(255, 253, 248, 0.78);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 20px;
}

.hero-card h2,
.panel-card h2,
.panel-card h3,
.roadmap-item strong {
    margin-top: 0;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.panel-card {
    width: 100%;
    max-width: 100%;
    padding: 32px;
}

.login-panel .panel-card {
    width: min(460px, 100%);
}

.muted,
.field-error,
.validation-summary,
.hero-card p,
.panel-card p,
.roadmap-item p,
.feature-list {
    color: var(--muted);
}

label {
    display: block;
    margin: 18px 0 8px;
    font-weight: 600;
}

.text-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 0.875rem;
    background: #fff;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 18px;
}

.button-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
}

.button-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.button-inline {
    width: auto;
    margin-top: 0;
}

.button-secondary {
    background: #e7ded0;
    color: var(--text);
}

.button-danger {
    background: #8f2d2d;
    color: #fff;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    transition: grid-template-columns 0.22s ease;
}

.sidebar {
    background: linear-gradient(180deg, #0f3d44, #0c262b);
    color: #f7f4ef;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.brand {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.brand p {
    margin: 0;
}

.brand p,
.page-kicker,
.eyebrow,
.brand-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    color: #b7c7c5;
}

.brand-logo {
    width: 156px;
    max-width: 100%;
    height: auto;
    display: block;
}

.nav {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.nav a,
.nav-link {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    color: #edf4f4;
    min-width: 0;
}

.nav a:hover,
.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link-active {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.nav-copy {
    display: grid;
    min-width: 0;
}

.nav-copy strong,
.nav-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-copy strong {
    font-size: 0.94rem;
}

.nav-copy small {
    margin-top: 3px;
    color: #b7c7c5;
    font-size: 0.73rem;
}

.nav-link-active .nav-icon,
.nav-link-active .nav-copy strong {
    color: #ffffff;
}

.nav-link-active .nav-icon svg {
    fill: #f8d9a5;
}

.nav-link-active .nav-copy small {
    color: #f8d9a5;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.sidebar-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.user-chip {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 10px 14px;
    min-width: 0;
}

.sidebar-mini-link {
    font-size: 0.78rem;
    color: #edf4f4;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 8px 10px;
    white-space: nowrap;
}

.sidebar-signout {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: #edf4f4;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-backdrop {
    display: none;
}

html.sidebar-collapsed .app-shell {
    grid-template-columns: 88px 1fr;
}

html.sidebar-collapsed .sidebar {
    padding: 24px 12px;
    align-items: center;
}

html.sidebar-collapsed .brand {
    justify-items: center;
}

html.sidebar-collapsed .brand-logo {
    width: 42px;
}

html.sidebar-collapsed .brand-kicker,
html.sidebar-collapsed .brand-meta,
html.sidebar-collapsed .nav-copy,
html.sidebar-collapsed .sidebar-copyright,
html.sidebar-collapsed .sidebar-user-row {
    display: none;
}

html.sidebar-collapsed .nav {
    width: 100%;
}

html.sidebar-collapsed .nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 12px 10px;
}

html.sidebar-collapsed .nav-link-active {
    background: rgba(248, 217, 165, 0.18);
    box-shadow: inset 0 0 0 1px rgba(248, 217, 165, 0.32);
}

html.sidebar-collapsed .nav-link-active .nav-icon {
    color: #ffffff;
}

html.sidebar-collapsed .nav-link-active .nav-icon svg {
    fill: #f8d9a5;
}

html.sidebar-collapsed .sidebar-signout {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 12px 10px;
}

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

.topbar {
    margin-bottom: 24px;
}

.topbar-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.86);
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 10px;
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.page-title {
    display: block;
    font-size: clamp(1.675rem, 2.8vw, 2.675rem);
    font-weight: 800;
}

.page-body {
    display: grid;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

.hero-banner {
    background: linear-gradient(135deg, rgba(255, 253, 248, 0.8), rgba(242, 165, 65, 0.14));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
}

.stat-stack,
.dashboard-grid,
.content-grid,
.roadmap-list {
    display: grid;
    gap: 16px;
}

.stat-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: start;
}

.content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-kpi-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
}

.stat-card strong {
    font-size: 1.375rem;
}

.stat-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.accent-blue {
    border-left: 6px solid var(--brand);
}

.accent-gold {
    border-left: 6px solid var(--accent);
}

.accent-green {
    border-left: 6px solid var(--success);
}

.accent-teal {
    border-left: 6px solid #0f766e;
}

.feature-list {
    margin: 0;
    padding-left: 18px;
}

.panel-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.625rem;
}

.metric-value {
    display: block;
    font-size: 1.575rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.dashboard-actions-card,
.dashboard-activity-card,
.dashboard-kpi-strip .panel-card {
    width: 100%;
}

.report-kpi-strip {
    margin: 18px 0;
}

.filter-action-inline {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}

.checkbox-inline-cell {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.checkbox-inline-cell label {
    margin-bottom: 8px;
}

.dashboard-actions-card,
.dashboard-activity-card {
    min-height: 360px;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
}

.dashboard-action-link {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.72);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-action-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: rgba(13, 92, 99, 0.2);
}

.dashboard-action-link span {
    color: var(--muted);
}

.dashboard-activity-list {
    display: grid;
    gap: 12px;
}

.dashboard-activity-scroll {
    max-height: 284px;
    min-height: 284px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.dashboard-activity-scroll::-webkit-scrollbar {
    width: 8px;
}

.dashboard-activity-scroll::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.16);
    border-radius: 999px;
}

.dashboard-activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.dashboard-activity-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-activity-item span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.dashboard-activity-meta {
    text-align: right;
}

.dashboard-empty-state {
    display: grid;
    gap: 6px;
    align-content: center;
    min-height: 100%;
    color: var(--muted);
}

.dashboard-empty-state strong {
    color: var(--text);
}

.dashboard-activity-meta strong,
.dashboard-activity-meta span {
    white-space: nowrap;
}

.roadmap-item {
    padding: 20px;
}

.module-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: stretch;
    min-height: calc(100vh - 170px);
}

.products-shell {
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
}

.products-stack {
    display: grid;
    gap: 24px;
    min-width: 0;
}

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

.module-header h2 {
    margin: 4px 0 0;
}

.module-list,
.module-form {
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.grid-shell {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
}

.data-grid {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.data-grid th,
.data-grid td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-grid-clickable tbody tr.clickable-grid-row {
    transition: background-color 0.18s ease;
}

.data-grid-clickable tbody tr.clickable-grid-row:hover {
    background: rgba(15, 23, 42, 0.04);
}

.data-grid-clickable tbody tr.clickable-grid-row:active {
    background: rgba(15, 23, 42, 0.08);
}

.hidden-grid-select,
.data-grid th.hidden-grid-select,
.data-grid td.hidden-grid-select {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

.hidden-row-select {
    display: none !important;
}

.data-grid th.inactive-col,
.data-grid td.inactive-col {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

.data-grid th {
    font-size: 0.695rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.data-grid tr:hover td {
    background: rgba(13, 92, 99, 0.06);
}

.data-grid td:last-child,
.data-grid th:last-child {
    white-space: nowrap;
}

.sales-search-product-cell {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.sales-search-product-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.sales-search-product-name {
    font-weight: 700;
    color: #1b232c;
    line-height: 1.3;
    word-break: break-word;
}

.sales-search-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.78rem;
    color: #5c6772;
}

.sales-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sales-item-badge-product {
    background: rgba(13, 92, 99, 0.12);
    color: #0d5c63;
}

.sales-item-badge-service {
    background: rgba(194, 88, 26, 0.14);
    color: #9a4a14;
}

.entry-card-cell {
    min-width: 0;
}

.entry-card {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.entry-card-title {
    font-weight: 700;
    color: #18212a;
    line-height: 1.3;
    word-break: break-word;
}

.entry-kind-prefix {
    color: #133a7a;
    font-weight: 800;
}

.entry-kind-separator {
    color: #133a7a;
    font-weight: 700;
}

.entry-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: #5c6772;
    font-size: 0.77rem;
}

.entry-line-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px 6px;
    padding-top: 4px;
    border-top: 1px dashed rgba(15, 23, 42, 0.1);
    align-items: end;
}

.entry-line-metrics-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-line-metric {
    display: grid;
    gap: 1px;
}

.entry-line-metric-wide {
    grid-column: span 1;
}

.entry-line-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6a7280;
    white-space: nowrap;
}

.entry-line-input {
    min-width: 0 !important;
    width: 100%;
    padding: 5px 7px;
    font-size: 0.82rem;
}

.entry-line-value {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 2px;
    font-weight: 700;
    font-size: 0.84rem;
    color: #111827;
    white-space: nowrap;
}

.purchase-lines-grid .entry-line-metrics,
.sales-register-cart-pane .purchase-lines-grid .entry-line-metrics {
    grid-template-columns: repeat(4, minmax(54px, 1fr));
    gap: 2px 5px;
}

.purchase-lines-grid .entry-line-label {
    font-size: 0.6rem;
}

.purchase-lines-grid .entry-line-input,
.purchase-lines-grid .entry-line-value {
    font-size: 0.8rem;
}

.purchase-search-pane .sales-entry-table,
.transfer-register-shell .sales-entry-table {
    border-spacing: 0 8px;
}

.sales-lines-grid.compact-entry-grid td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.module-list .grid-shell {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 290px);
}

.module-form .form-grid {
    flex: 1 1 auto;
    align-content: start;
}

.module-form .action-row {
    margin-top: auto;
    padding-top: 20px;
}

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

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

.radio-list {
    display: flex;
    gap: 18px;
    padding-top: 14px;
}

.radio-list input {
    margin-right: 6px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.status-message {
    display: block;
    min-height: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.status-success {
    color: var(--success);
}

.status-error {
    color: #a32727;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
}

.section-heading p {
    margin: 6px 0 0;
}

.section-heading-inline {
    margin-top: 8px;
}

.security-page,
.transactions-page,
.sales-pos-screen {
    display: grid;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

.security-layout {
    display: grid;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

.security-layout-stacked {
    grid-template-columns: 1fr;
}

.security-card,
.security-list-card,
.security-form-card,
.security-role-list-card,
.security-role-permission-card,
.transactions-card,
.purchase-report-card,
.sales-top-card,
.sales-search-pane,
.sales-items-pane,
.sales-summary-bar,
.migration-notice {
    width: 100%;
    min-width: 0;
}

.security-grid-wrap,
.transactions-grid-wrap,
.purchase-report-grid-shell,
.security-grid-shell,
.variants-grid-shell {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
}

.compact-grid {
    min-width: 880px;
}

.security-form-grid {
    display: grid;
    gap: 16px;
}

.security-form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.security-checklist {
    margin-top: 20px;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin-top: 12px;
}

.checkbox-stack {
    display: grid;
    align-content: end;
}

.security-checkbox-field {
    padding-top: 22px;
}

.security-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.security-actions .button {
    width: auto;
    margin-top: 0;
    flex: 0 0 auto;
}

.security-divider {
    height: 1px;
    margin: 26px 0 18px;
    background: var(--line);
}

.security-reset-row,
.transactions-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.align-end {
    display: flex;
    align-items: end;
}

.inline-search-action {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.inline-search-action .text-input {
    flex: 1 1 auto;
    min-width: 0;
}

.inline-search-action .maxlength-field {
    flex: 1 1 auto;
    min-width: 0;
}

.inline-search-action .button {
    flex: 0 0 auto;
    margin-top: 0;
}

.inventory-report-filter-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
    align-items: end;
}

.inventory-report-filter-grid .inline-search-action .text-input {
    max-width: 420px;
}

.inline-search-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-search-group .text-input {
    flex: 1 1 auto;
    min-width: 0;
}

.security-form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-report-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.report-print-actions {
    margin-top: 0;
    justify-content: flex-end;
}

.report-print-summary {
    display: none;
}

.report-print-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.report-print-header {
    display: none;
}

.report-print-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px;
}

.report-print-logo {
    width: 86px;
    max-width: 86px;
    max-height: 86px;
    object-fit: contain;
}

.report-print-company {
    text-align: center;
}

.report-print-company-name {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.report-print-company-details {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.report-print-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.report-print-value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.button-small {
    padding: 9px 14px;
    font-size: 0.725rem;
}

.sales-pos-screen {
    min-height: 0;
}

.sales-top-card-compact,
.sales-search-pane-compact,
.sales-items-pane-compact,
.sales-summary-bar-compact {
    padding: 20px 22px;
    border-radius: 20px;
}

.sales-entry-table,
.sales-totals-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.sales-entry-label-cell {
    width: 110px;
    padding-right: 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.sales-entry-field-cell,
.sales-search-button-cell {
    vertical-align: middle;
}

.sales-product-entry-table .sales-entry-label-cell {
    width: 96px;
}

.sales-barcode-cell {
    width: 80px;
    min-width: 80px;
}

.sales-product-search-cell {
    width: auto;
    min-width: 80px;
}

.sales-search-button-cell {
    width: 96px;
    padding-left: 10px;
}

.sales-source-invoice-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sales-source-invoice-row .text-input {
    width: 120px;
    min-width: 120px;
}

.sales-search-button {
    width: 100%;
}

.sales-scan-input,
.sales-product-search-input {
    width: 100%;
}

.sales-workspace {
    display: grid;
    grid-template-columns: minmax(560px, 1.18fr) minmax(0, 0.82fr);
    gap: 24px;
    align-items: start;
    min-width: 0;
}

.sales-fixed-list {
    min-height: 0;
}

.sales-search-results,
.sales-items-scroll {
    margin-top: 16px;
    max-height: 318px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.sales-search-grid,
.sales-lines-shell {
    overflow-x: auto;
}

.sales-pane-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.sales-pane-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.sales-pane-heading span {
    color: var(--muted);
    font-size: 0.8rem;
}

.sales-search-results-grid,
.sales-lines-grid,
.purchase-report-grid,
.transactions-grid,
.security-users-grid {
    min-width: 100%;
}

.sales-lines-grid {
    min-width: 780px;
}

.sales-search-results-grid {
    min-width: 560px;
}

.purchase-search-grid {
    min-width: 640px;
}

.purchase-lines-grid {
    min-width: 920px;
}

.purchase-product-entry-table {
    margin-bottom: 14px;
}

.purchase-batch-hint-row {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(160px, 220px);
    gap: 14px;
    margin-bottom: 14px;
}

.purchase-batch-hint-row label {
    display: block;
    margin-bottom: 6px;
}

.purchase-search-grid .grid-col-barcode,
.purchase-lines-grid .grid-col-barcode {
    width: 6ch;
    max-width: 6ch;
}

.purchase-search-grid .master-name-cell,
.purchase-lines-grid .master-name-cell {
    width: 11ch;
    max-width: 11ch;
    white-space: normal;
    word-break: break-word;
}

.purchase-search-grid .grid-col-compact,
.purchase-lines-grid .grid-col-compact {
    width: 10ch;
    max-width: 10ch;
}

.purchase-search-grid .grid-col-cost,
.purchase-lines-grid .grid-col-cost {
    width: 6ch;
    max-width: 6ch;
}

.purchase-search-grid .grid-col-compact .text-input,
.purchase-search-grid td.grid-col-compact .text-input {
    width: 100%;
    min-width: 96px;
}

.purchase-lines-grid .grid-col-qty {
    width: 5ch;
    max-width: 5ch;
}

.purchase-search-grid,
.purchase-lines-grid {
    table-layout: fixed;
}

.line-input,
.sales-summary-input {
    padding: 10px 12px;
    border-radius: 12px;
}

.icon-action {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
}

.icon-action svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.icon-action-add {
    color: var(--brand);
}

.icon-action-remove {
    color: #8f2d2d;
}

.icon-action-remove-solid {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.icon-action-edit,
.icon-action-open {
    color: var(--brand);
}

.icon-action-print {
    color: #475569;
}

.sales-summary-bar {
    display: grid;
    gap: 16px;
}

.sales-totals-table th,
.sales-totals-table td {
    text-align: left;
    padding-right: 18px;
}

.sales-totals-table th {
    color: var(--muted);
    font-size: 0.675rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sales-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.sales-pos-compact {
    gap: 16px;
}

.sales-touch-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.24);
    width: fit-content;
    max-width: 100%;
}

.sales-touch-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 11px 18px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sales-touch-tab:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.65);
}

.sales-touch-tab.is-active {
    color: #0b6bcb;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.sales-tab-panel {
    min-width: 0;
}

.sales-tab-panel[hidden] {
    display: none !important;
}

.sales-status-ghost {
    display: none;
}

.sales-top-card-touch {
    padding: 16px 18px;
}

.sales-touch-shell {
    display: grid;
    gap: 12px;
}

.sales-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr);
    gap: 16px;
    align-items: start;
}

.sales-details-form-panel,
.sales-details-summary-panel {
    min-width: 0;
}

.sales-details-form-panel {
    display: grid;
    gap: 12px;
}

.sales-details-grid {
    display: grid;
    gap: 10px 12px;
    align-items: end;
}

.sales-details-grid-primary {
    grid-template-columns: minmax(180px, 0.95fr) minmax(230px, 1.15fr) minmax(170px, 0.8fr);
}

.sales-details-grid-quick {
    grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1.15fr) auto;
}

.sales-details-grid-secondary {
    grid-template-columns: minmax(150px, 0.7fr) minmax(260px, 1.35fr) minmax(180px, 0.8fr);
}

.sales-details-summary-panel {
    display: grid;
    gap: 12px;
}

.sales-details-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sales-touch-row {
    display: grid;
    gap: 10px 12px;
    align-items: end;
}

.sales-touch-row-primary {
    grid-template-columns: minmax(170px, 0.95fr) minmax(220px, 1.2fr) minmax(150px, 0.9fr) minmax(150px, 0.8fr);
}

.sales-touch-row-secondary {
    grid-template-columns: minmax(140px, 0.85fr) minmax(200px, 1.15fr) auto minmax(120px, 0.7fr) minmax(120px, 0.7fr);
}

.sales-touch-row-tertiary {
    grid-template-columns: minmax(140px, 0.8fr) minmax(260px, 1.5fr) minmax(150px, 0.8fr) minmax(120px, 0.7fr) minmax(120px, 0.65fr);
}

.sales-touch-field {
    min-width: 0;
}

.sales-touch-field label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sales-touch-field .text-input,
.sales-touch-field .dropdown-input {
    width: 100%;
}

.sales-touch-field-auto {
    min-width: fit-content;
}

.sales-touch-field-remarks .text-input {
    min-width: 0;
}

.sales-touch-select {
    width: 100%;
    min-width: 0;
}

.sales-touch-add-customer {
    min-width: 120px;
    min-height: 42px;
}

.sales-touch-stat,
.sales-touch-kpi {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.02));
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.sales-touch-stat-label,
.sales-touch-kpi-label {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sales-touch-stat-value,
.sales-touch-kpi-value,
.sales-loyalty-balance {
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--ink);
}

.sales-touch-stat-value-small {
    font-size: 1rem;
}

.sales-touch-payable-stat {
    background: linear-gradient(180deg, rgba(11, 107, 203, 0.10), rgba(11, 107, 203, 0.04));
    border-color: rgba(11, 107, 203, 0.22);
}

.sales-touch-payable-stat .sales-touch-stat-value {
    color: #0b6bcb;
    font-size: 1.42rem;
}

.sales-touch-payable-stat-wide {
    padding: 14px 16px;
}

.sales-touch-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}

.sales-touch-kpis-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.sales-touch-actions {
    justify-content: flex-start;
    align-items: center;
    padding-top: 2px;
}

.sales-touch-save-button {
    min-width: 152px;
    min-height: 44px;
    font-size: 0.98rem;
}

.sales-amount-input,
.sales-touch-select {
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sales-state-low {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
}

.sales-state-warning {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
}

.sales-state-ok {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
}

.evoshx-dialog-host {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.evoshx-dialog-host.is-open {
    display: flex;
}

.evoshx-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
}

.evoshx-dialog-card {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.24);
}

.evoshx-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.evoshx-dialog-header h3 {
    margin: 4px 0 0;
}

.evoshx-dialog-body {
    margin-top: 14px;
    color: var(--text);
    line-height: 1.6;
}

.evoshx-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.sales-workspace-compact {
    gap: 16px;
}

.sales-search-pane-compact,
.sales-items-pane-compact {
    padding: 14px 16px 16px;
}

.purchase-top-card,
.purchase-search-pane,
.purchase-intake-pane,
.purchase-items-pane,
.purchase-summary-bar {
    width: 100%;
}

.purchase-report-card .security-actions,
.transactions-card .security-actions {
    margin-top: 18px;
}

.payment-voucher-actions {
    margin-top: 0;
    justify-content: flex-end;
}

.voucher-audit-panel,
.voucher-delete-panel {
    margin-top: 18px;
}

.voucher-audit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
}

.voucher-audit-value {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-weight: 600;
}

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

.cash-session-metric {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.cash-session-metric span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cash-session-metric strong {
    display: block;
    margin-top: 8px;
    font-size: 18px;
    color: var(--text);
}

.text-input-readonly {
    display: flex;
    align-items: center;
    min-height: 41px;
}

.grid-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
}

.grid-status-open {
    background: rgba(21, 128, 61, 0.12);
    color: #166534;
}

.grid-status-closed {
    background: rgba(71, 85, 105, 0.12);
    color: #334155;
}

.history-grid a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.history-grid a:hover {
    text-decoration: underline;
}

.grid-action-button {
    padding: 7px 12px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.damage-draft-actions {
    justify-content: flex-start;
    margin-top: 14px;
}

.damage-search-grid,
.damage-lines-grid {
    min-width: 0;
}

.data-grid th.damage-product-col,
.data-grid td.damage-product-col {
    width: 11ch;
    max-width: 11ch;
    white-space: normal;
    overflow-wrap: anywhere;
}

.data-grid th.damage-barcode-col,
.data-grid td.damage-barcode-col {
    width: 8ch;
    min-width: 8ch;
    max-width: 8ch;
}

.data-grid th.damage-cost-col,
.data-grid td.damage-cost-col {
    width: 6ch;
    min-width: 6ch;
    max-width: 6ch;
}

.data-grid th.damage-qty-col,
.data-grid td.damage-qty-col {
    width: 5ch;
    min-width: 5ch;
    max-width: 5ch;
}

.data-grid .grid-footer-row td {
    font-weight: 700;
    background: rgba(19, 58, 122, 0.08);
    border-top: 2px solid var(--line-strong);
}

.barcode-field-shell {
    display: grid;
    gap: 8px;
}

.barcode-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.checkbox-row-inline {
    margin: 0;
    font-weight: 500;
}

.variant-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.migration-notice {
    margin-bottom: 24px;
}

@media (max-width: 960px) {
    .login-shell,
    .app-shell,
    .hero-banner,
    .dashboard-grid,
    .dashboard-kpi-strip,
    .content-grid,
    .module-shell,
    .dashboard-action-grid,
    .hero-grid,
    .cash-session-summary-grid,
    .security-form-grid-three,
    .security-reset-row,
    .transactions-filter-grid,
    .sales-workspace,
    .products-shell,
    .checkbox-list {
        grid-template-columns: 1fr;
    }

    .stat-stack,
    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }

    .login-hero,
    .login-panel,
    .main-panel {
        padding: 24px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 40;
        padding: 20px;
        transform: translateX(-110%);
        transition: transform 0.22s ease;
    }

    .sales-entry-table,
    .sales-totals-table {
        display: block;
        overflow-x: auto;
    }

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

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(24, 32, 40, 0.34);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 30;
    }

    html.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Layout stabilization */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar,
.main-panel,
.page-body,
.panel-card,
.module-shell,
.dashboard-grid,
.content-grid,
.history-grid-shell,
.grid-shell,
.transactions-page,
.security-page,
.security-layout,
.sales-pos-screen {
    min-width: 0;
}

.sidebar {
    background: #171717;
    color: #f3f4f6;
    padding: 18px 14px 14px;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px 8px;
}

.brand-logo {
    width: 132px;
    max-width: 100%;
    height: auto;
    flex: 0 0 auto;
}

.brand-logo-expanded {
    width: 176px;
}

.brand-logo-menu-icon {
    width: 42px;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-title {
    font-size: 14px;
    font-weight: 600;
    color: #f9fafb;
}

.brand-meta,
.page-kicker,
.eyebrow {
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: #9ca3af;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a,
.nav-link {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px 12px;
    border-radius: 12px;
}

.nav-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.nav-copy strong {
    font-size: 13px;
    font-weight: 600;
}

.nav-copy small {
    font-size: 11px;
    color: #aeb6c1;
}

.main-panel {
    padding: 18px 20px 20px;
}

.topbar {
    margin-bottom: 18px;
}

.topbar-main,
.topbar-title-group {
    min-width: 0;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.page-body {
    display: grid;
    gap: 20px;
    align-content: start;
}

.page-body > * {
    min-width: 0;
}

.panel-card {
    width: 100%;
    max-width: 100%;
    padding: 24px;
    border-radius: 20px;
    background: #ffffff;
}

.panel-card-header,
.module-header,
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-card-header h2,
.module-header h2,
.section-heading h2,
.section-heading h3 {
    margin: 0;
}

.panel-card-header p,
.module-header p,
.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.details-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.54);
}

.details-modal-card {
    width: min(980px, 100%);
    max-height: min(88vh, 920px);
    overflow: auto;
}

.details-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.details-item {
    min-width: 0;
}

.details-item-wide {
    grid-column: 1 / -1;
}

.details-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.details-value {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbf8f1;
    color: var(--text);
    word-break: break-word;
}

.details-value-block {
    white-space: pre-wrap;
}

.details-stacktrace {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #111827;
    color: #f8fafc;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
}

@media (max-width: 860px) {
    .details-modal-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.app-error-card {
    max-width: 920px;
    margin: 0 auto;
}

.app-error-header {
    align-items: center;
}

.app-error-badge {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #b91c1c, #ef4444);
    color: #ffffff;
    font-size: 34px;
    font-weight: 800;
    box-shadow: 0 18px 35px rgba(185, 28, 28, 0.22);
}

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

.app-error-summary-item {
    min-width: 0;
}

.app-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 860px) {
    .app-error-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

.module-header .eyebrow {
    display: block;
    margin-bottom: 4px;
}

.dashboard-grid,
.content-grid,
.dashboard-kpi-strip,
.dashboard-action-grid,
.feature-hub-grid {
    display: grid;
    gap: 16px;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr);
}

.dashboard-kpi-strip,
.content-grid,
.feature-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-hub-grid .dashboard-action-link {
    min-height: 112px;
}

.module-shell {
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
    min-height: calc(100vh - 180px);
}

.transactions-filter-grid,
.security-reset-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.report-search-cell {
    min-width: 0;
}

.history-shell,
.purchase-report-card,
.transactions-card,
.security-card,
.security-list-card,
.security-form-card {
    width: 100%;
}

.history-grid-shell,
.transactions-grid-wrap,
.purchase-report-grid-shell,
.security-grid-wrap,
.grid-shell {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.data-grid {
    width: 100%;
    min-width: 760px;
}

.compact-grid {
    min-width: 920px;
}

.data-grid th,
.data-grid td {
    padding: 10px 12px;
}

.sales-workspace {
    grid-template-columns: minmax(620px, 1.2fr) minmax(0, 0.8fr);
}

.sales-search-results,
.sales-items-scroll {
    max-height: 320px;
    overflow-y: auto;
}

.sales-summary-bar,
.sales-top-card,
.sales-search-pane,
.sales-items-pane,
.purchase-top-card,
.purchase-search-pane,
.purchase-items-pane,
.purchase-summary-bar {
    width: 100%;
}

.status-message {
    min-height: 20px;
    margin-bottom: 10px;
}

.sidebar-user-card {
    padding: 10px;
}

@media (max-width: 1200px) {
    .dashboard-grid,
    .content-grid,
    .dashboard-kpi-strip,
    .feature-hub-grid,
    .module-shell,
    .sales-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .main-panel {
        padding: 16px;
    }

    .panel-card {
        padding: 18px;
    }

    .transactions-filter-grid,
    .security-reset-row {
        grid-template-columns: 1fr;
    }
}

/* Page-specific compact layout tuning */
.master-module-shell {
    grid-template-columns: minmax(340px, 0.88fr) minmax(0, 1.12fr);
    gap: 18px;
}

.master-module-list,
.master-editor-card {
    padding-top: 18px;
}

.master-module-list .module-header,
.master-editor-card .module-header {
    margin-bottom: 10px;
}

.master-search-row {
    margin-bottom: 10px;
}

.master-search-field label {
    margin-top: 0;
}

.master-module-list .grid-shell {
    max-height: calc(100vh - 255px);
}

.master-module-list .data-grid,
.master-module-list .compact-grid,
.setup-master-grid {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none;
    table-layout: auto;
}

.master-name-cell {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.data-grid th.master-name-col,
.data-grid td.master-name-col {
    width: 11ch !important;
    min-width: 11ch !important;
    max-width: 11ch !important;
}

.data-grid th.master-mobile-col,
.data-grid td.master-mobile-col {
    width: 6ch !important;
    min-width: 6ch !important;
    max-width: 6ch !important;
    white-space: nowrap;
}

.data-grid th.employee-category-col,
.data-grid td.employee-category-col {
    width: 6ch !important;
    min-width: 6ch !important;
    max-width: 6ch !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

.data-grid th.setup-name-col,
.data-grid td.setup-name-col {
    width: 11ch !important;
    min-width: 11ch !important;
    max-width: 11ch !important;
}

.data-grid th.setup-category-col,
.data-grid td.setup-category-col {
    width: 8ch !important;
    min-width: 8ch !important;
    max-width: 8ch !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

.data-grid th.setup-amount-col,
.data-grid td.setup-amount-col {
    width: 6ch !important;
    min-width: 6ch !important;
    max-width: 6ch !important;
    white-space: nowrap;
}

.data-grid th.setup-code-col,
.data-grid td.setup-code-col {
    width: 8ch !important;
    min-width: 8ch !important;
    max-width: 8ch !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

.master-module-list .data-grid th,
.master-module-list .data-grid td,
.setup-master-grid th,
.setup-master-grid td {
    padding: 8px 8px;
}

.setup-master-grid .master-name-cell,
.setup-master-grid td.setup-name-col,
.setup-master-grid th.setup-name-col {
    width: auto !important;
    min-width: 14ch !important;
    max-width: none !important;
}

.master-editor-card .form-grid {
    gap: 12px 16px;
}

.master-editor-card label {
    margin: 10px 0 6px;
}

.products-shell-compact {
    grid-template-columns: minmax(290px, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
}

.product-family-card .grid-shell {
    max-height: calc(100vh - 255px);
}

.product-family-grid {
    min-width: 420px;
}

.data-grid th.product-family-name-col,
.data-grid td.product-family-name-col {
    width: 14ch;
    max-width: 14ch;
}

.data-grid th.product-variant-count-col,
.data-grid td.product-variant-count-col {
    width: 6ch;
    max-width: 6ch;
    white-space: nowrap;
}

.product-editor-card-compact .module-header {
    margin-bottom: 10px;
}

.product-editor-card-compact .form-grid {
    gap: 12px 16px;
}

.product-description-input {
    min-height: 72px;
}

.product-variant-card {
    gap: 18px;
}

.product-variant-editor {
    display: grid;
    gap: 14px;
}

.product-editor-section {
    border: 1px solid rgba(19, 58, 122, 0.1);
    border-radius: 16px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.78));
}

.product-editor-section-title {
    margin-bottom: 12px;
}

.product-editor-section-title h3 {
    margin: 2px 0 0;
    font-size: 16px;
}

.master-editor-sections {
    display: grid;
    gap: 14px;
}

.master-editor-section {
    border: 1px solid rgba(19, 58, 122, 0.1);
    border-radius: 16px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 255, 0.82));
}

.master-editor-section-title {
    margin-bottom: 12px;
}

.master-editor-section-title h3 {
    margin: 2px 0 0;
    font-size: 16px;
}

.master-editor-grid {
    gap: 12px 14px;
}

.master-editor-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-variant-grid {
    gap: 12px 14px;
}

.product-variant-grid-basic {
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
}

.product-variant-grid-pricing,
.product-variant-grid-stock {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.variant-checks-compact {
    gap: 12px 18px;
    padding-top: 6px;
}

.variant-checks-compact .checkbox-row {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(19, 58, 122, 0.06);
}

@media (max-width: 1320px) {
    .master-editor-grid-wide,
    .product-variant-grid-pricing,
    .product-variant-grid-stock {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sales-top-card-compact {
    padding-top: 14px;
}

.sales-top-card-compact .status-message {
    margin-bottom: 4px;
}

.sales-entry-table {
    border-spacing: 0 6px;
}

.sales-top-summary-block {
    margin-top: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.inventory-transfer-top-summary-block {
    margin-top: 12px;
}

.sales-totals-table-compact {
    border-spacing: 0;
}

.sales-totals-table-compact th,
.sales-totals-table-compact td {
    padding: 8px 14px 8px 0;
}

.sales-summary-actions-inline {
    justify-content: flex-end;
    align-items: end;
    padding-bottom: 8px;
}

.sales-register-main-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.sales-invoice-single-screen {
    display: grid;
    gap: 18px;
}

.sales-invoice-inline-details {
    margin-top: 4px;
}

.sales-register-main-shell-nested {
    margin-top: 14px;
}

.sales-register-search-pane,
.sales-register-cart-pane {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.sales-register-cart-pane {
    position: sticky;
    top: 18px;
    align-self: start;
}

.sales-register-cart-pane .sales-items-scroll {
    min-height: 250px;
    max-height: 250px;
    flex: 0 0 auto;
}

.sales-register-search-pane .sales-search-results {
    flex: 0 0 auto;
}

.sales-register-search-pane .sales-search-grid,
.sales-register-cart-pane .sales-lines-shell {
    height: auto;
}

.sales-return-main-shell,
.sales-replacement-panel {
    margin-top: 16px;
}

.data-grid-clickable tbody tr.clickable-grid-row td {
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.data-grid-clickable tbody tr.clickable-grid-row:hover td {
    background: rgba(59, 130, 246, 0.08);
}

.data-grid-clickable tbody tr.clickable-grid-row:active td {
    background: rgba(59, 130, 246, 0.12);
}

.inventory-transfer-delete-panel {
    margin-top: 14px;
}

.sales-summary-input-compact {
    width: 88px;
    min-width: 88px;
    padding-left: 8px;
    padding-right: 8px;
}

.sales-summary-select {
    min-width: 132px;
    width: 132px;
}

.sales-workspace-stacked {
    grid-template-columns: 1fr;
    gap: 14px;
}

.sales-search-pane-compact,
.sales-items-pane-compact {
    padding-top: 16px;
}

.sales-product-entry-table .sales-entry-label-cell {
    width: 84px;
}

.sales-product-entry-table .sales-entry-field-cell {
    width: 80px;
}

.sales-barcode-cell,
.sales-product-search-cell {
    width: 220px;
    min-width: 220px;
}

.sales-search-button-cell {
    width: 92px;
}

.sales-search-results,
.sales-items-scroll {
    margin-top: 10px;
    max-height: 250px;
    min-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.sales-search-results-grid {
    min-width: 560px;
}

.sales-lines-grid {
    min-width: 720px;
}

.compact-entry-grid {
    min-width: 100%;
    table-layout: fixed;
}

.sales-register-search-pane .grid-shell,
.sales-register-cart-pane .grid-shell {
    width: 100%;
}

.sales-register-search-pane .compact-entry-grid,
.sales-register-cart-pane .compact-entry-grid {
    min-width: 100%;
}

.compact-entry-grid th.grid-col-icon,
.compact-entry-grid td.grid-col-icon {
    width: 56px;
    min-width: 56px;
    text-align: center;
}

.compact-entry-grid th.grid-col-action,
.compact-entry-grid td.grid-col-action {
    width: 52px;
    min-width: 52px;
    text-align: center;
}

.compact-entry-grid th,
.compact-entry-grid td {
    vertical-align: top;
}

.sales-lines-grid .line-input {
    min-width: 72px;
}

.sales-rate-text {
    display: inline-block;
    min-width: 72px;
    padding: 10px 0;
    font-weight: 600;
}

@media (max-width: 1380px) {
    .sales-details-layout {
        grid-template-columns: 1fr;
    }

    .sales-details-grid-primary,
    .sales-details-grid-quick,
    .sales-details-grid-secondary,
    .sales-details-summary-grid,
    .sales-touch-kpis-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-touch-row-primary,
    .sales-touch-row-secondary,
    .sales-touch-row-tertiary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-touch-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .sales-touch-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .sales-touch-tab {
        width: 100%;
        text-align: center;
    }

    .sales-top-card-touch {
        padding: 14px;
    }

    .entry-line-metrics,
    .entry-line-metrics-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-details-grid-primary,
    .sales-details-grid-quick,
    .sales-details-grid-secondary,
    .sales-details-summary-grid,
    .sales-touch-kpis-wide,
    .sales-touch-row-primary,
    .sales-touch-row-secondary,
    .sales-touch-row-tertiary,
    .sales-touch-kpis {
        grid-template-columns: 1fr;
    }

    .sales-touch-add-customer,
    .sales-touch-save-button {
        width: 100%;
    }
}

.data-grid th.grid-col-barcode,
.data-grid td.grid-col-barcode {
    width: 148px;
    min-width: 148px;
    white-space: nowrap;
}

.data-grid th.grid-col-cost,
.data-grid td.grid-col-cost,
.data-grid th.grid-col-compact,
.data-grid td.grid-col-compact {
    width: 96px;
    min-width: 96px;
    white-space: nowrap;
}

.data-grid th.grid-col-qty,
.data-grid td.grid-col-qty {
    width: 78px;
    min-width: 78px;
    white-space: nowrap;
}

.data-grid th.grid-col-action,
.data-grid td.grid-col-action {
    width: 34px;
    min-width: 34px;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
    white-space: nowrap;
}

.data-grid th.grid-col-action {
    text-align: center;
}

.invoice-delete-stack {
    display: flex;
    align-items: center;
    gap: 6px;
}

.invoice-delete-reason {
    flex: 1 1 auto;
    min-width: 0;
}

.data-grid .grid-qty-input {
    width: 64px;
    min-width: 64px;
    padding-left: 8px;
    padding-right: 8px;
}

.data-grid .grid-cost-input {
    width: 82px;
    min-width: 82px;
    padding-left: 8px;
    padding-right: 8px;
}

.damage-search-grid,
.damage-lines-grid {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
}

.damage-search-grid th,
.damage-search-grid td,
.damage-lines-grid th,
.damage-lines-grid td {
    padding: 8px 6px;
}

.damage-search-grid th.damage-product-col,
.damage-search-grid td.damage-product-col,
.damage-lines-grid th.damage-product-col,
.damage-lines-grid td.damage-product-col {
    width: 11ch !important;
    min-width: 11ch !important;
    max-width: 11ch !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.damage-search-grid th.damage-barcode-col,
.damage-search-grid td.damage-barcode-col,
.damage-lines-grid th.damage-barcode-col,
.damage-lines-grid td.damage-barcode-col {
    width: 8ch !important;
    min-width: 8ch !important;
    max-width: 8ch !important;
    white-space: nowrap;
}

.damage-search-grid th.damage-cost-col,
.damage-search-grid td.damage-cost-col,
.damage-lines-grid th.damage-cost-col,
.damage-lines-grid td.damage-cost-col {
    width: 6ch !important;
    min-width: 6ch !important;
    max-width: 6ch !important;
    white-space: nowrap;
}

.damage-lines-grid th.damage-qty-col,
.damage-lines-grid td.damage-qty-col {
    width: 5ch !important;
    min-width: 5ch !important;
    max-width: 5ch !important;
    white-space: nowrap;
}

.damage-lines-grid .grid-qty-input {
    width: 44px !important;
    min-width: 44px !important;
}

.damage-search-grid th.grid-col-action,
.damage-search-grid td.grid-col-action,
.damage-lines-grid th.grid-col-action,
.damage-lines-grid td.grid-col-action {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    text-align: center;
}

@media (max-width: 1200px) {
    .sales-top-summary-block {
        grid-template-columns: 1fr;
    }

    .sales-register-main-shell {
        grid-template-columns: 1fr;
    }

    .sales-register-cart-pane {
        position: static;
    }

    .sales-register-cart-pane .sales-items-scroll {
        min-height: 236px;
        max-height: 236px;
    }
}

.topbar-actions {
    gap: 10px;
}

.topbar-search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 12px;
    min-width: 0;
    position: relative;
    overflow: visible;
    z-index: 90;
}

.topbar-shortcuts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar-search-input {
    width: 220px;
    min-width: 180px;
    height: 34px;
}

.top-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
    padding: 10px;
    z-index: 120;
}

.top-search-results {
    display: grid;
    gap: 6px;
}

.top-search-result-link {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    transition: background-color 0.15s ease;
}

.top-search-result-link:hover {
    background: #f8fafc;
}

.top-search-result-link strong {
    font-size: 13px;
    font-weight: 700;
}

.top-search-result-link span {
    font-size: 12px;
    color: #64748b;
}

.top-search-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.search-recommendations-panel {
    margin: 12px 0 18px;
}

.topbar {
    position: relative;
    z-index: 80;
    overflow: visible;
}

.main-panel,
.page-body {
    overflow: visible;
}

.topbar-branch-switcher {
    min-width: 84px;
    max-width: 96px;
    height: 34px;
    flex: 0 1 96px;
    padding: 8px 8px;
    font-size: 12px;
}

@media (max-width: 1200px) {
    .topbar-search-group {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

.topbar-icon-action {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
}

.topbar-icon-action svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.ai-help-toggle {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 120;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #10a37f 0%, #0f8c6d 100%);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(16, 163, 127, 0.28);
    font-weight: 700;
    cursor: pointer;
}

.ai-help-toggle-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

.ai-help-drawer {
    position: fixed;
    right: 22px;
    bottom: 82px;
    z-index: 130;
    width: min(420px, calc(100vw - 30px));
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dfe7ec;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.ai-help-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ai-help-backdrop {
    position: fixed;
    inset: 0;
    z-index: 125;
    background: rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ai-help-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.ai-help-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ai-help-header h3 {
    margin: 6px 0 0;
}

.ai-help-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.ai-help-messages {
    max-height: 320px;
    min-height: 180px;
    overflow-y: auto;
    display: grid;
    gap: 10px;
    padding: 4px 2px;
}

.ai-help-bubble {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.ai-help-bubble-assistant {
    background: #f3f7fb;
    color: #1f2937;
    justify-self: start;
}

.ai-help-bubble-user {
    background: #10a37f;
    color: #ffffff;
    justify-self: end;
}

.ai-help-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-help-chip {
    border: 1px solid #dce4ea;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ai-help-compose {
    display: grid;
    gap: 10px;
}

.ai-help-input {
    min-height: 84px;
    resize: vertical;
}

.ai-help-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-help-source {
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 720px) {
    .ai-help-toggle {
        right: 14px;
        bottom: 14px;
        padding: 11px 14px;
    }

    .ai-help-toggle-text {
        display: none;
    }

    .ai-help-drawer {
        right: 12px;
        left: 12px;
        bottom: 74px;
        width: auto;
    }
}

.page-breadcrumb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -4px 0 14px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.92));
}

.page-breadcrumb-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.page-breadcrumb-back:hover {
    text-decoration: none;
    color: var(--brand-strong);
}

.page-breadcrumb-back-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(19, 58, 122, 0.08);
}

.page-breadcrumb-back-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.page-breadcrumb-trail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.page-breadcrumb-section,
.page-breadcrumb-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-breadcrumb-current {
    color: var(--text);
    font-weight: 700;
}

.page-breadcrumb-separator {
    color: #94a3b8;
}

.topbar-action-primary.topbar-icon-action {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.branch-role-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 90px minmax(160px, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.branch-role-grid-header {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    padding-top: 0;
}

.branch-role-name {
    font-weight: 600;
    color: #0f172a;
}

.branch-role-select {
    min-width: 160px;
}

.security-layout-two-column {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.security-role-directory,
.menu-config-groups {
    display: grid;
    gap: 16px;
}

.role-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.role-list li {
    list-style: none;
}

.role-list a {
    display: block;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.role-list a:hover {
    border-color: rgba(15, 23, 42, 0.16);
    background: #f8fafc;
}

.security-checklist-segmented {
    display: grid;
    gap: 16px;
}

.security-segment-card {
    padding: 16px 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.security-segment-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.security-segment-heading h3,
.security-segment-heading h4 {
    margin: 0;
}

.security-segment-heading p {
    margin: 5px 0 0;
    color: var(--muted);
}

.permission-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.permission-chip {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
}

.permission-chip input[type="checkbox"] {
    margin-top: 3px;
}

.permission-chip-copy {
    display: grid;
    gap: 4px;
}

.permission-chip-copy strong {
    font-size: 13px;
    color: #0f172a;
}

.permission-chip-copy small {
    font-size: 11px;
    color: #64748b;
    word-break: break-word;
}

.menu-config-section {
    display: grid;
    gap: 14px;
}

.menu-config-list {
    display: grid;
    gap: 12px;
}

.menu-config-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.9fr) 130px;
    gap: 14px;
    align-items: end;
    padding: 14px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.menu-config-row:first-child {
    border-top: none;
    padding-top: 0;
}

.menu-config-copy {
    display: grid;
    gap: 4px;
}

.menu-config-copy strong {
    color: #0f172a;
}

.menu-config-copy small {
    color: #64748b;
    word-break: break-word;
}

.menu-config-control,
.menu-config-toggle {
    display: grid;
    gap: 6px;
}

.menu-config-control label,
.menu-config-toggle label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.security-inline-status {
    margin-top: 14px;
}

.grid-icon-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.grid-icon-button:hover {
    background: #f8fafc;
}

.grid-icon-button-glyph {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: transparent;
    position: relative;
}

.grid-icon-button-glyph::before,
.grid-icon-button-glyph::after {
    content: "";
    position: absolute;
    background: #334155;
    border-radius: 2px;
}

.grid-icon-button-glyph::before {
    width: 10px;
    height: 2px;
    transform: rotate(-45deg);
}

.grid-icon-button-glyph::after {
    width: 2px;
    height: 10px;
    transform: rotate(-45deg) translate(2px, -2px);
}

@media (max-width: 960px) {
    .security-layout-two-column,
    .permission-chip-grid,
    .menu-config-row {
        grid-template-columns: 1fr;
    }
}

.branch-logo-preview {
    margin: 14px 0;
}

.branch-logo-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #f8fafc;
}

.branch-logo-preview-image {
    max-width: 220px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.branch-logo-preview-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.text-input,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.text-input,
select,
textarea {
    font-size: 13px;
    line-height: 1.4;
}

.maxlength-field {
    position: relative;
    display: block;
    width: 100%;
}

.maxlength-hint {
    position: absolute;
    top: -0.95rem;
    right: 0;
    color: #64748b;
    font-size: 9px;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
}

.maxlength-visible {
    opacity: 1;
    visibility: visible;
}

.maxlength-near-limit {
    color: #b45309;
}

.maxlength-at-limit {
    color: #b91c1c;
    font-weight: 600;
}

.input-near-limit {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12);
}

@media print {
    body,
    html {
        background: #fff !important;
    }

    body::after {
        content: "Powered by Intellion Solutions";
        position: fixed;
        left: 0;
        right: 0;
        bottom: 8px;
        text-align: center;
        font-size: 10px;
        color: #6b7280;
        letter-spacing: 0.04em;
    }

    .sidebar,
    .topbar,
    .page-breadcrumb-bar,
    .sidebar-backdrop,
    .report-print-actions,
    .security-actions,
    .button,
    .button-inline,
    .top-search-dropdown,
    .transactions-filter-grid,
    .inline-report-actions,
    .status-message {
        display: none !important;
    }

    .app-shell,
    .main-panel,
    .page-body,
    .page-body > *,
    .history-shell,
    .panel-card,
    .grid-shell,
    .history-grid-shell,
    .transactions-grid-wrap,
    .purchase-report-grid-shell,
    .security-grid-wrap,
    .sales-search-results,
    .sales-items-scroll {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .report-print-header,
    .report-print-summary {
        display: block !important;
        margin: 0 0 10px 0 !important;
    }

    .report-print-header {
        padding: 0 0 10px 0 !important;
        border-bottom: 1px solid #d1d5db !important;
    }

    .report-print-brand {
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 14px;
    }

    .report-print-logo {
        width: 78px !important;
        max-width: 78px !important;
        max-height: 78px !important;
    }

    .report-print-company-name {
        font-size: 22px !important;
    }

    .report-print-company-details {
        font-size: 11px !important;
        line-height: 1.45 !important;
    }

    .report-print-summary {
        padding: 0 0 8px 0 !important;
        border-bottom: 1px solid #d1d5db !important;
    }

    .data-grid,
    .compact-grid,
    .sales-search-results-grid,
    .sales-lines-grid,
    .purchase-search-grid,
    .purchase-lines-grid,
    .transactions-grid,
    .history-grid {
        min-width: 0 !important;
        width: 100% !important;
    }

    .panel-card-header,
    .module-header,
    .section-heading {
        margin-bottom: 8px !important;
    }

    .section-kicker,
    .eyebrow,
    .page-kicker {
        display: none !important;
    }

    .panel-card-header p {
        margin: 2px 0 0 0 !important;
    }

    .sales-summary-bar,
    .sales-summary-bar-compact {
        margin: 6px 0 8px 0 !important;
    }

    .sales-totals-table th,
    .sales-totals-table td {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .data-grid th,
    .data-grid td {
        padding: 6px 8px !important;
    }
}
.feature-hub-panel {
    background:
        radial-gradient(circle at top right, rgba(209, 160, 74, 0.14), transparent 26%),
        radial-gradient(circle at top left, rgba(13, 92, 99, 0.08), transparent 22%),
        linear-gradient(180deg, #fffdfa 0%, #fff8f1 100%);
    border: 1px solid #eadfce;
    box-shadow: 0 20px 46px rgba(76, 53, 28, 0.08);
}

.feature-hub-panel .panel-card-header {
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eadfce;
}

.feature-hub-header h2 {
    font-size: 1.6rem;
    line-height: 1.15;
    color: #2f2419;
}

.feature-hub-header p {
    max-width: 62ch;
    color: #6e6358;
}

.feature-hub-panel .section-kicker {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f3dfba 0%, #edd2a3 100%);
    color: #6f5026;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1px rgba(160, 110, 37, 0.08);
}

.feature-hub-section {
    position: relative;
    margin-top: 1.15rem;
    padding: 1rem 1rem 1.05rem 1.15rem;
    border: 1px solid #eee4d7;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(2px);
    box-shadow: 0 12px 28px rgba(63, 45, 25, 0.05);
    overflow: hidden;
}

.feature-hub-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #c98b2f 0%, #8f5d24 100%);
}

.feature-hub-section:nth-child(2n)::before {
    background: linear-gradient(180deg, #0d5c63 0%, #17484d 100%);
}

.feature-hub-section:nth-child(3n)::before {
    background: linear-gradient(180deg, #6e7f2f 0%, #4d5d21 100%);
}

.feature-hub-section:first-child {
    margin-top: 0;
}

.feature-hub-section-header {
    margin-bottom: 0.95rem;
    padding: 0 0 0.8rem 0.2rem;
    border-bottom: 1px solid #efe5d8;
}

.feature-hub-section-header h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.25;
    color: #382718;
    letter-spacing: 0.01em;
}

.feature-hub-section-header p {
    max-width: 62ch;
    margin: 0.32rem 0 0;
    color: #7b6b59;
    font-size: 0.89rem;
}

.feature-hub-grid {
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-guide-panel {
    display: grid;
    gap: 1.5rem;
}

.help-guide-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.help-guide-note {
    max-width: 360px;
    background: linear-gradient(135deg, rgba(201, 118, 42, 0.12), rgba(245, 220, 170, 0.28));
    border: 1px solid rgba(201, 118, 42, 0.22);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    color: #5e4123;
    display: grid;
    gap: 0.35rem;
}

.help-guide-section {
    display: grid;
    gap: 1rem;
}

.help-guide-section-header h3 {
    margin-bottom: 0.35rem;
}

.help-guide-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.help-guide-topic-card {
    background: #fff;
    border: 1px solid rgba(26, 38, 53, 0.08);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 14px 35px rgba(26, 38, 53, 0.08);
    display: grid;
    gap: 1rem;
}

.help-guide-topic-header h4 {
    margin-bottom: 0.35rem;
}

.help-guide-topic-header p,
.help-guide-section-header p {
    color: #667085;
}

.help-guide-topic-block {
    display: grid;
    gap: 0.55rem;
}

.help-guide-topic-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a05d18;
}

.help-guide-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #223042;
    display: grid;
    gap: 0.45rem;
}

.help-guide-list-ordered {
    padding-left: 1.25rem;
}

.help-guide-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.help-guide-related-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: #f6f8fb;
    border: 1px solid #e6ecf3;
    color: #38506a;
    font-size: 0.88rem;
}

.feature-hub-section .dashboard-action-link {
    position: relative;
    min-height: 110px;
    padding: 15px 16px 15px 18px;
    border: 1px solid #ece0d0;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 249, 242, 0.98) 100%);
    box-shadow: 0 4px 10px rgba(57, 40, 22, 0.03);
}

.feature-hub-section .dashboard-action-link strong {
    font-size: 0.96rem;
    color: #2e2419;
    line-height: 1.25;
}

.feature-hub-section .dashboard-action-link span {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #7a6a58;
}

.feature-hub-section .dashboard-action-link:hover {
    transform: translateY(-3px);
    border-color: rgba(13, 92, 99, 0.22);
    box-shadow: 0 14px 28px rgba(13, 92, 99, 0.1);
}

.feature-hub-section .dashboard-action-link::after {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(201, 139, 47, 0.85), rgba(143, 93, 36, 0.85));
}

.feature-hub-section:nth-child(2n) .dashboard-action-link::after {
    background: linear-gradient(180deg, rgba(13, 92, 99, 0.85), rgba(23, 72, 77, 0.85));
}

.feature-hub-section:nth-child(3n) .dashboard-action-link::after {
    background: linear-gradient(180deg, rgba(110, 127, 47, 0.85), rgba(77, 93, 33, 0.85));
}

@media (max-width: 1280px) {
    .feature-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .feature-hub-panel {
        padding: 1rem;
    }

    .feature-hub-header h2 {
        font-size: 1.35rem;
    }

    .feature-hub-grid {
        grid-template-columns: 1fr;
    }

    .help-guide-topic-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-hub-panel,
.analytics-dashboard-shell {
    background:
        radial-gradient(circle at top right, rgba(13, 92, 99, 0.1), transparent 24%),
        radial-gradient(circle at top left, rgba(242, 165, 65, 0.12), transparent 22%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #dbe6ec;
}

.analytics-hub-header h2,
.analytics-dashboard-copy h2 {
    margin: 0;
    color: #102a43;
}

.analytics-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.analytics-hub-link,
.analytics-link-pill,
.analytics-panel-card,
.analytics-branch-card,
.analytics-metric-card {
    text-decoration: none;
}

.analytics-hub-link {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.analytics-hub-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.analytics-hub-link strong {
    color: #102a43;
    font-size: 15px;
}

.analytics-hub-link span {
    color: #52606d;
    line-height: 1.5;
}

.analytics-dashboard-shell {
    display: grid;
    gap: 18px;
}

.analytics-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 20px;
    align-items: end;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.analytics-dashboard-copy {
    display: grid;
    gap: 8px;
}

.analytics-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(16, 163, 127, 0.1);
    color: #0f766e;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.analytics-dashboard-copy p,
.analytics-panel-head p,
.analytics-dashboard-filter small {
    color: #64748b;
}

.analytics-dashboard-filter {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.analytics-dashboard-filter label {
    margin: 0;
    font-size: 12px;
}

.analytics-branch-selector {
    min-width: 220px;
}

.analytics-period-chip {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
}

.analytics-link-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.analytics-link-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.analytics-link-pill-active {
    background: linear-gradient(135deg, #0d5c63 0%, #164e63 100%);
    border-color: transparent;
    color: #ffffff;
}

.analytics-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.analytics-metric-card,
.analytics-branch-card,
.analytics-panel-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.analytics-metric-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-left-width: 6px;
}

.analytics-metric-card span,
.analytics-branch-card span,
.analytics-row-item span,
.analytics-panel-note {
    color: #64748b;
}

.analytics-metric-card strong {
    font-size: 28px;
    color: #0f172a;
}

.analytics-branch-grid,
.analytics-panel-grid {
    display: grid;
    gap: 16px;
}

.analytics-branch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-branch-card {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.analytics-branch-card h3,
.analytics-panel-head h3 {
    margin: 0;
    color: #0f172a;
}

.analytics-branch-card strong {
    font-size: 26px;
    color: #0d5c63;
}

.analytics-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-panel-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.analytics-panel-head {
    display: grid;
    gap: 6px;
}

.analytics-panel-head p {
    margin: 0;
}

.analytics-bar-list,
.analytics-row-list {
    display: grid;
    gap: 12px;
}

.analytics-bar-item,
.analytics-row-item {
    display: grid;
    gap: 8px;
}

.analytics-bar-item {
    grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 1fr) auto;
    align-items: center;
}

.analytics-bar-copy {
    display: grid;
    gap: 4px;
}

.analytics-bar-copy strong,
.analytics-row-item strong {
    color: #0f172a;
}

.analytics-bar-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.analytics-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #10a37f 0%, #0d5c63 100%);
}

.analytics-bar-value {
    min-width: 86px;
    text-align: right;
    font-weight: 700;
    color: #0f172a;
}

.analytics-row-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.analytics-row-item:first-child {
    border-top: none;
    padding-top: 0;
}

.analytics-row-value {
    display: grid;
    gap: 4px;
    text-align: right;
}

.analytics-panel-note {
    padding-top: 8px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 12px;
}

.analytics-trend-shell,
.dashboard-trend-card {
    display: grid;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    padding: 16px;
}

.analytics-trend-list {
    display: grid;
    gap: 12px;
}

.analytics-trend-item {
    display: grid;
    gap: 8px;
}

.analytics-trend-bars {
    display: grid;
    gap: 6px;
}

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

.analytics-trend-label,
.analytics-trend-value {
    font-size: 12px;
    color: #5b6475;
}

.analytics-bar-fill-sales {
    background: linear-gradient(90deg, #0f8b8d, #35b6b4);
}

.analytics-bar-fill-returns {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.dashboard-trend-copy {
    display: grid;
    gap: 12px;
}

.dashboard-hero {
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.2fr) minmax(220px, 0.8fr);
    align-items: start;
}

@media (max-width: 1200px) {
    .analytics-hub-grid,
    .analytics-metric-grid,
    .analytics-branch-grid,
    .analytics-panel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .analytics-dashboard-hero,
    .analytics-bar-item,
    .analytics-row-item {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .analytics-trend-row {
        grid-template-columns: 1fr;
    }

    .analytics-dashboard-filter,
    .analytics-row-value,
    .analytics-bar-value {
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .analytics-hub-grid,
    .analytics-metric-grid,
    .analytics-branch-grid,
    .analytics-panel-grid {
        grid-template-columns: 1fr;
    }
}

.sales-register-three-shell {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
    min-width: 0;
}

.sales-detail-card {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.invoice-side-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    align-items: start;
}

.invoice-side-grid-tight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-side-field {
    min-width: 0;
}

.invoice-side-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.invoice-side-field-wide {
    grid-column: 1 / -1;
}

.invoice-side-stat {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(226, 232, 240, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.invoice-side-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ink);
}

.invoice-side-stat-value-small {
    font-size: 0.96rem;
}

.invoice-summary-table {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(243, 248, 255, 0.96), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(59, 130, 246, 0.14);
}

.invoice-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    color: var(--muted);
    font-size: 0.9rem;
}

.invoice-summary-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.invoice-summary-row > span:first-child {
    font-weight: 700;
}

.invoice-summary-row-strong,
.invoice-summary-row-strong > span {
    color: var(--ink);
    font-weight: 800;
}

.purchase-batch-input,
.purchase-expiry-input {
    min-width: 120px;
    width: 120px;
}

.sales-replacement-detail-card .invoice-summary-table {
    margin-top: 2px;
}

.voucher-entry-screen {
    gap: 20px;
}

.voucher-entry-card {
    display: grid;
    gap: 18px;
}

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

.voucher-entry-section {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.voucher-entry-section-wide {
    grid-column: 1 / -1;
}

.voucher-entry-actions {
    justify-content: flex-end;
    padding-top: 4px;
}

.voucher-audit-panel-tight {
    margin-bottom: 0;
}

.damage-entry-grid .history-grid-shell {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
    border-radius: 18px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.damage-lines-grid .grid-footer-row td {
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.03);
}

.damage-footer-total {
    display: inline-block;
    font-weight: 800;
    color: var(--ink);
}

.damage-footer-amount {
    float: right;
    font-weight: 800;
    color: var(--brand);
}

.transfer-register-shell .entry-line-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.purchase-register-shell .sales-search-results,
.purchase-register-shell .sales-items-scroll,
.sales-replacement-panel .sales-search-results,
.sales-replacement-panel .sales-items-scroll {
    min-height: 350px;
    max-height: 350px;
}

.sales-replacement-panel .sales-register-cart-pane .entry-line-metrics {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    gap: 2px 5px;
}

.sales-replacement-panel .sales-register-cart-pane .entry-line-label {
    font-size: 0.6rem;
}

.sales-replacement-panel .sales-register-cart-pane .entry-line-input,
.sales-replacement-panel .sales-register-cart-pane .entry-line-value {
    font-size: 0.8rem;
}

@media (max-width: 1180px) {
    .sales-register-three-shell,
    .voucher-entry-grid {
        grid-template-columns: 1fr;
    }

    .invoice-side-grid,
    .invoice-side-grid-tight {
        grid-template-columns: 1fr;
    }
}
