@font-face {
    font-family: 'Siya Rabar';
    src: url('/fonts/Rabar_013.ttf') format('truetype');
    font-style: normal;
    font-weight: 400 900;
    font-display: swap
}

@font-face {
    font-family: 'Siya Calibri';
    src: url('/fonts/Sarchia_Jihad.ttf') format('truetype');
    font-style: normal;
    font-weight: 400 900;
    font-display: swap
}

/* ==========================================================================
   1. BASE RESET & TYPOGRAPHY
   ========================================================================== */
* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: 'Siya Calibri', Calibri, Arial, sans-serif;
    color: var(--text, #352d30);
    background: var(--bg, #fff9f4);
    line-height: 1.5
}

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

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    text-align: start
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand strong,
.login-brand strong,
.stats strong,
.brand-mark,
.company-icon,
.error-card h1 {
    font-family: 'Siya Rabar', 'Siya Calibri', sans-serif !important
}

/* ==========================================================================
   2. CORE SHELL LAYOUT (SCOPED SIDEBAR & STANDALONE SUPPORT)
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-block: 0;
    inset-inline-start: 0;
    width: 260px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: #fffdfb;
    border-inline-end: 1px solid #f0e4e3;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0
}

.sidebar-header {
    flex: 0 0 auto;
    padding: 18px 16px 14px;
    border-bottom: 1px solid #f2e7e6;
    background: #fffdfb;
    box-sizing: border-box
}

.sidebar-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0
}

.sidebar-header .brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary, #d96c91), #efacc0);
    display: grid;
    place-items: center;
    color: #fff;
    font: italic 20px 'DM Serif Display';
    box-shadow: 0 4px 14px #d96c9133;
    flex-shrink: 0
}

.brand-text strong {
    font-size: 15px;
    color: #382d31;
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.brand-text small {
    font-size: 11px;
    color: #8b7f83;
    display: block;
    margin-top: 2px
}

.sidebar-nav {
    flex: 1 1 0px;
    height: 0;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 10px 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #e2cad0 #faf3f5
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
    display: block
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #faf3f5;
    border-radius: 4px
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #e2cad0;
    border-radius: 4px
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #cfb2b9
}

.nav-label {
    font-size: 10.5px;
    letter-spacing: 1.2px;
    color: #a79a9d;
    margin: 16px 12px 4px;
    text-transform: uppercase;
    font-weight: 700;
    user-select: none;
    line-height: 1.2
}

.sidebar-nav>p.nav-label:first-child {
    margin-top: 4px
}

.sidebar-nav a,
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 9px;
    color: #6b5d62;
    font-size: 13px;
    font-weight: 500;
    min-height: 38px;
    height: 38px;
    transition: background .15s ease, color .15s ease;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.sidebar-nav a:hover,
.sidebar-nav .nav-link:hover {
    background: #fff3f6;
    color: var(--accent, #b85578)
}

.sidebar-nav a.active,
.sidebar-nav .nav-link.active {
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578);
    font-weight: 700;
    border-inline-start: 4px solid var(--accent, #b85578);
    box-shadow: inset 0 0 0 1px rgba(184, 85, 120, 0.12)
}

.sidebar-nav .nav-icon {
    font-size: 14px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    line-height: 1
}

.sidebar-footer,
.sidebar-foot {
    flex: 0 0 auto;
    border-top: 1px solid #f1e7e6;
    padding: 12px 16px;
    background: #fffdfb;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box
}

.sidebar-footer .avatar,
.sidebar-foot .avatar,
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #d96c91), #efacc0);
    color: #fff;
    display: grid;
    place-items: center;
    font: 600 13px 'Siya Calibri', sans-serif;
    flex-shrink: 0
}

.sidebar-footer .user-meta,
.sidebar-foot .user-meta {
    min-width: 0;
    flex: 1
}

.sidebar-footer strong,
.sidebar-foot strong {
    font-size: 13px;
    color: #382d31;
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.sidebar-footer small,
.sidebar-foot small {
    font-size: 11px;
    color: #8b7f83;
    display: block;
    margin-top: 1px
}

/* Standalone main: no sidebar offset by default */
main {
    margin-inline: auto;
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box
}

/* Scoped sidebar offset: only when sidebar is actually present */
aside.sidebar~main,
.app-layout main {
    margin-inline-start: 260px;
    width: calc(100% - 260px);
    min-height: 100vh
}

.topbar {
    min-height: 78px;
    padding: 14px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f0e4e3;
    background: #fffdfbcc;
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000
}

.topbar h1 {
    font-size: 24px;
    margin: 2px 0 0;
    font-weight: 700
}

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

.content {
    padding: 28px 36px 60px;
    max-width: 1600px;
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box
}

.menu-button,
.nav-toggle,
.scrim {
    display: none
}

.hero {
    background: linear-gradient(120deg, #fff 0%, #fff5f5 60%, #f7dce6 100%);
    border: 1px solid #f3e2e2;
    border-radius: var(--radius, 18px);
    padding: 35px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 14px 40px #8c56620c
}

.eyebrow {
    color: var(--accent, #b85578);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase
}

.hero h2,
.page-intro h2 {
    font-size: 32px;
    margin: 9px 0 5px
}

.hero p,
.page-intro p,
.card-head p,
.section-title p,
.preview-card p {
    color: #877a7e;
    margin: 5px 0 0;
    font-size: 13px
}

.hero-flower {
    font-size: 72px;
    color: #d77c9c;
    opacity: .5
}

/* ==========================================================================
   3. UNIFIED BUTTON SYSTEM (.button, .btn, .primary, .secondary, .ghost, .danger)
   ========================================================================== */
.button,
.btn,
.primary,
.ghost,
.secondary,
.danger,
.actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    min-height: 40px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    font-family: inherit;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease
}

/* Primary */
.primary,
.button.primary,
.btn-primary,
.button:not(.secondary):not(.ghost):not(.danger):not(.table-action):not(.remove-row-btn) {
    color: #fff;
    background: var(--primary, #d96c91);
    border-color: var(--primary, #d96c91);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary, #d96c91) 28%, transparent)
}

.primary:hover,
.button.primary:hover,
.btn-primary:hover,
.button:not(.secondary):not(.ghost):not(.danger):not(.table-action):not(.remove-row-btn):hover {
    background: var(--accent, #b85578);
    border-color: var(--accent, #b85578);
    color: #fff
}

/* Secondary */
.secondary,
.button.secondary,
.btn-secondary,
.actions a {
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578);
    border-color: #ebd2dc;
    box-shadow: none
}

.secondary:hover,
.button.secondary:hover,
.btn-secondary:hover,
.actions a:hover {
    background: #f0cdd8;
    border-color: #e5bfcc;
    color: var(--accent, #b85578)
}

/* Ghost */
.ghost,
.button.ghost,
.btn-ghost {
    color: #675b5f;
    background: #fff;
    border-color: #eadedd;
    box-shadow: 0 1px 3px #00000008
}

.ghost:hover,
.button.ghost:hover,
.btn-ghost:hover {
    background: #fff8fa;
    border-color: #dcc8cd;
    color: var(--accent, #b85578)
}

/* Danger */
.danger,
.button.danger,
.btn-danger,
.danger-link,
.variant-remove,
.remove-row-btn {
    background: #fbe2e5;
    color: #a94e5c;
    border-color: #f3ccd2
}

.danger:hover,
.button.danger:hover,
.btn-danger:hover,
.danger-link:hover,
.variant-remove:hover,
.remove-row-btn:hover {
    background: #f8ccd2;
    border-color: #eaafb8;
    color: #8e3643
}

/* Button Sizing */
.small,
.button.small,
.btn-sm {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 9px;
    gap: 5px
}

.large,
.button.large,
.btn-lg {
    min-height: 48px;
    padding: 13px 24px;
    font-size: 15px;
    border-radius: 14px
}

.wide,
.button.wide,
.btn-block {
    width: 100%
}

/* Button States */
.button:focus-visible,
.btn:focus-visible,
.primary:focus-visible,
.ghost:focus-visible,
.secondary:focus-visible {
    outline: 2px solid var(--primary, #d96c91);
    outline-offset: 2px
}

.button:active,
.btn:active,
.primary:active,
.ghost:active,
.secondary:active {
    transform: translateY(1px)
}

.button:disabled,
.btn:disabled,
.primary:disabled,
.ghost:disabled,
.secondary:disabled,
.button[disabled],
.btn[disabled],
.primary[disabled],
.ghost[disabled],
.secondary[disabled],
.button.disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none
}

/* ==========================================================================
   4. GRID UTILITIES SYSTEM (.grid, .grid-2, .grid-3, .col-3, .grid-4, .span-2)
   ========================================================================== */
.grid {
    display: grid;
    gap: 16px
}

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

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

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

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px
}

.span-2 {
    grid-column: span 2
}

.span-3 {
    grid-column: span 3
}

.span-full {
    grid-column: 1/-1
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0
}

/* ==========================================================================
   5. FORMS FOUNDATION
   ========================================================================== */
.form-card {
    padding: 28px
}

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

.form-grid label,
.field label,
.stack label,
.license-row label,
label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #675b5f;
    min-width: 0
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.field input,
.field select,
.field textarea,
.stack input,
.stack select,
.stack textarea,
.form-card input,
.form-card select,
.form-card textarea,
.license-row input,
.license-row select {
    width: 100%;
    height: 42px;
    min-width: 0;
    border: 1px solid #e4d7d5;
    border-radius: 11px;
    padding: 9px 13px;
    background: #fffcfb;
    color: #41383b;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease
}

.form-grid textarea,
.field textarea,
.stack textarea,
.form-card textarea {
    height: auto;
    min-height: 85px;
    padding: 10px 13px;
    resize: vertical;
    line-height: 1.5
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.stack input:focus,
.stack select:focus,
.stack textarea:focus,
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--primary, #d96c91);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d96c91) 14%, transparent);
    background: #fff
}

.form-grid input:disabled,
.form-grid select:disabled,
.form-grid textarea:disabled,
.field input:disabled,
.field select:disabled,
.field textarea:disabled,
input[readonly],
textarea[readonly] {
    background: #f9f2f0;
    color: #8b7f83;
    cursor: not-allowed;
    border-color: #ebdcdb
}

.req,
span.req {
    color: #a94e5c;
    margin-inline-start: 3px;
    font-weight: 700
}

.check,
label.checkbox,
.filter-check {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #55494d
}

.check input,
label.checkbox input,
.filter-check input {
    width: 18px !important;
    height: 18px !important;
    accent-color: var(--primary, #d96c91);
    margin: 0 !important;
    cursor: pointer
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    flex-wrap: wrap
}

.section-title {
    padding: 7px 0 3px;
    border-bottom: 1px solid #f0e5e3
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.stack-lg {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.help-text,
.field-help,
small.help {
    font-size: 11px;
    color: #8c7e83;
    margin-top: 4px;
    line-height: 1.4
}

.field-error,
.invalid-feedback {
    font-size: 11px;
    color: #a94e5c;
    font-weight: 600;
    margin-top: 4px
}

/* System-generated fields (SKU / Barcode) */
.system-field {
    position: relative
}

.system-field span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%
}

.auto-badge,
.auto-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent, #b85578);
    background: var(--secondary, #f6dce5);
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .3px
}

.system-field input[readonly] {
    background: #fdf6f8;
    border-color: #ebd4db;
    color: #4f3d43;
    font-weight: 600;
    cursor: default
}

/* ==========================================================================
   6. CARDS & STATS FOUNDATION
   ========================================================================== */
.card {
    background: #fff;
    border: 1px solid #f0e5e4;
    border-radius: var(--radius, 18px);
    box-shadow: 0 8px 30px #7046540a;
    overflow: hidden
}

.card-head,
.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap
}

.card-head {
    padding: 20px 24px;
    border-bottom: 1px solid #f3e9e7
}

.card-head h3,
.card-title,
.company-card h3,
.preview-card h3,
.license-company h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #352d30)
}

.page-intro {
    margin-bottom: 24px
}

.page-intro h2 {
    margin-top: 3px
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 22px 0
}

.card.stat,
.stats article {
    background: #fff;
    border: 1px solid #f1e6e5;
    padding: 20px;
    border-radius: var(--radius, 18px);
    position: relative;
    box-shadow: 0 8px 30px #7344540a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 112px;
    min-width: 0
}

.card.stat .label,
.stats article span {
    font-size: 12px;
    color: #887b80;
    line-height: 1.35;
    padding-inline-end: 36px
}

.card.stat strong,
.stats article strong {
    font-size: 28px;
    line-height: 1.1;
    margin-top: 8px;
    color: var(--text, #352d30)
}

.card.stat i,
.stats article i {
    position: absolute;
    inset-inline-end: 16px;
    inset-block-start: 18px;
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578);
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 14px
}

/* ==========================================================================
   7. BADGES FOUNDATION
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 5px 9px;
    border-radius: 20px;
    line-height: 1;
    background: #f1e9ea;
    color: #6d5e63;
    white-space: nowrap
}

.badge.active,
.badge.success,
.badge.posted,
.badge.completed,
.badge.approved,
.badge.delivered,
.badge.in_stock,
.stock-badge.in {
    color: #2d7a4a;
    background: #e4f5ec
}

.badge.trial,
.badge.expiring,
.badge.warning,
.badge.pending,
.badge.processing,
.badge.low,
.badge.low_stock,
.stock-badge.low {
    color: #9c7136;
    background: #fff0d4
}

.badge.expired,
.badge.suspended,
.badge.inactive,
.badge.cancelled,
.badge.danger,
.badge.error,
.badge.out,
.badge.out_of_stock,
.stock-badge.out {
    color: #a94e5c;
    background: #fbe2e5
}

.badge.info,
.badge.draft,
.badge.unposted {
    color: #4a689e;
    background: #e9eff9
}

.badge.neutral {
    color: #675b5f;
    background: #f1e8ea
}

/* ==========================================================================
   8. TABLES FOUNDATION & COLUMN PRIORITIES
   ========================================================================== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px
}

th,
td {
    text-align: start;
    padding: 14px 20px;
    border-bottom: 1px solid #f3eae8;
    font-size: 13px;
    vertical-align: middle
}

th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .75px;
    font-weight: 700;
    color: #9a8d90;
    background: #fffcfb
}

tbody tr:hover {
    background: #fffafa
}

tbody tr:last-child td {
    border-bottom: 0
}

.empty {
    text-align: center;
    padding: 38px;
    color: #978a8e
}

@media(max-width:900px) {
    .col-wholesale {
        display: none
    }
}

/* Deployment Center: explicit local-backup storage indicator. */
.backup-location {
    background: #f4fbf8;
    border: 1px solid #d7eee3;
    border-radius: 10px;
    margin: 0 0 15px;
    padding: 10px
}

.backup-location span {
    color: #397461;
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 4px
}

.backup-location code {
    color: #4b5e57;
    direction: ltr;
    display: block;
    font-size: 10px;
    overflow: auto;
    text-align: left;
    white-space: nowrap
}

@media(max-width:640px) {

    .col-category,
    .col-reason,
    .col-user,
    .col-date,
    .col-items {
        display: none
    }
}

/* ==========================================================================
   9. NOTICES & ALERTS
   ========================================================================== */
.notice,
.security-banner {
    padding: 14px 17px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 13px
}

.notice.success {
    background: #e4f4eb;
    color: #31704f
}

.notice.error {
    background: #fbe5e7;
    color: #a34351
}

.security-banner {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #fff0d4;
    color: #765429
}

.security-banner strong {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px
}

/* ==========================================================================
   10. COMPANY & OWNER MODULE COMPONENTS
   ========================================================================== */
.company-card {
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px
}

.company-card p {
    font-size: 12px;
    color: #8c7f83;
    margin: 5px 0
}

.company-meta {
    grid-column: 1/-1;
    display: flex;
    gap: 35px;
    background: #fff9f7;
    padding: 15px;
    border-radius: 12px
}

.company-meta span {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: #918387;
    gap: 5px
}

.company-meta strong {
    color: #51464a
}

.actions {
    grid-column: 1/-1;
    display: flex;
    gap: 8px
}

.actions a {
    flex: 1
}

.appearance-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 20px
}

.preview-card {
    padding: 32px;
    min-height: 280px;
    background: linear-gradient(150deg, #fff 20%, var(--secondary, #f6dce5));
    position: sticky;
    top: 125px;
    align-self: start
}

.preview-card h3 {
    font-size: 30px;
    margin: 15px 0 8px
}

.preview-swatch {
    display: flex;
    margin: 30px 0
}

.preview-swatch span {
    height: 55px;
    flex: 1
}

.preview-swatch span:first-child {
    border-radius: 12px 0 0 12px
}

.preview-swatch span:last-child {
    border-radius: 0 12px 12px 0
}

.color-input {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eadedd;
    border-radius: 11px;
    padding: 7px
}

.color-input input {
    width: 38px;
    height: 30px;
    border: 0;
    padding: 0
}

.color-input code {
    font-size: 11px
}

.license-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(5, 1fr) auto auto;
    gap: 13px;
    align-items: end;
    padding: 20px
}

.license-company {
    display: flex;
    align-items: center;
    gap: 10px
}

.license-company .badge {
    display: inline-block;
    margin-top: 6px
}

/* Company logo & favicon containment */
.brand img {
    width: auto;
    height: 42px;
    max-width: 170px;
    object-fit: contain;
    border-radius: 0
}

.login-brand img {
    width: auto;
    height: 42px;
    max-width: 180px;
    object-fit: contain;
    border-radius: 0
}

.brand-asset-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.brand-asset {
    background: #fff;
    border: 1px solid #f0e4e3;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: .2s
}

.brand-asset-head h4 {
    margin: 0;
    font-size: 14px
}

.brand-asset-head small {
    display: block;
    color: #8b7f83;
    font-size: 11px;
    margin-top: 3px
}

.brand-asset-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    flex: 1
}

.brand-logo-preview {
    width: 100%;
    max-width: 240px;
    height: 150px;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #fff, #fff5f7);
    border: 1px dashed #e6d3da;
    border-radius: 14px;
    overflow: hidden;
    padding: 12px
}

.brand-favicon-preview {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #fff, #fff5f7);
    border: 1px dashed #e6d3da;
    border-radius: 16px;
    overflow: hidden;
    padding: 10px
}

.brand-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0
}

.brand-favicon-preview img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0
}

.brand-preview-fallback,
.brand-logo-preview>span,
.brand-favicon-preview>span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--accent, #b85578);
    font: italic 38px 'DM Serif Display';
    opacity: .45
}

.brand-favicon-preview>span {
    font-size: 24px
}

.brand-asset-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center
}

