:root {
    --primary: #1f3bb3;
    --primary-600: #17339f;
    --primary-soft: #e9efff;
    --secondary: #00bcd4;
    --success: #00b894;
    --warning: #ffb020;
    --danger: #ef4444;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e6eaf2;
    --surface: #ffffff;
    --body-bg: #f4f7fb;
    --sidebar-bg: #ffffff;
    --shadow-sm: 0 8px 24px rgba(31, 59, 179, 0.08);
    --shadow-md: 0 18px 48px rgba(31, 59, 179, 0.13);
}

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

* {
    letter-spacing: 0;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--body-bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.modal-open {
    overflow: hidden;
}

.auth-page {
    min-height: 100vh;
    background: #f3f4f6;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 0.35rem;
}

.auth-card {
    width: min(100%, 846px);
    min-height: 648px;
    display: grid;
    grid-template-columns: minmax(0, 423px) minmax(0, 1fr);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid #d7d7d7;
    border-radius: 12px;
    box-shadow: none;
}

.auth-visual {
    position: relative;
    min-height: 648px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 43px 43px 44px;
    color: #fff;
    background: #2358c7;
}

.auth-visual::after {
    display: none;
}

.brand-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
}

.brand-mark {
    width: 60px;
    height: 60px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: url('/assets/icons/icon.svg') center / contain no-repeat;
    color: transparent;
    font-size: 0;
    font-weight: 700;
    box-shadow: none;
    overflow: hidden;
    text-indent: -999px;
}

.brand-mark-sm {
    width: 52px;
    height: 52px;
    color: transparent;
    box-shadow: none;
    font-size: 0.9rem;
}

.brand-name {
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 800;
}

.auth-visual-copy {
    position: relative;
    z-index: 1;
    max-width: 340px;
    margin-top: 46px;
    margin-bottom: auto;
}

.auth-visual-copy h1 {
    margin: 2rem 0 1rem;
    font-size: 2.4rem;
    line-height: 1.16;
    font-weight: 900;
}

.auth-visual-copy p {
    max-width: 315px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.13rem;
    line-height: 1.55;
    font-weight: 650;
}

.auth-metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.auth-metrics div {
    min-height: 107px;
    padding: 1.05rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: none;
}

.auth-metrics strong,
.auth-metrics span {
    display: block;
}

.auth-metrics strong {
    font-size: 1.55rem;
    line-height: 1.15;
}

.auth-metrics span {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 650;
}

.auth-form-panel {
    align-self: center;
    width: min(100%, 336px);
    justify-self: center;
    padding: 1rem 0;
}

.auth-form-panel-wide {
    width: min(100%, 380px);
}

.auth-eyebrow {
    color: #1d56d8;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.auth-form-title {
    color: #000;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 500;
}

.auth-form-text {
    max-width: 280px;
    color: #111;
    font-size: 1.2rem;
    line-height: 1.2;
}

.auth-field {
    display: grid;
    gap: 0.35rem;
}

.auth-field .form-label {
    margin: 0;
    color: #222;
    font-size: 1rem;
    font-weight: 400;
}

.auth-field .form-control {
    min-height: 49px;
    padding: 0.55rem 1rem;
    color: #111;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font-size: 1.34rem;
    font-weight: 400;
}

.auth-field .form-control::placeholder {
    color: #737373;
    opacity: 1;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .form-control {
    padding-right: 3rem;
}

.auth-password-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: #777;
    font-size: 1.05rem;
    pointer-events: none;
}

.btn-auth-submit {
    min-height: 47px;
    margin-top: 0.1rem;
    color: #111;
    background: #fff;
    border: 1px solid #bfc0c3;
    border-radius: 9px;
    font-size: 1.16rem;
    font-weight: 650;
}

.btn-auth-submit:hover,
.btn-auth-submit:focus,
.btn-auth-submit:active {
    color: #111;
    background: #f7f8fb;
    border-color: #9fa2a8;
}

.auth-help-link {
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 750;
}

.auth-help-link a {
    color: var(--primary);
    text-decoration: none;
}

.auth-help-link a:hover,
.auth-help-link a:focus {
    text-decoration: underline;
}

.eyebrow {
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: 0.75rem 1rem;
    color: var(--ink);
    border-color: var(--line);
    border-style: solid;
    border-width: 1px;
    border-radius: 8px;
    background-color: #fbfcff;
    font: inherit;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 59, 179, 0.14);
}

.btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    appearance: none;
}

.btn-sm {
    min-height: 34px;
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
}

.w-100 {
    width: 100% !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    line-height: 1;
}

.btn-primary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-600);
    --bs-btn-hover-border-color: var(--primary-600);
    --bs-btn-active-bg: var(--primary-600);
    --bs-btn-active-border-color: var(--primary-600);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-light {
    color: var(--ink);
    background: #f8fafc;
    border-color: var(--line);
}

.btn-outline-primary {
    color: var(--primary);
    background: #fff;
    border-color: rgba(31, 59, 179, 0.35);
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: rgba(31, 59, 179, 0.35);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
}

.form-select {
    width: 100%;
    min-height: 46px;
    padding: 0.55rem 2.35rem 0.55rem 0.85rem;
    color: var(--ink);
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-weight: 650;
}

.form-select:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(31, 59, 179, 0.14);
}

.invalid-feedback {
    display: none;
    margin-top: 0.35rem;
    color: var(--danger);
    font-size: 0.88rem;
    font-weight: 750;
}

.was-validated :invalid ~ .invalid-feedback,
.is-invalid ~ .invalid-feedback {
    display: block;
}

.alert-modern {
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.08);
}

.system-popup-overlay {
    --popup-accent: var(--success);
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.48);
}

.system-popup-card {
    width: min(100%, 278px);
    min-height: 278px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.9rem;
    padding: 1rem 1.25rem 0.85rem;
    color: #111827;
    text-align: center;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 22px 70px rgba(17, 24, 39, 0.24);
}

.system-popup-icon {
    width: 94px;
    height: 94px;
    display: grid;
    place-items: center;
    color: var(--popup-accent);
    border: 4px solid var(--popup-accent);
    border-radius: 50%;
    font-size: 3.25rem;
    line-height: 1;
}

.system-popup-card h2 {
    margin: 0;
    color: var(--popup-accent);
    font-size: 1.35rem;
    font-weight: 500;
}

.system-popup-card p {
    margin: 0;
    color: #1f2937;
    font-size: 0.98rem;
    line-height: 1.45;
}

.system-popup-ok {
    min-height: 30px;
    padding: 0.25rem 0.65rem;
    background: var(--popup-accent);
    border-color: var(--popup-accent);
    border-radius: 4px;
    font-size: 0.86rem;
    font-weight: 500;
}

.system-popup-ok:hover,
.system-popup-ok:focus,
.system-popup-ok:active {
    background: var(--popup-accent);
    border-color: var(--popup-accent);
    filter: brightness(0.94);
}

.system-popup-actions {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
}

.system-popup-actions .btn {
    min-width: 72px;
    min-height: 30px;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.86rem;
    font-weight: 500;
}

.system-popup-danger,
.system-popup-warning {
    --popup-accent: var(--danger);
}

.system-popup-info {
    --popup-accent: var(--primary);
}

.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.56);
}

.app-loading-card {
    width: min(100%, 330px);
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.9rem;
    padding: 1.5rem;
    color: var(--ink);
    text-align: center;
    background: #fff;
    border: 1px solid rgba(31, 59, 179, 0.12);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(17, 24, 39, 0.28);
}

.app-loading-spinner {
    width: 72px;
    height: 72px;
    border: 6px solid #e9efff;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: app-loading-spin 0.8s linear infinite;
}

.app-loading-card strong {
    color: var(--primary);
    font-size: 1.12rem;
    font-weight: 900;
}

.app-loading-card span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
}

