/* =========================================================
   Jean Rose POS - shared styles
   Values come from docs/design/design-tokens.md (the team mockup).
   Loaded AFTER the Bootstrap CDN link, so these rules win.
   Views use Bootstrap classes + the .jr-* classes below.
   Do not put hex colors or inline styles in views.
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
    --jr-primary: #D1177E;
    --jr-primary-dark: #B01268;          /* pressed/active state of main buttons */
    --jr-primary-text: #FFFFFF;
    --jr-primary-soft: rgba(209, 23, 126, 0.12);
    --jr-text: #3B0A2A;
    --jr-text-strong: #8A0F55;
    --jr-muted: #7A3F63;
    --jr-bg: #FFF0F7;
    --jr-panel: #FFFFFF;
    --jr-fill: #FFE3F1;
    --jr-border: #F5B5D6;
    --jr-border-soft: #FBD3E8;
    --jr-danger: #8E0F3E;
    --jr-error: #B00020;
    --jr-near-expiry-bg: #FFE08A;
    --jr-near-expiry-text: #5A3B00;
    --jr-low-bg: #FFD0B0;
    --jr-low-text: #6B2D00;
    --jr-ok-bg: #D3F3EF;
    --jr-ok-text: #0A5F63;

    --jr-font-body: 'Nunito', system-ui, sans-serif;
    --jr-font-head: 'Poppins', system-ui, sans-serif;
    --jr-font-script: 'Parisienne', cursive;

    --jr-control-height: 48px;           /* buttons and inputs, never below 44px */
    --jr-radius: 12px;                   /* buttons and inputs */
    --jr-radius-card: 24px;
    --jr-shadow: 0 4px 16px rgba(209, 23, 126, 0.08);
    --jr-page-pad: 32px;

    /* ---------- 2. Bootstrap variable overrides ---------- */
    --bs-primary: #D1177E;
    --bs-primary-rgb: 209, 23, 126;
    --bs-danger: #8E0F3E;
    --bs-danger-rgb: 142, 15, 62;
    --bs-body-bg: #FFF0F7;
    --bs-body-color: #3B0A2A;
    --bs-body-font-family: var(--jr-font-body);
    --bs-body-font-size: 16px;
    --bs-border-color: #F5B5D6;
    --bs-border-radius: 12px;
    --bs-link-color: #8A0F55;
    --bs-link-color-rgb: 138, 15, 85;
    --bs-link-hover-color: #D1177E;
    --bs-link-hover-color-rgb: 209, 23, 126;
    --bs-focus-ring-color: rgba(209, 23, 126, 0.25);
}

body {
    background: var(--jr-bg);
    color: var(--jr-text);
    font-family: var(--jr-font-body);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .btn {
    font-family: var(--jr-font-head);
}

/* ---------- 3. Bootstrap components restyled ---------- */

/* Buttons: 48px high, rounded, bold */
.btn {
    min-height: var(--jr-control-height);
    border-radius: var(--jr-radius);
    border-width: 2px;
    font-weight: 600;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Disabled buttons (any kind): faded. Bootstrap also sets pointer-events: none, so there is no pointer cursor. */
    --bs-btn-disabled-opacity: 0.45;
}
.btn-primary {
    --bs-btn-bg: var(--jr-primary);
    --bs-btn-border-color: var(--jr-primary);
    --bs-btn-color: var(--jr-primary-text);
    --bs-btn-hover-bg: var(--jr-primary-dark);
    --bs-btn-hover-border-color: var(--jr-primary-dark);
    --bs-btn-hover-color: var(--jr-primary-text);
    --bs-btn-active-bg: var(--jr-primary-dark);
    --bs-btn-active-border-color: var(--jr-primary-dark);
    --bs-btn-disabled-bg: var(--jr-primary);
    --bs-btn-disabled-border-color: var(--jr-primary);
    --bs-btn-disabled-color: var(--jr-primary-text);
    --bs-btn-focus-shadow-rgb: 209, 23, 126;
}
/* Outline buttons: pink border, dark pink text, white fill (also when disabled, never Bootstrap blue). */
.btn-outline-primary {
    --bs-btn-color: var(--jr-text-strong);
    --bs-btn-bg: var(--jr-panel);
    --bs-btn-border-color: var(--jr-primary);
    --bs-btn-hover-bg: var(--jr-fill);
    --bs-btn-hover-color: var(--jr-text-strong);
    --bs-btn-hover-border-color: var(--jr-primary);
    --bs-btn-active-bg: var(--jr-fill);
    --bs-btn-active-color: var(--jr-text-strong);
    --bs-btn-active-border-color: var(--jr-primary);
    --bs-btn-disabled-color: var(--jr-text-strong);
    --bs-btn-disabled-bg: var(--jr-panel);
    --bs-btn-disabled-border-color: var(--jr-primary);
    --bs-btn-focus-shadow-rgb: 209, 23, 126;
}
.btn-danger {
    --bs-btn-bg: var(--jr-danger);
    --bs-btn-border-color: var(--jr-danger);
    --bs-btn-hover-bg: #6F0B30;
    --bs-btn-hover-border-color: #6F0B30;
    --bs-btn-active-bg: #6F0B30;
    --bs-btn-active-border-color: #6F0B30;
}
.btn-pill { border-radius: 24px; }   /* fully round buttons (header, toolbar) */

/* Inputs: 48px high, pink border, pink fill */
.form-control,
.form-select {
    min-height: var(--jr-control-height);
    border: 2px solid var(--jr-border);
    border-radius: var(--jr-radius);
    background-color: var(--jr-bg);
    color: var(--jr-text);
    font-size: 16px;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--jr-primary);
    box-shadow: 0 0 0 4px var(--jr-primary-soft);
    background-color: var(--jr-panel);
}
.form-control.is-invalid,
.form-select.is-invalid { border-color: var(--jr-error); }
.invalid-feedback { color: var(--jr-error); font-weight: 600; }
.form-label { color: var(--jr-muted); font-weight: 700; }