.brand-file-trigger {
    cursor: pointer;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px
}

.brand-file-trigger input[type=file] {
    display: none
}

.brand-file-trigger:disabled,
.brand-file-trigger input:disabled {
    cursor: not-allowed;
    opacity: .5
}

.brand-remove {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #a94e5c;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 14px;
    border: 1px solid #f0d3d9;
    border-radius: 12px;
    background: #fff;
    transition: .18s
}

.brand-remove input {
    display: none
}

.brand-remove:hover {
    border-color: #e5a9b5;
    background: #fff6f8
}

.brand-remove input:disabled {
    cursor: not-allowed;
    opacity: .5
}

.brand-asset.removing .brand-logo-preview,
.brand-asset.removing .brand-favicon-preview {
    opacity: .35;
    filter: grayscale(1)
}

.brand-remove:has(input:checked) {
    background: #fbe2e5;
    border-color: #e5a9b5
}

/* ==========================================================================
   11. AUTHENTICATION & LOGIN PAGES
   ========================================================================== */
.login-page {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #fff9f4, #f9e2e7);
    overflow: hidden;
    position: relative
}

.login-shell {
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    max-width: 1250px;
    padding: 60px;
    position: relative;
    z-index: 2
}

.login-welcome {
    padding: 60px
}

.login-welcome h1 {
    font-size: 52px;
    line-height: 1.08;
    margin: 20px 0;
    color: #413337
}

.login-welcome h1 em {
    color: #c46083
}

.login-welcome>p {
    font-size: 16px;
    color: #7e6d72;
    line-height: 1.7;
    max-width: 550px
}