@keyframes app-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.order-entry-page {
    --order-blue: #185FA5;
    --order-blue-dark: #1a6dbf;
    --order-bg: #f2f2f7;
    --order-summary-width: clamp(236px, 24vw, 330px);
    background: var(--order-bg);
    overflow: hidden;
}

.order-entry-page .content-wrap {
    min-height: 100vh;
    padding: 0;
    background: var(--order-bg);
}

.order-unified-shell {
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: var(--order-bg);
    overflow: hidden;
}

@supports (height: 100svh) {
    .order-unified-shell {
        height: 100svh;
    }
}

.order-unified-header {
    position: sticky;
    top: 0;
    z-index: 35;
    color: #fff;
    background: var(--order-blue);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.16);
}

.order-brand-row {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
}

.order-brand-title,
.order-seller-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    font-weight: 850;
}

.order-brand-title span,
.order-seller-chip {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
}

.order-brand-title strong {
    white-space: nowrap;
}

.order-client-bar {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    background: var(--order-blue-dark);
}

.order-client-info {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.order-client-info strong,
.order-client-info span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-client-info strong {
    font-size: 1rem;
    font-weight: 900;
}

.order-client-info span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.86rem;
    font-weight: 750;
}

.order-client-bar .btn {
    flex: 0 0 auto;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
}

.order-product-area {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--order-summary-width);
    gap: 0;
    overflow: hidden;
}

.order-product-main {
    min-width: 0;
    height: 100%;
    max-width: 100%;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.order-product-tools {
    position: relative;
    z-index: 30;
    margin: 0;
    padding: 1rem 1rem 0.7rem;
    background: var(--order-bg);
    color: var(--ink);
    border-bottom: 1px solid #d7d9de;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.order-search-row {
    margin-bottom: 0.7rem;
}

.order-product-search .form-control {
    min-height: 40px;
    background: #fff;
    border-color: #d8dce6;
    border-radius: 10px;
    font-size: 0.95rem;
}

.order-entry-page .order-filter-tabs {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    align-items: center;
    gap: 0.55rem;
    max-width: 100%;
    margin: 0;
    padding: 0 0 0.25rem;
    overflow: hidden;
}

.order-entry-page .department-chip-track {
    min-width: 0;
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    cursor: grab;
    user-select: none;
}

.order-entry-page .department-chip-track.is-dragging {
    cursor: grabbing;
}

.order-entry-page .order-filter-tabs .department-chip,
.order-entry-page .department-scroll-btn {
    flex: 0 0 auto;
    min-height: 34px;
    background: #fff;
    border-color: #d9dde6;
    border-radius: 999px;
    color: #3a3f4b;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
}

.order-entry-page .order-filter-tabs .department-chip {
    padding: 0.42rem 0.85rem;
    max-width: none;
}

.order-entry-page .department-scroll-btn {
    width: 36px;
    padding: 0;
    border: 1px solid #d9dde6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.order-entry-page .order-filter-tabs .department-chip.active {
    color: #fff;
    background: var(--order-blue);
    border-color: var(--order-blue);
}

.order-product-grid {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.65rem;
    padding-top: 0.35rem;
    overflow-x: hidden;
}

.order-product-card {
    position: relative;
    min-width: 0;
    min-height: 176px;
    display: grid;
    align-content: start;
    gap: 0.32rem;
    padding: 0.78rem;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.order-product-card.selected {
    border: 2.5px solid var(--order-blue);
    box-shadow: 0 2px 8px rgba(24, 95, 165, 0.16);
}

.order-product-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0 0.35rem;
    color: #fff;
    background: var(--order-blue);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.order-product-name {
    padding-right: 1.6rem;
    color: #111827;
    font-size: 0.92rem;
    line-height: 1.18;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.order-product-department,
.order-product-stock,
.order-product-last {
    color: #9aa0aa;
    font-size: 0.74rem;
    font-weight: 750;
}

.order-product-price {
    color: var(--order-blue);
    font-size: 1rem;
    font-weight: 950;
}

.order-product-price-edit {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.45rem;
    color: var(--order-blue);
    font-size: 0.72rem;
    font-weight: 850;
}

.order-product-price-edit span {
    color: #9aa0aa;
    font-size: 0.7rem;
    font-weight: 850;
}

.order-product-price-edit .form-control {
    min-height: 30px;
    padding: 0.2rem 0.45rem;
    color: var(--order-blue);
    background: #fff;
    border-color: #dfe5ef;
    border-radius: 6px;
    text-align: center;
    font-size: 0.98rem;
    font-weight: 950;
}

.order-qty-control {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 0.28rem;
    align-items: center;
    margin-top: 0.1rem;
}

.order-qty-control .btn {
    width: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 6px;
    font-size: 1.05rem;
}

.order-qty-control .form-control {
    min-height: 30px;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.order-summary-panel {
    position: relative;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 1rem 0.8rem;
    background: #fff;
    border-left: 1px solid #d9dde6;
    overflow: hidden;
}

.order-summary-panel h2 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.8rem;
    color: #1f2937;
    font-size: 0.98rem;
    font-weight: 900;
}

.order-summary-list {
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding-right: 0.15rem;
    padding-bottom: 0.4rem;
}

.order-summary-empty {
    min-height: 0;
    overflow: hidden;
    color: #8b95a5;
    font-size: 0.86rem;
    font-weight: 750;
}

.order-summary-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #edf0f5;
}

.order-summary-item strong,
.order-summary-item span {
    display: block;
}

.order-summary-item strong {
    min-width: 0;
    color: #1f2937;
    font-size: 0.86rem;
    line-height: 1.2;
    font-weight: 850;
}

.order-summary-item span {
    color: var(--order-blue);
    font-size: 0.78rem;
    font-weight: 900;
}

.order-summary-item div:last-child {
    text-align: right;
}

.order-summary-item button {
    padding: 0;
    color: #a1a8b3;
    background: transparent;
    border: 0;
    font-size: 0.72rem;
    font-weight: 750;
}

.order-summary-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem;
    padding-top: 0.8rem;
    border-top: 1px solid #edf0f5;
    background: #fff;
}

.order-summary-totals {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.35rem;
}

.order-summary-totals div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.order-summary-totals span {
    color: #697386;
    font-weight: 750;
}

.order-summary-totals strong {
    color: #111827;
    font-weight: 900;
}

.order-summary-total strong {
    color: var(--order-blue);
    font-size: 1.1rem;
}

.order-close-action,
.order-cancel-action {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    font-size: 0.92rem;
    white-space: normal;
}

.order-cancel-action {
    color: #A32D2D;
    background: #fff;
    border-color: #F09595;
}

.order-cancel-action:hover,
.order-cancel-action:focus {
    color: #A32D2D;
    background: #fff7f7;
    border-color: #F09595;
}

.order-whatsapp-screen {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.58);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.order-whatsapp-card {
    width: min(100%, 460px);
    display: grid;
    gap: 0.8rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    background: #fff;
    border: 1px solid #d9dde6;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

.order-whatsapp-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #128c7e;
    border-radius: 10px;
    font-size: 1.45rem;
}

.order-whatsapp-card h2 {
    margin: -0.25rem 0 0;
    color: #111827;
    font-size: 1.22rem;
    line-height: 1.2;
    font-weight: 900;
}

.order-whatsapp-copy {
    margin: -0.25rem 0 0;
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 750;
}

.order-whatsapp-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.order-whatsapp-summary div {
    min-width: 0;
    padding: 0.62rem 0.72rem;
    background: #f8fafc;
    border: 1px solid #edf0f5;
    border-radius: 8px;
}

.order-whatsapp-summary span,
.order-whatsapp-summary strong {
    display: block;
    min-width: 0;
}

.order-whatsapp-summary span,
.order-whatsapp-field span {
    color: #697386;
    font-size: 0.8rem;
    font-weight: 850;
}

.order-whatsapp-summary strong {
    margin-top: 0.12rem;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.order-whatsapp-field {
    display: grid;
    gap: 0.35rem;
}

.order-whatsapp-field .form-control {
    min-height: 46px;
    font-size: 1rem;
    font-weight: 850;
}

.order-whatsapp-warning {
    padding: 0.62rem 0.78rem;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
}

.order-whatsapp-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

.order-whatsapp-actions .btn {
    width: 100%;
    min-height: 46px;
}

.status-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 32px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    font-size: 0.84rem;
    font-weight: 800;
}

.dashboard-page {
    min-height: 100vh;
    background: var(--body-bg);
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    max-width: 100vw;
}

.order-entry-page .app-layout {
    grid-template-columns: 1fr;
}

.order-entry-page .sidebar,
.order-entry-page .topbar {
    display: none;
}

.order-entry-page .content-wrap {
    min-height: 100vh;
    padding: 1rem;
}

.order-entry-page .main-area {
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.25rem 1rem;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 30px rgba(31, 59, 179, 0.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    padding: 0 0.35rem 1.2rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 900;
}

.mobile-user-actions {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

.sidebar-nav {
    display: grid;
    gap: 0.35rem;
}

.nav-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.8rem;
    color: #5b6475;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 750;
}

.nav-item i {
    color: #9aa5b5;
    font-size: 1.05rem;
}

.nav-item.active,
.nav-item:hover,
.nav-item:focus {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-item.active i,
.nav-item:hover i,
.nav-item:focus i {
    color: var(--primary);
}

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

.main-area {
    min-width: 0;
    max-width: 100%;
}

.dashboard-page .main-area {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(244, 247, 251, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-chip {
    max-width: 220px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #3f4757;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-wrap {
    padding: 1.5rem;
    min-width: 0;
    max-width: 100%;
}

.dashboard-page .content-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.welcome-band {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: clamp(1.2rem, 3vw, 1.8rem);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(31, 59, 179, 0.96), rgba(0, 188, 212, 0.82)),
        #1f3bb3;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 0;
    overflow: hidden;
}

.welcome-band h2 {
    margin: 0.8rem 0 0.4rem;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    font-weight: 900;
}

.welcome-band p {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    overflow-wrap: anywhere;
}

.welcome-stat {
    min-width: 132px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
}

.welcome-stat strong,
.welcome-stat span {
    display: block;
}

.welcome-stat strong {
    font-size: 2rem;
    line-height: 1;
}

.welcome-stat span {
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.84rem;
    font-weight: 800;
}

.stats-grid,
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stats-grid-pending-only {
    grid-template-columns: minmax(min(100%, 260px), 360px);
}

.stats-grid-dashboard {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 360px));
}

.dashboard-footer {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.8rem;
    margin: auto 0 0;
    padding: 1.25rem 0 0;
    color: #8a93a3;
    font-size: 0.78rem;
    font-weight: 750;
    text-align: center;
}

.dashboard-footer span,
.dashboard-footer a {
    color: inherit;
    white-space: nowrap;
}

.dashboard-footer-brand,
.dashboard-footer-phone {
    display: none;
}

.dashboard-footer-version {
    display: inline-flex;
}

.dashboard-footer a {
    text-decoration: none;
}

.dashboard-footer a:hover,
.dashboard-footer a:focus {
    color: var(--primary);
    text-decoration: underline;
}

.dashboard-footer .dashboard-footer-detail:not(:last-child)::after {
    content: "|";
    margin-left: 0.8rem;
    color: #b2bac8;
}

.dashboard-footer-version::after {
    content: "|";
    margin-left: 0.8rem;
    color: #b2bac8;
}

.stat-card,
.module-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.stat-card {
    min-height: 96px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas: "icon label" "icon value";
    align-items: center;
    column-gap: 0.85rem;
    padding: 1rem;
}

.stat-card i {
    grid-area: icon;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    font-size: 1.25rem;
}

.stat-card span {
    grid-area: label;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.stat-card strong {
    grid-area: value;
    font-size: 1.03rem;
    font-weight: 900;
}

.pending-export-widget {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    overflow: hidden;
}

.pending-export-widget:hover,
.pending-export-widget:focus {
    color: var(--ink);
    border-color: rgba(31, 59, 179, 0.35);
    box-shadow: var(--shadow-md);
}

.pending-export-widget[aria-disabled="true"] {
    cursor: default;
}

.pending-export-widget.has-pending-orders {
    color: #123173;
    background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
    border-color: rgba(24, 95, 165, 0.42);
    box-shadow: 0 10px 26px rgba(24, 95, 165, 0.12);
    animation: pendingCardPulse 1.45s ease-in-out 3;
}

.pending-export-widget.has-pending-orders::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid rgba(24, 95, 165, 0.36);
    border-radius: inherit;
    opacity: 0;
    animation: pendingRingPulse 1.45s ease-in-out 3;
}

.pending-export-widget.has-pending-orders i {
    background: #185FA5;
    box-shadow: 0 0 0 7px rgba(24, 95, 165, 0.11);
    animation: pendingIconNudge 1.45s ease-in-out 3;
}

.pending-export-widget.has-pending-orders span {
    color: #52637c;
}

.pending-export-widget.has-pending-orders strong {
    color: #102449;
}

@keyframes pendingCardPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 10px 26px rgba(24, 95, 165, 0.12);
    }

    45% {
        transform: translateY(-2px);
        box-shadow: 0 16px 34px rgba(24, 95, 165, 0.22);
    }
}