/* Cards: white, 2px pink border, 24px radius, soft shadow */
.card {
    --bs-card-border-color: var(--jr-border);
    --bs-card-border-width: 2px;
    --bs-card-border-radius: var(--jr-radius-card);
    --bs-card-inner-border-radius: 22px;
    --bs-card-bg: var(--jr-panel);
    box-shadow: var(--jr-shadow);
}

/* Badges: pill, 12px bold */
.badge {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
}

/* Nav pills: used for the owner tabs in the header */
.nav-pills {
    --bs-nav-pills-border-radius: 22px;
    --bs-nav-pills-link-active-bg: var(--jr-primary);
    --bs-nav-pills-link-active-color: var(--jr-primary-text);
    --bs-nav-link-color: var(--jr-text-strong);
    --bs-nav-link-hover-color: var(--jr-primary);
    gap: 8px;
}
.nav-pills .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    font-family: var(--jr-font-head);
    font-weight: 600;
    font-size: 16px;
}

/* Tables: pink header row, soft row lines */
.table {
    --bs-table-bg: var(--jr-panel);
    --bs-table-color: var(--jr-text);
    --bs-table-border-color: var(--jr-border-soft);
    margin-bottom: 0;
}
.table > thead th {
    background: var(--jr-fill);
    color: #5C1B43;
    font-size: 14px;
    padding: 14px 16px;
}
.table > tbody td { padding: 12px 16px; vertical-align: middle; }

/* Alerts (flash messages) */
.alert { border-width: 2px; border-radius: var(--jr-radius); font-weight: 600; }
.alert-success { background: var(--jr-ok-bg); color: var(--jr-ok-text); border-color: var(--jr-ok-text); }
.alert-danger  { background: #FFE5EA; color: var(--jr-error); border-color: var(--jr-error); }

/* ---------- 4. Jean Rose classes ---------- */

/* Page body padding and title */
.jr-main { padding: 24px var(--jr-page-pad); }
.jr-page-title {
    font-family: var(--jr-font-head);
    font-weight: 700;
    font-size: 32px;
    margin: 0;
}

/* Header bar: white, 2px pink bottom border */
.jr-header.navbar {
    background: var(--jr-panel);
    border-bottom: 2px solid var(--jr-border);
    padding: 12px var(--jr-page-pad);
    flex-wrap: wrap;
    gap: 12px 20px;
}

/* Wordmark "Jean Rose" + "BEAUTY PRODUCTS TRADING" */
.jr-wordmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    color: var(--jr-primary);
    text-decoration: none;
}
.jr-wordmark:hover { color: var(--jr-primary); }
.jr-wordmark-name {
    font-family: var(--jr-font-script);
    font-size: 50px;
    line-height: 1;
}
.jr-wordmark-tag {
    font-family: var(--jr-font-head);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 2.6px;
    margin-top: 2px;
}