.quote {
    margin-top: 50px;
    padding: 20px 24px;
    border-inline-start: 3px solid #d8819f;
    color: #79676c;
    font: italic 17px Georgia
}

.login-card {
    background: #fffdfbe8;
    backdrop-filter: blur(16px);
    padding: 45px;
    border: 1px solid #fff;
    border-radius: 28px;
    box-shadow: 0 30px 80px #a7627830;
    max-width: 460px;
    width: 100%;
    justify-self: center
}

.login-card h2 {
    font-size: 28px;
    margin: 35px 0 8px
}

.login-card>p {
    color: #897b7f;
    font-size: 13px;
    margin-bottom: 26px
}

.secure-note {
    display: block;
    text-align: center;
    color: #9b8e91;
    margin-top: 22px
}

.login-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px)
}

.login-decor.one {
    width: 420px;
    height: 420px;
    background: #edb7c56b;
    inset-inline-start: -130px;
    top: -140px
}

.login-decor.two {
    width: 300px;
    height: 300px;
    background: #fff1c7;
    inset-inline-end: -70px;
    bottom: -100px
}

.login-links {
    margin-top: 1.1rem;
    display: flex;
    gap: .6rem;
    justify-content: center;
    flex-wrap: wrap
}

.login-language {
    position: fixed;
    inset-block-start: 24px;
    inset-inline-end: 28px;
    z-index: 5
}

.login-card .login-submit {
    margin-top: 6px;
    min-height: 50px;
    box-shadow: 0 10px 20px color-mix(in srgb, var(--primary, #d96c91) 24%, transparent)
}

.login-card .login-submit span {
    font-size: 18px;
    line-height: 1
}

/* ==========================================================================
   12. MULTILINGUAL & BIDIRECTIONAL LOGICAL FOUNDATION
   ========================================================================== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #eadedd;
    border-radius: 11px;
    padding: 7px 9px;
    color: var(--accent, #b85578)
}

.language-switcher select {
    border: 0;
    background: transparent;
    color: #675b5f;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    padding: 0 2px
}

.language-checks {
    border: 1px solid #eadedd;
    border-radius: 12px;
    padding: 13px 16px;
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0
}

.language-checks legend {
    font-size: 12px;
    font-weight: 600;
    color: #675b5f;
    padding: 0 6px
}

.error-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff9f4, #f9e2e7)
}

.error-card {
    padding: 45px;
    text-align: center;
    max-width: 460px
}

.error-card h1 {
    font-size: 34px
}

.error-card p {
    color: #7e6d72;
    margin-bottom: 25px
}

/* ==========================================================================
   13. PHASE 2 CATALOG, PRODUCTS & INVENTORY SPECIFICS
   ========================================================================== */
.page-actions,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.filter-bar {
    padding: 15px;
    margin-bottom: 18px
}

.filter-bar input,
.filter-bar select {
    min-width: 180px;
    flex: 1;
    border: 1px solid #e6d9d8;
    border-radius: 11px;
    padding: 11px 13px;
    background: #fffcfb
}

.table-action {
    color: var(--accent, #b85578);
    font-weight: 700
}

.color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #d8cecc;
    vertical-align: middle;
    margin-inline-end: 6px
}

.stock-number {
    font-size: 16px;
    font-weight: 700
}

.stock-in {
    color: #39815e
}

.stock-out {
    color: #a94e5c
}

.inventory-alerts {
    margin-bottom: 22px
}

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

@media (max-width: 1100px) {
    .dashboard-analytics-grid {
        grid-template-columns: 1fr
    }
}

.dashboard-table {
    width: 100%;
    min-width: 440px;
    border-collapse: separate;
    border-spacing: 0
}

.dashboard-table th {
    background: #fbf7f8;
    color: #6d5b62;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid #ecdfe2;
    white-space: nowrap
}

.dashboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f2e7e9;
    vertical-align: middle
}

.dashboard-table tr:hover td {
    background: #fffafa
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2
}

.metric-pill.orders {
    background: #eef7f2;
    color: #246a48;
    border: 1px solid #c9ebd8
}

.metric-pill.views {
    background: #fdf2f6;
    color: var(--primary, #d96c91);
    border: 1px solid #f8d7e2
}

.catalog-stats {
    margin-top: 0
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px
}

.product-thumb,
.product-placeholder {
    width: 46px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
    background: #f9e8ed;
    display: grid;
    place-items: center;
    flex-shrink: 0
}

.mini-tags,
.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px
}

.mini-tag {
    display: inline-flex;
    align-items: center;
    width: max-content;
    font-size: 9px;
    line-height: 1;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .35px;
    padding: 4px 7px;
    border-radius: 20px;
    background: #f6e2e9;
    color: #984f69
}

.mini-tag.offer {
    background: #fff0d4;
    color: #956b2f
}

.form-jump {
    position: sticky;
    top: 78px;
    z-index: 7;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px;
    margin-bottom: 16px;
    background: #fff
}

.form-jump a {
    white-space: nowrap;
    padding: 7px 11px;
    border-radius: 9px;
    background: #fff5f7;
    color: var(--accent);
    font-size: 12px
}

.product-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(145px, 1fr)) auto auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
    margin-bottom: 20px
}

.product-filters label,
.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #675b5f
}

.product-filters input,
.product-filters select,
.filter-bar label input,
.filter-bar label select {
    width: 100%;
    min-width: 0;
    border: 1px solid #e6d9d8;
    border-radius: 11px;
    padding: 11px 12px;
    background: #fffcfb;
    color: #41383b;
    outline: none
}

.product-filters input:focus,
.product-filters select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary, #d96c91);
    box-shadow: 0 0 0 3px #d96c9117
}

.product-filters .filter-check {
    height: 42px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #eadedd;
    border-radius: 11px;
    background: #fff9fa;
    white-space: nowrap
}

.product-filters .filter-check input {
    width: auto;
    margin: 0
}

.catalog-filters {
    align-items: end
}

.catalog-filters label {
    flex: 1;
    min-width: 220px
}

.product-summary {
    min-width: 0
}

.product-summary>strong {
    display: block;
    line-height: 1.35
}

.stock-cell {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap
}

.products-table td:first-child {
    min-width: 230px
}

.product-form-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px
}

.product-form-intro h2 {
    font-size: 30px;
    margin: 5px 0 2px
}

.product-form-intro p {
    margin: 0;
    color: #887b80;
    font-size: 13px
}

.product-intro-actions {
    display: flex;
    gap: 9px;
    flex-shrink: 0
}

.product-section-nav {
    top: 78px;
    margin: 0 0 20px;
    padding: 8px;
    border: 1px solid #eee2e0;
    border-radius: 16px;
    box-shadow: 0 10px 28px #7046540d;
    scrollbar-width: none
}

.product-section-nav::-webkit-scrollbar {
    display: none
}

.product-section-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    background: transparent;
    color: #77696e;
    border: 1px solid transparent;
    border-radius: 11px;
    transition: .18s
}

.product-section-nav a i {
    font-style: normal;
    font: 700 9px Arial;
    color: #b6a8ac
}

.product-section-nav a.active,
.product-section-nav a:hover {
    background: var(--secondary, #f6dce5);
    border-color: #eed4dd;
    color: var(--accent, #b85578)
}

.product-section-nav a.active i {
    color: var(--accent, #b85578)
}

.product-editor {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-bottom: 10px
}

.product-form-section {
    padding: 0;
    overflow: hidden;
    scroll-margin-top: 165px;
    box-shadow: 0 15px 42px #7046540d
}

/* The custom variant colour list must be allowed to float outside its card. */
#variants.product-form-section {
    overflow: visible;
    position: relative;
    z-index: 30
}

#variants .variant-entry,
#variants .variant-entry__rows,
#variants .variant-entry__table,
#variants .variant-entry__table tbody,
#variants .variant-entry__table tr,
#variants .variant-entry__table td {
    overflow: visible
}

.product-section-head {
    padding: 20px 26px;
    border-bottom: 1px solid #f0e5e3;
    background: linear-gradient(100deg, #fff, #fff9f7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.product-section-head>div {
    display: grid;
    grid-template-columns: 38px 1fr;
    column-gap: 12px;
    align-items: center
}

.product-section-head>div>span {
    grid-row: 1/3;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578);
    display: grid;
    place-items: center;
    font: 700 10px Arial
}

.product-section-head h3 {
    font-size: 18px;
    margin: 0
}

.product-section-head p {
    grid-column: 2;
    margin: 3px 0 0;
    color: #8c7e83;
    font-size: 12px
}

.form-subsection {
    padding: 24px 26px
}

.form-subsection+.form-subsection {
    border-top: 1px solid #f2e8e6
}

.form-subsection h4,
.existing-images-title h4 {
    font-size: 13px;
    margin: 0 0 16px;
    color: #5f5357
}

.product-field-grid,
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px
}

.product-field-grid label,
.pricing-grid label,
.variant-fields label,
.translation-card label,
.status-field,
.sort-control {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    color: #6e6166
}

.field-wide {
    grid-column: 1/-1
}

.product-field-grid input,
.product-field-grid select,
.pricing-grid input,
.pricing-grid select,
.variant-fields input,
.variant-fields select,
.translation-card input,
.translation-card textarea,
.status-field select,
.sort-control input {
    width: 100%;
    height: 42px;
    min-width: 0;
    border: 1px solid #e4d7d5;
    border-radius: 11px;
    padding: 9px 12px;
    background: #fffcfb;
    color: #41383b;
    outline: none;
    transition: .18s
}

.translation-card textarea {
    height: auto;
    min-height: 95px;
    resize: vertical;
    line-height: 1.6;
    background: #fff;
    border: 1px solid #e0d2d0;
    border-radius: 11px;
    padding: 11px 13px;
    color: #41383b;
    box-shadow: inset 0 2px 4px #70465408
}

.translation-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px
}

.translation-card {
    padding: 18px;
    background: #fffaf9;
    border: 1px solid #eee1df;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 14px
}

.translation-card header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee4e2
}

.translation-card header span {
    font: 700 9px Arial;
    padding: 4px 7px;
    border-radius: 7px;
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578)
}

.translation-card header strong {
    font-size: 12px
}