@keyframes pendingRingPulse {
    0% {
        opacity: 0;
        transform: scale(0.99);
    }

    45% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.01);
    }
}

@keyframes pendingIconNudge {
    0%, 100% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pending-export-widget.has-pending-orders,
    .pending-export-widget.has-pending-orders::after,
    .pending-export-widget.has-pending-orders i {
        animation: none;
    }
}

.accent-blue i { background: var(--primary); }
.accent-green i { background: var(--success); }
.accent-orange i { background: var(--warning); }
.pending-export-widget i { background: var(--primary); }
.sync-cadastros-widget {
    width: 100%;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.sync-cadastros-widget:hover,
.sync-cadastros-widget:focus-visible {
    color: var(--ink);
    border-color: rgba(0, 136, 112, 0.38);
    box-shadow: var(--shadow-md);
}

.sync-cadastros-widget:disabled {
    cursor: wait;
    opacity: 0.72;
}

.sync-cadastros-widget i {
    background: #008870;
}
.tutorial-widget i { background: linear-gradient(135deg, #00a887, #1f3bb3); }

.module-card {
    min-height: 205px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.1rem;
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.tutorial-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(1.2rem, 3vw, 1.8rem);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(31, 59, 179, 0.96), rgba(0, 188, 212, 0.82)),
        #1f3bb3;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.tutorial-hero h2 {
    margin: 0.8rem 0 0.35rem;
    font-size: clamp(1.35rem, 3vw, 2.05rem);
    font-weight: 900;
}

.tutorial-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.tutorial-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.tutorial-steps,
.tutorial-stage {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.tutorial-steps {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.8rem;
}

.tutorial-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.72rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 850;
    text-align: left;
}

.tutorial-step span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #eef3ff;
    border-radius: 8px;
}

.tutorial-step.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.tutorial-step.changed {
    animation: tutorialMenuChanged 0.9s ease both;
}

.tutorial-step.active span {
    color: var(--primary);
    background: #fff;
}

.tutorial-stage {
    min-width: 0;
    padding: 1rem;
}

.tutorial-stage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tutorial-stage-head h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.85rem);
    font-weight: 900;
}

