* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1e293b;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: #0f172a;
    color: #fff;
    padding: 24px 18px;
}

.brand {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar nav a {
    color: #fff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.14);
}

.user-box {
    position: absolute;
    bottom: 24px;
    left: 18px;
    right: 18px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
}

.content {
    margin-left: 240px;
    padding: 28px;
}

.content-full {
    padding: 28px;
}

h1, h2, h3 {
    margin-top: 0;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    margin-bottom: 20px;
}

.form-card {
    max-width: 700px;
    background: #fff;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-card.no-shadow {
    box-shadow: none;
    padding: 0;
}

input, select, textarea, button {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    font-size: 14px;
}

button, .btn, .btn-sm {
    background: #0f172a;
    color: #fff;
    border: none;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn {
    padding: 12px 16px;
    border-radius: 10px;
}

.btn-sm {
    padding: 8px 12px;
    border-radius: 8px;
    width: auto;
}

.danger {
    background: #b91c1c !important;
}

.grid {
    display: grid;
    gap: 20px;
}

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

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

.stat p {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
}

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

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
    max-width: 280px;
}

.flash-wrap {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    color: #fff;
}

.flash.success { background: #15803d; }
.flash.danger { background: #b91c1c; }
.flash.warning { background: #d97706; }
.flash.info { background: #2563eb; }

.login-box {
    max-width: 420px;
    margin: 80px auto;
}

.hint {
    margin-top: 16px;
    font-size: 14px;
    color: #475569;
}

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

.product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    padding-bottom: 16px;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-card h3,
.product-card p,
.product-card form {
    padding-left: 16px;
    padding-right: 16px;
}

.products-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.products-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    padding: 26px 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.10), transparent 26%),
        linear-gradient(135deg, #fff5f5 0%, #fffefe 52%, #f8fafc 100%);
    border: 1px solid #ffe4e6;
    box-shadow: 0 20px 40px rgba(127, 29, 29, 0.07);
}

.products-kicker,
.receipts-kicker {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff1f2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.products-hero h1,
.receipts-hero h1 {
    margin: 12px 0 8px 0;
    color: #7f1d1d;
    font-size: 34px;
    line-height: 1.05;
}

.products-hero p,
.receipts-hero p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.products-hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

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

.product-card.modern {
    padding-bottom: 0;
    border: 1px solid #ffe4e6;
    box-shadow: 0 16px 30px rgba(127, 29, 29, 0.06);
}

.product-card.modern img {
    height: 190px;
}

.product-card-body {
    padding: 16px 16px 18px 16px;
}

.product-card-body h3 {
    margin: 0 0 8px 0;
    padding: 0;
    color: #7f1d1d;
}

.product-price-preview {
    margin: 0 0 14px 0;
    padding: 0;
    color: #991b1b;
    font-size: 18px;
    font-weight: 900;
}

.product-price-form {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-price-form label {
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 800;
}

.product-price-form input {
    width: 100%;
    height: 44px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fff;
    padding: 0 12px;
}

.product-price-status {
    min-height: 18px;
    font-size: 12px;
    font-weight: 700;
}

.product-price-status.typing {
    color: #b45309;
}

.product-price-status.saving {
    color: #2563eb;
}

.product-price-status.saved {
    color: #16a34a;
}

.product-price-status.error {
    color: #dc2626;
}

.product-create-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.55fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid #ffe4e6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(127, 29, 29, 0.06);
}

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

.product-create-field label {
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 800;
}

.product-create-field input {
    width: 100%;
    height: 42px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff;
    padding: 0 12px;
    font-size: 14px;
}

.product-create-card .primary-btn {
    min-height: 42px;
    white-space: nowrap;
}

.receipts-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.receipts-hero {
    padding: 24px 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.10), transparent 26%),
        linear-gradient(135deg, #fff7f7 0%, #ffffff 55%, #f8fafc 100%);
    border: 1px solid #ffe4e6;
    box-shadow: 0 20px 40px rgba(127, 29, 29, 0.07);
}

.receipts-filter-panel {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid #ffe4e6;
    background: #fff;
    box-shadow: 0 16px 30px rgba(127, 29, 29, 0.05);
}

.receipts-filter-search {
    min-width: 0;
}

.receipts-filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.receipts-table-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 26px;
    border: 1px solid #ffe4e6;
    background: #fff;
    box-shadow: 0 18px 34px rgba(127, 29, 29, 0.06);
}

.receipts-table-head,
.receipts-table-row {
    display: grid;
    grid-template-columns: 1.25fr 1.4fr 0.8fr 1fr 0.9fr 0.9fr 0.9fr 1.2fr;
    gap: 12px;
    align-items: center;
}

.receipts-table-head {
    padding: 0 8px 6px 8px;
    border-bottom: 1px solid #ffe4e6;
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 800;
}

.receipts-table-row {
    padding: 16px 12px;
    border-radius: 20px;
    border: 1px solid;
}

.receipts-table-row.status-open {
    background: linear-gradient(180deg, #fff8f8 0%, #fffefe 100%);
    border-color: #fecaca;
}

.receipts-table-row.status-closed {
    background: linear-gradient(180deg, #f7fff8 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.receipts-table-row.status-canceled {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-color: #cbd5e1;
}

.receipts-main-cell strong {
    color: #7f1d1d;
}

.receipts-status-pill {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.receipts-status-pill.open {
    background: #ffe4e6;
    color: #991b1b;
}

.receipts-status-pill.closed {
    background: #dcfce7;
    color: #166534;
}

.receipts-status-pill.canceled {
    background: #e2e8f0;
    color: #475569;
}

.receipts-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.receipts-action-btn.secondary {
    background: #fff;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.receipts-empty-state {
    padding: 28px;
    border-radius: 20px;
    background: #fff8f8;
    text-align: center;
    color: #64748b;
}

.bulk-box {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.bulk-box select,
.bulk-box button {
    max-width: 240px;
}

@media (max-width: 992px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .content {
        margin-left: 0;
    }

    .cards-4,
    .cards-2,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .page-header,
    .bulk-box {
        flex-direction: column;
        align-items: stretch;
    }

    .products-hero,
    .receipts-filter-panel,
    .receipts-table-head,
    .receipts-table-row {
        grid-template-columns: 1fr;
    }

    .products-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .products-hero-actions,
    .receipts-filter-actions,
    .receipts-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .product-create-card {
        grid-template-columns: 1fr;
        padding: 12px;
        border-radius: 14px;
    }

    .product-create-card .primary-btn {
        width: 100%;
    }
}


/* CUSTOMER FORM */

.customer-create-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.customer-create-hero {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 24px;
    align-items: stretch;
}

.hero-left {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    color: #fff;
    border-radius: 26px;
    padding: 36px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.20);
    position: relative;
    overflow: hidden;
}

.hero-left::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.page-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.hero-left h1 {
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: 12px;
    color: #fff;
}

.hero-left p {
    max-width: 680px;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.88);
    margin-bottom: 24px;
}

.hero-points {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.hero-point {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
}

.hero-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.hero-point strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.hero-point small {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.hero-right {
    display: flex;
    align-items: stretch;
}

.info-card.glass {
    width: 100%;
    border-radius: 26px;
    padding: 20px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(255,255,255,0.6);
}

.info-top {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.info-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #cbd5e1;
}

.info-body h3 {
    margin-bottom: 14px;
    font-size: 20px;
    color: #0f172a;
}

.info-body ul {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    line-height: 1.8;
}

.customer-form-shell {
    display: flex;
    justify-content: center;
}

.customer-form-card {
    width: 100%;
    max-width: 1100px;
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.10);
    border: 1px solid #eef2f7;
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f7;
}

.form-card-header h2 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #0f172a;
}

.form-card-header p {
    margin: 0;
    color: #64748b;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px 18px;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    white-space: nowrap;
}

.ghost-btn:hover {
    background: #f1f5f9;
}

.premium-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.input-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.8;
}

.textarea-icon {
    top: 18px;
    transform: none;
}

.input-wrap input,
.input-wrap textarea {
    width: 100%;
    border: 1px solid #dbe4ee;
    background: #fbfdff;
    border-radius: 16px;
    padding: 15px 16px 15px 46px;
    font-size: 15px;
    transition: 0.2s ease;
    color: #0f172a;
}

.input-wrap textarea {
    resize: vertical;
    min-height: 130px;
}

.input-wrap input:focus,
.input-wrap textarea:focus {
    outline: none;
    border-color: #0f172a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

.field-help {
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.5;
    padding-left: 2px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
}

.primary-btn,
.secondary-btn {
    min-width: 170px;
    text-align: center;
    padding: 13px 18px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s ease;
}

.primary-btn {
    border: none;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    cursor: pointer;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.16);
}

.secondary-btn {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #dbe4ee;
}

.secondary-btn:hover {
    background: #f1f5f9;
}

@media (max-width: 992px) {
    .customer-create-hero {
        grid-template-columns: 1fr;
    }

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

    .form-card-header,
    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-left h1 {
        font-size: 30px;
    }
}

/* CUSTOMER FORM */

/* CUSTOMER DETAIL */


/* =========================
   CUSTOMER DETAIL
========================= */

/* =========================
   CUSTOMER DETAIL
========================= */

.customer-detail-v2 {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Banner */
.customer-detail-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: 28px;
    box-shadow: 0 22px 48px rgba(220, 38, 38, 0.16);
}

.customer-detail-banner.red-banner {
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 58%, #ef4444 100%);
    color: #fff;
}

.customer-detail-banner-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-detail-badge {
    display: inline-flex;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.customer-detail-banner-left h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -1px;
}

.customer-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.7;
    font-size: 14px;
}

.customer-detail-banner-right {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.customer-banner-btn {
    height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 800;
    font-size: 14px;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
}

.customer-banner-btn.light {
    color: #991b1b;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 28px rgba(127, 29, 29, 0.12);
}

.customer-banner-btn.light:hover {
    transform: translateY(-1px);
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(127, 29, 29, 0.18);
}

.customer-banner-btn.light:active {
    transform: translateY(0);
}

.customer-banner-btn.dark {
    color: #fff;
    background: rgba(127, 29, 29, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.customer-banner-btn.dark:hover {
    background: rgba(127, 29, 29, 0.38);
    transform: translateY(-1px);
}

/* Summary */
.customer-summary-grid-v2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.summary-card-v2 {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #ffe4e6;
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.06);
}

.summary-card-v2 span {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
    font-size: 13px;
}

.summary-card-v2 strong {
    color: #991b1b;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
}

/* Sections */
.receipt-section-v2 {
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid #ffe4e6;
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.06);
}

.receipt-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.receipt-section-head h2 {
    margin: 0 0 6px 0;
    color: #7f1d1d;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.4px;
}

.receipt-section-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

/* Toolbar */
.receipt-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff8f8;
    border: 1px solid #fecaca;
    margin-top: 18px;
    margin-bottom: 18px;
}

.receipt-list-toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.receipt-list-toolbar-left strong {
    color: #7f1d1d;
    font-size: 15px;
}

.receipt-list-toolbar-left span {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.receipt-list-toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Receipt list */
.receipt-list-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.receipt-list-head {
    display: grid;
    grid-template-columns: 48px 78px minmax(130px, 1fr) minmax(132px, 0.9fr) 92px 82px 92px 92px minmax(170px, 1fr) 92px;
    gap: 12px;
    padding: 0 10px 8px 10px;
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 800;
    border-bottom: 1px solid #ffe4e6;
}

.receipt-list-row {
    display: grid;
    grid-template-columns: 48px 78px minmax(130px, 1fr) minmax(132px, 0.9fr) 92px 82px 92px 92px minmax(170px, 1fr) 92px;
    gap: 12px;
    align-items: start;
    padding: 14px 10px;
    border-radius: 18px;
    border: 1px solid;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.03);
}

.row-open {
    background: linear-gradient(180deg, #fff8f8 0%, #fffefe 100%);
    border-color: #fecaca;
}

.row-closed {
    background: linear-gradient(180deg, #f7fff8 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.row-delivery-pending {
    background: linear-gradient(180deg, #fff7f7 0%, #fffefe 100%);
    border-color: #fecaca;
}

.row-delivery-partial {
    background: linear-gradient(180deg, #fffaf0 0%, #fffefe 100%);
    border-color: #fdba74;
}

.row-delivery-delivered {
    background: linear-gradient(180deg, #f7fff8 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.receipt-cell {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    min-width: 0;
}

.receipt-cell strong {
    color: #7f1d1d;
}

.receipt-number-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.receipt-number-cell .delivery-action-btn {
    width: 100%;
    justify-content: center;
}

/* Status */
.receipt-status-badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    width: fit-content;
}

.receipt-status-badge.open {
    color: #991b1b;
    background: #ffe4e6;
}

.receipt-status-badge.closed {
    color: #166534;
    background: #dcfce7;
}

/* Items */
.receipt-items-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.receipt-item-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fecaca;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.closed-chip {
    border-color: #bbf7d0;
    color: #166534;
    background: #fff;
}

/* Inline note */
.receipt-inline-note-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.receipt-inline-note-form textarea {
    min-height: 54px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fff;
    padding: 8px 10px;
    resize: vertical;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
}

.receipt-note-static {
    min-height: 54px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 8px 10px;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
}

.receipt-note-static.muted {
    color: #94a3b8;
}

/* Actions */
.receipt-row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.mini-action-btn {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

.mini-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(220, 38, 38, 0.16);
}

.mini-action-btn.danger {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
}

/* Empty state */
.empty-receipt-state {
    padding: 36px 20px;
    border-radius: 20px;
    text-align: center;
    background: #fff8f8;
    border: 1px dashed #fda4af;
}

.empty-receipt-state h3 {
    margin: 0 0 8px 0;
    color: #991b1b;
}

.empty-receipt-state p {
    margin: 0;
    color: #64748b;
}

/* Modal */
.ikiz-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
}

.ikiz-modal.show {
    display: block;
}

.ikiz-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.ikiz-modal-card {
    position: relative;
    z-index: 2;
    width: min(92vw, 560px);
    max-height: 92vh;
    margin: 4vh auto;
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
    overflow-y: auto;
}

.ikiz-modal-card.large {
    width: min(94vw, 1000px);
}

.receipt-modal-layout.xlarge,
.ikiz-modal-card.xlarge {
    width: 98vw;
    height: 94vh;
    max-width: 98vw;
    max-height: 94vh;
    margin: 3vh auto;
    overflow: hidden;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
}

.ikiz-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    flex-shrink: 0;
    position: relative;
}

.ikiz-modal-head h2 {
    margin: 0;
    color: #7f1d1d;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.ikiz-modal-close {
    border: none;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #7f1d1d;
    padding: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-shrink: 0;
}

.ikiz-modal-title-wrap {
    min-width: 0;
    flex: 1;
}

.receipt-modal-subtitle {
    margin: 6px 0 0 0;
    color: #64748b;
    font-size: 14px;
}

.receipt-modal-form {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.receipt-modal-grid {
    display: grid;
    grid-template-columns: 1.35fr 1.05fr;
    gap: 22px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}

.receipt-modal-left,
.receipt-modal-right {
    min-width: 0;
    height: 100%;
}

.receipt-modal-left {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.receipt-modal-right {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.receipt-modal-search-box {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.receipt-modal-search-box input {
    width: 100%;
    height: 54px;
    border-radius: 16px;
    border: 1px solid #fecaca;
    background: #fff;
    padding: 0 16px;
    font-size: 14px;
}

.receipt-modal-products {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
    align-content: start;
    min-height: 0;
}

/* Product gallery */
.product-tile {
    border-radius: 20px;
    overflow: hidden;
    background: #fff8f8;
    border: 1px solid #ffe4e6;
    cursor: pointer;
    transition: 0.18s ease;
}

.product-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(220, 38, 38, 0.10);
}

.product-tile.compact {
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 230px;
}

.product-tile img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.product-tile.compact img {
    width: calc(100% - 22px);
    height: 120px;
    margin: 10px auto 0;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.product-tile-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-tile-info strong {
    color: #7f1d1d;
}

.product-tile-info span {
    color: #64748b;
    font-size: 13px;
}

.product-tile-info.compact {
    padding: 10px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
}

.product-tile-info.compact strong {
    font-size: 14px;
    line-height: 1.35;
    color: #7f1d1d;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-tile-info.compact span {
    font-size: 13px;
    font-weight: 800;
    color: #991b1b;
    margin-top: auto;
}

/* Selected receipt items */
.receipt-summary-panel {
    border: 1px solid #ffe4e6;
    background: linear-gradient(180deg, #fffefe 0%, #fff8f8 100%);
    border-radius: 22px;
    padding: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.receipt-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.receipt-summary-head h3 {
    margin: 0;
    color: #7f1d1d;
    font-size: 20px;
    font-weight: 900;
}

.receipt-summary-head span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.selected-receipt-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.selected-receipt-items.scrollable {
    flex: 1;
    overflow-y: auto;
    min-height: 280px;
    padding-right: 4px;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.selected-items-empty {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.selected-item-row {
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid #ffe4e6;
    background: #fff;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.selected-item-left {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
}

.selected-item-left img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.selected-item-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.selected-item-left strong {
    display: block;
    color: #7f1d1d;
    margin-bottom: 4px;
}

.selected-item-info {
    flex: 1;
    min-width: 0;
}

.selected-item-left span {
    color: #64748b;
    font-size: 12px;
}

.selected-item-line-total {
    flex-shrink: 0;
    color: #991b1b;
    font-size: 15px;
    line-height: 1.2;
}

.selected-item-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 110px));
    gap: 10px;
    margin-top: 10px;
}

.mini-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-field label {
    color: #991b1b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mini-field input {
    width: 100%;
    height: 38px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fff;
    padding: 0 10px;
    color: #475569;
}

.selected-item-edit-grid.compact {
    grid-template-columns: 84px 108px auto;
    align-items: end;
}

.mini-field.compact label {
    font-size: 10px;
}

.mini-field.compact input {
    height: 34px;
    padding: 0 8px;
}

.selected-item-remove {
    border: none;
    background: #fff1f2;
    color: #991b1b;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    justify-self: end;
}

.receipt-live-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.receipt-summary-mini {
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #ffe4e6;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.receipt-summary-mini span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.receipt-summary-mini strong {
    color: #7f1d1d;
    font-size: 18px;
    font-weight: 900;
}

.receipt-summary-mini.accent {
    background: linear-gradient(180deg, #fff1f2 0%, #fff 100%);
    border-color: #fecaca;
}

.receipt-summary-mini.accent strong {
    color: #991b1b;
}

.receipt-payment-hint {
    min-height: 20px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.receipt-payment-hint.info {
    color: #2563eb;
}

.receipt-payment-hint.error {
    color: #dc2626;
}

.confirm-modal-card {
    width: min(94vw, 920px);
}

.receipt-confirm-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.receipt-confirm-block {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #ffe4e6;
    background: #fff8f8;
}

.receipt-confirm-label {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.receipt-confirm-block strong {
    color: #7f1d1d;
}

.receipt-confirm-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.receipt-confirm-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding-top: 10px;
    border-top: 1px dashed #fecaca;
}

.receipt-confirm-item:first-child {
    padding-top: 0;
    border-top: none;
}

.receipt-confirm-item span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

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

.receipt-confirm-stat {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #ffe4e6;
    background: #fff;
}

.receipt-confirm-stat span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.receipt-confirm-stat strong {
    color: #7f1d1d;
    font-size: 18px;
}

.receipt-confirm-stat.accent {
    background: linear-gradient(180deg, #fff1f2 0%, #fff 100%);
    border-color: #fecaca;
}

.receipt-confirm-stat.accent strong {
    color: #991b1b;
}

.receipt-total-box {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #fecaca;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.receipt-total-box span {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.receipt-total-box strong {
    color: #991b1b;
    font-size: 22px;
    font-weight: 900;
}

/* Forms in modal */
.modal-note-area,
.collection-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-note-area {
    flex-shrink: 0;
}

.modal-note-area textarea {
    min-height: 84px;
}

.modal-note-area label,
.collection-form label {
    color: #7f1d1d;
    font-weight: 800;
    font-size: 13px;
}

.collection-info-box {
    padding: 14px;
    border-radius: 16px;
    background: #fff8f8;
    border: 1px solid #fecaca;
    color: #7f1d1d;
    line-height: 1.6;
    font-size: 14px;
}

.selected-collection-total-box strong {
    color: #991b1b;
}

.selected-receipts-summary {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: min(340px, calc(100vw - 32px));
    padding: 18px;
    border-radius: 22px;
    border: 1px solid #fecaca;
    background: linear-gradient(180deg, #fffefe 0%, #fff1f2 100%);
    box-shadow: 0 24px 50px rgba(127, 29, 29, 0.14);
    z-index: 3400;
    display: none;
}

.selected-receipts-summary.show {
    display: block;
}

.selected-receipts-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.selected-receipts-summary-head strong {
    color: #7f1d1d;
    font-size: 16px;
    font-weight: 900;
}

.selected-receipts-summary-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.selected-receipts-summary-amount {
    color: #991b1b;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.selected-receipts-summary-note {
    margin-top: 8px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.selected-receipts-summary .primary-btn {
    width: 100%;
}

.selected-receipts-summary .primary-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#cancelReasonInput {
    min-height: 110px;
    resize: vertical;
}

.modal-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.sticky-actions {
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 1500px) {
    .receipt-list-head {
        display: none;
    }

    .receipt-list-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
    }

    .receipt-list-row .receipt-cell {
        padding: 8px 10px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.72);
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 13px;
        line-height: 1.35;
    }

    .receipt-list-row .receipt-cell::before {
        content: attr(data-label);
        color: #991b1b;
        font-size: 10px;
        font-weight: 900;
        line-height: 1.15;
        text-transform: uppercase;
    }

    .receipt-list-row .receipt-select-cell {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .receipt-list-row .receipt-select-cell.is-empty {
        display: none;
    }

    .receipt-list-row .receipt-number-cell,
    .receipt-list-row .receipt-note-cell,
    .receipt-list-row .receipt-actions-cell {
        grid-column: span 2;
    }

    .receipt-list-row .receipt-number-cell .delivery-action-btn {
        width: auto;
        align-self: flex-start;
        padding: 0 10px;
    }

    .receipt-list-row .receipt-row-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .receipt-list-row .receipt-row-actions .mini-action-btn {
        flex: 0 0 auto;
    }

    .receipt-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .receipt-list-toolbar-right {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 1200px) {
    .receipt-modal-layout.xlarge,
    .ikiz-modal-card.xlarge {
        width: 98vw;
        height: 96vh;
        max-width: 98vw;
        max-height: 96vh;
        margin: 2vh auto;
    }

    .receipt-modal-grid {
        grid-template-columns: 1fr;
        height: 100%;
    }

    .receipt-modal-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .selected-receipt-items.scrollable {
        min-height: 180px;
    }

    .receipt-extra-box {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1100px) {
    .customer-summary-grid-v2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .customer-detail-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-detail-banner-right,
    .modal-actions {
        justify-content: stretch;
    }

    .customer-summary-grid-v2 {
        grid-template-columns: 1fr;
    }

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

    .selected-item-row {
        flex-direction: column;
        align-items: stretch;
    }

    .selected-item-edit-grid,
    .receipt-live-summary,
    .receipt-extra-box {
        grid-template-columns: 1fr;
    }

    .selected-item-topline,
    .receipt-confirm-item {
        flex-direction: column;
    }

    .selected-item-remove {
        justify-self: stretch;
    }

    .selected-receipts-summary {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }
}

@media (max-width: 560px) {
    .receipt-modal-products {
        grid-template-columns: 1fr;
    }

    .receipt-confirm-grid,
    .selected-item-edit-grid.compact {
        grid-template-columns: 1fr;
    }
}

.items-modal-card {
    width: min(92vw, 920px);
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
}

.items-modal-head {
    align-items: flex-start;
    padding-right: 12px;
}

.items-modal-title-wrap {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
}

.items-modal-title-wrap h2 {
    white-space: normal !important;
    line-height: 1.15;
    margin-bottom: 6px;
}

.items-modal-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.items-modal-close {
    align-self: flex-start;
    margin-left: auto;
    margin-top: 2px;
}

.receipt-items-modal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 56vh;
    overflow-y: auto;
    padding-right: 4px;
}

.receipt-items-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid;
}

.receipt-items-modal-row.open {
    background: #fff8f8;
    border-color: #fecaca;
}

.receipt-items-modal-row.closed {
    background: #f7fff8;
    border-color: #bbf7d0;
}

.receipt-items-modal-row.pending {
    background: #fff8f8;
    border-color: #fecaca;
}

.receipt-items-modal-row.partial {
    background: #fffaf0;
    border-color: #fdba74;
}

.receipt-items-modal-row.delivered {
    background: #f0fdf4;
    border-color: #86efac;
}

.receipt-items-modal-name {
    min-width: 0;
    flex: 1;
}

.receipt-items-modal-name strong {
    color: #7f1d1d;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.receipt-items-modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.receipt-items-modal-meta span {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.receipt-items-modal-meta strong {
    color: #991b1b;
    font-size: 15px;
    font-weight: 900;
}

.receipt-items-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.receipt-items-modal-summary {
    color: #7c2d12;
    font-size: 14px;
    font-weight: 700;
}

.receipt-items-modal-feedback {
    display: none;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
}

.receipt-items-modal-feedback.show {
    display: block;
}

.receipt-items-modal-feedback.error {
    background: #fef2f2;
    color: #b91c1c;
}

.receipt-items-modal-delivery-line {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.delivery-meta {
    min-width: 180px;
}

.receipt-delivery-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 180px;
}

.receipt-delivery-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.receipt-delivery-form input {
    width: 84px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #fed7aa;
    background: #fff;
}

.receipt-delivery-complete {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 900;
}

@media (max-width: 700px) {
    .items-modal-card {
        width: 96vw;
        max-width: 96vw;
    }

    .receipt-items-modal-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .receipt-items-modal-meta {
        justify-content: flex-start;
    }

    .receipt-items-modal-toolbar,
    .receipt-delivery-actions,
    .receipt-delivery-form {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .delivery-meta {
        min-width: 0;
        width: 100%;
    }
}

.mini-action-btn.outline {
    background: #fff;
    color: #991b1b;
    border: 1px solid #fecaca;
    box-shadow: none;
}

.mini-action-btn.outline:hover {
    background: #fff5f5;
    box-shadow: none;
}

.delivery-action-btn.pending {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.delivery-action-btn.partial {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.delivery-action-btn.delivered {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.receipt-inline-note-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.receipt-inline-note-form textarea {
    min-height: 68px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fff;
    padding: 10px 12px;
    resize: vertical;
    color: #475569;
}

.note-autosave-status {
    min-height: 18px;
    font-size: 12px;
    font-weight: 700;
    transition: 0.2s ease;
}

.note-autosave-status.typing {
    color: #b45309;
}

.note-autosave-status.saving {
    color: #2563eb;
}

.note-autosave-status.saved {
    color: #16a34a;
}

.note-autosave-status.error {
    color: #dc2626;
}


.filter-modal-card {
    width: min(94vw, 1100px);
    max-width: 94vw;
    max-height: 90vh;
    overflow-y: auto;
}

.receipt-filter-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.filter-chip {
    height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fff8f8;
    color: #991b1b;
    font-weight: 800;
    cursor: pointer;
}

.filter-chip:hover {
    background: #fff1f2;
}

.filter-date-box {
    display: grid;
    grid-template-columns: 1fr 1fr 220px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.filter-date-action .primary-btn {
    width: 100%;
}

.filter-result-meta {
    margin-bottom: 14px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.receipt-filter-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 48vh;
    overflow-y: auto;
    padding-right: 4px;
}

.filter-result-row {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid;
}

.filter-result-row.open {
    background: #fff8f8;
    border-color: #fecaca;
}

.filter-result-row.closed {
    background: #f7fff8;
    border-color: #bbf7d0;
}

.filter-result-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.filter-result-top strong {
    display: block;
    color: #7f1d1d;
    font-size: 16px;
    font-weight: 900;
}

.filter-result-top span {
    color: #64748b;
    font-size: 13px;
}

.filter-result-amount strong {
    color: #991b1b;
    font-size: 16px;
}

.filter-result-meta-line {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .filter-date-box {
        grid-template-columns: 1fr;
    }

    .filter-result-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

#receiptFilterModal.stack-behind {
    z-index: 3990;
}

#receiptItemsModal {
    z-index: 4050;
}

.receipt-extra-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.receipt-extra-box.compact .field {
    margin-bottom: 0;
}

.receipt-extra-box.compact .field label {
    font-size: 12px;
}

.receipt-extra-box.compact .field input,
.receipt-extra-box.compact .field select {
    height: 44px;
}

/* DASHBOARD */

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dashboard-hero-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    padding: 28px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 28%),
        linear-gradient(135deg, #fff5f5 0%, #fffdfd 44%, #f8fafc 100%);
    border: 1px solid #ffe4e6;
    box-shadow: 0 22px 44px rgba(127, 29, 29, 0.08);
}

.dashboard-kicker {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff1f2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-hero-main h1 {
    margin: 14px 0 10px 0;
    color: #7f1d1d;
    font-size: 38px;
    line-height: 1.05;
}

.dashboard-hero-main p {
    max-width: 680px;
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

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

.dashboard-action-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 15px;
    border: 1px solid #fecaca;
    background: #fff;
    color: #991b1b;
    text-decoration: none;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.18s ease;
}

.dashboard-action-btn.primary {
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    border-color: transparent;
    color: #fff;
}

.dashboard-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(127, 29, 29, 0.10);
}

.dashboard-hero-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-highlight-card,
.dashboard-mini-card,
.dashboard-stat-card,
.dashboard-panel-card {
    border-radius: 24px;
    border: 1px solid #ffe4e6;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 18px 36px rgba(127, 29, 29, 0.06);
}

.dashboard-highlight-card {
    padding: 22px;
    background: linear-gradient(145deg, #7f1d1d 0%, #b91c1c 48%, #ef4444 100%);
    color: #fff;
    border-color: transparent;
}

.dashboard-highlight-card span {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    opacity: 0.88;
}

.dashboard-highlight-card strong {
    display: block;
    margin: 10px 0 6px 0;
    font-size: 34px;
    line-height: 1.05;
}

.dashboard-highlight-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.9;
}

.dashboard-side-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dashboard-mini-card {
    padding: 18px;
}

.dashboard-mini-card span,
.dashboard-stat-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

.dashboard-mini-card strong,
.dashboard-stat-card strong {
    color: #7f1d1d;
    font-size: 24px;
    line-height: 1.1;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-stat-card {
    padding: 20px 18px;
}

.dashboard-stat-card small {
    display: block;
    margin-top: 10px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

.dashboard-stat-card.accent {
    background: linear-gradient(180deg, #fff1f2 0%, #fff 100%);
}

.dashboard-content-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

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

.dashboard-panel-card {
    padding: 22px;
}

.dashboard-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-panel-head h2 {
    margin: 0 0 6px 0;
    color: #7f1d1d;
    font-size: 22px;
}

.dashboard-panel-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.dashboard-panel-link,
.dashboard-inline-link {
    color: #991b1b;
    text-decoration: none;
    font-weight: 800;
}

.dashboard-list-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-list-head,
.dashboard-list-row {
    display: grid;
    gap: 12px;
    align-items: center;
}

.dashboard-list-head.receipt-head,
.dashboard-list-row.receipt-row {
    grid-template-columns: 1.5fr 0.8fr 1fr 0.55fr;
}

.dashboard-list-head {
    padding: 0 8px 6px 8px;
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 800;
    border-bottom: 1px solid #ffe4e6;
}

.dashboard-list-row {
    padding: 14px 12px;
    border-radius: 18px;
    border: 1px solid #ffe4e6;
    background: #fff;
}

.dashboard-list-row strong {
    color: #7f1d1d;
}

.dashboard-status-pill {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-status-pill.open {
    background: #ffe4e6;
    color: #991b1b;
}

.dashboard-status-pill.closed {
    background: #dcfce7;
    color: #166534;
}

.dashboard-status-pill.canceled {
    background: #e2e8f0;
    color: #475569;
}

.dashboard-compact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-compact-row,
.dashboard-customer-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid #fff1f2;
}

.dashboard-compact-row:first-child,
.dashboard-customer-row:first-child {
    border-top: none;
    padding-top: 0;
}

.dashboard-compact-row strong,
.dashboard-customer-meta strong {
    color: #7f1d1d;
}

.dashboard-compact-row span,
.dashboard-customer-meta span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.dashboard-customer-row {
    text-decoration: none;
}

.dashboard-customer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #991b1b 0%, #ef4444 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

.dashboard-customer-meta {
    flex: 1;
    min-width: 0;
}

.dashboard-empty-state {
    padding: 20px;
    border-radius: 18px;
    background: #fff8f8;
    color: #64748b;
    text-align: center;
}

@media (max-width: 1500px) {
    .dashboard-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .dashboard-hero-card,
    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .dashboard-stat-grid,
    .dashboard-side-mini-grid,
    .dashboard-list-head.receipt-head,
    .dashboard-list-row.receipt-row {
        grid-template-columns: 1fr;
    }

    .dashboard-panel-head,
    .dashboard-compact-row,
    .dashboard-customer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-hero-main h1 {
        font-size: 30px;
    }
}

.checkbox-field {
    margin-top: 2px;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #7f1d1d;
}

.checkbox-line input {
    width: 18px;
    height: 18px;
}

/* CUSTOMER DETAIL */

/* LOGIN */

.ikiz-login-page {
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.10), transparent 20%),
        radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.10), transparent 24%),
        linear-gradient(135deg, #fff5f5 0%, #fef2f2 35%, #f8fafc 100%);
}

.ikiz-login-shell {
    width: 100%;
    max-width: 1360px;
    min-height: 780px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    border-radius: 34px;
    overflow: hidden;
    background: rgba(255,255,255,0.62);
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow: 0 35px 80px rgba(127, 29, 29, 0.12);
    backdrop-filter: blur(18px);
}

.ikiz-login-left {
    padding: 24px;
    background: linear-gradient(145deg, #7f1d1d 0%, #b91c1c 48%, #ef4444 100%);
}

.ikiz-visual-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 720px;
    border-radius: 30px;
    overflow: hidden;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)),
        linear-gradient(145deg, #991b1b 0%, #dc2626 55%, #ef4444 100%);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.ikiz-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
}

.orb-1 {
    width: 260px;
    height: 260px;
    top: -80px;
    right: -60px;
    background: rgba(255,255,255,0.12);
}

.orb-2 {
    width: 220px;
    height: 220px;
    left: -70px;
    bottom: -60px;
    background: rgba(255,255,255,0.10);
}

.orb-3 {
    width: 160px;
    height: 160px;
    right: 18%;
    bottom: 18%;
    background: rgba(255,255,255,0.08);
}

.ikiz-brand-top,
.ikiz-brand-center,
.ikiz-brand-bottom {
    position: relative;
    z-index: 2;
}

.ikiz-logo-box {
    width: 130px;
    height: 130px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 50px rgba(127, 29, 29, 0.22);
}

.ikiz-logo-main {
    max-width: 88px;
    max-height: 88px;
    object-fit: contain;
}

.ikiz-brand-center {
    margin-top: auto;
    margin-bottom: auto;
}

.ikiz-brand-line {
    display: block;
    width: 84px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.85);
    margin-bottom: 22px;
}

.ikiz-brand-center h1 {
    margin: 0;
    color: #fff;
    font-size: 64px;
    line-height: 0.96;
    font-weight: 900;
    letter-spacing: -2px;
    text-shadow: 0 8px 24px rgba(127, 29, 29, 0.24);
}

.ikiz-brand-center p {
    margin: 18px 0 0 0;
    color: rgba(255,255,255,0.92);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.ikiz-brand-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ikiz-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
}

.ikiz-stat-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    margin-top: 5px;
    flex-shrink: 0;
}

.ikiz-stat-card strong {
    display: block;
    color: #fff;
    font-size: 15px;
    margin-bottom: 4px;
}

.ikiz-stat-card small {
    color: rgba(255,255,255,0.84);
    font-size: 13px;
    line-height: 1.55;
}

.ikiz-login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px;
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.06), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.52));
}

.ikiz-login-card {
    width: 100%;
    max-width: 500px;
    padding: 42px 36px 36px 36px;
    border-radius: 32px;
    background: rgba(255,255,255,0.84);
    border: 1px solid rgba(255,255,255,0.88);
    box-shadow: 0 28px 60px rgba(127, 29, 29, 0.10);
    backdrop-filter: blur(16px);
}

.ikiz-login-card-top {
    text-align: center;
    margin-bottom: 30px;
}

.ikiz-mini-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 18px auto;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff 0%, #fff1f2 100%);
    border: 1px solid #fecdd3;
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.10);
}

.ikiz-mini-logo img {
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

.ikiz-login-card-top h2 {
    margin: 0;
    font-size: 36px;
    font-weight: 900;
    color: #7f1d1d;
    letter-spacing: -1px;
}

.ikiz-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ikiz-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ikiz-field label {
    font-size: 14px;
    font-weight: 700;
    color: #7f1d1d;
    padding-left: 2px;
}

.ikiz-input-wrap {
    position: relative;
}

.ikiz-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: 0.76;
}

.ikiz-input-wrap input {
    width: 100%;
    height: 60px;
    border-radius: 18px;
    border: 1px solid #fecaca;
    background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
    padding: 0 18px 0 48px;
    font-size: 15px;
    color: #7f1d1d;
    transition: 0.22s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.ikiz-input-wrap input:focus {
    outline: none;
    border-color: #dc2626;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.08);
}

.ikiz-login-btn {
    margin-top: 10px;
    height: 60px;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 55%, #ef4444 100%);
    box-shadow: 0 20px 38px rgba(220, 38, 38, 0.20);
    transition: 0.22s ease;
}

.ikiz-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 44px rgba(220, 38, 38, 0.24);
}

.ikiz-login-btn:active {
    transform: translateY(0);
}

@media (max-width: 1100px) {
    .ikiz-login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .ikiz-visual-card {
        min-height: 360px;
    }

    .ikiz-brand-center h1 {
        font-size: 46px;
    }

    .ikiz-brand-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ikiz-login-page {
        padding: 12px;
    }

    .ikiz-login-left,
    .ikiz-login-right {
        padding: 16px;
    }

    .ikiz-visual-card,
    .ikiz-login-card {
        padding: 24px;
    }

    .ikiz-logo-box {
        width: 100px;
        height: 100px;
    }

    .ikiz-logo-main {
        max-width: 66px;
        max-height: 66px;
    }

    .ikiz-brand-center h1 {
        font-size: 36px;
    }

    .ikiz-brand-center p {
        font-size: 16px;
    }

    .ikiz-login-card-top h2 {
        font-size: 30px;
    }
}

/* LOGIN */

/* BASE */

.ikiz-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 290px;
    height: 100vh;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.10), transparent 22%),
        linear-gradient(180deg, #8b1111 0%, #b91c1c 45%, #dc2626 100%);
    box-shadow: 10px 0 40px rgba(127, 29, 29, 0.20);
    z-index: 1000;
}

.ikiz-sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ikiz-brand-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

.ikiz-brand-card::after {
    content: "";
    position: absolute;
    right: -35px;
    top: -35px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.10);
}

.ikiz-brand-logo-wrap {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 14px 30px rgba(127, 29, 29, 0.16);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.ikiz-brand-logo {
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}

.ikiz-brand-text {
    position: relative;
    z-index: 2;
}

.ikiz-brand-kicker {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 1.4px;
    font-weight: 800;
    color: rgba(255,255,255,0.84);
    margin-bottom: 8px;
}

.ikiz-brand-text h2 {
    margin: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.ikiz-brand-text p {
    margin: 10px 0 0 0;
    color: rgba(255,255,255,0.86);
    font-size: 14px;
    line-height: 1.6;
}

.ikiz-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ikiz-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    transition: 0.22s ease;
    backdrop-filter: blur(8px);
}

.ikiz-nav-link:hover {
    transform: translateX(2px);
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.ikiz-nav-link.active {
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,245,245,0.98));
    color: #991b1b;
    box-shadow: 0 16px 30px rgba(127, 29, 29, 0.20);
    border-color: rgba(255,255,255,0.75);
}

.ikiz-nav-icon {
    width: 22px;
    display: inline-flex;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ikiz-sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ikiz-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
}

.ikiz-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #b91c1c;
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 10px 22px rgba(127, 29, 29, 0.15);
}

.ikiz-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ikiz-user-info strong {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.ikiz-user-info small {
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    line-height: 1.4;
}

.ikiz-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 16px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 800;
    color: #991b1b;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    box-shadow: 0 18px 32px rgba(127, 29, 29, 0.16);
    transition: 0.22s ease;
}

.ikiz-logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(127, 29, 29, 0.22);
}

.ikiz-main-content {
    margin-left: 290px;
    min-height: 100vh;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(220,38,38,0.04), transparent 18%),
        linear-gradient(180deg, #fffdfd 0%, #fff7f7 40%, #f8fafc 100%);
}

@media (max-width: 992px) {
    .ikiz-sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-radius: 0 0 24px 24px;
    }

    .ikiz-main-content {
        margin-left: 0;
        padding: 20px;
    }
}