.pricing-grid {
    padding: 24px 26px;
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.money-field>div {
    position: relative
}

.money-field>div input {
    padding-inline-end: 58px
}

.money-field>div span {
    position: absolute;
    inset-inline-end: 12px;
    inset-block-start: 50%;
    transform: translateY(-50%);
    padding-inline-start: 9px;
    border-inline-start: 1px solid #e4d7d5;
    color: #a09296;
    font: 700 9px Arial
}

/* Variants Matrix */
.variant-list {
    padding: 20px 24px;
    gap: 18px;
    background: #fffdfc
}

.variant-row {
    display: block;
    padding: 0;
    border: 1px solid #eadcda;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 20px #70465408;
    overflow: hidden;
    margin-bottom: 16px
}

.variant-row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #fff8f8;
    border-bottom: 1px solid #f0e4e2
}

.variant-row-head>div {
    display: flex;
    align-items: center;
    gap: 9px
}

.variant-number {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578);
    font: 700 10px Arial
}

.variant-row-head strong {
    font-size: 13px
}

.variant-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    padding: 18px 20px
}

.variant-fields input,
.variant-fields select {
    height: 40px;
    padding: 8px 10px
}

.add-variant {
    white-space: nowrap
}

/* Images manager */
.upload-zone {
    margin: 24px 26px;
    padding: 28px 20px;
    border: 2px dashed #dcb9c4;
    border-radius: 16px;
    background: linear-gradient(120deg, #fffafa, #fff5f7);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 7px;
    color: #6f6065;
    cursor: pointer;
    transition: .18s
}

.upload-zone:hover {
    border-color: var(--primary, #d96c91);
    background: #fff3f6
}

.upload-zone .upload-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578);
    font-size: 22px
}

.upload-zone strong {
    font-size: 14px
}

.upload-zone small {
    font-size: 11px;
    color: #998b90
}

.upload-zone input {
    margin-top: 7px;
    width: auto;
    max-width: 100%;
    font-size: 12px
}

.existing-images-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 26px 14px
}

.existing-images-title h4 {
    margin: 0
}

.existing-images-title span {
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #f2e6e9;
    color: #8e6070;
    display: grid;
    place-items: center;
    font-size: 10px
}

.image-manager {
    padding: 0 26px 26px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    display: grid
}

.image-manager .image-card {
    padding: 0;
    border: 1px solid #e9dcda;
    border-radius: 15px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 6px 20px #70465408
}

.image-card.is-main {
    border-color: var(--primary, #d96c91);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #d96c91) 14%, transparent)
}

.image-preview {
    height: 170px;
    padding: 8px;
    background: #f7f1f0;
    position: relative
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px
}

.image-preview>span {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    padding: 5px 8px;
    border-radius: 10px;
    background: var(--primary, #d96c91);
    color: #fff;
    font-size: 9px;
    font-weight: 700
}

.image-card-controls {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center
}

.main-image-choice {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: #675b5f
}

.main-image-choice input {
    accent-color: var(--primary, #d96c91)
}

.sort-control {
    grid-template-columns: auto 54px;
    flex-direction: row;
    align-items: center
}

.sort-control input {
    height: 34px;
    padding: 6px
}

/* Inventory bridge & publishing */
.inventory-callout {
    margin: 22px 26px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid #eadfdc;
    border-radius: 15px;
    background: #fffaf7
}

.inventory-symbol {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #f4e6e9;
    color: var(--accent, #b85578);
    display: grid;
    place-items: center;
    font-size: 20px
}

.inventory-callout strong {
    font-size: 13px
}

.inventory-callout p {
    font-size: 12px;
    color: #887b80;
    margin: 4px 0 0
}

.publishing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 24px 26px
}

.status-field {
    padding: 16px;
    border: 1px solid #e9dcda;
    border-radius: 14px;
    background: #fffaf9
}

.status-field select {
    margin-top: auto
}

.toggle-card {
    min-height: 100px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e9dcda;
    border-radius: 14px;
    background: #fff;
    cursor: pointer
}

.toggle-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.toggle-card>i {
    width: 40px;
    height: 23px;
    border-radius: 14px;
    background: #d8cccf;
    position: relative;
    transition: .18s
}

.toggle-card>i:after {
    content: '';
    position: absolute;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    inset-block-start: 3px;
    inset-inline-start: 3px;
    box-shadow: 0 2px 5px #49353d2e;
    transition: .18s
}

.toggle-card input:checked+i {
    background: var(--primary, #d96c91)
}

.toggle-card input:checked+i:after {
    transform: translateX(17px)
}

[dir=rtl] .toggle-card input:checked+i:after {
    transform: translateX(-17px)
}

.toggle-card span {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.toggle-card strong {
    font-size: 12px
}

.toggle-card small {
    font-size: 10px;
    color: #92858a;
    line-height: 1.4
}

.toggle-card:has(input:checked) {
    border-color: #e3beca;
    background: #fff8fa
}

.product-action-bar {
    position: sticky;
    bottom: 12px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 18px;
    background: #fffdfbf2;
    backdrop-filter: blur(12px);
    border: 1px solid #e9dcd9;
    border-radius: 16px;
    box-shadow: 0 15px 45px #49343c25
}

.product-action-bar>div:first-child {
    display: flex;
    flex-direction: column
}

.product-action-bar strong {
    font-size: 13px
}

.product-action-bar small {
    font-size: 10px;
    color: #95878b;
    margin-top: 2px
}

.product-action-bar>div:last-child {
    display: flex;
    gap: 8px
}

/* Variant warehouse stock cards */
.variant-warehouse-section {
    margin-top: 14px;
    padding: 16px 20px;
    border-top: 1px solid #f0e4e2
}

.warehouse-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px
}

.warehouse-section-head span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--secondary, #f6dce5);
    color: var(--accent, #b85578);
    font-size: 13px
}

.warehouse-section-head strong {
    font-size: 12px;
    color: #5f5357
}

.warehouse-section-head small {
    font-size: 10px;
    color: #92858a;
    margin-inline-start: auto
}

.warehouse-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px
}

.warehouse-stock-card {
    padding: 12px 14px;
    border: 1px solid #eee1df;
    border-radius: 13px;
    background: #fffaf9;
    transition: .18s
}

.warehouse-stock-card:hover {
    border-color: #e0d0cd;
    box-shadow: 0 4px 14px #7046540a
}

.warehouse-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f2e8e6
}

.warehouse-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0
}

.warehouse-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #f7e8ed;
    font-size: 15px;
    flex-shrink: 0
}

.warehouse-info strong {
    display: block;
    font-size: 12px;
    color: #41383b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.warehouse-info small {
    display: block;
    font-size: 10px;
    color: #92858a;
    margin-top: 1px
}

.stock-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0
}

.stock-badge.in {
    background: #e6f5ec;
    color: #2d7a4a
}

.stock-badge.low {
    background: #fff3d6;
    color: #956b2f
}

.stock-badge.out {
    background: #fbe2e5;
    color: #a94e5c
}

.warehouse-card-body label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #6e6166
}

.warehouse-card-body input {
    width: 100%;
    height: 38px;
    border: 1px solid #e4d7d5;
    border-radius: 9px;
    padding: 7px 10px;
    background: #fff;
    color: #41383b;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: .18s
}

.warehouse-card-body input:focus {
    border-color: var(--primary, #d96c91);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d96c91) 13%, transparent)
}

.warehouse-card-body input[readonly] {
    background: #f9f2f0;
    color: #8b7f83;
    cursor: not-allowed
}

.warehouse-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 20px;
    color: #92858a;
    font-size: 12px
}

/* Orders details layout */
.orders-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    align-items: start
}

.order-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0 4px;
    border-top: 1px solid #f2e8e6;
    margin-top: 12px;
    font-size: 12px
}

.order-totals>div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #6e6166
}

.order-totals>div.total {
    font-size: 15px;
    font-weight: 700;
    color: #41383b;
    border-top: 1px solid #f2e8e6;
    padding-top: 10px
}

.order-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.order-info-list>div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
    font-size: 12px
}

.order-info-list span {
    color: #8b7f83
}

.order-info-list b {
    color: #41383b;
    font-weight: 600;
    word-break: break-word
}

.status-update {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f2e8e6
}

.status-update label {
    font-size: 10px;
    font-weight: 700;
    color: #6e6166
}

.status-update select,
.status-update input {
    height: 40px;
    border: 1px solid #e4d7d5;
    border-radius: 10px;
    padding: 8px 12px;
    background: #fff;
    outline: none
}

.order-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0
}

.order-timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
    padding: 0 0 18px 4px
}

.order-timeline-item i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--primary, #d96c91);
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
    z-index: 1
}

.order-timeline-item:not(:last-child):before {
    content: '';
    position: absolute;
    inset-inline-start: 9px;
    top: 15px;
    bottom: 0;
    width: 2px;
    background: #f2e8e6
}

.order-timeline-item strong {
    display: block;
    font-size: 12px;
    color: #41383b
}

.order-timeline-item span {
    font-size: 10px;
    color: #92858a
}

.order-timeline-item p {
    margin: 4px 0 0;
    font-size: 11px;
    color: #6e6166;
    background: #fbf5f3;
    border-radius: 8px;
    padding: 6px 9px
}

/* ==========================================================================
   14. RESPONSIVE BREAKPOINT FOUNDATION (1180px, 1024px, 800px, 600px, 480px)
   ========================================================================== */
@media(min-width:1500px) {
    .variant-fields {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }
}

@media(max-width:1180px) {
    .stats {
        grid-template-columns: repeat(3, 1fr)
    }

    .cards {
        grid-template-columns: repeat(2, 1fr)
    }

    .license-row {
        grid-template-columns: 1fr 1fr 1fr
    }

    .license-company {
        grid-column: 1/-1
    }

    .login-welcome {
        padding: 25px
    }

    .login-welcome h1 {
        font-size: 46px
    }

    .translation-cards {
        grid-template-columns: 1fr
    }

    .translation-card {
        display: grid;
        grid-template-columns: 1fr 1fr
    }

    .translation-card header {
        grid-column: 1/-1
    }

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

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

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

    .product-filters {
        grid-template-columns: repeat(3, minmax(180px, 1fr)) auto
    }

    .product-search {
        grid-column: span 2
    }
}

