:root {
    --bg: #f6fbf2;
    --sidebar: #173b24;
    --card: #ffffff;
    --primary: #2f7d4b;
    --primary-dark: #1f5b36;
    --accent: #9bcf53;
    --text: #203126;
    --muted: #657267;
    --border: #dbead3;
    --shadow: 0 18px 45px rgba(35, 93, 56, 0.11);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; background: radial-gradient(circle at 10% 0%, rgba(218, 242, 199, .75), transparent 28%), var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar { background: var(--sidebar); color: #fff; padding: 24px; position: sticky; top: 0; height: 100vh; }
.admin-brand { display: block; font-size: 1.35rem; font-weight: 900; margin-bottom: 28px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a { padding: 12px 14px; border-radius: 14px; color: #e8dfe6; font-weight: 700; }
.sidebar nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar i { width: 22px; color: #d8f6c9; }
.admin-main { padding: 28px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-topbar p { margin: 0; color: var(--primary); text-transform: uppercase; letter-spacing: .14em; font-weight: 900; font-size: .75rem; }
.admin-topbar h1 { margin: 4px 0 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.admin-user { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 12px 16px; font-weight: 800; box-shadow: 0 10px 24px rgba(35,93,56,.08); }
.flash { padding: 14px 16px; border-radius: 16px; margin-bottom: 20px; font-weight: 800; }
.flash.success { background: #e9f8ec; color: #24743a; border: 1px solid #c8edcf; }
.flash.error { background: #ffecec; color: #a82727; border: 1px solid #ffd0d0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-card, .panel { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.stat-card i { font-size: 1.6rem; color: var(--primary); }
.stat-card h3 { margin: 12px 0 6px; font-size: 2rem; }
.stat-card p { margin: 0; color: var(--muted); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-title h2 { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 800; margin-bottom: 6px; }
input, textarea, select { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: #fff; color: var(--text); outline: none; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47, 125, 75, .12); }
.btn { border: 0; border-radius: 999px; padding: 11px 16px; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.light { background: #fff; color: var(--primary-dark); border: 1px solid var(--border); }
.btn.danger { background: #c62828; color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 18px; overflow: hidden; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid #f4e7ee; vertical-align: top; }
th { background: #eef8e7; color: var(--primary-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.thumb { width: 76px; height: 58px; object-fit: cover; border-radius: 12px; background: #eef8e7; display: grid; place-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note { padding: 14px; border-radius: 16px; background: #fff8de; color: #775400; border: 1px solid #ffe7a0; margin-bottom: 16px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: radial-gradient(circle at 20% 20%, #eef8e7, transparent 34%), linear-gradient(135deg, #f6fbf2, #e4f4df); }
.login-card { width: min(430px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
.login-card h1 { margin-top: 0; }
.login-card .brand { font-size: 2.4rem; }
@media (max-width: 980px) {
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .sidebar nav { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .admin-main { padding: 18px; }
    .admin-topbar { align-items: flex-start; flex-direction: column; }
    .sidebar nav { grid-template-columns: 1fr; }
    .stats-grid, .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
}

/* v1.0.4 - Admin-managed logo and contact settings */
.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-brand-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.admin-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}
.logo-preview-box {
    display: grid;
    place-items: center;
    min-height: 240px;
    border: 1px dashed var(--border);
    border-radius: 22px;
    background: linear-gradient(135deg, #f8fff3, #ffffff);
    margin-bottom: 16px;
}
.logo-preview-box img {
    width: min(260px, 100%);
    max-height: 220px;
    object-fit: contain;
    border-radius: 18px;
}
.contact-preview-list {
    display: grid;
    gap: 12px;
}
.contact-preview-list p {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f6fbf2;
    border: 1px solid var(--border);
    font-weight: 700;
}
.contact-preview-list i {
    width: 22px;
    color: var(--primary);
}

/* v1.0.5 - Product admin image gallery */
.admin-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
}
.admin-gallery-item {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px;
    background: #f8fff3;
    display: grid;
    gap: 10px;
}
.admin-gallery-item img {
    width: 100%;
    aspect-ratio: 1 / .8;
    object-fit: cover;
    border-radius: 14px;
}
small { color: var(--muted); font-weight: 700; }

/* v1.0.6 - Inventory and Cost Management */
.inventory-stats .stat-card h3,
.cost-stats .stat-card h3 {
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);
}
.compact-form textarea { min-height: 86px; }
.stock-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.stock-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(135deg, #f8fff3, #ffffff);
}
.stock-card h3 {
    margin: 0 0 4px;
    color: var(--primary-dark);
}
.stock-in-card { border-color: #bfe6c8; }
.stock-out-card { border-color: #ffd2d2; }
.inline-upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.inline-upload-form input[type="file"] {
    flex: 1 1 300px;
}
.table-search {
    margin-bottom: 14px;
    max-width: 520px;
    background: #f8fff3;
    border: 1px solid var(--border);
}
.qty-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #e6f6dc;
    color: #1f5b36;
    font-weight: 900;
}
.qty-pill.low {
    background: #fff0dc;
    color: #9a4b00;
}
.sales-limit-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.sales-limit-form label {
    margin: 0;
}
.sales-limit-form select {
    width: auto;
    min-width: 150px;
}
.soft-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}
@media (max-width: 760px) {
    .stock-actions { grid-template-columns: 1fr; }
    .inline-upload-form { display: grid; }
}

/* v1.0.9 - Cleaner Inventory Management and half A4 invoice */
.inventory-inline-table input,
.inventory-inline-table select {
    padding: 8px 9px;
    min-width: 110px;
    border-radius: 10px;
    background: #fbfff8;
}
.inventory-inline-table .mini-number { min-width: 105px; }
.inventory-inline-table .mini-qty { width: 86px; min-width: 86px; text-align: center; font-weight: 900; }
.icon-actions { flex-wrap: nowrap; align-items: center; }
.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--primary-dark);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    font-weight: 900;
}
.icon-btn:hover { background: #eef8e7; transform: translateY(-1px); }
.icon-btn.save { background: #e9f8ec; color: #24743a; }
.icon-btn.danger { background: #fff1f1; color: #b72323; }
.icon-btn.add-to-sale-btn { background: #fff8de; color: #8a5900; }
.stock-out-main { border: 2px solid #cfe8c4; }
.sale-invoice-table .mini-qty { max-width: 90px; text-align: center; font-weight: 900; }
.sale-invoice-table tfoot th { background: #f7fff2; font-size: 1rem; }
.collapsible-panel[hidden] { display: none !important; }
.receipt-area {
    width: min(148mm, 100%);
    min-height: 105mm;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    color: #172416;
}
.receipt-head { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #e5eedf; padding-bottom: 10px; }
.receipt-head img { width: 64px; height: 64px; object-fit: contain; }
.receipt-head h2 { margin: 0 0 4px; color: var(--primary-dark); }
.receipt-head p { margin: 2px 0; font-size: .9rem; }
.receipt-table { margin-top: 12px; }
.receipt-table th,
.receipt-table td { padding: 8px; font-size: .9rem; }
.receipt-table tfoot th { background: #f6fbf2; font-size: 1rem; }
.receipt-note { text-align: center; color: var(--muted); font-weight: 800; }
@media print {
    body * { visibility: hidden !important; }
    #receiptArea, #receiptArea * { visibility: visible !important; }
    #receiptArea { position: absolute; top: 0; left: 0; width: 148mm; min-height: 105mm; border: 1px solid #ccc; border-radius: 0; }
    @page { size: A4 portrait; margin: 10mm; }
}
@media (max-width: 760px) {
    .panel-title { flex-direction: column; align-items: flex-start; }
    .panel-title .actions { width: 100%; }
    .panel-title .actions .btn { width: 100%; justify-content: center; }
    .icon-actions { flex-wrap: wrap; }
}

/* v1.0.10 - Inventory table cleanup, no horizontal movement, edit-on-demand mode */
.inventory-primary-panel { overflow: visible; }
.inventory-toolbar { align-items: center; }
.inventory-table-wrap,
.sale-table-wrap {
    width: 100%;
    overflow-x: visible;
}
.compact-inventory-table {
    table-layout: fixed;
    width: 100%;
    font-size: .92rem;
}
.compact-inventory-table th,
.compact-inventory-table td {
    padding: 11px 10px;
    word-break: break-word;
    vertical-align: middle;
}
.compact-inventory-table th:nth-child(1) { width: 7%; }
.compact-inventory-table th:nth-child(2) { width: 17%; }
.compact-inventory-table th:nth-child(3) { width: 12%; }
.compact-inventory-table th:nth-child(4) { width: 11%; }
.compact-inventory-table th:nth-child(5) { width: 12%; }
.compact-inventory-table th:nth-child(6) { width: 9%; }
.compact-inventory-table th:nth-child(7) { width: 13%; }
.compact-inventory-table th:nth-child(8) { width: 11%; }
.compact-inventory-table th:nth-child(9) { width: 8%; }
.compact-inventory-table th:nth-child(10) { width: 8%; }
.compact-inventory-table input,
.compact-inventory-table select {
    min-width: 0 !important;
    width: 100%;
    padding: 7px 8px;
    border-radius: 10px;
}
.compact-inventory-table .mini-number,
.compact-inventory-table .mini-qty {
    min-width: 0 !important;
    width: 100%;
}
.inventory-edit { display: none; }
tr.is-editing .inventory-view { display: none !important; }
tr.is-editing .inventory-edit { display: block; }
.edit-save-btn { display: none; }
tr.is-editing .edit-save-btn { display: inline-grid; }
tr.is-editing .edit-row-btn { display: none; }
.compact-inventory-table .icon-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-start;
}
.compact-inventory-table .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    flex: 0 0 auto;
}
.inventory-top-floating {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 28px rgba(31, 91, 54, .25);
    cursor: pointer;
    z-index: 30;
}
@media (max-width: 900px) {
    .compact-inventory-table thead { display: none; }
    .compact-inventory-table,
    .compact-inventory-table tbody,
    .compact-inventory-table tr,
    .compact-inventory-table td { display: block; width: 100%; }
    .compact-inventory-table tr {
        border: 1px solid var(--border);
        border-radius: 18px;
        margin-bottom: 14px;
        padding: 10px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(35, 93, 56, .08);
    }
    .compact-inventory-table td {
        border: 0;
        display: grid;
        grid-template-columns: 135px 1fr;
        align-items: center;
        gap: 8px;
        padding: 8px;
    }
    .compact-inventory-table td::before {
        content: attr(data-label);
        font-weight: 900;
        color: var(--primary-dark);
        text-transform: uppercase;
        font-size: .78rem;
        letter-spacing: .04em;
    }
    .compact-inventory-table .icon-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
    .compact-inventory-table td { grid-template-columns: 1fr; }
    .inventory-toolbar .btn { width: 100%; justify-content: center; }
}

/* v1.0.11/v1.0.15 - Orders dashboard and performance chart */
.dashboard-grid-v111 { grid-template-columns: 1.35fr .65fr; }
.order-table-wrap { overflow-x: auto; }
.order-admin-table { width: 100%; border-collapse: collapse; }
.order-admin-table th,
.order-admin-table td { padding: 12px 10px; vertical-align: top; border-bottom: 1px solid var(--border); }
.order-admin-table th { background: #eef8e8; color: var(--primary-dark); text-transform: uppercase; font-size: .78rem; letter-spacing: .05em; }
.status-badge { display: inline-flex; padding: 7px 10px; border-radius: 999px; font-weight: 900; font-size: .78rem; }
.status-pending { background: #fff4d8; color: #8a5900; }
.status-completed { background: #e7f8e9; color: #20713b; }
.tiny-btn { padding: 8px 10px; border-radius: 12px; font-size: .82rem; }
.pill-label { padding: 7px 12px; border-radius: 999px; background: #f0faeb; color: var(--primary-dark); font-weight: 900; }
.period-filter-form select { width: auto; min-width: 150px; padding: 8px 10px; }
.bar-chart-simple { display: grid; gap: 18px; margin: 18px 0 22px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr 40px; align-items: center; gap: 12px; font-weight: 900; }
.bar-track { height: 22px; border-radius: 999px; background: #eef6ea; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; border-radius: 999px; min-width: 6px; }
.bar-fill.pending { background: linear-gradient(90deg, #ffbf4b, #ff9900); }
.bar-fill.completed { background: linear-gradient(90deg, #77c66e, #24834d); }
.mini-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-summary-grid div { padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: #f8fff3; }
.mini-summary-grid strong { display: block; font-size: 1.5rem; color: var(--primary-dark); }
.mini-summary-grid span { color: var(--muted); font-weight: 800; }
.small-muted { color: var(--muted); font-size: .85rem; }
@media (max-width: 1000px) { .dashboard-grid-v111 { grid-template-columns: 1fr; } }

/* v1.0.15 - Online order preparation workflow */
.online-order-admin-table th:first-child,
.online-order-admin-table td:first-child {
    width: 52px;
    text-align: center;
}
.inline-action-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.disabled-btn,
.disabled-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}
.order-detail-row td {
    background: #fbfff7;
    padding: 0 !important;
}
.order-items-box {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(135deg, #f8fff3, #ffffff);
    margin: 10px;
}
.order-customer-mini {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #eef8e7;
    color: var(--primary-dark);
    font-size: .92rem;
}
.order-items-inner-table {
    width: 100%;
    border-collapse: collapse;
}
.order-items-inner-table th,
.order-items-inner-table td {
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.order-items-inner-table th {
    background: #e9f5e0;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .78rem;
}
.prepared-row td {
    background: #f0fbef;
}
.stock-warning-row td {
    background: #fff8e8;
}
.warning-text {
    color: #b14d00;
    font-weight: 900;
}
.prepared-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #dff5e3;
    color: #1d7034;
    font-weight: 900;
    white-space: nowrap;
}
.prepare-order-item-btn {
    background: #e8f8e8;
    color: #177536;
    border-color: #b9dfbc;
}
.prepare-order-item-btn:hover {
    background: #d8f0db;
}
@media (max-width: 900px) {
    .online-order-admin-table,
    .order-items-inner-table {
        min-width: 780px;
    }
    .order-table-wrap {
        overflow-x: auto;
    }
}

/* v1.0.15 - always-visible top-bar logout for admin and root users */
.admin-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.admin-logout-top {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 900;
    color: #b42318;
    box-shadow: 0 10px 24px rgba(35,93,56,.08);
}
.admin-logout-top:hover {
    background: #fff1f0;
    border-color: #ffc7c2;
}
@media (max-width: 620px) {
    .admin-top-actions {
        width: 100%;
        justify-content: flex-start;
    }
}


/* v1.0.23 - flower category manager and table-wise inventory controls */
.inline-category-edit {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.inline-category-edit input[type="text"] {
    min-width: 170px;
}
.inline-category-edit input[type="number"] {
    width: 100px;
}
.location-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 260px;
}
.location-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: #edf8e6;
    border: 1px solid #cfe7c2;
    color: #174f29;
    font-size: .78rem;
    font-weight: 900;
}
.sale-location-select {
    min-width: 150px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 700;
}
.email-log-note {
    color: #516254;
    font-size: .86rem;
}

/* v1.0.23 - table-wise stock-out allocation and email verification UI */
.table-allocation-box {
    border: 1px solid #cfe6c2;
    background: #f7fff2;
    border-radius: 14px;
    padding: 8px;
    min-width: 210px;
}
.table-allocation-list {
    display: grid;
    gap: 6px;
    max-height: 170px;
    overflow-y: auto;
    padding-right: 4px;
}
.table-allocation-list.compact { max-height: 140px; }
.table-allocation-line {
    display: grid;
    grid-template-columns: 1fr 70px;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #123322;
}
.table-allocation-line span { font-weight: 700; }
.table-allocation-line em {
    display: block;
    font-style: normal;
    font-size: 0.72rem;
    color: #607060;
}
.table-allocation-line input {
    width: 70px;
    padding: 7px 8px;
    border: 1px solid #cfe6c2;
    border-radius: 10px;
    text-align: center;
    font-weight: 800;
}
.sale-table-allocation small,
.order-table-allocation small {
    display: block;
    margin-top: 6px;
    color: #315a36;
}
.qty-help {
    display: block;
    color: #607060;
    font-size: 0.72rem;
    margin-top: 4px;
}
.email-log-body {
    max-height: 150px;
    overflow: auto;
    white-space: pre-wrap;
    background: #f6fff3;
    border: 1px solid #dbead2;
    border-radius: 12px;
    padding: 10px;
    font-size: 0.85rem;
}
.email-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 800;
    background: #e7f7dc;
    color: #14532d;
}
.email-status-pill.logged { background: #fff3cd; color: #8a5a00; }

/* v1.0.23 - admin table naming and email log updates */
.admin-top-actions { display: flex; align-items: center; gap: 10px; }
.pill-label { white-space: nowrap; }

/* v1.0.23 - topbar back-to-website action */
.admin-back-website-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid #dbead3;
    background: #fff;
    color: #1f5b36;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(47,125,75,.08);
}
.admin-back-website-top:hover { background: #eef8e7; }
@media (max-width: 760px) {
    .admin-top-actions { gap: 8px; flex-wrap: wrap; }
    .admin-back-website-top, .admin-logout-top, .admin-user { padding: 9px 12px; font-size: .88rem; }
}


/* v1.0.23 - dedicated Edit / Save column in Available Inventory */
.compact-inventory-table .edit-save-cell,
.compact-inventory-table .sale-delete-cell {
    text-align: center;
}
.compact-inventory-table .edit-save-cell.icon-actions,
.compact-inventory-table .sale-delete-cell.icon-actions {
    justify-content: center;
    gap: 8px;
}
.compact-inventory-table .edit-save-cell .icon-btn,
.compact-inventory-table .sale-delete-cell .icon-btn {
    width: 36px;
    height: 36px;
}
.compact-inventory-table tr.is-editing {
    background: #f4fff0;
    box-shadow: inset 4px 0 0 var(--green);
}
.compact-inventory-table tr.is-editing .edit-save-cell {
    background: #eefce8;
}


/* v1.0.23 - inventory row editing refinements */
.table-location-edit {
    width: 100%;
    min-width: 150px;
    min-height: 78px;
    resize: vertical;
    font-size: .88rem;
    line-height: 1.35;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    background: #fff;
}
.inventory-edit-help {
    display: none;
    margin-top: 5px;
    color: #5c725d;
    font-size: .78rem;
}
tr.is-editing .inventory-edit-help { display: block; }
tr.is-editing .inventory-location-view { display: none; }
.sale-item-picker {
    margin: 14px 0 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fff2;
}
.sale-item-picker label {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
}
.sale-item-picker-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.sale-item-picker-row select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
}
@media (max-width: 760px) {
    .sale-item-picker-row { grid-template-columns: 1fr; }
}

/* v1.0.26 - Root-only Activity Log Panel and Guest Demo Mode */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #eef8e9;
    color: #155f33;
    text-transform: uppercase;
}
.role-root { background: #ffe8d6; color: #9a3f00; }
.role-admin { background: #e7f6ee; color: #155f33; }
.role-guest { background: #eef2ff; color: #3730a3; }
.activity-filter-form {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr 0.8fr 0.8fr auto auto auto;
    gap: 10px;
    align-items: center;
}
.activity-log-table pre {
    max-width: 360px;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f7fbf4;
    border: 1px solid #dcefd5;
    border-radius: 12px;
    padding: 10px;
    font-size: 12px;
}
.guest-demo-panel {
    max-width: 980px;
}
.guest-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}
.guest-demo-grid > div {
    border: 1px solid #d9edcf;
    background: #f6fff2;
    border-radius: 18px;
    padding: 18px;
    display: grid;
    gap: 6px;
}
.guest-demo-grid i {
    color: #21854a;
    font-size: 22px;
}
.guest-demo-grid span {
    color: #526256;
    font-size: 14px;
}
@media (max-width: 900px) {
    .activity-filter-form { grid-template-columns: 1fr; }
    .guest-demo-grid { grid-template-columns: 1fr; }
}

/* v1.0.31 - Post gallery image management and password page */
.post-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.post-image-preview {
    position: relative;
    border: 1px solid #d9ead3;
    border-radius: 16px;
    overflow: hidden;
    background: #f7fbf3;
    min-height: 96px;
}
.post-image-preview img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
}
.tiny-danger {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: #c9202b;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.muted-small { color: #66756b; font-size: .92rem; }