/* BASE */

/* TOP BAR */

.ikiz-topbar-right {
    min-width: 620px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.ikiz-topbar-add-btn {
    height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 55%, #ef4444 100%);
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.16);
    transition: 0.22s ease;
    flex-shrink: 0;
}


.ikiz-topbar-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(220, 38, 38, 0.22);
}

@media (max-width: 992px) {
    .ikiz-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ikiz-topbar-right {
        min-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .global-customer-search {
        max-width: 100%;
    }

    .ikiz-topbar-add-btn {
        width: 100%;
    }
}

.ikiz-topbar {
    display: flex;
    position: relative;
    z-index: 50;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px 22px;
    border-radius: 24px;
    background: rgba(255,255,255,0.82);
    border: 1px solid #ffe4e6;
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.06);
    backdrop-filter: blur(12px);
}

.ikiz-topbar-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.ikiz-topbar-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ikiz-topbar-title strong {
    color: #991b1b;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.ikiz-topbar-title span {
    color: #b45309;
    font-size: 13px;
    font-weight: 600;
}

.ikiz-topbar-right {
    min-width: 560px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
}

.ikiz-search-cluster {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    gap: 12px;
}

.global-customer-search {
    position: relative;
    width: 100%;
    max-width: 760px;
    flex: 1;
    z-index: 80;
}