@media(max-width:1024px) {

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

@media(max-width:900px) {
    .orders-detail-grid {
        grid-template-columns: 1fr
    }

    .product-filters {
        grid-template-columns: repeat(2, minmax(170px, 1fr))
    }

    .product-search {
        grid-column: span 2
    }

    .stats article {
        min-height: 108px
    }
}

@media(max-width:800px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .sidebar {
        transform: translateX(-100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform .25s ease, visibility .25s ease;
    }

    [dir="rtl"] .sidebar {
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
    }

    .nav-toggle:checked~.sidebar {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-toggle:checked~.scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: #2c202788;
        z-index: 1040
    }

    .menu-button {
        display: block;
        font-size: 20px;
        cursor: pointer
    }

    .topbar {
        min-height: 68px;
        padding: 12px 18px
    }

    .topbar h1 {
        font-size: 21px
    }

    .topbar>.page-heading {
        margin-inline-end: auto;
        margin-inline-start: 12px;
        min-width: 0
    }

    .topbar>.topbar-actions {
        margin: 0;
        gap: 6px
    }

    .content {
        padding: 12px 10px 40px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    aside.sidebar~main,
    .app-layout main {
        margin-inline-start: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .card {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .pos-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .pos-layout-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .pos-left-column,
    .pos-right-column {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .pos-cart-card,
    .pos-recent-sales-card {
        overflow: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }

    .grid-2,
    .grid-3,
    .col-3,
    .grid-4 {
        grid-template-columns: 1fr
    }

    .span-2,
    .span-3 {
        grid-column: auto
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .stats {
        grid-template-columns: repeat(2, 1fr)
    }

    .hero {
        padding: 24px
    }

    .hero h2,
    .page-intro h2 {
        font-size: 26px
    }

    .hero-flower {
        display: none
    }

    .cards {
        grid-template-columns: 1fr
    }

    .appearance-layout {
        grid-template-columns: 1fr
    }

    .preview-card {
        position: static
    }

    .license-row {
        grid-template-columns: 1fr 1fr
    }

    .login-shell {
        grid-template-columns: 1fr;
        padding: 25px;
        align-content: center
    }

    .login-welcome {
        display: none
    }

    .login-card {
        padding: 32px
    }

    .page-intro {
        align-items: flex-start
    }

    .security-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px
    }

    .product-form-intro {
        align-items: flex-start
    }

    .product-section-nav {
        top: 68px
    }

    .product-section-nav a {
        padding: 8px 11px
    }

    .product-section-nav a i {
        display: none
    }

    .product-form-section {
        scroll-margin-top: 140px
    }

    .product-field-grid {
        grid-template-columns: 1fr
    }

    .field-wide {
        grid-column: auto
    }

    .translation-card {
        display: flex
    }

    .pricing-grid {
        grid-template-columns: 1fr 1fr
    }

    .variant-fields {
        grid-template-columns: 1fr 1fr
    }

    .publishing-grid {
        grid-template-columns: 1fr 1fr
    }

    .inventory-callout {
        grid-template-columns: auto 1fr
    }

    .inventory-callout>a {
        grid-column: 1/-1
    }

    .product-action-bar {
        bottom: 8px
    }

    .warehouse-stock-grid {
        grid-template-columns: 1fr 1fr
    }

    .brand-asset-card {
        grid-template-columns: 1fr
    }

    .brand-logo-preview {
        height: 130px
    }

    .page-actions>* {
        flex: 1
    }

    .form-jump {
        top: 68px
    }

    .variant-row {
        grid-template-columns: 1fr 1fr
    }

    .inventory-alerts {
        margin-bottom: 18px
    }
}

@media(max-width:600px) {
    .product-filters {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 12px
    }

    .product-search {
        grid-column: auto
    }

    .product-filters .filter-check,
    .product-filters button {
        width: 100%
    }

    .catalog-filters label {
        min-width: 100%
    }

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

    .stats article {
        padding: 16px;
        padding-inline-end: 30px;
        min-height: 105px
    }

    .stats span {
        min-height: 0
    }

    .image-manager {
        grid-template-columns: 1fr
    }

    .product-form-intro {
        flex-direction: column
    }

    .product-intro-actions {
        width: 100%
    }

    .product-intro-actions>* {
        flex: 1
    }

    .product-section-nav {
        margin-inline: -4px;
        border-radius: 12px
    }

    .product-section-nav a span {
        font-size: 11px
    }

    .product-section-head {
        padding: 16px 18px
    }

    .product-section-head>div {
        grid-template-columns: 33px 1fr
    }

    .product-section-head>div>span {
        width: 33px;
        height: 33px
    }

    .product-section-head p {
        line-height: 1.45
    }

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

    .action-head .add-variant {
        width: 100%
    }

    .form-subsection,
    .pricing-grid {
        padding: 18px 16px
    }

    .pricing-grid,
    .variant-fields,
    .publishing-grid {
        grid-template-columns: 1fr
    }

    .variant-list {
        padding: 14px 16px
    }

    .variant-fields {
        padding: 14px 16px
    }

    .variant-row-head {
        padding: 10px 14px
    }

    .upload-zone {
        margin: 18px 16px;
        padding: 22px 14px
    }

    .existing-images-title {
        margin-inline: 16px
    }

    .image-manager {
        padding: 0 16px 20px;
        grid-template-columns: 1fr
    }

    .image-preview {
        height: 200px
    }

    .inventory-callout {
        margin: 18px 16px;
        grid-template-columns: 1fr;
        text-align: center
    }

    .inventory-symbol {
        margin: auto
    }

    .inventory-callout>a {
        grid-column: auto
    }

    .publishing-grid {
        padding: 18px 16px
    }

    .toggle-card {
        min-height: 85px
    }

    .product-action-bar {
        margin-inline: -4px;
        padding: 10px
    }

    .product-action-bar>div:first-child {
        display: none
    }

    .product-action-bar>div:last-child {
        width: 100%
    }

    .product-action-bar>div:last-child>* {
        flex: 1
    }

    .product-action-bar .primary {
        min-width: 0
    }

    .order-info-list>div {
        grid-template-columns: 1fr;
        gap: 2px
    }
}

@media(max-width:480px) {
    .topbar {
        gap: 7px
    }

    .topbar>.page-heading {
        margin-inline-start: 6px
    }

    .topbar .page-heading small {
        display: none
    }

    .topbar h1 {
        max-width: 140px;
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .topbar-actions {
        gap: 4px
    }

    .language-switcher select {
        max-width: 70px
    }

    .login-language {
        inset-block-start: 14px;
        inset-inline-end: 15px
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 9px
    }

    .stats article {
        padding: 14px
    }

    .stats strong {
        font-size: 24px
    }

    .topbar form .ghost {
        padding: 9px;
        font-size: 0
    }

    .topbar form .ghost:after {
        content: '↪';
        font-size: 17px
    }

    [dir="rtl"] .topbar form .ghost:after {
        transform: scaleX(-1);
        display: inline-block
    }

    .card-head,
    .page-intro {
        flex-direction: column;
        align-items: stretch
    }

    .form-card {
        padding: 18px
    }

    .license-row {
        grid-template-columns: 1fr
    }

    .company-card {
        grid-template-columns: auto 1fr
    }

    .company-card>.badge {
        grid-column: 1/-1;
        width: max-content
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 20px
    }

    .login-card h2 {
        font-size: 24px
    }

    .login-shell {
        padding: 16px
    }

    .company-meta {
        gap: 15px
    }

    .filter-bar>* {
        min-width: 100% !important;
        width: 100%
    }

    .variant-row {
        grid-template-columns: 1fr
    }

    .warehouse-stock-grid {
        grid-template-columns: 1fr
    }

    .variant-warehouse-section {
        padding: 14px
    }

    .form-actions {
        flex-wrap: wrap
    }

    .form-actions>* {
        flex: 1
    }

    .form-actions .button,
    .login-card .button {
        width: 100%
    }

    table .button,
    table a.button,
    .topbar-actions .button,
    .topbar-actions .ghost,
    .topbar-actions form button {
        width: auto
    }

    .page-actions .button,
    .page-actions a {
        width: auto
    }
}

/* ==========================================================================
   15. ACCOUNTING & FINANCIAL UI SYSTEM (PHASE 7 / BATCH 5)
   ========================================================================== */
.ac-voucher-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px
}

.ac-voucher-desc {
    grid-column: 1/-1
}

.ac-entries-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0
}

.ac-entries-table th {
    background: #fbf7f8;
    color: #6d5b62;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid #ecdfe2
}

.ac-entries-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f2e7e9;
    vertical-align: middle
}

.ac-entries-table tr:hover td {
    background: #fffafa
}

.ac-money-input {
    width: 100%;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    text-align: end;
    direction: ltr;
    font-weight: 600;
    padding: 9px 12px;
    border: 1px solid #e3d5d8;
    border-radius: 10px;
    background: #fffcfd;
    color: #352d30;
    transition: border-color .15s, box-shadow .15s, background .15s
}

.ac-money-input:focus {
    border-color: var(--primary, #d96c91);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d96c91) 15%, transparent);
    outline: none
}

.ac-debit-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15)
}

.ac-credit-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15)
}

.ac-select,
.ac-text-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e3d5d8;
    border-radius: 10px;
    background: #fffcfd;
    color: #352d30;
    font-size: 13px;
    outline: none;
    transition: .15s
}

.ac-select:focus,
.ac-text-input:focus {
    border-color: var(--primary, #d96c91);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d96c91) 15%, transparent)
}

.ac-btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #c25367;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s
}

.ac-btn-remove:hover {
    background: #fde8ec;
    border-color: #f6c0cc;
    color: #a8243e
}

.ac-balance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fffcfb, #fef7f9);
    border: 1px solid #ebd9de;
    border-radius: 14px;
    margin-top: 14px;
    align-items: center
}

.ac-stat-box {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.ac-stat-box .ac-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: #837278;
    text-transform: uppercase;
    letter-spacing: .5px
}

.ac-stat-box .ac-stat-val {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    color: #352d30
}

.ac-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 12px;
    width: fit-content
}

.ac-status-balanced {
    background: #e6f7ee;
    color: #1e7e48;
    border: 1px solid #b7ebd0
}