/* Alerts button in the header, with a round count */
.jr-alerts-btn {
    min-height: var(--jr-control-height);
    border-radius: 24px;
    border: 2px solid var(--jr-border);
    background: var(--jr-fill);
    color: var(--jr-text-strong);
    font-family: var(--jr-font-body);
    font-weight: 700;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.jr-alerts-btn:hover,
.jr-alerts-btn:active { color: var(--jr-text-strong); border-color: var(--jr-primary); }
.jr-alerts-count {
    min-width: 26px;
    height: 26px;
    border-radius: 13px;
    background: var(--jr-primary);
    color: var(--jr-primary-text);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.jr-signed-in { font-size: 15px; color: var(--jr-muted); }
.jr-signed-in strong { color: var(--jr-text); }

/* "Menu" button that shows the owner tabs on small screens (tap, not hover) */
.jr-menu-btn {
    min-height: var(--jr-control-height);
    border-radius: 24px;
    border: 2px solid var(--jr-border);
    color: var(--jr-text-strong);
    font-weight: 700;
    padding: 0 18px;
}

/* Stock status badges */
.jr-badge-low,
.jr-badge-out,
.jr-badge-near,
.jr-badge-ok {
    display: inline-block;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    white-space: nowrap;
}
.jr-badge-low  { background: var(--jr-low-bg);         color: var(--jr-low-text); }
.jr-badge-out  { background: var(--jr-danger);         color: #FFFFFF; }
.jr-badge-near { background: var(--jr-near-expiry-bg); color: var(--jr-near-expiry-text); }
.jr-badge-ok   { background: var(--jr-ok-bg);          color: var(--jr-ok-text); }

/* Big total box (POS order panel, payment) */
.jr-total-box {
    background: var(--jr-fill);
    border-radius: 16px;
    padding: 16px 20px;
}
.jr-total-amount {
    font-family: var(--jr-font-head);
    font-weight: 800;
    font-size: 36px;
    color: var(--jr-primary);
}

/* Money is always right-aligned in tables */
.jr-money { text-align: right; white-space: nowrap; }

/* Login page (mockup 01-login): pink logo panel on the left, card on the right */
.jr-login {
    --jr-login-panel: #FF0184;           /* same pink as the logo's background */
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
}
.jr-login-brand {
    flex: 3 1 560px;
    background: var(--jr-login-panel);
    color: #FFFFFF;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
}
.jr-login-logo { width: 100%; max-width: 740px; height: auto; display: block; }
.jr-login-subtitle { font-family: var(--jr-font-head); font-weight: 600; font-size: 20px; text-align: center; }
.jr-login-side {
    flex: 2 1 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}
.jr-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    border-radius: var(--jr-radius-card);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 12px 32px var(--jr-primary-soft);
}
.jr-login-title { margin: 0; font-weight: 700; font-size: 32px; color: var(--jr-text); }
.jr-login-lead { margin: 6px 0 0; color: var(--jr-muted); }
.jr-login-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; color: var(--jr-text); }
.jr-login-input { min-height: 52px; border-radius: 14px; padding: 0 16px; }
.jr-password { position: relative; }
.jr-password .jr-login-input { padding-right: 60px; }
.jr-password-toggle {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--jr-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.jr-password-toggle[aria-pressed="true"] { color: var(--jr-primary); }
.jr-login-btn { min-height: 56px; border-radius: 14px; font-weight: 700; font-size: 18px; }
.jr-login-link { text-align: center; font-weight: 700; color: var(--jr-primary); padding: 10px 0; }
/* "Forgot password?" right under the password box (44px tall touch target) */
.jr-login-forgot { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 700; color: var(--jr-primary); }

/* Forgot and Reset Password (mockup: docs/design/02-forgot-reset-password.png). Uses the .jr-login-card classes above. */
.jr-reset { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 16px 48px; }
.jr-reset-brand { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--jr-primary); }
.jr-reset-brand-name { font-family: 'Parisienne', cursive; font-size: 50px; }
.jr-reset-brand-tag { font-family: var(--jr-font-head); font-weight: 600; font-size: 10px; letter-spacing: 2.6px; margin-top: 2px; }
.jr-reset-card { max-width: 540px; padding: 36px; gap: 18px; }
.jr-reset-step { align-self: flex-start; background: var(--jr-primary); color: #FFFFFF; font-size: 14px; font-weight: 700; padding: 4px 14px; border-radius: 14px; }
.jr-reset-note { margin: 0; font-size: 14px; color: var(--jr-muted); text-align: center; }
/* "Send the reset by" choice: Gmail (selected) and SMS (shown, disabled until it is built) */
.jr-reset-by { border: 0; margin: 0; padding: 0; }
.jr-reset-options { display: flex; gap: 12px; }
.jr-reset-option {
    flex: 1 1 0;
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 44px;
    padding: 14px;
    border: 2px solid var(--jr-border);
    border-radius: 16px;
    background: var(--jr-panel);
    cursor: pointer;
}
.jr-reset-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--jr-primary); flex-shrink: 0; }
.jr-reset-option.is-selected { border-color: var(--jr-primary); background: var(--jr-fill); }
.jr-reset-option.is-disabled { opacity: 0.55; cursor: not-allowed; }
.jr-reset-option-text { display: flex; flex-direction: column; }
.jr-reset-option-title { font-weight: 700; font-size: 16px; }
.jr-reset-option-sub { font-size: 14px; color: var(--jr-muted); }
@media (max-width: 575.98px) {
    .jr-reset-options { flex-direction: column; }
}

/* ---------- 5. Smaller screens ---------- */
/* Tablet landscape 1024-1199px: a little less page padding */
@media (max-width: 1199.98px) {
    :root { --jr-page-pad: 20px; }
}
/* From 992px up the header is ONE row: nothing wraps, only the search box shrinks to make room. */
@media (min-width: 992px) {
    .jr-header.navbar { flex-wrap: nowrap; }
    .jr-header .jr-wordmark,
    .jr-header .navbar-collapse,
    .jr-header .ms-auto { flex-shrink: 0; }
    .jr-header .nav-pills { flex-wrap: nowrap; }
    .jr-header .nav-pills .nav-link { white-space: nowrap; }
    .jr-header-search { min-width: 0; }
}
/* 992-1399px (tablet landscape and small PC screens): compact header so the row fits.
   Smaller wordmark, tighter tabs and buttons, smaller gaps. Touch targets stay >= 44px high. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .jr-header.navbar { gap: 10px; }
    .jr-wordmark-name { font-size: 34px; }
    .jr-wordmark-tag { font-size: 8px; letter-spacing: 1.5px; }
    .jr-header .nav-pills { gap: 4px; }
    .jr-header .nav-pills .nav-link { padding: 0 10px; font-size: 15px; }
    .jr-header .ms-auto { gap: 10px !important; }   /* beats Bootstrap's gap-3 on the right-side group */
    .jr-alerts-btn { padding: 0 12px; gap: 6px; }
    .jr-header .btn-pill { padding: 0 14px; }
    .jr-header-search { flex-basis: 120px; }
    .jr-search .form-control { padding-left: 40px; padding-right: 12px; }
    /* Room for the clear (x) only while it is showing, so an empty box keeps more space for the placeholder */
    .jr-search:has(.jr-search-clear:not([hidden])) .form-control { padding-right: 44px; }
    .jr-search-icon { left: 12px; }
}
/* Below 992px the owner tabs sit on their own row under the Menu button */
@media (max-width: 991.98px) {
    :root { --jr-page-pad: 16px; }
    .jr-header .navbar-collapse .nav-pills { padding-top: 8px; }
    /* Login: smaller logo panel on top, card below */
    .jr-login-brand { padding: 32px 16px; gap: 16px; }
    .jr-login-logo { max-width: 480px; }
    .jr-login-side { padding: 32px 16px; }
    .jr-login-card { padding: 28px; }
}