.global-search-input-wrap {
    position: relative;
}

.global-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #b91c1c;
    font-size: 16px;
    opacity: 0.75;
}

.global-search-input-wrap input {
    width: 100%;
    height: 66px;
    border-radius: 22px;
    border: 1px solid #fecaca;
    background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
    padding: 0 22px 0 56px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #7f1d1d;
    text-transform: uppercase;
    transition: 0.22s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
}

.global-search-input-wrap input:focus {
    outline: none;
    border-color: #dc2626;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.08);
}

.global-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(255,255,255,0.98);
    border: 1px solid #ffe4e6;
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(127, 29, 29, 0.12);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: 0.18s ease;
    z-index: 2500;
    max-height: 420px;
    overflow-y: auto;
}

.global-search-results.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.global-search-item {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    border-bottom: 1px solid #fff1f2;
    transition: 0.18s ease;
}

.global-search-item:last-child {
    border-bottom: none;
}

.global-search-item:hover {
    background: #fff5f5;
}

.global-search-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 4px;
}

.global-search-item-main strong {
    color: #7f1d1d;
    font-size: 14px;
    font-weight: 800;
}

.global-search-item-main span {
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.global-search-item-sub {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.global-search-empty {
    padding: 16px;
    color: #64748b;
    font-size: 13px;
}

.global-search-empty strong {
    display: block;
    color: #7f1d1d;
    font-size: 14px;
    font-weight: 800;
}

.global-search-empty span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

.global-search-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: 12px;
    padding: 0 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.global-receipt-search .global-search-icon {
    font-size: 17px;
}

.global-search-item-button {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.body-modal-open {
    overflow: hidden;
}

.quick-receipt-modal-card {
    padding: 26px 26px 24px;
    background:
        radial-gradient(circle at top right, rgba(254, 226, 226, 0.88), transparent 26%),
        linear-gradient(180deg, #fffdfd 0%, #fff7f7 100%);
}

.quick-receipt-head {
    margin-bottom: 12px;
}

.quick-receipt-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff1f2;
    color: #be123c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.quick-receipt-feedback {
    display: none;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid #bfdbfe;
}

.quick-receipt-feedback.show {
    display: block;
}

.quick-receipt-feedback.error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.quick-receipt-shell {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.quick-receipt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.92fr);
    gap: 20px;
    height: 100%;
    min-height: 0;
}

.quick-receipt-main,
.quick-receipt-side-panel {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.quick-receipt-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 60%, #ef4444 100%);
    color: #fff;
    box-shadow: 0 24px 40px rgba(185, 28, 28, 0.22);
}

.quick-receipt-number {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.quick-receipt-hero-main h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.quick-receipt-hero-main p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 600;
}

.quick-receipt-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.quick-status-badge,
.quick-delivery-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.quick-status-badge.closed,
.quick-delivery-badge.delivered {
    background: rgba(34, 197, 94, 0.2);
}

.quick-status-badge.canceled {
    background: rgba(15, 23, 42, 0.24);
}

.quick-delivery-badge.canceled {
    background: rgba(15, 23, 42, 0.24);
}

.quick-delivery-badge.partial {
    background: rgba(251, 146, 60, 0.24);
}

.quick-delivery-badge.pending,
.quick-status-badge.open {
    background: rgba(255, 255, 255, 0.16);
}

.quick-receipt-stats,
.quick-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.quick-stat-card,
.quick-meta-card {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #ffe4e6;
    box-shadow: 0 16px 30px rgba(127, 29, 29, 0.06);
}

.quick-stat-card span,
.quick-meta-card span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.quick-stat-card strong,
.quick-meta-card strong {
    color: #7f1d1d;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.3;
}

.quick-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ffe4e6;
    box-shadow: 0 18px 34px rgba(127, 29, 29, 0.07);
}

.quick-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.quick-panel-head h3 {
    margin: 0;
    color: #7f1d1d;
    font-size: 18px;
    font-weight: 900;
}

.quick-products-list,
.quick-payments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
}