.ac-status-unbalanced {
    background: #fdf0ed;
    color: #c0392b;
    border: 1px solid #facbc4
}

.ac-form-section {
    padding: 20px 24px
}

.ac-form-section+.ac-form-section {
    border-top: 1px solid #f2e6e8
}

.ac-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #4b3d42;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px
}

.ac-section-title span {
    font-size: 11px;
    color: var(--accent, #b85578);
    background: var(--secondary, #f6dce5);
    padding: 2px 8px;
    border-radius: 6px
}

.ac-tree-line {
    display: inline-block;
    color: #b5a2a8;
    margin-inline-end: 6px;
    font-family: monospace
}

.ac-header-account {
    background: #faf4f6 !important;
    font-weight: 700
}

.ac-header-account td {
    border-top: 1px solid #ecdfe2;
    border-bottom: 1px solid #ecdfe2
}

.ac-num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: end;
    direction: ltr
}

.ac-debit-val {
    color: #1e3a8a
}

.ac-credit-val {
    color: #065f46
}

.ac-recon-card {
    border: 1px solid #ebd9de;
    border-radius: var(--radius, 18px);
    background: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    box-shadow: 0 8px 30px #7046540a
}

.ac-recon-card.is-reconciled {
    border-color: #c7ebd8;
    background: linear-gradient(135deg, #fff, #f4faf6)
}

.ac-recon-card.is-unreconciled {
    border-color: #fad2cc;
    background: linear-gradient(135deg, #fff, #fdf5f4)
}

.ac-card-header-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 700
}

@media(max-width:800px) {
    .ac-entries-table {
        min-width: 600px
    }

    .ac-balance-summary {
        grid-template-columns: 1fr 1fr
    }

    .ac-balance-summary .ac-status-box {
        grid-column: 1/-1
    }
}

@media(max-width:768px) {

    .grid.grid-2,
    .grid.col-2,
    .grid.col-3 {
        grid-template-columns: 1fr !important
    }
}

@media(max-width:600px) {
    .ac-entries-table {
        min-width: 540px
    }

    .ac-balance-summary {
        grid-template-columns: 1fr
    }
}

/* ==========================================================================
   16. MANUAL ORDER ENTRY / POS SYSTEM (.manual-order-*)
   ========================================================================== */
.manual-order-page {
    width: 100%;
    max-width: 1560px;
    margin-inline: auto;
    box-sizing: border-box;
}

.manual-order-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.95fr) minmax(330px, 1.05fr);
    gap: 24px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.manual-order-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
}

.manual-order-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
}

.manual-order-card {
    position: relative;
    overflow: visible;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid #f0e4e7;
    border-radius: var(--radius, 18px);
    box-shadow: 0 4px 20px rgba(112, 70, 84, 0.05);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

/* Card Stacking Contexts (Descending order so top card dropdowns float above lower cards) */
.manual-order-customer-card {
    z-index: 30;
}

.manual-order-product-card {
    z-index: 20;
}

.manual-order-items-card {
    z-index: 10;
}

/* Elevated z-index when dropdown is actively open */
.manual-order-card.has-open-dropdown {
    z-index: 60 !important;
}

.manual-order-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f7eff1;
    flex-wrap: wrap;
}

.manual-order-card .card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #352d30);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.manual-order-card .card-header h3 svg {
    color: var(--accent, #b85578);
    flex-shrink: 0;
}

/* Mode Switcher Group */
.customer-mode-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fbf7f8;
    padding: 3px;
    border-radius: 11px;
    border: 1px solid #ebd9de;
}

.customer-mode-group .button {
    min-height: 30px;
    height: 30px;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 8px;
    box-shadow: none;
}

/* Form Controls Inside Cards */
.manual-order-card input[type="text"],
.manual-order-card input[type="number"],
.manual-order-card input[type="tel"],
.manual-order-card select {
    width: 100%;
    height: 42px;
    border: 1px solid #e4d7d5;
    border-radius: 11px;
    padding: 8px 13px;
    background: #fffcfb;
    color: #41383b;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.manual-order-card textarea {
    width: 100%;
    min-height: 72px;
    border: 1px solid #e4d7d5;
    border-radius: 11px;
    padding: 10px 13px;
    background: #fffcfb;
    color: #41383b;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.manual-order-card input:focus,
.manual-order-card select:focus,
.manual-order-card textarea:focus {
    border-color: var(--primary, #d96c91);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d96c91) 14%, transparent);
    background: #ffffff;
}

/* POS Tools Grid (Barcode + Product Search) */
.manual-order-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
    width: 100%;
    position: relative;
    overflow: visible;
}

.pos-search-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.pos-search-wrapper.is-open {
    z-index: 70;
}

.pos-search-input {
    width: 100%;
    height: 42px;
    border: 1px solid #e4d7d5;
    border-radius: 11px;
    padding: 8px 13px;
    background: #fffcfb;
    color: #41383b;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.pos-dropdown {
    position: absolute;
    inset-block-start: calc(100% + 4px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #ebd9de;
    border-radius: 12px;
    box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.18), 0 8px 12px -6px rgba(0, 0, 0, 0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    pointer-events: auto;
}

.pos-dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f7eff1;
    transition: background .12s ease;
    word-break: break-word;
    overflow-wrap: break-word;
}


.pos-dropdown-item:last-child {
    border-bottom: none;
}

.pos-dropdown-item:hover {
    background: #fff5f7;
}

/* Selected Customer Box */
.selected-customer-box {
    display: none;
    padding: 14px 16px;
    border: 1px solid rgba(184, 85, 120, 0.3);
    background: linear-gradient(135deg, rgba(184, 85, 120, 0.04), rgba(246, 220, 229, 0.14));
    border-radius: 12px;
    margin-top: 12px;
}

/* Scanner Input Group */
.scanner-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.scanner-input-group input {
    flex: 1;
    min-width: 0;
}

.scanner-input-group button {
    flex-shrink: 0;
    min-height: 42px;
    height: 42px;
    padding: 0 16px;
}

/* Items Matrix Table */
.manual-order-items-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.manual-order-items-table th {
    background: #fbf7f8;
    color: #6d5b62;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid #ecdfe2;
    text-align: start;
}

.manual-order-items-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f2e7e9;
    vertical-align: middle;
    font-size: 13px;
}

.manual-order-items-table tr:hover td {
    background: #fffafa;
}

.manual-order-items-table .item-qty-input,
.manual-order-items-table .item-price-input {
    height: 38px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 9px;
    border: 1px solid #e4d7d5;
    background: #fffcfb;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    text-align: end;
    box-sizing: border-box;
}

.manual-order-items-table .item-qty-input:focus,
.manual-order-items-table .item-price-input:focus {
    border-color: var(--primary, #d96c91);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d96c91) 14%, transparent);
    background: #fff;
    outline: none;
}

.manual-order-items-table .item-qty-input {
    width: 75px;
}

.manual-order-items-table .item-price-input {
    width: 100px;
}

.manual-order-items-table .warehouse-select {
    height: 38px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 9px;
    border: 1px solid #e4d7d5;
    background: #fffcfb;
    width: 100%;
    max-width: 160px;
    box-sizing: border-box;
}

/* Summary Card & Breakdown */
.manual-order-summary-card {
    border-top: 4px solid var(--accent, #b85578);
    background: linear-gradient(180deg, #ffffff 0%, #fffbfd 100%);
}

.summary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13.5px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #55494d;
}

.summary-line.discount {
    color: #16a34a;
}

.summary-line.grand-total {
    border-top: 1px solid #ebd9de;
    padding-top: 14px;
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text, #352d30);
}

.summary-line.grand-total strong {
    color: var(--accent, #b85578);
    font-size: 22px;
}

/* Responsive Media Queries */
@media (min-width: 1024px) {
    .manual-order-sidebar {
        position: sticky;
        top: 95px;
    }
}

@media (max-width: 1023px) {
    .manual-order-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .manual-order-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .manual-order-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .manual-order-card {
        padding: 16px;
    }

    .manual-order-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .customer-mode-group {
        width: 100%;
    }

    .customer-mode-group button {
        flex: 1;
    }

    .scanner-input-group {
        flex-direction: column;
    }

    .scanner-input-group button {
        width: 100%;
    }
}


/* ==========================================================================
   17. ADMIN QUICK ACCESS TOOLBAR & USER FAVORITES
   ========================================================================== */
.heading-with-favorite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.heading-with-favorite h1 {
    margin: 0;
}

.favorite-star-btn {
    background: transparent;
    border: none;
    font-size: 19px;
    color: #a99ca2;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.favorite-star-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    transform: scale(1.15);
}

.favorite-star-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.favorite-star-btn.is-pinned {
    color: #f59e0b;
}

.quick-access-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-inline: 12px;
    padding: 2px 4px;
}

.quick-access-toolbar::-webkit-scrollbar {
    display: none;
}

.quick-shortcuts-group,
.quick-favorites-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.quick-divider {
    width: 1px;
    height: 18px;
    background: #e2d2d8;
    margin: 0 4px;
    flex-shrink: 0;
    display: inline-block;
}

.quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #ebd9de;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    color: #55494d;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.quick-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fdf5f8;
    transform: translateY(-1px);
}

.quick-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(217, 108, 145, 0.25);
}

.quick-chip.favorite-chip {
    border-color: #f5dfb8;
    background: #fffdf8;
}

.quick-chip.favorite-chip:hover {
    border-color: #d97706;
    background: #fef8eb;
    color: #b45309;
}

.quick-chip.favorite-chip.active {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
}

.quick-chip .chip-icon {
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.quick-chip .chip-label {
    font-size: 11.5px;
}

/* Deployment Center */
.deployment-center {
    max-width: 1400px;
    margin-inline: auto;
    padding: 8px 0 36px;
    color: #3f3438
}

.deployment-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin: 10px 0 22px
}

.deployment-hero h2 {
    font-size: 28px;
    letter-spacing: -.6px;
    margin: 4px 0 6px
}

.deployment-hero>div>p:last-child {
    margin: 0;
    color: #7d6c72;
    font-size: 14px
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase
}

.status-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    gap: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap
}

.status-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor
}