.tutorial-head-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tutorial-head-actions > span {
    padding: 0.42rem 0.72rem;
    color: var(--primary);
    background: #eef3ff;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}

.tutorial-screen {
    min-height: 420px;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: #f6f8fc;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.tutorial-animation-frame {
    position: relative;
    width: min(100%, 760px);
    display: grid;
    place-items: center;
    animation: tutorialSceneIn 0.28s ease both;
}

.tutorial-focus {
    position: relative;
    z-index: 2;
    animation: tutorialPulse 1.2s ease-in-out infinite;
    outline: 3px solid rgba(31, 59, 179, 0.32);
    outline-offset: 4px;
}

.tutorial-tip {
    position: absolute;
    right: 1.4rem;
    top: 1.2rem;
    z-index: 5;
    width: min(300px, 82%);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    padding: 0.85rem;
    color: #172033;
    background: #fff;
    border: 1px solid rgba(31, 59, 179, 0.2);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    animation: tutorialTipIn 0.35s ease 0.18s both;
}

.tutorial-tip::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 28px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-left: 1px solid rgba(31, 59, 179, 0.2);
    border-bottom: 1px solid rgba(31, 59, 179, 0.2);
    transform: rotate(45deg);
}

.tutorial-tip i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
}

.tutorial-tip span {
    color: #334155;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.35;
}

.tutorial-tip-near-card {
    right: 1rem;
    top: calc(100% + 0.8rem);
}

.tutorial-tip-near-card::before {
    left: auto;
    right: 46px;
    top: -8px;
    border: 0;
    border-left: 1px solid rgba(31, 59, 179, 0.2);
    border-top: 1px solid rgba(31, 59, 179, 0.2);
}

.tutorial-tip-import-button {
    right: 1rem;
    top: 44%;
}

.tutorial-tip-import-button::before {
    left: -8px;
    top: 50%;
    border: 0;
    border-left: 1px solid rgba(31, 59, 179, 0.2);
    border-bottom: 1px solid rgba(31, 59, 179, 0.2);
    transform: translateY(-50%) rotate(45deg);
}

.tutorial-tip-departments {
    left: 2rem;
    right: auto;
    top: 68%;
    width: min(430px, 82%);
}

.tutorial-tip-departments::before {
    left: 112px;
    top: -8px;
    border: 0;
    border-left: 1px solid rgba(31, 59, 179, 0.2);
    border-top: 1px solid rgba(31, 59, 179, 0.2);
}

.tutorial-tip-quantity {
    right: 1rem;
    top: 70%;
}

.tutorial-tip-quantity::before {
    left: -8px;
    top: 50%;
    border: 0;
    border-left: 1px solid rgba(31, 59, 179, 0.2);
    border-bottom: 1px solid rgba(31, 59, 179, 0.2);
    transform: translateY(-50%) rotate(45deg);
}

.tutorial-tip-footer {
    right: 1rem;
    bottom: 4.6rem;
    top: auto;
}

.tutorial-tip-footer::before {
    left: auto;
    right: 24px;
    top: calc(100% - 8px);
    border: 0;
    border-right: 1px solid rgba(31, 59, 179, 0.2);
    border-bottom: 1px solid rgba(31, 59, 179, 0.2);
}

.tutorial-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 0.12rem;
    vertical-align: -0.16em;
    background: var(--primary);
    animation: tutorialBlink 0.8s steps(1) infinite;
}

.tutorial-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.tutorial-nav-hint {
    position: absolute;
    right: 0;
    top: calc(100% + 0.75rem);
    z-index: 8;
    width: min(320px, 80vw);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.82rem 0.92rem;
    color: #1f2937 !important;
    background: linear-gradient(135deg, #ffd43b, #ffb703) !important;
    border: 2px solid #d97706 !important;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(180, 83, 9, 0.36);
    font-size: 0.9rem;
    font-weight: 900;
    animation: tutorialHintPop 0.34s ease both, tutorialHintPulse 1.15s ease-in-out 0.34s infinite;
}

.tutorial-nav-hint::before {
    content: "";
    position: absolute;
    right: 46px;
    top: -8px;
    width: 16px;
    height: 16px;
    background: #ffd43b !important;
    border-left: 2px solid #d97706;
    border-top: 2px solid #d97706;
    transform: rotate(45deg);
}

.tutorial-nav-hint i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #1f3bb3;
    border-radius: 50%;
    font-size: 1rem;
}

.tutorial-nav-hint span {
    color: #1f2937 !important;
}

.tutorial-button-attention {
    animation: tutorialButtonShake 0.65s ease-in-out 0s 3, tutorialButtonGlow 1.2s ease-in-out 2s infinite;
}

.tutorial-dashboard-preview,
.tutorial-payment,
.tutorial-table,
.tutorial-export {
    width: min(100%, 560px);
}

.tutorial-blue-panel {
    padding: 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, #1f3bb3, #37bfd2);
    border-radius: 8px;
}

.tutorial-blue-panel span,
.tutorial-blue-panel strong,
.tutorial-blue-panel p {
    display: block;
}

.tutorial-blue-panel strong {
    margin-top: 0.9rem;
    font-size: 1.55rem;
    font-weight: 900;
}

.tutorial-blue-panel p {
    max-width: 420px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.tutorial-mini-card,
.tutorial-row,
.tutorial-product,
.tutorial-order,
.tutorial-select,
.tutorial-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.9rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.tutorial-mini-card i,
.tutorial-info i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
}

.tutorial-mini-card span,
.tutorial-row span,
.tutorial-product span,
.tutorial-order span,
.tutorial-select span,
.tutorial-client-chip span,
.tutorial-export span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 750;
}

.tutorial-phone {
    width: min(100%, 520px);
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.tutorial-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tutorial-modal-head span {
    display: block;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.tutorial-modal-head strong {
    font-size: 1.25rem;
    font-weight: 900;
}

.tutorial-search {
    padding: 0.9rem;
    color: var(--muted);
    background: #fff;
    border: 1px solid #cfd7e6;
    border-radius: 8px;
}

.tutorial-search i {
    margin-right: 0.55rem;
    color: var(--primary);
}

.tutorial-fake-button {
    margin-top: 0.75rem;
    padding: 0.65rem 0.9rem;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 8px;
    font-weight: 900;
}

.tutorial-client-chip {
    margin-bottom: 0.8rem;
    padding: 0.72rem 0.85rem;
    color: #12319c;
    background: #eef5ff;
    border: 1px solid #cfe0ff;
    border-radius: 8px;
}

.tutorial-chips {
    display: flex;
    gap: 0.5rem;
    margin: 0.8rem 0;
    overflow-x: auto;
}

.tutorial-chips span {
    flex: 0 0 auto;
    padding: 0.48rem 0.75rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 850;
}

.tutorial-chips .active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.tutorial-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.tutorial-qty {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 42px 64px 42px;
    gap: 0.45rem;
}

.tutorial-qty button,
.tutorial-qty input,
.tutorial-icon-actions button,
.tutorial-footer button {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.tutorial-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0.8rem -1rem -1rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-top: 1px solid var(--line);
}

.tutorial-footer button,
.tutorial-icon-actions .primary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.tutorial-order-entry,
.tutorial-order-desktop {
    width: min(100%, 760px);
    overflow: hidden;
    background: #f2f2f7;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.tutorial-order-entry {
    max-width: 430px;
}

.tutorial-order-head {
    display: grid;
    gap: 0.2rem;
    padding: 0.78rem 0.9rem;
    color: #fff;
    background: #1a6dbf;
}

.tutorial-order-head strong,
.tutorial-order-head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tutorial-order-head strong {
    font-weight: 950;
}

.tutorial-order-head span {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    font-weight: 750;
}

.tutorial-order-head button {
    justify-self: end;
    min-height: 30px;
    margin-top: 0.35rem;
    padding: 0.25rem 0.65rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 8px;
    font-weight: 850;
}

.tutorial-order-entry .tutorial-search,
.tutorial-order-desktop .tutorial-search {
    margin: 0.75rem;
    border-radius: 10px;
}

.tutorial-order-entry .tutorial-chips {
    margin: 0 0.75rem 0.75rem;
}

.tutorial-order-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0 0.75rem 0.75rem;
}

.tutorial-product-card {
    position: relative;
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 0.34rem;
    padding: 0.72rem;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.tutorial-product-card.selected {
    border: 2.5px solid #185FA5;
}

.tutorial-product-card em {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #185FA5;
    border-radius: 999px;
    font-style: normal;
    font-size: 0.76rem;
    font-weight: 900;
}

.tutorial-product-card strong {
    padding-right: 1.35rem;
    color: #111827;
    font-size: 0.86rem;
    line-height: 1.16;
    font-weight: 950;
}

.tutorial-product-card span {
    color: #9aa0aa;
    font-size: 0.72rem;
    font-weight: 800;
}

.tutorial-product-card b {
    color: #185FA5;
    font-size: 1rem;
}

.tutorial-mobile-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.75rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.tutorial-mobile-summary span:last-child {
    text-align: right;
}

.tutorial-mobile-summary strong {
    color: #185FA5;
    font-size: 1rem;
}

.tutorial-order-desktop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 30%);
}