.quick-product-row,
.quick-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid #ffe4e6;
    background: #fffafa;
}

.quick-product-row.pending {
    border-color: #fecaca;
    background: #fff7f7;
}

.quick-product-row.partial {
    border-color: #fdba74;
    background: #fff9f0;
}

.quick-product-row.delivered {
    border-color: #86efac;
    background: #f6fff8;
}

.quick-product-row.canceled {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.quick-product-main,
.quick-product-side {
    min-width: 0;
}

.quick-product-main strong,
.quick-payment-row strong {
    color: #7f1d1d;
    font-size: 16px;
    font-weight: 900;
}

.quick-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.quick-product-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.quick-delivery-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-delivery-form input,
.quick-collection-form input,
.quick-collection-form select {
    height: 42px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fff;
    color: #7f1d1d;
    font-size: 14px;
    font-weight: 700;
    padding: 0 14px;
}

.quick-delivery-form input {
    width: 84px;
    text-align: center;
}

.quick-delivery-done {
    color: #15803d;
    font-size: 13px;
    font-weight: 800;
}

.quick-delivery-canceled {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.quick-action-caption {
    margin-bottom: 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.quick-collection-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quick-collection-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 800;
}

.quick-submit-btn {
    width: 100%;
}

.quick-divider {
    height: 1px;
    margin: 16px 0;
    background: linear-gradient(90deg, rgba(254, 202, 202, 0.25) 0%, #fecaca 50%, rgba(254, 202, 202, 0.25) 100%);
}

.mini-action-btn.full {
    width: 100%;
    justify-content: center;
    text-decoration: none;
}

.quick-payment-row div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.quick-payment-row span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.quick-note-box,
.quick-empty-state {
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff7f7;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    border: 1px dashed #fecaca;
}

.quick-receipt-loading {
    height: 100%;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(255,247,247,0.95) 100%);
    border: 1px solid #ffe4e6;
    color: #7f1d1d;
    text-align: center;
}

.quick-receipt-loading strong {
    font-size: 22px;
    font-weight: 900;
}

.quick-receipt-loading span {
    color: #64748b;
    font-size: 14px;
}

.quick-receipt-loading.error {
    border-color: #fecaca;
}

.quick-receipt-loading-glow {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: radial-gradient(circle, rgba(248, 113, 113, 0.22) 0%, rgba(248, 113, 113, 0) 72%);
}

@media (max-width: 992px) {
    .ikiz-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ikiz-topbar-right {
        min-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .ikiz-search-cluster {
        grid-template-columns: 1fr;
    }

    .global-customer-search,
    .global-receipt-search {
        max-width: 100%;
    }

    .quick-receipt-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
        padding-right: 2px;
    }

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

    .quick-receipt-hero,
    .quick-product-row,
    .quick-payment-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-product-side,
    .quick-receipt-badges {
        align-items: flex-start;
    }

    .quick-delivery-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .quick-delivery-form input,
    .quick-delivery-form button {
        width: 100%;
    }

    .quick-receipt-modal-card {
        padding: 20px;
    }
}

/* TOP BAR */

/* TOAST */

.toast-container {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    width: 360px;
    max-width: calc(100vw - 32px);
    display: flex;
    align-items: stretch;
    gap: 0;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.38s ease, opacity 0.38s ease;
    pointer-events: auto;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-hide {
    transform: translateX(-120%);
    opacity: 0;
}

.toast-accent {
    width: 6px;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
    padding: 14px 14px 14px 16px;
}

.toast-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.toast-message {
    font-size: 14px;
    line-height: 1.55;
    color: #334155;
}

.toast-close {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    width: 46px;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #0f172a;
}

.toast-success .toast-accent {
    background: linear-gradient(180deg, #16a34a 0%, #22c55e 100%);
}

.toast-success .toast-title {
    color: #166534;
}

.toast-danger .toast-accent {
    background: linear-gradient(180deg, #dc2626 0%, #ef4444 100%);
}

.toast-danger .toast-title {
    color: #991b1b;
}

.toast-warning .toast-accent {
    background: linear-gradient(180deg, #d97706 0%, #f59e0b 100%);
}

.toast-warning .toast-title {
    color: #92400e;
}

.toast-info .toast-accent {
    background: linear-gradient(180deg, #2563eb 0%, #60a5fa 100%);
}

.toast-info .toast-title {
    color: #1d4ed8;
}

@media (max-width: 640px) {
    .toast-container {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .toast {
        width: 100%;
        max-width: 100%;
    }
}

/* TOAST */

/* CUSTOMERS */

.customers-page-modern {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.customers-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 58%, #ef4444 100%);
    color: #fff;
    box-shadow: 0 22px 48px rgba(220, 38, 38, 0.16);
}

.customers-kicker {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.customers-hero-left h1 {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
}

.customers-hero-left p {
    margin: 0;
    color: rgba(255,255,255,0.90);
    line-height: 1.7;
    max-width: 720px;
}

.customers-summary-pill {
    min-width: 120px;
    padding: 20px 22px;
    border-radius: 24px;
    text-align: center;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(10px);
}

.customers-summary-pill strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
}

.customers-summary-pill span {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

.customers-letter-card,
.customers-list-card {
    background: rgba(255,255,255,0.84);
    border: 1px solid #ffe4e6;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.06);
    backdrop-filter: blur(10px);
}

.customers-letter-head,
.customers-list-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.customers-letter-head h2,
.customers-list-top h2 {
    margin: 0;
    color: #7f1d1d;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.customers-list-top p {
    margin: 6px 0 0 0;
    color: #64748b;
    font-size: 14px;
}

.clear-letter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #991b1b;
    background: #fff5f5;
    border: 1px solid #fecaca;
    font-weight: 800;
}

.clear-letter-btn:hover {
    background: #ffe4e6;
}

.letter-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.letter-chip {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
    color: #991b1b;
    background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
    border: 1px solid #fecaca;
    transition: 0.18s ease;
}

.letter-chip:hover {
    transform: translateY(-1px);
    background: #fff1f2;
}

.letter-chip.active {
    color: #fff;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.18);
}

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

.customer-card-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
    text-decoration: none;
    background: linear-gradient(180deg, #fffefe 0%, #fff8f8 100%);
    border: 1px solid #ffe4e6;
    transition: 0.2s ease;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.04);
}

.customer-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.10);
    border-color: #fda4af;
}

.customer-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.customer-card-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.16);
}

.customer-card-title h3 {
    margin: 0 0 6px 0;
    color: #7f1d1d;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.customer-card-title span {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.customer-card-address {
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #ffe4e6;
}

.customer-card-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.customer-card-address p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
    font-size: 14px;
}

.customer-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.customer-mini-box {
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #ffe4e6;
}

.customer-mini-box span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}

.customer-mini-box strong {
    color: #991b1b;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.customer-card-footer {
    display: flex;
    justify-content: flex-end;
}

.customer-detail-link {
    color: #b91c1c;
    font-weight: 800;
    font-size: 14px;
}

.customer-empty-state {
    grid-column: 1 / -1;
    padding: 44px 20px;
    border-radius: 22px;
    text-align: center;
    background: #fff8f8;
    border: 1px dashed #fda4af;
}

.customer-empty-state h3 {
    margin: 0 0 8px 0;
    color: #991b1b;
}

.customer-empty-state p {
    margin: 0;
    color: #64748b;
}

.pagination-wrap {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #991b1b;
    background: #fff5f5;
    border: 1px solid #fecaca;
    font-weight: 800;
}

.pagination-btn:hover {
    background: #ffe4e6;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-page {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #991b1b;
    background: #fff;
    border: 1px solid #fecaca;
    font-weight: 800;
}

.pagination-page.active {
    color: #fff;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    border-color: transparent;
}

.pagination-dots {
    color: #94a3b8;
    font-weight: 800;
    padding: 0 4px;
}

@media (max-width: 1100px) {
    .customer-card-grid {
        grid-template-columns: 1fr;
    }

    .customer-card-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .customers-hero-card,
    .customers-letter-head,
    .customers-list-top,
    .pagination-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .letter-filter-grid {
        gap: 8px;
    }

    .letter-chip {
        width: 42px;
        height: 42px;
    }
}


.customer-list-modern {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-list-head {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr 1.8fr 0.7fr 1fr 1fr 0.7fr;
    gap: 14px;
    padding: 0 16px 10px 16px;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 800;
    border-bottom: 1px solid #ffe4e6;
}

.customer-list-row {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr 1.8fr 0.7fr 1fr 1fr 0.7fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    text-decoration: none;
    background: linear-gradient(180deg, #fffefe 0%, #fff8f8 100%);
    border: 1px solid #ffe4e6;
    transition: 0.18s ease;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.04);
}

.customer-list-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.08);
    border-color: #fda4af;
}