.status-ready {
    background: #e8f7ef;
    color: #18764a
}

.status-muted {
    background: #f1eff0;
    color: #71666b
}

.status-warning {
    background: #fff2d6;
    color: #a35c00
}

.status-failed {
    background: #fde9eb;
    color: #bc3547
}

.deployment-safety-banner {
    align-items: center;
    background: linear-gradient(90deg, #fff8e5, #fff4f7);
    border: 1px solid #f0d9a4;
    border-radius: 16px;
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px 18px
}

.safety-icon {
    align-items: center;
    background: #fff;
    color: #b87117;
    border-radius: 12px;
    display: flex;
    font-size: 22px;
    height: 38px;
    justify-content: center;
    width: 38px
}

.deployment-safety-banner strong {
    font-size: 14px
}

.deployment-safety-banner p {
    color: #806d58;
    font-size: 13px;
    margin: 4px 0 0
}

.deployment-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px
}

.deployment-card {
    background: #fff;
    border: 1px solid #eadde1;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(65, 38, 47, .055);
    padding: 24px;
    min-width: 0
}

.deployment-card-heading {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin-bottom: 20px
}

.deployment-card-heading h3 {
    font-size: 17px;
    letter-spacing: -.25px;
    margin: 1px 0 5px
}

.deployment-card-heading p {
    color: #7d6c72;
    font-size: 13px;
    line-height: 1.55;
    margin: 0
}

.card-icon {
    align-items: center;
    border-radius: 11px;
    display: flex;
    font-size: 19px;
    height: 38px;
    justify-content: center;
    flex: 0 0 38px
}

.connection-icon {
    background: #f1ecff;
    color: #735cc3
}

.deploy-icon {
    background: #fff0f5;
    color: #c84c77
}

.backup-icon {
    background: #eaf8f4;
    color: #248166
}

.restore-icon {
    background: #fff3e8;
    color: #b96319
}

.health-icon {
    background: #eaf4ff;
    color: #3974b8
}

.connection-status {
    align-items: center;
    border-block: 1px solid #f1e9eb;
    color: #786a70;
    display: flex;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 16px;
    padding: 12px 0
}

.connection-details {
    display: grid;
    gap: 10px;
    margin: 0 0 20px
}

.connection-details div {
    display: flex;
    justify-content: space-between;
    gap: 10px
}

.connection-details dt {
    color: #8a7c81;
    font-size: 12px
}

.connection-details dd {
    font-size: 12px;
    font-weight: 700;
    margin: 0
}

.deploy-label {
    color: #66585d;
    display: block;
    font-size: 12px;
    font-weight: 750;
    margin: 14px 0 7px
}

.deploy-label small {
    color: #9a888e;
    float: inline-end;
    font-size: 11px;
    font-weight: 600
}

.deployment-center select,
.deployment-center input {
    background: #fff;
    border: 1px solid #ded3d7;
    border-radius: 10px;
    box-sizing: border-box;
    color: #40343a;
    font: inherit;
    height: 44px;
    outline: 0;
    padding: 0 12px;
    width: 100%;
    transition: border-color .18s, box-shadow .18s
}

.deployment-center select:focus,
.deployment-center input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 108, 145, .14)
}

.deploy-btn {
    align-items: center;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    display: inline-flex;
    font: 700 13px inherit;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    transition: transform .16s, box-shadow .16s, background .16s
}

.deploy-btn:hover {
    transform: translateY(-1px)
}

.deploy-btn-primary {
    background: var(--primary);
    box-shadow: 0 5px 12px rgba(217, 108, 145, .2);
    color: #fff;
    width: 100%
}

.deploy-btn-secondary {
    background: #f8f5f6;
    border: 1px solid #e6dbdf;
    color: #51434a;
    width: 100%
}

.deploy-btn-secondary span {
    color: #977983;
    font-size: 11px;
    margin-inline-start: 8px
}

.deploy-btn-danger {
    background: #bd5271;
    margin-top: 14px
}

.force-sync-note {
    align-items: center;
    background: #fff8e8;
    border: 1px solid #f5dfad;
    border-radius: 10px;
    display: flex;
    gap: 9px;
    margin-top: 12px;
    padding: 10px
}

.force-sync-note>span {
    align-items: center;
    background: #e69a2b;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-weight: 900;
    height: 18px;
    justify-content: center;
    width: 18px
}

.force-sync-note strong,
.force-sync-note small {
    display: block;
    font-size: 12px
}

.force-sync-note small {
    color: #8e744a;
    margin-top: 2px
}

.preview-stats {
    background: #fbf8f9;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 14px 0
}

.preview-stats div {
    border-inline-end: 1px solid #eee2e5;
    padding: 10px;
    text-align: center
}

.preview-stats div:last-child {
    border: 0
}

.preview-stats strong,
.preview-stats span {
    display: block
}

.preview-stats strong {
    font-size: 17px
}

.preview-stats span {
    color: #85767b;
    font-size: 10px;
    margin-top: 2px
}

.last-backup {
    background: #faf8f8;
    border-radius: 11px;
    margin: 15px 0;
    padding: 12px
}

.last-backup span,
.last-backup strong,
.last-backup small {
    display: block
}

.last-backup span {
    color: #88797f;
    font-size: 11px
}

.last-backup strong {
    font-size: 13px;
    margin-top: 4px
}

.last-backup small {
    color: #88797f;
    font-size: 11px;
    margin-top: 4px
}

.restore-unavailable {
    background: #faf8f8;
    border: 1px dashed #ddd2d5;
    border-radius: 13px;
    padding: 18px
}

.restore-unavailable strong {
    display: block;
    font-size: 13px;
    margin: 13px 0 5px
}

.restore-unavailable p {
    color: #806f75;
    font-size: 12px;
    line-height: 1.6;
    margin: 0
}

.deployment-status-card {
    grid-column: span 2
}

.deployment-status-card .deployment-card-heading>.status-badge {
    margin-inline-start: auto
}

.health-row {
    align-items: center;
    background: #faf8f8;
    border-radius: 11px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 11px 13px;
    font-size: 12px
}

.health-row a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none
}

.command-checklist h4 {
    font-size: 13px;
    margin: 0 0 10px
}

.command-item {
    align-items: center;
    border-top: 1px solid #f0e9eb;
    display: flex;
    gap: 10px;
    padding: 9px 0
}

.command-step {
    align-items: center;
    background: #f4edf0;
    border-radius: 50%;
    color: #81616d;
    display: flex;
    font-size: 11px;
    font-weight: 800;
    height: 22px;
    justify-content: center;
    flex: 0 0 22px
}

.command-item code {
    background: #f5f1f2;
    border-radius: 7px;
    direction: ltr;
    flex: 1;
    font-size: 11px;
    overflow: auto;
    padding: 7px 9px;
    text-align: left;
    white-space: nowrap
}

.copy-command {
    background: transparent;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    padding: 6px
}

.deployment-wide-card {
    margin-top: 22px;
    padding: 0
}

.section-heading {
    align-items: center;
    border-bottom: 1px solid #eee5e7;
    display: flex;
    justify-content: space-between;
    padding: 20px 24px
}

.section-heading h3 {
    font-size: 17px;
    margin: 3px 0 0
}

.section-heading>span {
    color: #8e7e84;
    font-size: 12px
}

.deployment-table-wrap {
    overflow-x: auto
}

.deployment-table {
    border-collapse: collapse;
    min-width: 720px;
    width: 100%
}

.deployment-table th {
    background: #fcfafb;
    color: #957f87;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 13px 24px;
    text-align: start;
    text-transform: uppercase
}

.deployment-table td {
    border-top: 1px solid #f2ebed;
    font-size: 12px;
    padding: 15px 24px;
    vertical-align: middle
}

.backup-name {
    font-weight: 800
}

.delete-backup-form {
    align-items: center;
    display: flex;
    gap: 7px
}

.delete-backup-form input {
    height: 34px;
    min-width: 104px;
    width: 104px
}

.deploy-btn-danger-outline {
    background: #fff1f2;
    border: 1px solid #f4c7ce;
    color: #b5394e;
    min-height: 34px;
    padding: 0 11px
}

.empty-state {
    color: #8b7c81;
    padding: 29px;
    text-align: center
}

.empty-state span {
    display: block;
    color: #d67a9a;
    font-size: 23px;
    margin-bottom: 7px
}

.empty-state strong,
.empty-state p {
    display: block
}

.empty-state strong {
    color: #58494f;
    font-size: 13px
}

.empty-state p {
    font-size: 12px;
    margin: 5px 0 0
}

@media (max-width:1199px) {
    .deployment-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .deployment-status-card {
        grid-column: span 1
    }
}