/* ---------- 6. Print (receipts) ---------- */
@media print {
    .jr-header,
    .jr-no-print { display: none !important; }
    body { background: #FFFFFF; }
    .jr-main { padding: 0; }
    .card { box-shadow: none; }
}

/* ---------- 7. POS screen (mockup: docs/design/03-pos-cashier.png) ---------- */

/* Header search box (round, pink fill, icon on the left) */
.jr-header-search { flex: 1 1 280px; max-width: 520px; }
.jr-search { position: relative; margin: 0; }
.jr-search .form-control { border-radius: 24px; padding-left: 48px; padding-right: 52px; }
.jr-search-icon { position: absolute; left: 16px; top: 14px; color: var(--jr-muted); pointer-events: none; }
/* Hide the browser's own small x; we show our bigger clear button instead (44px touch target). */
.jr-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.jr-search-clear {
    position: absolute; right: 2px; top: 2px;
    width: 44px; height: 44px;
    border: 0; border-radius: 22px;
    background: transparent;
    color: var(--jr-muted);
    display: flex; align-items: center; justify-content: center;
}
.jr-search-clear[hidden] { display: none; }
.jr-search-clear:active { background: var(--jr-fill); color: var(--jr-text-strong); }

.alert-warning { background: var(--jr-low-bg); color: var(--jr-low-text); border-color: var(--jr-low-text); }

/* Two columns: products (wide) and Order Details (360-440px). They stack on narrow screens. */
.jr-pos { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.jr-pos-products { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Category pills */
.jr-cat-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.jr-cat-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 22px;
    border-radius: 22px;
    border: 2px solid var(--jr-border);
    background: var(--jr-panel);
    color: var(--jr-text-strong);
    font-weight: 700;
    text-decoration: none;
}
.jr-cat-pill.active { background: var(--jr-primary); border-color: var(--jr-primary); color: var(--jr-primary-text); }

/* Product cards */
.jr-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.jr-product-card {
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.jr-product-card form { margin: 0; }
.jr-product-img {
    height: 128px;
    border-radius: 14px;
    background: var(--jr-fill);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.jr-product-photo { object-fit: contain; }
/* Uploaded photos: whole photo visible on a white background with rounded corners (order lines, edit page) */
.jr-photo-upload { background: var(--jr-panel); border-radius: 8px; }
/* On a POS card the photo fills the whole image area */
.jr-product-img .jr-photo-upload {
    width: 100%;
    height: 100%;
    padding: 6px;
    border-radius: 14px;
}
.jr-card-badge { position: absolute; top: 8px; left: 8px; font-size: 13px; text-transform: none; padding: 3px 10px; }
/* Name and price on one line; when the card is too narrow the price wraps under the name. */
.jr-product-info { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
.jr-product-name { font-family: var(--jr-font-head); font-weight: 600; font-size: 18px; overflow-wrap: break-word; }
.jr-product-price { font-weight: 700; font-size: 18px; color: var(--jr-primary); white-space: nowrap; }

/* Out of stock card: greyed, button cannot be pressed */
.jr-product-card.is-out .jr-product-img { background: #F3E6EE; }
.jr-product-card.is-out .jr-product-name,
.jr-product-card.is-out .jr-product-price { color: #5C3A4D; }
.jr-btn-unavailable,
.jr-btn-unavailable:disabled { background: #EBD9E4; color: #5C3A4D; border-color: #EBD9E4; opacity: 1; width: 100%; }

/* Pink placeholder icon when a product has no picture */
.jr-ph-light { fill: #FF8FC7; }
.jr-ph-dark  { fill: var(--jr-primary); }

/* Order Details panel */
.jr-order-panel {
    flex: 1 1 360px;
    max-width: 440px;
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    border-radius: var(--jr-radius-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 12px 32px var(--jr-primary-soft);
}
.jr-order-title { margin: 0; font-weight: 700; font-size: 22px; }
.jr-chip { background: var(--jr-fill); color: var(--jr-text-strong); font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 14px; }
.jr-order-lines { display: flex; flex-direction: column; gap: 12px; }
.jr-order-line { background: var(--jr-bg); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.jr-order-line form { margin: 0; }
.jr-order-thumb {
    width: 52px; height: 52px; flex: 0 0 52px;
    border-radius: 12px;
    background: var(--jr-fill);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.jr-order-name { font-weight: 700; font-size: 17px; }
.jr-order-each { font-size: 14px; color: var(--jr-muted); }
.jr-order-amount { font-weight: 700; font-size: 17px; white-space: nowrap; }
.jr-badge-sm { font-size: 13px; text-transform: none; padding: 1px 8px; }
.min-w-0 { min-width: 0; }

/* − / + buttons (44px touch targets) and Remove */
.jr-qty-btn {
    width: 44px; height: 44px;
    border-radius: 12px;
    border: 2px solid var(--jr-border);
    background: var(--jr-panel);
    color: var(--jr-primary);
    font-size: 22px; font-weight: 700; line-height: 1;
}
.jr-qty-btn:disabled { opacity: 0.4; }
.jr-qty { min-width: 40px; text-align: center; font-weight: 700; font-size: 18px; }
.jr-remove-btn {
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--jr-danger);
    font-weight: 700; font-size: 15px;
}

/* Subtotal, discount lines, total */
.jr-order-sums { border-top: 2px dashed var(--jr-border); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.jr-discount-line { color: var(--jr-ok-text); }
.jr-total-label { font-weight: 700; color: #5C1B43; }

/* Cancel / Void (outline, dark red) and Pay now (big, pink) */
.jr-btn-void {
    flex: 1 1 0;
    min-height: 56px;
    border-radius: 14px;
    /* Colors through Bootstrap's variables, so the disabled state (empty order) keeps them, just faded. */
    --bs-btn-border-color: var(--jr-danger);
    --bs-btn-bg: var(--jr-panel);
    --bs-btn-color: var(--jr-danger);
    --bs-btn-disabled-border-color: var(--jr-danger);
    --bs-btn-disabled-bg: var(--jr-panel);
    --bs-btn-disabled-color: var(--jr-danger);
    font-family: var(--jr-font-body);
    font-weight: 700;
}
.jr-btn-void:hover,
.jr-btn-void:active { background: var(--jr-fill); color: var(--jr-danger); border-color: var(--jr-danger); }
.jr-btn-pay { flex: 2 1 0; min-height: 56px; border-radius: 14px; font-size: 20px; font-weight: 700; }
.jr-hint { font-size: 14px; color: var(--jr-muted); text-align: right; }
.jr-empty { color: var(--jr-muted); }
.jr-modal { border-radius: var(--jr-radius-card); border: 2px solid var(--jr-border); }

/* Narrow screens: the order panel takes the full width under the products */
@media (max-width: 900px) {
    .jr-order-panel { max-width: none; }
}

/* ---------- 8. Payment box and receipt (mockup: docs/design/04-payment-receipt.png) ---------- */

/* Payment box (Bootstrap modal) */
.jr-pay-dialog { max-width: 560px; }
.jr-pay-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 12px 32px rgba(209, 23, 126, 0.12);
}
.jr-pay-title { margin: 0; font-weight: 700; font-size: 28px; }
.jr-pay-label { font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.jr-pay-total {
    background: var(--jr-fill);
    border-radius: 20px;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #5C1B43;
}
.jr-pay-total-amount {
    font-family: var(--jr-font-head);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.1;
    color: var(--jr-primary);
}
.jr-cash-field { position: relative; }
.jr-cash-peso { position: absolute; left: 16px; top: 13px; font-size: 20px; font-weight: 700; color: var(--jr-muted); }
.jr-cash-input,
.jr-cash-input:focus {
    min-height: 56px;
    border-radius: 14px;
    border-color: var(--jr-primary);
    background: var(--jr-panel);
    padding-left: 40px;
    font-size: 22px;
    font-weight: 700;
}
.jr-quick-cash { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.jr-quick-btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 22px;
    border: 2px solid var(--jr-border);
    background: var(--jr-panel);
    color: var(--jr-text-strong);
    font-weight: 700;
}
.jr-quick-btn.active,
.jr-quick-btn:active { border-color: var(--jr-primary); background: var(--jr-fill); }
.jr-pay-hint { margin: 8px 0 0; font-size: 14px; color: var(--jr-muted); }
.jr-change-box {
    background: var(--jr-ok-bg);
    color: var(--jr-ok-text);
    border-radius: 20px;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.jr-change-amount { font-family: var(--jr-font-head); font-weight: 700; font-size: 36px; }
.jr-change-box.is-short { background: #FFE5EA; color: var(--jr-error); }
.jr-change-box.is-short .jr-change-amount { font-size: 22px; }
.jr-pay-cancel { flex: 1 1 0; min-height: 56px; border-radius: 14px; }
.jr-pay-confirm { flex: 2 1 0; min-height: 56px; border-radius: 14px; font-size: 18px; font-weight: 700; }

/* Receipt page */
.jr-receipt-page { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.jr-receipt {
    background: var(--jr-panel);
    border: 2px dashed var(--jr-border);
    border-radius: 12px;
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 15px;
}
.jr-receipt-shop {
    text-align: center;
    font-family: var(--jr-font-head);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.25;
    color: var(--jr-primary);
}
.jr-receipt-heading { text-align: center; font-weight: 700; letter-spacing: 2px; }
/* VOIDED stamp on the receipt of a cancelled sale */
.jr-receipt-void {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    color: var(--jr-danger);
    border: 3px solid var(--jr-danger);
    border-radius: 8px;
    padding: 8px;
    font-size: 14px;
}
.jr-receipt-void-stamp { font-family: var(--jr-font-head); font-weight: 800; font-size: 30px; letter-spacing: 6px; line-height: 1.1; }
.jr-receipt-block {
    border-top: 2px dashed var(--jr-border);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.jr-receipt-row { display: flex; justify-content: space-between; gap: 12px; }
.jr-receipt-row > span:last-child { white-space: nowrap; text-align: right; }
.jr-receipt-total { font-weight: 700; font-size: 18px; color: var(--jr-primary); }
.jr-receipt-thanks {
    text-align: center;
    border-top: 2px dashed var(--jr-border);
    padding-top: 12px;
    font-family: var(--jr-font-head);
    font-weight: 600;
}
.jr-receipt-saved {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--jr-ok-bg);
    color: var(--jr-ok-text);
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 700;
}
.jr-receipt-btn { flex: 1 1 0; min-height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }

/* Printing the receipt: only the receipt card, black on white, no flash messages */
@media print {
    .jr-main > .alert { display: none !important; }
    .jr-receipt-page { max-width: 80mm; }
    .jr-receipt { border: 0; padding: 0; color: #000000; }
    .jr-receipt-block,
    .jr-receipt-thanks { border-top: 1px dashed #000000; }
    .jr-receipt-shop,
    .jr-receipt-total { color: #000000; }
}

/* ---------- 9. Inventory screen (mockup: docs/design/05-inventory-owner.png) ---------- */
.jr-inv { display: flex; flex-direction: column; gap: 20px; }

/* Title row: "Inventory" on the left, page buttons on the right */
.jr-inv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.jr-inv-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Summary cards (Low stock, Out of stock, Near expiry) */
.jr-inv-cards { display: flex; flex-wrap: wrap; gap: 16px; }
.jr-inv-card {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    border-radius: 18px;
    padding: 16px 18px;
}
.jr-inv-card-count { font-family: var(--jr-font-head); font-weight: 700; font-size: 28px; line-height: 1.2; }
.jr-inv-card-first { font-size: 15px; color: var(--jr-muted); }

/* Search box (white, round) and the Clear button next to it */
.jr-inv-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.jr-inv-search-box { flex: 1 1 280px; max-width: 480px; }
.jr-inv-search .jr-inv-search-input { background: var(--jr-panel); padding-right: 20px; }
.jr-btn-clear {
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    color: var(--jr-text-strong);
    padding: 0 20px;
}
.jr-btn-clear:hover,
.jr-btn-clear:active { background: var(--jr-fill); border-color: var(--jr-primary); color: var(--jr-text-strong); }

/* Table card: white, rounded, scrolls sideways on narrow screens */
.jr-inv-table-wrap {
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    border-radius: 20px;
    overflow-x: auto;
}
.jr-inv-table { min-width: 860px; }
.jr-inv-table > tbody > tr:last-child > td { border-bottom: 0; }
.jr-inv-table > tbody > tr[hidden] { display: none; }
.jr-inv-name { display: block; font-weight: 700; }
.jr-inv-batch { display: block; font-size: 13px; color: var(--jr-muted); }
.jr-inv-expired { margin-left: 6px; font-size: 14px; font-weight: 700; color: var(--jr-error); }
.jr-badge-table { font-size: 14px; }

/* Row buttons: Update stock, Update price, trash (44px touch targets) */
.jr-inv-actions { display: flex; gap: 8px; }
.jr-btn-row { min-height: 44px; height: 44px; padding: 0 14px; font-size: 15px; white-space: nowrap; }
.jr-btn-trash {
    width: 44px; height: 44px; min-height: 44px;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    /* Set through Bootstrap's variables so the disabled state keeps the same colors (just faded). */
    --bs-btn-bg: var(--jr-panel);
    --bs-btn-border-color: var(--jr-border);
    --bs-btn-color: var(--jr-danger);
    --bs-btn-disabled-bg: var(--jr-panel);
    --bs-btn-disabled-border-color: var(--jr-border);
    --bs-btn-disabled-color: var(--jr-danger);
}

/* ---------- 10. Sales Records (mockup: docs/design/07-sales-records-void.png, left part) ---------- */
.jr-sales { display: flex; flex-direction: column; gap: 20px; }

/* Title on the left; date, Export and Close on the right (bottom-aligned like the mockup) */
.jr-sales-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.jr-sales-head-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.jr-sales-date-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
.jr-sales-date-field { display: flex; flex-direction: column; gap: 6px; }
.jr-sales-date-label { font-size: 15px; font-weight: 700; }
.jr-sales-head .jr-sales-date { width: 190px; background: var(--jr-panel); }

/* Table card: white, rounded, scrolls sideways on narrow screens */
.jr-sales-table-wrap {
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    border-radius: 20px;
    overflow-x: auto;
}
.jr-sales-table { min-width: 860px; margin: 0; }
.jr-sales-table > thead th { color: #5C1B43; font-size: 14px; }

/* Receipt header row of each sale: S-0001, time, cashier, Receipt / Void */
.jr-sales-table .jr-sales-sale-row > td { background: var(--jr-bg); padding-top: 8px; padding-bottom: 8px; }
.jr-sales-receipt { font-family: var(--jr-font-head); font-weight: 700; margin-right: 8px; }
.jr-sales-meta { color: var(--jr-muted); font-size: 15px; margin-right: 6px; }
.jr-sales-actions { display: flex; gap: 8px; }
.jr-btn-void {
    --bs-btn-bg: var(--jr-panel);
    --bs-btn-border-color: var(--jr-danger);
    --bs-btn-color: var(--jr-danger);
    --bs-btn-disabled-bg: var(--jr-panel);
    --bs-btn-disabled-border-color: var(--jr-danger);
    --bs-btn-disabled-color: var(--jr-danger);
}

/* The sale whose void card is open: filled Void button (mockup) */
.jr-btn-void.jr-btn-void-on,
.jr-btn-void.jr-btn-void-on:hover,
.jr-btn-void.jr-btn-void-on:active { background: var(--jr-danger); color: #FFFFFF; border-color: var(--jr-danger); }

/* Table + summary on the left, void card on the right; the card goes under the table below 992px */
.jr-sales-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.jr-sales-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Void card (mockup: docs/design/07-sales-records-void.png, right part) */
.jr-void-card {
    flex: 1 1 340px;
    max-width: 440px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: 24px;
    box-shadow: 0 12px 32px var(--jr-primary-soft);
}
.jr-void-title { font-family: var(--jr-font-head); font-weight: 700; font-size: 22px; margin: 0; }
.jr-void-selected { background: var(--jr-fill); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.jr-void-selected-label { font-size: 14px; font-weight: 700; letter-spacing: 1px; color: #5C1B43; }
.jr-void-selected-total { font-family: var(--jr-font-head); font-weight: 600; font-size: 18px; color: var(--jr-primary); }
.jr-void-label { font-size: 15px; font-weight: 700; }
.jr-void-card .jr-void-reason { min-height: 92px; border-radius: 14px; resize: vertical; }
.jr-void-note { display: flex; gap: 10px; align-items: flex-start; background: var(--jr-bg); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #5C1B43; }
.jr-void-note > svg { flex-shrink: 0; margin-top: 1px; color: var(--jr-text-strong); }
.jr-void-buttons { display: flex; gap: 12px; }
.jr-void-cancel { flex: 1 1 0; min-height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.jr-btn-confirm-void {
    flex: 1.4 1 0;
    min-height: 54px;
    border-radius: 14px;
    font-weight: 700;
    --bs-btn-bg: var(--jr-danger);
    --bs-btn-border-color: var(--jr-danger);
    --bs-btn-color: #FFFFFF;
    --bs-btn-hover-bg: var(--jr-danger);
    --bs-btn-hover-border-color: var(--jr-danger);
    --bs-btn-hover-color: #FFFFFF;
    --bs-btn-active-bg: var(--jr-danger);
    --bs-btn-active-border-color: var(--jr-danger);
    --bs-btn-active-color: #FFFFFF;
    --bs-btn-disabled-bg: var(--jr-danger);
    --bs-btn-disabled-border-color: var(--jr-danger);
    --bs-btn-disabled-color: #FFFFFF;
}
@media (max-width: 991.98px) {
    .jr-void-card { max-width: none; }
}

/* Voided (CANCELLED) sale: grey and faded, with a VOIDED pill and the reason */
.jr-sales-voided > tr > td { color: #8C7A85; background: #F6F2F4; }
.jr-sales-table .jr-sales-voided > .jr-sales-sale-row > td { background: #EFE8EC; }
.jr-badge-voided {
    display: inline-block;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    margin-right: 6px;
    background: #6E5A66;
    color: #FFFFFF;
}
.jr-sales-reason { font-size: 15px; font-style: italic; }

/* Daily summary under the table (right side, like the mockup's Total sales box) */
.jr-sales-pages .pagination { margin: 0; justify-content: flex-end; }
.jr-sales-pages .page-link { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.jr-sales-summary {
    align-self: flex-end;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px 28px;
    background: var(--jr-fill);
    border-radius: 16px;
    padding: 12px 20px;
    color: #5C1B43;
    font-size: 15px;
    font-weight: 700;
}
.jr-sales-summary strong { font-size: 20px; margin-left: 4px; color: var(--jr-text); }
.jr-sales-total { font-family: var(--jr-font-head); font-weight: 700; font-size: 26px; color: var(--jr-primary); margin-left: 8px; }

/* Close Sales box */
.jr-sales-close-date { color: var(--jr-muted); font-weight: 700; margin-top: -12px; }
.jr-sales-close-list { display: flex; flex-direction: column; gap: 8px; }
.jr-sales-close-list > div { display: flex; justify-content: space-between; font-size: 17px; }
.jr-sales-close-list dt { font-weight: 600; color: var(--jr-muted); }
.jr-sales-close-list dd { margin: 0; font-weight: 700; }

/* ---------- 11. Audit Log (mockup: docs/design/09-audit-log-export.png) ---------- */
.jr-audit { display: flex; flex-direction: column; gap: 20px; }

/* Left part (filters + table) is wide; the Export card is 320-400px. They wrap under each other when there is no room. */
.jr-audit-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.jr-audit-main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Filter row: Date (From to To), User, Action, Apply, Export Excel; bottom-aligned like the mockup */
.jr-audit-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0; }
.jr-audit-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.jr-audit-label { font-size: 15px; font-weight: 700; margin: 0; padding: 0; float: none; width: auto; }
.jr-audit-dates { display: flex; align-items: center; gap: 8px; }
.jr-audit-to { color: var(--jr-muted); font-weight: 700; }
.jr-audit-filters .form-control,
.jr-audit-filters .form-select { background-color: var(--jr-panel); }
.jr-audit-date { width: 165px; }
.jr-audit-select { width: 160px; }
.jr-audit-select-wide { width: 200px; }

/* Table card: white, rounded, scrolls sideways on narrow screens */
.jr-audit-table-wrap {
    background: var(--jr-panel);
    border: 2px solid var(--jr-border);
    border-radius: 20px;
    overflow-x: auto;
}
.jr-audit-table { min-width: 760px; margin: 0; }
.jr-audit-table > tbody > tr:last-child > td { border-bottom: 0; }

/* Action badges (colours from the mockup) */
.jr-audit-badge {
    display: inline-block;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    white-space: nowrap;
}
.jr-audit-login     { background: var(--jr-fill);           color: var(--jr-text-strong); }
.jr-audit-sale      { background: var(--jr-ok-bg);          color: var(--jr-ok-text); }
.jr-audit-void      { background: var(--jr-danger);         color: #FFFFFF; }
.jr-audit-inventory { background: var(--jr-near-expiry-bg); color: var(--jr-near-expiry-text); }
.jr-audit-action-export { background: var(--jr-primary-soft); color: var(--jr-primary-dark); }
.jr-audit-action-reset { background: var(--jr-primary-soft); color: var(--jr-primary-dark); }

.jr-audit-pages .pagination { margin: 0; justify-content: flex-end; }
.jr-audit-pages .page-link { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.jr-audit-note { font-size: 14px; color: var(--jr-muted); }

/* Export to Excel card (right): Inventory list, Sales Records or Audit log as .xlsx. */
.jr-audit-export {
    flex: 1 1 320px;
    max-width: 400px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.jr-audit-export-title { font-family: var(--jr-font-head); font-weight: 700; font-size: 22px; margin: 0; }
.jr-audit-export-what { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; }
.jr-audit-export-what > legend { padding-bottom: 8px; }
.jr-audit-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border: 2px solid var(--jr-border);
    border-radius: 14px;
    font-weight: 700;
}
.jr-audit-option { cursor: pointer; }
.jr-audit-option .form-check-input { width: 20px; height: 20px; margin: 0; }
/* Our pink radio, not Bootstrap's built-in blue (Bootstrap's radio colour ignores --bs-primary). */
.jr-audit-option .form-check-input:checked { background-color: var(--jr-primary); border-color: var(--jr-primary); }
.jr-audit-option .form-check-input:focus { border-color: var(--jr-primary); box-shadow: 0 0 0 .25rem var(--jr-primary-soft); }
/* The chosen option gets a pink border and fill. */
.jr-audit-option:has(.form-check-input:checked) { border-color: var(--jr-primary); background: var(--jr-fill); }
.jr-audit-export-dates { display: flex; gap: 12px; }
.jr-audit-export-dates > .jr-audit-field { flex: 1 1 0; }
.jr-audit-download { min-height: 56px; border-radius: 14px; font-size: 17px; }

/* Below 992px the Export card takes the full width under the table */
@media (max-width: 991.98px) {
    .jr-audit-export { max-width: none; }
}

/* ---------- 12. Update stock / Update price (mockup: docs/design/06-stock-price-product-import.png) ---------- */
/* Each card is its own page, centered. */
.jr-form-page { display: flex; justify-content: center; align-items: flex-start; padding: 16px 0; }
.jr-edit-card {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: var(--jr-radius-card);
    box-shadow: 0 12px 32px var(--jr-primary-soft);
}
.jr-edit-title { font-family: var(--jr-font-head); font-weight: 700; font-size: 24px; margin: 0; }
.jr-edit-row { display: flex; gap: 12px; }
.jr-edit-row > .jr-edit-field { flex: 1 1 0; min-width: 0; }
.jr-edit-field { display: flex; flex-direction: column; gap: 6px; }
.jr-edit-label { font-size: 15px; font-weight: 700; }
.jr-edit-input { font-size: 18px; font-weight: 700; }

/* Read-only values (product, batch, current stock or price) */
.jr-readonly-box {
    min-height: var(--jr-control-height);
    border-radius: var(--jr-radius);
    background: var(--jr-fill);
    display: flex;
    align-items: center;
    padding: 0 14px;
}
.jr-readonly-big { font-size: 18px; font-weight: 700; }

/* NEW STOCK preview box */
.jr-new-stock {
    background: var(--jr-ok-bg);
    color: var(--jr-ok-text);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.jr-new-stock-label { font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.jr-new-stock-value { font-family: var(--jr-font-head); font-weight: 700; font-size: 28px; }

.jr-form-note { margin: 0; font-size: 14px; color: var(--jr-muted); }

/* Cancel (narrow) and Save (wide), 52px high */
.jr-edit-buttons { display: flex; gap: 12px; }
.jr-edit-cancel,
.jr-edit-save {
    min-height: 52px;
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jr-edit-cancel { flex: 1 1 0; }
.jr-edit-save { flex: 1.4 1 0; }

/* ---------- 13. Add or Edit Product (mockup: docs/design/06-stock-price-product-import.png, "Add product" card) ---------- */
/* Own class name: .jr-product-card is the POS product card */
.jr-product-form { max-width: 480px; }

/* Edit product: the product card and the "Add new batch" card side by side (stacked on narrow screens) */
.jr-form-page-two { gap: 32px; flex-wrap: wrap; }

/* Dashed "Product image" box with the Upload image button */
.jr-image-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--jr-bg);
    border: 2px dashed var(--jr-border);
    border-radius: 14px;
    padding: 12px;
}
.jr-image-box.is-invalid { border-color: var(--jr-error); }
.jr-image-thumb {
    width: 56px; height: 56px; flex: none;
    border-radius: var(--jr-radius);
    background: var(--jr-fill);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.jr-image-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.jr-image-name { font-size: 13px; color: var(--jr-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-image-btn { min-height: 44px; display: flex; align-items: center; padding: 0 16px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.jr-field-error { color: var(--jr-error); font-weight: 600; font-size: 0.875em; }

/* "First batch" section under a dashed line, pink Poppins heading */
.jr-batch-section {
    border-top: 2px dashed var(--jr-border);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.jr-section-title { font-family: var(--jr-font-head); font-weight: 600; font-size: 17px; color: var(--jr-primary); margin: 0; }

/* Current batches list on the Edit product page */
.jr-batch-list { display: flex; flex-direction: column; gap: 4px; }
.jr-batch-list-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--jr-radius);
    background: var(--jr-fill);
    font-size: 15px;
}

/* ---------- Alerts page (mockup 08-alerts-daily-email.png, left card + "Who gets what") ---------- */
.jr-alerts-page {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: flex-start;
}
.jr-alerts-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 0 1 560px;
    min-width: 0;
}
.jr-alerts-side { flex-basis: 360px; }
.jr-alerts-title { font-family: var(--jr-font-head); font-weight: 700; font-size: 24px; margin: 0; }
.jr-alerts-side-title { font-family: var(--jr-font-head); font-weight: 700; font-size: 22px; margin: 0; }
.jr-alerts-group {
    font-family: var(--jr-font-head);
    font-weight: 600;
    font-size: 15px;
    color: var(--jr-muted);
    margin: 6px 0 0;
}
/* One alert (or one "who gets what" line): pink tile */
.jr-alert-tile {
    background: var(--jr-bg);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.jr-alert-line { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.jr-alert-note { font-size: 14px; color: var(--jr-muted); }
.jr-alert-empty { margin: 0; font-weight: 600; }
.jr-alert-view {
    align-self: flex-start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 700;
}
.jr-who-role { font-weight: 700; color: var(--jr-primary); }

/* Below 992px the two cards stack */
@media (max-width: 991.98px) {
    .jr-alerts-page { flex-direction: column; align-items: stretch; }
    .jr-alerts-card { flex-basis: auto; }
}
/* Square 44px close (X) button, top right of the Alerts card */
.jr-icon-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: var(--jr-radius);
    border: 2px solid var(--jr-border);
    background: var(--jr-panel);
    color: var(--jr-text-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.jr-icon-btn:active { border-color: var(--jr-primary); color: var(--jr-text-strong); }