.customer-list-person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.customer-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.16);
}

.customer-list-namebox {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-list-namebox strong {
    color: #7f1d1d;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.customer-list-namebox span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.customer-list-cell {
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.customer-phone-cell {
    font-weight: 700;
    color: #991b1b;
}

.customer-address-cell {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.customer-list-action {
    display: flex;
    justify-content: flex-end;
    color: #b91c1c;
    font-weight: 800;
}

.mini-pill {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff1f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-weight: 800;
}

@media (max-width: 1200px) {
    .customer-list-head {
        display: none;
    }

    .customer-list-row {
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .customer-list-action {
        justify-content: flex-start;
    }
}

/* CUSTOMERS */

/* Live responsive tightening */
.primary-btn,
.secondary-btn,
.mini-action-btn,
.customer-banner-btn,
.filter-chip {
    width: auto;
    min-width: 0;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.receipt-modal-form {
    overflow-x: hidden;
    overflow-y: auto;
}

.receipt-summary-panel {
    padding: 14px;
}

.selected-receipt-items.scrollable {
    min-height: 120px;
    max-height: 240px;
}

.receipt-summary-mini {
    padding: 10px 12px;
}

.receipt-live-summary {
    margin-top: 10px;
    margin-bottom: 10px;
}

.modal-note-area textarea {
    min-height: 68px;
}

.modal-actions {
    margin-top: 12px;
}

@media (max-width: 1200px) {
    .receipt-modal-grid {
        height: auto;
        min-height: 100%;
        align-items: start;
    }

    .receipt-modal-left,
    .receipt-modal-right {
        height: auto;
    }

    .receipt-modal-products {
        flex: none;
        max-height: min(42vh, 420px);
    }

    .receipt-summary-panel {
        height: auto;
        overflow: visible;
    }

    .selected-receipt-items.scrollable {
        flex: none;
        max-height: 220px;
    }
}

@media (max-width: 992px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .ikiz-sidebar {
        position: sticky;
        top: 0;
        z-index: 2200;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 8px 10px;
        border-radius: 0;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        box-shadow: 0 10px 24px rgba(127, 29, 29, 0.18);
    }

    .ikiz-sidebar-top {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .ikiz-brand-card {
        display: none;
    }

    .ikiz-sidebar-bottom {
        display: flex;
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .ikiz-user-card {
        display: none;
    }

    .ikiz-logout-btn {
        height: 38px;
        padding: 0 10px;
        border-radius: 12px;
        gap: 6px;
        font-size: 12px;
        line-height: 1;
        white-space: nowrap;
        box-shadow: none;
    }

    .ikiz-logout-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .ikiz-sidebar-nav {
        flex-direction: row;
        gap: 6px;
        min-width: 0;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .ikiz-nav-link {
        flex: 0 0 auto;
        height: 38px;
        padding: 0 10px;
        border-radius: 12px;
        font-size: 12px;
        white-space: nowrap;
        gap: 7px;
    }

    .ikiz-nav-link:hover {
        transform: none;
    }

    .ikiz-nav-icon {
        width: auto;
        font-size: 12px;
    }

    .ikiz-main-content {
        padding: 12px;
    }

    .ikiz-topbar {
        padding: 12px;
        gap: 10px;
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .ikiz-topbar-title strong {
        font-size: 16px;
        letter-spacing: 0;
    }

    .ikiz-topbar-title span {
        font-size: 11px;
    }

    .ikiz-topbar-right {
        min-width: 0;
        gap: 8px;
    }

    .ikiz-search-cluster {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .global-search-input-wrap input {
        height: 46px;
        border-radius: 14px;
        padding: 0 12px 0 42px;
        font-size: 13px;
        letter-spacing: 0.02em;
    }

    .global-search-icon {
        left: 13px;
        font-size: 14px;
    }

    .ikiz-topbar-add-btn {
        height: 44px;
        border-radius: 14px;
        font-size: 13px;
        box-shadow: none;
    }
}

@media (max-width: 700px) {
    .customer-detail-v2 {
        gap: 14px;
    }

    .customer-detail-banner {
        padding: 16px;
        gap: 14px;
        border-radius: 18px;
        box-shadow: 0 12px 26px rgba(220, 38, 38, 0.12);
    }

    .customer-detail-badge {
        padding: 6px 10px;
        font-size: 10px;
        letter-spacing: 0.06em;
    }

    .customer-detail-banner-left h1 {
        font-size: clamp(21px, 7vw, 26px);
        line-height: 1.15;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .customer-detail-meta {
        gap: 8px;
        font-size: 12px;
        line-height: 1.45;
    }

    .customer-detail-meta span {
        width: 100%;
        overflow-wrap: anywhere;
    }

    .customer-detail-banner-right {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .customer-banner-btn {
        width: 100%;
        height: 42px;
        padding: 0 8px;
        border-radius: 12px;
        font-size: 12px;
        box-shadow: none;
    }

    .summary-card-v2 {
        padding: 14px;
        border-radius: 16px;
    }

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

    .receipt-section-v2 {
        padding: 14px;
        border-radius: 18px;
    }

    .receipt-section-head {
        align-items: flex-start;
    }

    .receipt-section-head h2 {
        font-size: 22px;
    }

    .receipt-section-head p,
    .receipt-list-toolbar-left span {
        font-size: 12px;
        line-height: 1.45;
    }

    .receipt-list-toolbar {
        padding: 12px;
        gap: 10px;
        border-radius: 14px;
    }

    .receipt-list-toolbar-right .primary-btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .ikiz-search-cluster {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .global-search-input-wrap input {
        height: 42px;
        padding-left: 34px;
        padding-right: 10px;
        font-size: 12px;
    }

    .global-search-icon {
        left: 11px;
        font-size: 13px;
    }

    .global-search-results {
        top: calc(100% + 6px);
        max-height: 260px;
        border-radius: 12px;
        box-shadow: 0 14px 28px rgba(127, 29, 29, 0.12);
    }

    .global-search-item,
    .global-search-item-button {
        padding: 8px 10px;
    }

    .global-search-item-main {
        gap: 8px;
        margin-bottom: 2px;
    }

    .global-search-item-main strong {
        font-size: 11.5px;
        line-height: 1.25;
    }

    .global-search-item-main span {
        font-size: 10.5px;
        line-height: 1.25;
    }

    .global-search-item-sub {
        font-size: 10.5px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .global-search-empty {
        padding: 10px;
        font-size: 11px;
    }

    .global-search-empty strong {
        font-size: 11.5px;
        line-height: 1.3;
    }

    .global-search-empty span {
        margin-top: 4px;
        font-size: 10.5px;
        line-height: 1.25;
    }

    .global-search-create-btn {
        min-height: 30px;
        margin-top: 8px;
        padding: 0 10px;
        border-radius: 9px;
        font-size: 11px;
    }

    .ikiz-topbar-add-btn {
        height: 40px;
    }

    .ikiz-modal-card {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        margin: 8px auto;
        padding: 16px;
        border-radius: 18px;
    }

    .receipt-modal-layout.xlarge,
    .ikiz-modal-card.xlarge {
        width: calc(100vw - 12px);
        height: auto;
        max-width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        margin: 6px auto;
        padding: 10px;
        border-radius: 16px;
        overflow: hidden;
    }

    .ikiz-modal-head {
        align-items: center;
        margin-bottom: 8px;
    }

    .ikiz-modal-head h2 {
        font-size: 20px;
        white-space: normal;
    }

    .ikiz-modal-close {
        width: 30px;
        height: 30px;
        align-items: center;
        justify-content: center;
        font-size: 26px;
    }

    .receipt-modal-form {
        max-height: calc(100dvh - 62px);
        padding-right: 2px;
        padding-bottom: 66px;
    }

    .receipt-modal-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
        height: auto;
        min-height: 0;
        align-items: stretch;
        overflow: visible;
    }

    .receipt-modal-left,
    .receipt-modal-right {
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .receipt-modal-search-box {
        display: none;
    }

    .receipt-modal-products {
        grid-template-columns: none;
        grid-template-rows: repeat(2, 78px);
        grid-auto-flow: column;
        grid-auto-columns: 96px;
        gap: 6px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-right: 0;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
    }

    .product-tile.compact {
        width: 96px;
        height: 78px;
        min-height: 0;
        border-radius: 10px;
    }

    .product-tile.compact img {
        width: calc(100% - 18px);
        height: 30px;
        margin: 5px auto 0;
        border-radius: 8px;
        object-fit: contain;
    }

    .product-tile-info.compact {
        padding: 4px 6px 5px;
        gap: 2px;
    }

    .product-tile-info.compact strong {
        min-height: 0;
        font-size: 9.5px;
        line-height: 1.15;
        letter-spacing: 0;
        -webkit-line-clamp: 1;
    }

    .product-tile-info.compact span {
        font-size: 9.5px;
        line-height: 1.1;
    }

    .receipt-summary-panel {
        padding: 10px;
        border-radius: 14px;
        overflow: visible;
    }

    .receipt-summary-head {
        margin-bottom: 8px;
    }

    .receipt-summary-head h3 {
        font-size: 15px;
    }

    .receipt-summary-head span {
        font-size: 11px;
    }

    .selected-receipt-items.scrollable {
        min-height: 76px;
        max-height: min(28dvh, 156px);
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .selected-items-empty {
        padding: 8px;
        font-size: 11px;
    }

    .selected-item-row {
        padding: 7px;
        gap: 6px;
        border-radius: 12px;
    }

    .selected-item-left {
        gap: 6px;
    }

    .selected-item-left img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .selected-item-topline {
        flex-direction: column;
        gap: 4px;
    }

    .selected-item-left strong {
        font-size: 12px;
    }

    .selected-item-edit-grid.compact {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .selected-item-remove {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .receipt-live-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .receipt-summary-mini {
        padding: 7px 8px;
        border-radius: 10px;
    }

    .receipt-summary-mini span {
        font-size: 10.5px;
    }

    .receipt-summary-mini strong {
        font-size: 13.5px;
    }

    .receipt-extra-box.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .receipt-extra-box.compact .field:nth-child(3) {
        grid-column: 1 / -1;
    }

    .receipt-extra-box.compact .field input,
    .receipt-extra-box.compact .field select {
        height: 40px;
        min-height: 40px;
        padding: 0 10px;
        font-size: 12px;
        line-height: 1.2;
    }

    .receipt-extra-box.compact .field label,
    .modal-note-area label {
        font-size: 11px;
        line-height: 1.25;
        white-space: normal;
    }

    .modal-note-area {
        gap: 5px;
    }

    .modal-note-area textarea {
        min-height: 48px;
    }

    #receiptModal .modal-actions.sticky-actions {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 8px;
        z-index: 3;
        margin-top: 8px;
        padding: 8px;
        border-radius: 12px;
        gap: 6px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 12px 30px rgba(127, 29, 29, 0.18);
    }

    .modal-actions > .primary-btn,
    .modal-actions > .secondary-btn {
        flex: 1;
        min-width: 0;
        height: 38px;
        padding: 0 8px;
        border-radius: 10px;
        font-size: 12px;
    }
}

@media (max-width: 700px) {
    .receipt-list-table {
        gap: 8px;
    }

    .receipt-list-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 10px;
        border-radius: 15px;
        box-shadow: 0 8px 18px rgba(127, 29, 29, 0.06);
    }

    .receipt-list-row .receipt-cell {
        min-width: 0;
        padding: 7px 8px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.78);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        font-size: 12px;
        line-height: 1.25;
    }

    .receipt-list-row .receipt-cell::before,
    .receipts-table-row > div::before {
        content: attr(data-label);
        color: #991b1b;
        font-size: 9.5px;
        font-weight: 900;
        line-height: 1.15;
        text-transform: uppercase;
    }

    .receipt-select-cell {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .receipt-select-cell.is-empty {
        display: none;
    }

    .receipt-number-cell {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 5px 8px;
        background: #fff1f2;
    }

    .receipt-number-cell::before {
        grid-column: 1 / -1;
    }

    .receipt-number-cell strong {
        font-size: 13px;
        line-height: 1.2;
    }

    .receipt-number-cell .delivery-action-btn {
        width: auto;
        height: 30px;
        min-height: 0;
        padding: 0 9px;
        border-radius: 9px;
        font-size: 10.5px;
        line-height: 1;
        justify-self: end;
    }

    .receipt-status-badge {
        padding: 5px 8px;
        font-size: 10px;
        letter-spacing: 0.03em;
    }

    .receipt-note-cell,
    .receipt-actions-cell {
        grid-column: 1 / -1;
    }

    .receipt-inline-note-form,
    .receipt-note-static {
        width: 100%;
    }

    .receipt-inline-note-form textarea,
    .receipt-note-static {
        min-height: 42px;
        border-radius: 10px;
        padding: 7px 8px;
        font-size: 12px;
        line-height: 1.3;
    }

    .receipt-row-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .receipt-row-actions .mini-action-btn {
        width: auto;
        height: 30px;
        min-height: 0;
        padding: 0 10px;
        border-radius: 9px;
        font-size: 11px;
        line-height: 1;
        flex: 0 0 auto;
    }

    .receipts-shell {
        gap: 12px;
    }

    .receipts-hero {
        padding: 16px;
        border-radius: 18px;
        box-shadow: 0 12px 24px rgba(127, 29, 29, 0.06);
    }

    .receipts-hero h1 {
        font-size: 26px;
        line-height: 1.1;
    }

    .receipts-hero p {
        font-size: 12px;
        line-height: 1.45;
    }

    .receipts-filter-panel {
        padding: 12px;
        gap: 10px;
        border-radius: 16px;
    }

    .receipts-filter-panel .field {
        gap: 5px;
    }

    .receipts-filter-panel .field label {
        font-size: 11px;
    }

    .receipts-filter-panel input,
    .receipts-filter-panel select {
        min-height: 38px;
        border-radius: 10px;
        font-size: 12px;
    }

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

    .receipts-filter-actions .primary-btn,
    .receipts-filter-actions .secondary-btn {
        width: 100%;
        height: 38px;
        border-radius: 10px;
        font-size: 12px;
    }

    .receipts-table-card {
        padding: 10px;
        gap: 8px;
        border-radius: 16px;
    }

    .receipts-table-head {
        display: none;
    }

    .receipts-table-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 10px;
        border-radius: 15px;
        align-items: stretch;
    }

    .receipts-table-row > div {
        min-width: 0;
        padding: 7px 8px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.78);
        color: #475569;
        font-size: 12px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .receipts-table-row > div::before {
        display: block;
        margin-bottom: 4px;
    }

    .receipts-table-row .receipts-main-cell:first-child {
        grid-column: 1 / -1;
        background: #fff1f2;
    }

    .receipts-main-cell strong,
    .receipts-table-row > div strong {
        font-size: 13px;
        line-height: 1.2;
    }

    .receipts-status-pill {
        padding: 5px 8px;
        font-size: 10.5px;
        line-height: 1;
    }

    .receipts-table-row .receipts-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 0;
        background: transparent;
        align-items: stretch;
    }

    .receipts-table-row .receipts-actions::before {
        display: none;
    }

    .receipts-table-row .receipts-action-btn {
        width: 100%;
        min-width: 0;
        min-height: 0;
        height: 31px;
        padding: 0 5px;
        border-radius: 9px;
        font-size: 10.5px;
        line-height: 1;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .customer-detail-banner-right,
    .receipt-modal-products,
    .receipt-live-summary,
    .receipt-extra-box.compact {
        grid-template-columns: 1fr;
    }
}

/* Service-type product pricing */
.services-search-panel {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #ffe4e6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(127, 29, 29, 0.05);
}

.services-search-panel label {
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 900;
}

.services-search-panel input {
    width: 100%;
    height: 42px;
    min-width: 0;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 0 13px;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    background: #fffafa;
}

.services-search-panel input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
    background: #fff;
}

.services-search-empty {
    padding: 18px;
    border: 1px dashed #fecaca;
    border-radius: 16px;
    background: #fffafa;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.product-grid.modern.service-price-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-price-card .product-price-preview {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.35;
}

.product-service-price-list,
.product-service-price-readonly {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-price-form {
    padding: 8px 0 0 0;
    border-top: 1px dashed #ffe4e6;
    gap: 5px;
}

.service-price-form:first-child {
    border-top: none;
    padding-top: 0;
}

.product-service-price-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.product-service-price-control input {
    height: 36px;
    border-radius: 10px;
}

.product-service-price-control span,
.product-service-price-readonly strong {
    color: #991b1b;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.product-service-price-readonly div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px dashed #ffe4e6;
}

.product-service-price-readonly div:first-child {
    border-top: none;
}

.product-service-price-readonly span {
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 800;
}

.compact-modal-card {
    width: min(94vw, 430px);
}

.product-create-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-tile.compact {
    border: 1px solid #ffe4e6;
    color: inherit;
    font: inherit;
    text-align: left;
    padding: 0;
}

.product-tile-info.compact small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.receipt-service-modal-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.receipt-service-option {
    min-height: 72px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff8f8;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    cursor: pointer;
    color: #7f1d1d;
}

.receipt-service-option:hover,
.receipt-service-option.selected {
    border-color: #991b1b;
    background: #fff1f2;
    box-shadow: 0 10px 22px rgba(127, 29, 29, 0.10);
}

.receipt-service-option span {
    font-size: 13px;
    font-weight: 900;
}

.receipt-service-option strong {
    color: #991b1b;
    font-size: 15px;
}

.receipt-service-quantity {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.receipt-service-quantity label {
    color: #7f1d1d;
    font-size: 12px;
    font-weight: 900;
}

.receipt-service-quantity input {
    width: 100%;
    height: 42px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 0 12px;
}

.receipt-items-modal-service {
    color: #991b1b;
    font-size: 12px;
    font-weight: 800;
    margin-top: -2px;
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .product-grid.modern.service-price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .services-search-panel {
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 11px 12px;
        border-radius: 14px;
    }

    .services-search-panel input {
        height: 40px;
        font-size: 13px;
    }
}

@media (max-width: 700px) {
    .product-grid.modern.service-price-grid {
        grid-template-columns: 1fr;
    }

    .product-service-price-control {
        grid-template-columns: minmax(0, 1fr) 92px;
    }

    .receipt-service-options {
        grid-template-columns: 1fr;
    }
}


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

.quick-product-service {
    display: inline-flex;
    width: fit-content;
    margin-top: 2px;
    margin-bottom: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff1f2;
    color: #991b1b;
    font-size: 11px;
    font-weight: 900;
}

.item-name small {
    color: #991b1b;
    font-size: 10px;
    font-weight: 800;
}

@media (max-width: 700px) {
    .product-create-service-grid {
        grid-template-columns: 1fr;
    }
}


.receipt-service-option.selected {
    border-color: #16a34a;
    background: #dcfce7;
    color: #166534;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.14);
}

.receipt-service-option.selected strong,
.receipt-service-option.selected span {
    color: #166534;
}