@media (max-width:767px) {
    .deployment-center {
        padding: 2px 0 22px
    }

    .deployment-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 17px
    }

    .deployment-hero h2 {
        font-size: 24px
    }

    .deployment-safety-banner {
        align-items: flex-start;
        padding: 14px
    }

    .deployment-action-grid {
        grid-template-columns: 1fr;
        gap: 14px
    }

    .deployment-card {
        border-radius: 16px;
        padding: 18px
    }

    .deployment-status-card {
        grid-column: span 1
    }

    .deployment-status-card .deployment-card-heading {
        flex-wrap: wrap
    }

    .deployment-status-card .deployment-card-heading>.status-badge {
        margin-inline-start: 50px
    }

    .health-row {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .command-item {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .command-item code {
        flex-basis: calc(100% - 32px)
    }

    .copy-command {
        margin-inline-start: 32px
    }

    .section-heading {
        padding: 17px 18px
    }

    .deployment-table th,
    .deployment-table td {
        padding: 13px 16px
    }

    .deploy-btn {
        min-height: 46px
    }

    .delete-backup-form {
        min-width: 215px
    }

    .deployment-card form:not(.delete-backup-form) .deploy-btn {
        width: 100%
    }
}

@media (max-width: 1024px) {
    .topbar {
        flex-wrap: wrap;
        gap: 8px;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .quick-access-toolbar {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
        padding-top: 4px;
        border-top: 1px solid #f1e4e8;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
    }
}

@media (max-width: 640px) {
    .quick-chip {
        padding: 0 8px;
        height: 28px;
        font-size: 11px;
    }

    .quick-chip .chip-icon {
        font-size: 12px;
    }
}

/* ==========================================================================
   17. SANGAWY SOLUTIONS DEVELOPER BRANDING & MODAL SYSTEM
   ========================================================================== */
.sangawy-developer-attribution {
    font-size: 11.5px;
    color: #8c7e83;
    line-height: 1.4;
    user-select: none;
}

.sangawy-attribution-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.sangawy-powered-label {
    color: #8c7e83;
    font-weight: 500;
}

.sangawy-brand-trigger {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 750;
    color: var(--accent, #b85578);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: color 0.18s ease, text-decoration-color 0.18s ease;
    border-radius: 4px;
    outline: none;
}

.sangawy-brand-trigger:hover {
    color: var(--primary, #d96c91);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

.sangawy-brand-trigger:focus-visible {
    outline: 2px solid var(--primary, #d96c91);
    outline-offset: 2px;
}

.sangawy-sep {
    color: #bfaab1;
    font-weight: 700;
}

.sangawy-year {
    color: #8c7e83;
    font-weight: 500;
    direction: ltr;
    display: inline-block;
}

/* Sidebar Specific Developer Attribution */
.sidebar-developer-attribution {
    padding: 8px 16px 12px;
    border-top: 1px dashed #f2e3e7;
    background: #fffdfb;
    flex-shrink: 0;
}

.sidebar-developer-attribution .sangawy-attribution-text {
    font-size: 11px;
    justify-content: flex-start;
}

/* App Main Footer Attribution (Used on small screens / when sidebar is hidden) */
.app-footer {
    display: none;
    padding: 16px 36px 32px;
    text-align: center;
    border-top: 1px solid #f0e4e3;
    background: transparent;
    margin-top: 20px;
}

.app-footer .sangawy-developer-attribution {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Login Page Attribution */
.login-developer-attribution {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #f4e4e9;
    text-align: center;
}

.login-developer-attribution .sangawy-attribution-text {
    justify-content: center;
    font-size: 11px;
}

/* SIDEBAR / FOOTER EXACTLY-ONE-VISIBLE INSTANCE RULE */
@media (min-width: 801px) {
    .sidebar .sidebar-developer-attribution {
        display: block !important;
    }

    .app-footer {
        display: none !important;
    }
}

@media (max-width: 800px) {
    .sidebar .sidebar-developer-attribution {
        display: none !important;
    }

    .app-footer {
        display: block !important;
        padding: 16px 20px 30px;
    }

    .nav-toggle:checked~.sidebar .sidebar-developer-attribution {
        display: block !important;
    }

    .nav-toggle:checked~main .app-footer {
        display: none !important;
    }
}

/* Modal Overlay & Dialog Styles */
body.sangawy-modal-open {
    overflow: hidden !important;
}

.sangawy-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
}

.sangawy-modal-overlay.is-active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sangawy-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(44, 32, 39, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1;
}

.sangawy-modal-dialog {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border: 1px solid #f2e2e7;
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(78, 38, 52, 0.22), 0 4px 14px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    transform: scale(0.94) translateY(10px);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.sangawy-modal-overlay.is-active .sangawy-modal-dialog {
    transform: scale(1) translateY(0);
}

.sangawy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, #fffbfd 0%, #fff4f8 100%);
    border-bottom: 1px solid #f4e3e8;
}

.sangawy-header-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sangawy-logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary, #d96c91) 0%, var(--accent, #b85578) 100%);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-family: 'DM Serif Display', 'Siya Rabar', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(184, 85, 120, 0.3);
    flex-shrink: 0;
}

.sangawy-header-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sangawy-brand-heading {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #352d30;
    line-height: 1.2;
}

.sangawy-brand-subtitle {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent, #b85578);
    margin-top: 2px;
}

.sangawy-modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #ebd6de;
    background: #ffffff;
    color: #7a6b71;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.sangawy-modal-close-btn:hover {
    background: #fdf0f4;
    color: var(--accent, #b85578);
    border-color: var(--accent, #b85578);
    transform: scale(1.05);
}

.sangawy-modal-body {
    padding: 22px 24px;
}

.sangawy-modal-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #5d4f54;
}

.sangawy-modal-divider {
    height: 1px;
    background: #f4e5ea;
    margin: 18px 0;
}

.sangawy-contact-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sangawy-section-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #96868d;
}

.sangawy-contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fcf9fa;
    border: 1px solid #f0e2e7;
    border-radius: 14px;
    transition: all 0.18s ease;
}

.sangawy-contact-card:hover {
    background: #fff8fb;
    border-color: #e5ccd6;
    box-shadow: 0 4px 12px rgba(112, 70, 84, 0.04);
}

.sangawy-contact-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sangawy-contact-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sangawy-contact-icon.email-icon {
    background: #fbeaf0;
    color: var(--accent, #b85578);
}

.sangawy-contact-icon.phone-icon {
    background: #eaf7ef;
    color: #1b844f;
}

.sangawy-contact-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sangawy-contact-type {
    font-size: 10.5px;
    font-weight: 700;
    color: #8c7d83;
}

.sangawy-contact-value {
    font-size: 12.5px;
    font-weight: 700;
    color: #352d30;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sangawy-contact-link:hover {
    color: var(--accent, #b85578);
    text-decoration: underline;
}

.sangawy-contact-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sangawy-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.16s ease;
    cursor: pointer;
}

.sangawy-action-email {
    background: #fbf0f4;
    color: var(--accent, #b85578);
    border: 1px solid #f2d5e0;
}

.sangawy-action-email:hover {
    background: var(--accent, #b85578);
    color: #ffffff;
    border-color: var(--accent, #b85578);
    transform: translateY(-1px);
}

.sangawy-action-wa {
    background: #e8f7ee;
    color: #187a48;
    border: 1px solid #c9ebd6;
}

.sangawy-action-wa:hover {
    background: #187a48;
    color: #ffffff;
    border-color: #187a48;
    transform: translateY(-1px);
}

.sangawy-action-call {
    background: #f5f1f3;
    color: #55484e;
    border: 1px solid #e5dbe0;
}

.sangawy-action-call:hover {
    background: #44373d;
    color: #ffffff;
    border-color: #44373d;
    transform: translateY(-1px);
}

.sangawy-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 18px;
    background: #faf6f7;
    border-top: 1px solid #f2e3e8;
    gap: 12px;
    flex-wrap: wrap;
}

.sangawy-footer-note {
    font-size: 11px;
    font-weight: 600;
    color: #8c7e84;
}

.sangawy-footer-close-btn {
    background: #ffffff;
    border: 1px solid #ebd9de;
    border-radius: 9px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #55494d;
    cursor: pointer;
    transition: all 0.16s ease;
}

.sangawy-footer-close-btn:hover {
    background: #fdf5f8;
    border-color: var(--accent, #b85578);
    color: var(--accent, #b85578);
}

@media (max-width: 480px) {
    .sangawy-modal-dialog {
        border-radius: 18px;
    }

    .sangawy-modal-header {
        padding: 16px 18px 12px;
    }

    .sangawy-modal-body {
        padding: 16px 18px;
    }

    .sangawy-contact-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sangawy-contact-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .sangawy-action-chip {
        flex: 1;
        justify-content: center;
    }

    .sangawy-modal-footer {
        padding: 12px 18px 16px;
        flex-direction: column-reverse;
        align-items: stretch;
        text-align: center;
    }

    .sangawy-footer-close-btn {
        width: 100%;
        padding: 8px;
    }
}

/* ==========================================================================
   PAGINATION & SVG ICON CONSTRAINTS
   ========================================================================== */
.w-4,
svg.w-4 {
    width: 1rem !important;
    max-width: 16px !important;
}

.h-4,
svg.h-4 {
    height: 1rem !important;
    max-height: 16px !important;
}

.w-5,
svg.w-5 {
    width: 1.25rem !important;
    max-width: 20px !important;
}

.h-5,
svg.h-5 {
    height: 1.25rem !important;
    max-height: 20px !important;
}

.w-6,
svg.w-6 {
    width: 1.5rem !important;
    max-width: 24px !important;
}

.h-6,
svg.h-6 {
    height: 1.5rem !important;
    max-height: 24px !important;
}

nav[role="navigation"] svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

nav[role="navigation"] {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

nav[role="navigation"]>div:first-child {
    display: none !important;
}

nav[role="navigation"]>div:last-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

@media (max-width: 640px) {
    nav[role="navigation"]>div:first-child {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 10px !important;
    }

    nav[role="navigation"]>div:first-child a,
    nav[role="navigation"]>div:first-child span {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 16px !important;
        border-radius: 9px !important;
        border: 1px solid #ebd9de !important;
        background: #ffffff !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #55484e !important;
        text-decoration: none !important;
    }

    nav[role="navigation"]>div:last-child {
        display: none !important;
    }
}

nav[role="navigation"] p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #796a70 !important;
}

nav[role="navigation"] p span,
nav[role="navigation"] p strong {
    font-weight: 700 !important;
    color: #382d31 !important;
}

nav[role="navigation"] span.relative.z-0,
nav[role="navigation"] .shadow-sm {
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #eadedd !important;
    background: #ffffff !important;
}

nav[role="navigation"] a,
nav[role="navigation"] span[aria-disabled="true"]>span,
nav[role="navigation"] span[aria-current="page"]>span,
nav[role="navigation"] span.relative.inline-flex {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #5a4c52 !important;
    text-decoration: none !important;
    border-inline-end: 1px solid #f0e4e3 !important;
    background: #ffffff !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

nav[role="navigation"] a:last-child,
nav[role="navigation"] span:last-child>span {
    border-inline-end: none !important;
}

nav[role="navigation"] a:hover {
    background: #fff3f6 !important;
    color: var(--accent, #b85578) !important;
}

nav[role="navigation"] span[aria-current="page"]>span,
nav[role="navigation"] .active {
    background: var(--secondary, #f6dce5) !important;
    color: var(--accent, #b85578) !important;
    font-weight: 700 !important;
}

nav[role="navigation"] span[aria-disabled="true"]>span,
nav[role="navigation"] span.cursor-default {
    color: #b8acb0 !important;
    background: #fdfafb !important;
    cursor: not-allowed !important;
}