.tutorial-order-list {
    min-width: 0;
}

.tutorial-order-summary {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.8rem;
    background: #fff;
    border-left: 1px solid #d9dde6;
}

.tutorial-order-summary h3 {
    margin: 0 0 0.3rem;
    font-size: 0.92rem;
}

.tutorial-order-summary p,
.tutorial-order-summary div {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #edf0f5;
    font-size: 0.8rem;
}

.tutorial-order-summary p strong {
    min-width: 0;
}

.tutorial-order-summary p span,
.tutorial-order-summary div strong {
    color: #185FA5;
    font-weight: 900;
    white-space: nowrap;
}

.tutorial-order-summary footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.2rem;
}

.tutorial-order-summary footer button {
    min-height: 36px;
    color: #fff;
    background: #1f3bb3;
    border: 1px solid #1f3bb3;
    border-radius: 8px;
    font-weight: 900;
}

.tutorial-order-summary footer button:last-child {
    color: #A32D2D;
    background: #fff;
    border-color: #F09595;
}

.tutorial-total-card {
    padding: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
}

.tutorial-total-card span,
.tutorial-total-card strong {
    display: block;
}

.tutorial-total-card strong {
    margin-top: 0.5rem;
    font-size: 1.6rem;
}

.tutorial-icon-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.tutorial-icon-actions button {
    width: 48px;
}

.tutorial-pending-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.tutorial-pending-actions button,
.tutorial-export-button,
.tutorial-sync-button {
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 900;
}

.tutorial-export-button,
.tutorial-sync-button {
    width: 100%;
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.tutorial-export {
    padding: 2rem 1rem;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.tutorial-success {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    color: var(--success);
    border: 5px solid var(--success);
    border-radius: 50%;
    font-size: 2.4rem;
}

.tutorial-export strong {
    display: block;
    color: var(--success);
    font-size: 1.5rem;
    font-weight: 900;
}

.tutorial-export p {
    margin: 0.5rem 0;
}

@keyframes tutorialSceneIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tutorialTipIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tutorialPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(31, 59, 179, 0.22);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(31, 59, 179, 0.08);
    }
}

@keyframes tutorialBlink {
    0%, 45% {
        opacity: 1;
    }
    46%, 100% {
        opacity: 0;
    }
}

@keyframes tutorialHintPop {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tutorialHintPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 16px 36px rgba(180, 83, 9, 0.24);
    }
    50% {
        transform: translateY(4px);
        box-shadow: 0 18px 42px rgba(180, 83, 9, 0.34);
    }
}

@keyframes tutorialButtonShake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-4px);
    }
    40%, 80% {
        transform: translateX(4px);
    }
}

@keyframes tutorialButtonGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 183, 3, 0.55);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(255, 183, 3, 0.16);
    }
}

@keyframes tutorialMenuChanged {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 183, 3, 0);
    }
    35% {
        transform: scale(1.035);
        box-shadow: 0 0 0 8px rgba(255, 183, 3, 0.28);
        border-color: #ffb703;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 183, 3, 0);
    }
}

.module-card:hover,
.module-card:focus {
    color: var(--ink);
    border-color: rgba(31, 59, 179, 0.35);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.module-icon {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 1.28rem;
}

.primary-card .module-icon {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.module-title {
    font-size: 1.08rem;
    font-weight: 900;
}

.module-text {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.42;
}

.module-badge {
    margin-top: auto;
    width: fit-content;
    border-radius: 999px;
    background: #eef3ff;
    color: var(--primary);
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 900;
}

.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: clamp(1.1rem, 3vw, 1.5rem);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(31, 59, 179, 0.96), rgba(0, 188, 212, 0.82)),
        var(--primary);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.list-title-center {
    flex: 1;
    text-align: center;
}

.list-toolbar h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 900;
}

.list-toolbar p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.status-pill-light {
    background: rgba(255, 255, 255, 0.18);
}

.form-panel,
.filter-card,
.data-card {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.sync-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.sync-toolbar strong,
.sync-toolbar span {
    display: block;
}

.sync-toolbar strong {
    font-weight: 900;
}

.sync-toolbar span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.form-panel {
    scroll-margin-top: 1rem;
}

.form-panel-feature {
    max-width: 860px;
}

.form-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-panel-heading p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.filter-card .form-label {
    color: #3f4757;
    font-size: 0.86rem;
    font-weight: 900;
}

.search-control {
    position: relative;
    display: block;
    width: 100%;
}

.search-control i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: var(--primary);
}

.search-control .form-control {
    width: 100%;
    padding-left: 2.75rem;
    font-size: 1.08rem;
}

.data-card {
    padding: 0;
    overflow: hidden;
}

.data-card-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
}

.order-panel .data-card-header {
    margin: 0.75rem;
    padding: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 0;
    border-radius: 8px;
}

.order-panel .data-card-header span,
.order-panel .order-total {
    color: rgba(255, 255, 255, 0.86);
}

.order-panel .data-card-header strong {
    color: #fff;
}

.data-card-header strong,
.data-card-header span {
    display: block;
}

.data-card-header strong {
    font-weight: 900;
}

.data-card-header span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.client-grid {
    display: grid;
}

.client-row {
    display: grid;
    grid-template-columns: minmax(230px, 1.3fr) minmax(155px, 0.75fr) minmax(240px, 1.2fr) minmax(145px, 0.65fr);
    gap: 1rem;
    align-items: center;
    min-width: 0;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.product-card {
    display: grid;
    align-content: start;
    gap: 0.7rem;
    min-width: 0;
    min-height: 132px;
    padding: 0.95rem;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.product-card .product-main {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.product-card .product-main strong {
    padding-right: 0.4rem;
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.14;
    font-weight: 950;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.product-card .product-main span,
.order-row span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.product-card-price {
    color: #185FA5;
    font-size: 1.08rem;
    font-weight: 950;
}

@media (max-width: 700px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.62rem;
        padding: 0.75rem;
    }

    .product-card {
        min-height: 124px;
        padding: 0.72rem;
        border-radius: 12px;
    }

    .product-card .product-main strong {
        font-size: 0.83rem;
        line-height: 1.16;
    }

    .product-card .product-main span {
        font-size: 0.69rem;
    }

    .product-card-price {
        font-size: 0.98rem;
    }
}

.order-row strong {
    display: block;
    color: #374151;
    font-weight: 900;
}

.order-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.order-entry-toolbar {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 280px;
    position: sticky;
    top: 0;
    z-index: 9;
    align-items: center;
}

.order-entry-toolbar .list-title-center {
    justify-self: center;
    width: min(100%, 720px);
    text-align: center;
}

.order-entry-toolbar #openClientLookup {
    width: auto;
}

.order-meta {
    margin: 0.3rem 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    font-weight: 800;
}

.order-meta span {
    display: block;
}

.order-client-name {
    margin-top: 0.35rem;
    color: #e8f4ff;
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
    font-weight: 900;
}

.order-client-address,
.order-reference {
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(0.82rem, 1.6vw, 0.98rem);
    font-weight: 750;
}

.order-entry-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.order-section-title {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 900;
}

.lookup-field,
.order-client-layout,
.order-add-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.6fr);
    gap: 0.75rem;
    align-items: center;
}

.order-add-grid {
    grid-template-columns: minmax(0, 1fr) 130px 100px 190px;
}

.selected-pill {
    min-height: 56px;
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    color: #374151;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
}

.lookup-field-compact {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 0;
}

.lookup-field-compact .selected-pill {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.lookup-icon-button {
    width: 56px;
    min-height: 56px;
    padding: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    font-size: 1.25rem;
}

.suggestion-list {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.suggestion-item {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    padding: 0.75rem;
    text-align: left;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.suggestion-item:hover,
.suggestion-item:focus {
    border-color: rgba(31, 59, 179, 0.35);
    background: var(--primary-soft);
}

.order-grid {
    display: grid;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

.order-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 90px 130px 44px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
}

.order-total {
    color: var(--primary);
    font-size: 1.1rem;
}

.success-dialog {
    text-align: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    color: #fff;
    background: var(--success);
    border-radius: 50%;
    font-size: 2.2rem;
}

.success-dialog h2 {
    margin-bottom: 1.25rem;
    font-weight: 900;
}

.order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.lookup-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.56);
}

.lookup-dialog {
    width: min(100%, 680px);
    max-height: min(760px, 92vh);
    overflow: auto;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.product-picker-dialog {
    width: min(100%, 860px);
    max-height: min(820px, 94vh);
    padding-bottom: 0;
}

.product-picker-client {
    display: grid;
    gap: 0.2rem;
    margin: -0.15rem 0 0.85rem;
    padding: 0.75rem 0.9rem;
    color: #12319c;
    background: #eef5ff;
    border: 1px solid #cfe0ff;
    border-radius: 8px;
}

.product-picker-client strong,
.product-picker-client span {
    display: block;
}

.product-picker-client strong {
    color: #12319c;
    font-weight: 900;
}

.product-picker-client span {
    color: #5c687a;
    font-size: 0.86rem;
    font-weight: 750;
}

.department-strip {
    display: flex;
    gap: 0.55rem;
    margin: 0.85rem 0 1rem;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.department-chip {
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
    padding: 0.58rem 0.9rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.department-chip.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.product-picker-list {
    display: grid;
    gap: 0.75rem;
    max-height: min(520px, 54vh);
    overflow: auto;
    padding-bottom: 1rem;
}

.product-picker-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    padding: 0.95rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.product-picker-info strong,
.product-picker-info span {
    display: block;
}

.product-picker-info strong {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

.product-picker-info span {
    margin-top: 0.2rem;
    color: var(--muted);
    font-weight: 750;
}

.product-picker-price {
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 900;
}

.product-picker-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(132px, 170px) auto minmax(92px, 130px);
    gap: 0.55rem;
    align-items: center;
}

.product-picker-quantity {
    display: grid;
    grid-template-columns: 42px minmax(52px, 1fr) 42px;
    gap: 0.45rem;
    align-items: center;
}

.product-picker-qty,
.product-picker-unit-price {
    text-align: center;
}

.product-picker-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 -1rem;
    padding: 0.9rem 1rem;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
}

.lookup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.client-lookup-overlay {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(2px);
}

.lookup-close-action {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(24, 95, 165, 0.28);
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.1rem;
    box-shadow: 0 8px 18px rgba(24, 95, 165, 0.14);
}

.lookup-close-action:hover,
.lookup-close-action:focus {
    border-color: var(--primary);
    color: var(--primary);
}

.lookup-secondary-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0.75rem 0 0.25rem;
}

.lookup-results {
    max-height: 420px;
    overflow: auto;
}

.draft-dialog {
    max-width: 520px;
}

.payment-form {
    margin-top: 0.9rem;
}

.payment-form-grid,
.payment-field {
    display: grid;
    gap: 0.8rem;
}

.payment-field {
    gap: 0.35rem;
}

.payment-field .form-label {
    margin: 0;
    color: var(--ink);
    font-weight: 750;
}

.payment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.btn-icon-action {
    width: 46px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.native-action-icon {
    display: inline-block;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 900;
}

.draft-summary {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.draft-summary div {
    padding: 0.9rem;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.draft-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.draft-summary strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--ink);
    font-weight: 900;
}

.draft-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.pending-orders-card {
    margin-top: 1rem;
}

.pending-orders-page {
    overflow-y: auto;
}

.pending-orders-page .content-wrap {
    min-height: 100vh;
    padding-bottom: 2rem;
}

.pending-orders-page .pending-orders-card {
    margin-bottom: 2rem;
}

.pending-info-band {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    color: var(--primary);
    background: #eef3ff;
    border: 1px solid rgba(31, 59, 179, 0.18);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.pending-info-band i {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-size: 1.05rem;
}

.pending-info-band strong {
    font-size: 1rem;
    font-weight: 900;
}

.pending-order-grid {
    display: grid;
}

.pending-order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
}

.pending-order-row:last-child {
    border-bottom: 0;
}

.pending-order-main {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(110px, 0.45fr) minmax(120px, 0.45fr);
    gap: 1rem;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 0;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
}

.pending-order-main span,
.pending-detail-summary span {
    display: block;
    min-width: 0;
}

.pending-order-main strong,
.pending-detail-summary strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 900;
}

.pending-order-main small,
.pending-detail-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.pending-order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.pending-order-actions .btn {
    width: 42px;
    height: 42px;
    padding: 0;
}

.pending-order-whatsapp {
    color: #128c7e;
}

.pending-detail-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.35fr) minmax(100px, 0.35fr) minmax(120px, 0.35fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pending-detail-summary div {
    padding: 0.85rem;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.pending-details-dialog .order-row {
    grid-template-columns: minmax(220px, 1fr) 90px 130px;
}

.client-row:last-child {
    border-bottom: 0;
}

.client-row:hover {
    background: #f9fbff;
}

.client-main {
    display: grid;
    gap: 0.18rem;
    align-items: center;
    min-width: 0;
}

.client-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-weight: 900;
}

.client-main strong,
.client-main span,
.client-doc strong,
.client-address strong,
.client-phone strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-main strong {
    font-weight: 900;
}

.client-main span,
.client-doc span,
.client-address span,
.client-phone span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-doc strong,
.client-address strong,
.client-phone strong {
    color: #374151;
    font-size: 0.92rem;
    font-weight: 800;
}

.empty-state {
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.35rem;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
}

.empty-state i {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 1.4rem;
}

.empty-state strong {
    color: var(--ink);
    font-weight: 900;
}

.app-modal {
    border: 0;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.app-modal .modal-header,
.app-modal .modal-footer {
    border-color: var(--line);
}

.app-toast {
    color: #fff;
    background: var(--success);
    border: 0;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
    .auth-card {
        grid-template-columns: 1fr;
        width: min(100%, 520px);
        min-height: 0;
    }

    .auth-visual {
        min-height: 410px;
        padding: 2rem;
    }

    .auth-visual-copy h1 {
        max-width: 620px;
        font-size: 2.15rem;
    }

    .auth-form-panel {
        width: min(100% - 2rem, 380px);
        padding: 2rem 0 2.25rem;
    }

    .app-layout {
        grid-template-columns: 1fr;
        grid-auto-rows: max-content;
        align-content: start;
        min-height: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .main-area {
        align-self: start;
    }

    .sidebar {
        position: static;
        height: auto;
        width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 0.55rem 1rem;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        overflow: hidden;
    }

    .sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        min-width: 0;
    }

    .sidebar-brand {
        flex: 0 1 auto;
        min-width: 0;
        padding-bottom: 0;
    }

    .sidebar-brand span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-user-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.75rem;
        min-width: 0;
    }

    .mobile-user-actions .user-chip {
        max-width: min(220px, 38vw);
    }

    .sidebar-nav {
        display: none;
        width: 100%;
        max-width: 100%;
        margin-top: 0.7rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.15rem;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .topbar {
        position: static;
        min-height: auto;
        justify-content: flex-start;
        padding-top: 0.7rem;
        padding-bottom: 0.65rem;
    }

    .topbar .topbar-actions {
        display: none;
    }

    .topbar-empty {
        display: none;
    }

    .content-wrap {
        padding-top: 0.8rem;
        padding-bottom: calc(1.5rem + 82px + env(safe-area-inset-bottom));
    }

    .dashboard-footer {
        margin-top: 1rem;
    }

    .dashboard-page .content-wrap {
        padding-bottom: calc(7rem + env(safe-area-inset-bottom));
    }

    .dashboard-page .dashboard-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: env(safe-area-inset-bottom);
        z-index: 49;
        width: 100%;
        min-height: 22px;
        transform: none;
        margin: 0;
        padding: 0.2rem 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        flex-wrap: nowrap;
        gap: 0.28rem;
        line-height: 1;
        pointer-events: none;
    }

    .dashboard-page .mobile-bottom-nav {
        bottom: calc(1.65rem + env(safe-area-inset-bottom));
    }

    .tutorial-page .content-wrap {
        padding-bottom: calc(8rem + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav {
        position: fixed;
        left: max(0.75rem, env(safe-area-inset-left));
        right: max(0.75rem, env(safe-area-inset-right));
        bottom: max(0.65rem, env(safe-area-inset-bottom));
        z-index: 50;
        min-height: 70px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.15rem;
        padding: 0.48rem 0.45rem;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(207, 215, 230, 0.9);
        border-radius: 18px;
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 0.2rem;
        color: #596475;
        text-decoration: none;
        border-radius: 14px;
        font-size: 0.68rem;
        font-weight: 850;
        line-height: 1.05;
    }

    .mobile-bottom-nav i {
        color: #7b8798;
        font-size: 1.28rem;
        line-height: 1;
    }

    .mobile-bottom-nav span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav a.active {
        color: var(--primary);
        background: #eef3ff;
    }

    .mobile-bottom-nav a.active i {
        color: var(--primary);
    }

    .client-row {
        grid-template-columns: 1fr 1fr;
    }

    .order-row,
    .pending-details-dialog .order-row,
    .order-client-layout,
    .order-add-grid,
    .pending-order-row,
    .pending-order-main,
    .pending-detail-summary {
        grid-template-columns: 1fr;
    }

    .pending-order-actions {
        justify-content: stretch;
    }

    .pending-order-actions .btn {
        flex: 1;
        width: auto;
    }

    .client-main {
        grid-column: 1 / -1;
    }

    .client-address {
        grid-column: 1 / -1;
    }
}

@media (max-width: 576px) {
    .auth-shell {
        align-items: stretch;
        padding: 0;
    }

    .auth-card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-visual {
        min-height: auto;
        padding: 1.15rem 1.5rem 1.35rem;
        gap: 1.05rem;
    }

    .auth-metrics {
        grid-template-columns: 1fr;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
    }

    .brand-name {
        font-size: 1.12rem;
    }

    .auth-visual-copy {
        margin-top: 0;
    }

    .auth-visual-copy h1 {
        margin: 1rem 0 0.65rem;
        font-size: 1.75rem;
        line-height: 1.15;
    }

    .auth-visual-copy p {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .auth-metrics div {
        min-height: 0;
    }

    .auth-form-title {
        font-size: 1.7rem;
    }

    .auth-form-text {
        font-size: 1rem;
    }

    .auth-form-panel {
        width: min(100% - 2rem, 380px);
        padding: 1.25rem 0 1.4rem;
    }

    .auth-form-panel .mb-4 {
        margin-bottom: 1rem !important;
    }

    .auth-field.mb-3 {
        margin-bottom: 0.85rem !important;
    }

    .auth-field .form-control {
        min-height: 44px;
        font-size: 1.08rem;
    }

    .btn-auth-submit {
        min-height: 44px;
        font-size: 1.05rem;
    }

    .topbar,
    .welcome-band,
    .topbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .content-wrap,
    .topbar {
        padding: 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .topbar {
        min-height: auto;
        justify-content: flex-start;
        padding-top: 0.75rem;
        padding-bottom: 0.65rem;
    }

    .content-wrap {
        padding-top: 0.75rem;
        padding-bottom: calc(1.5rem + 82px + env(safe-area-inset-bottom));
    }

    .dashboard-footer {
        gap: 0.4rem;
        padding-top: 0.85rem;
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .dashboard-page .dashboard-footer {
        padding: 0.2rem 0;
        font-size: 0.64rem;
    }

    .dashboard-footer-detail {
        display: none;
    }

    .dashboard-footer-brand,
    .dashboard-footer-phone,
    .dashboard-footer-version {
        display: inline-flex;
    }

    .dashboard-footer-version::after {
        display: none;
    }

    .dashboard-footer-brand::after,
    .dashboard-footer-phone::after {
        content: "|";
        margin-left: 0.28rem;
        color: #b2bac8;
    }

    .sidebar {
        padding-inline: 0.75rem;
        min-height: 0;
        max-height: 86px;
    }

    .sidebar-head {
        gap: 0.6rem;
    }

    .sidebar-brand {
        padding-inline: 0;
        gap: 0.55rem;
    }

    .brand-mark-sm {
        flex: 0 0 auto;
    }

    .mobile-user-actions {
        gap: 0.45rem;
    }

    .mobile-user-actions .user-chip {
        max-width: 30vw;
        padding-inline: 0.55rem;
        font-size: 0.82rem;
    }

    .mobile-user-actions .btn {
        padding-inline: 0.55rem;
    }

    .user-chip {
        max-width: 100%;
    }

    .welcome-stat {
        width: 100%;
        text-align: left;
    }

    .welcome-band {
        width: 100%;
    }

    .stats-grid,
    .module-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-hero,
    .tutorial-shell {
        grid-template-columns: 1fr;
    }

    .tutorial-hero,
    .tutorial-stage-head,
    .tutorial-head-actions,
    .tutorial-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .tutorial-steps {
        display: flex;
        overflow-x: auto;
    }

    .tutorial-step {
        flex: 0 0 auto;
        width: auto;
        min-width: 138px;
    }

    .tutorial-screen {
        min-height: 360px;
        padding: 0.75rem;
    }

    .tutorial-tip {
        position: relative;
        inset: auto;
        width: 100%;
        margin-top: 0.8rem;
    }

    .tutorial-tip::before {
        left: 26px;
        top: -8px;
        border: 0;
        border-left: 1px solid rgba(31, 59, 179, 0.2);
        border-top: 1px solid rgba(31, 59, 179, 0.2);
    }

    .tutorial-nav-hint {
        position: relative;
        inset: auto;
        width: 100%;
        margin-top: 0.75rem;
    }

    .tutorial-nav-hint::before {
        right: 38px;
    }

    .tutorial-product,
    .tutorial-order,
    .tutorial-info {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .list-toolbar,
    .sync-toolbar,
    .data-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .list-title-center {
        text-align: center;
    }

    .list-toolbar .btn,
    .sync-toolbar .btn,
    .data-card-header .btn {
        width: 100%;
    }

    .order-entry-toolbar {
        display: flex;
        position: static;
    }

    .order-meta {
        font-size: 0.92rem;
    }

    .order-entry-toolbar #openClientLookup {
        width: 50%;
        min-width: 180px;
        align-self: center;
    }

    .order-entry-actions {
        flex-direction: column;
        width: 100%;
    }

    .order-entry-actions .btn {
        width: 100%;
    }

    .product-picker-card {
        grid-template-columns: 1fr;
    }

    .product-picker-controls {
        grid-template-columns: auto minmax(140px, 1fr);
    }

    .product-picker-controls > span:nth-of-type(2) {
        margin-top: 0.35rem;
    }

    .product-picker-controls .product-picker-unit-price {
        width: 100%;
    }

    .product-picker-quantity {
        width: 100%;
    }

    .product-picker-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .pending-info-band {
        align-items: flex-start;
    }

    .client-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .order-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .order-actions {
        flex-direction: column;
    }

    .order-actions .btn {
        width: 100%;
    }

    .draft-actions {
        grid-template-columns: 1fr;
    }

    .client-main,
    .client-address {
        grid-column: auto;
    }

    .client-main strong,
    .client-main span,
    .client-doc strong,
    .client-address strong,
    .client-phone strong {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 577px) and (max-width: 900px) {
    .pending-orders-page .pending-order-row {
        grid-template-columns: minmax(0, 1fr) 148px;
    }

    .pending-orders-page .pending-order-actions {
        align-self: center;
        justify-content: flex-end;
    }

    .pending-orders-page .pending-order-actions .btn {
        flex: 0 0 42px;
        width: 42px;
    }
}

@media (max-width: 900px) {
    .order-entry-page .content-wrap {
        padding: 0;
    }

    .pending-orders-page .content-wrap {
        padding: 0.75rem 0.75rem calc(7.5rem + env(safe-area-inset-bottom, 0px));
    }

    .order-brand-row {
        display: none;
    }

    .order-client-bar {
        position: relative;
        width: 100vw;
        max-width: 100vw;
        min-height: 54px;
        display: block;
        padding: 0.65rem 3.85rem 0.65rem 1rem;
        overflow: hidden;
    }

    .order-client-info {
        width: calc(100vw - 4.85rem);
        max-width: calc(100vw - 4.85rem);
        min-width: 0;
        overflow: hidden;
    }

    .order-client-info strong,
    .order-client-info span {
        white-space: nowrap;
    }

    .order-client-bar .btn {
        position: absolute;
        top: 50%;
        right: 0.75rem;
        transform: translateY(-50%);
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 0;
        color: #fff;
        background: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 255, 255, 0.34);
        border-radius: 10px;
        font-size: 0;
        font-weight: 900;
        line-height: 1;
        z-index: 5;
    }

    .order-client-bar .btn i {
        width: 20px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        font-size: 1.05rem;
        line-height: 1;
    }

    .order-client-bar .btn i::before {
        display: block;
        line-height: 1;
        transform: none;
    }

    .order-product-area {
        display: block;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .order-product-main {
        width: 100%;
        height: 100%;
        max-width: 100vw;
        padding: 0.75rem 0.75rem 210px;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .order-product-tools {
        margin: 0;
        padding: 0.75rem 0.75rem 0.55rem;
    }

    .order-search-row {
        margin-bottom: 0.55rem;
    }

    .order-filter-tabs {
        margin: 0;
        padding-inline: 0;
    }

    .order-product-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.58rem;
        padding-top: 0.32rem;
    }

    .order-product-card {
        width: 100%;
        min-width: 0;
        min-height: 176px;
        padding: 0.68rem;
        border-radius: 12px;
    }

    .order-product-name {
        font-size: 0.85rem;
    }

    .order-summary-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 45;
        height: auto;
        display: block;
        padding: 0.75rem;
        border-left: 0;
        border-top: 1px solid #d9dde6;
        box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.12);
    }

    .order-summary-panel h2,
    .order-summary-list,
    .order-summary-empty {
        display: none !important;
    }

    .order-summary-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        align-items: center;
        padding-top: 0;
        border-top: 0;
    }

    .order-summary-totals {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
    }

    .order-summary-totals div {
        display: none;
    }

    .order-summary-totals div:first-child,
    .order-summary-totals .order-summary-total {
        display: block;
    }

    .order-summary-totals .order-summary-total {
        text-align: right;
    }

    .order-summary-totals span,
    .order-summary-totals strong {
        display: block;
    }

    .order-summary-totals span {
        font-size: 0.82rem;
    }

    .order-summary-total strong {
        font-size: 1.15rem;
    }

    .order-close-action,
    .order-cancel-action {
        min-height: 56px;
        padding: 0.45rem 0.55rem;
        font-size: 0.96rem;
    }

    .order-whatsapp-card {
        align-self: start;
        align-content: start;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }

    .order-whatsapp-summary {
        grid-template-columns: 1fr;
    }

    .order-whatsapp-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .order-brand-row {
        display: none;
    }

    .order-brand-title {
        gap: 0.42rem;
    }

    .order-brand-title span,
    .order-seller-chip {
        font-size: 0.78rem;
    }

    .order-client-bar {
        align-items: center;
        width: 100vw;
        max-width: 100vw;
        min-height: 54px;
        padding: 0.58rem 3.65rem 0.58rem 0.9rem;
    }

    .order-client-info {
        width: calc(100vw - 4.55rem);
        max-width: calc(100vw - 4.55rem);
    }

    .order-client-info strong {
        font-size: 0.9rem;
    }

    .order-client-info span {
        font-size: 0.74rem;
    }

    .order-client-bar .btn {
        right: 0.72rem;
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        font-size: 0;
    }

    .order-product-main {
        width: 100%;
        height: 100%;
        max-width: 100vw;
        padding: 0.62rem 0.62rem 214px;
    }

    .order-product-tools {
        margin: 0;
        padding: 0.62rem 0.62rem 0.52rem;
    }

    .order-search-row {
        margin-bottom: 0.52rem;
    }

    .order-filter-tabs {
        margin: 0;
        padding-inline: 0;
    }

    .order-entry-page .order-filter-tabs {
        gap: 0.48rem;
    }

    .order-product-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.52rem;
        padding-top: 0.3rem;
    }

    .order-product-card {
        width: 100%;
        min-width: 0;
        min-height: 184px;
        padding: 0.62rem;
    }

    .order-product-price {
        font-size: 0.98rem;
    }

    .order-product-price-edit {
        grid-template-columns: 1fr;
        gap: 0.16rem;
    }

    .order-product-price-edit span {
        font-size: 0.66rem;
    }

    .order-product-price-edit .form-control {
        min-height: 28px;
        padding-inline: 0.35rem;
        text-align: center;
        font-size: 0.92rem;
    }

    .order-product-department,
    .order-product-stock,
    .order-product-last {
        font-size: 0.69rem;
    }

    .order-qty-control {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
    }

    .order-qty-control .btn,
    .order-qty-control .form-control {
        min-height: 28px;
    }

    .order-summary-footer {
        grid-template-columns: 1fr 1fr;
    }

    .order-whatsapp-screen {
        display: grid;
        place-items: center;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 0.9rem;
        overflow-y: auto;
    }

    .order-whatsapp-card {
        width: min(100%, 360px);
        min-height: 0;
        gap: 0.58rem;
        padding: 0.95rem;
        border: 1px solid #d9dde6;
        border-radius: 14px;
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    }

    .order-whatsapp-icon {
        width: 48px;
        height: 48px;
        font-size: 1.45rem;
    }

    .order-whatsapp-card h2 {
        font-size: 1.08rem;
    }

    .order-whatsapp-copy {
        font-size: 0.84rem;
        line-height: 1.3;
    }

    .order-whatsapp-summary div {
        padding: 0.52rem 0.62rem;
    }

    .order-whatsapp-field .form-control {
        min-height: 42px;
    }

    .order-whatsapp-actions .btn {
        width: 100%;
        min-height: 42px;
    }

    .order-whatsapp-warning {
        padding: 0.52rem 0.62rem;
        font-size: 0.82rem;
    }
}

.order-entry-page .content-wrap.order-entry-wrap {
    min-height: 100vh;
    padding: 0;
    background: var(--order-bg);
}

.order-entry-page .main-area {
    background: var(--order-bg);
}

@media (max-width: 700px) {
    .order-product-area {
        display: block;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .order-product-main {
        width: 100%;
        height: 100%;
        max-width: 100vw;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .order-product-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-product-card {
        max-width: 100%;
    }
}
