﻿/* =========================
   RW Dialogs / Toasts CSS
   ========================= */

/* Backdrop */
.rw-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
}

/* Base modal */
.rw-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, 92vw);
    max-height: 85vh;
    background: #fff;
    color: #111;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Header */
.rw-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

.rw-modal-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

/* Close button */
.rw-modal-close {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    padding: 4px 8px;
    margin: -4px -8px -4px 0;
    cursor: pointer;
    color: #444;
    border-radius: 8px;
}

    .rw-modal-close:hover {
        background: #f1f5f9;
        color: #111;
    }

/* Body (scrollable) */
.rw-modal-body {
    padding: 16px;
    overflow-y: auto;
    min-height: 0; /* important for flex scrolling */
    flex: 1 1 auto;
}

/* Actions */
.rw-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    flex: 0 0 auto;
}

/* Buttons */
.rw-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

    .rw-btn:hover {
        background: #e2e8f0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
        transform: translateY(-1px);
    }

    .rw-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .rw-btn:focus {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    .rw-btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

/* Primary button used by OK */
.rw-btn-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

    .rw-btn-primary:hover {
        background: #1d4ed8;
        border-color: #1d4ed8;
    }

/* Optional "danger" style (you used rw-btn-danger earlier) */
.rw-btn-danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

    .rw-btn-danger:hover {
        background: #b91c1c;
        border-color: #b91c1c;
    }

/* Prompt dialog input + error */
.rw-modal-field {
    padding: 0 16px 16px 16px;
}

.rw-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #111;
}

    .rw-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    }

    .rw-input.invalid {
        border-color: #dc2626;
        box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
    }

.rw-modal-error {
    display: none;
    margin-top: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

/* Wait dialog */
.rw-wait-body {
    padding: 18px 16px;
}

.rw-wait-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rw-wait-text {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

/* CSS spinner */
.rw-wait-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(37, 99, 235, 0.25);
    border-top-color: rgba(37, 99, 235, 1);
    animation: rw-spin 0.9s linear infinite;
}

@keyframes rw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Redirect / Countdown dialogs (showRedirectMessage, showCountdownMessage)
   This uses the wrapper and keeps footer from overlapping content. */
.rw-modal-redirect {
    width: min(1000px, 94vw);
    max-height: 88vh;
}

    /* For redirect/countdown, body hosts our internal flex wrapper, so avoid double scroll */
    .rw-modal-redirect .rw-modal-body {
        padding: 0;
        overflow: hidden;
        min-height: 0;
    }

/* Wrapper inside modal body */
.rw-redirect-wrap {
    display: flex;
    flex-direction: column;
    max-height: 70vh; /* tweak if you want more/less */
    min-height: 0;
}

/* Only this scrolls */
.rw-redirect-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 16px 16px 10px 16px;
}

.rw-redirect-footer {
    flex: 0 0 auto;
    border-top: 1px solid #eee;
    background: #fff;
    padding: 10px 16px 12px 16px;
}

.rw-redirect-countdown {
    font-weight: 700;
    color: #0f172a;
}

/* Optional status blocks for your createProcessingStatusHTML output */
.status-block {
    margin: 12px 0 14px 0;
    padding: 12px;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    background: #fafafa;
}

    .status-block h3 {
        margin: 0 0 10px 0;
        font-size: 14px;
        font-weight: 800;
        color: #0f172a;
    }

.status-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 3px 0;
}

.status-label {
    font-weight: 700;
    color: #334155;
}

.status-value {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #0f172a;
}

/* Optional scan action buttons row (if you used rw-scan-actions) */
.rw-scan-actions {
    margin: 14px 0 10px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Toast container */
.rw-toast-container {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* so clicks pass through except on toasts */
}

/* Toast */
.rw-toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: min(420px, 92vw);
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.rw-toast-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 900;
    flex: 0 0 auto;
    margin-top: 1px;
}

.rw-toast-body {
    flex: 1 1 auto;
    min-width: 0;
}

.rw-toast-title {
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 2px 0;
}

.rw-toast-text {
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.35;
}

.rw-toast-close {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 8px;
    margin: -2px -6px 0 0;
    flex: 0 0 auto;
}

    .rw-toast-close:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
    }

/* Optional toast variants */
.rw-toast-success {
    background: #065f46;
}
/* emerald-ish */
.rw-toast-error {
    background: #7f1d1d;
}
/* red-ish */
.rw-toast-info {
    background: #0f172a;
}
/* default navy */

/* =========================
   RW Toast CSS additions
   ========================= */

/* Override earlier .rw-toast layout to match: bar + content + optional close */
.rw-toast {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 12px;
    border-radius: 12px;
    cursor: default;
    user-select: none;
    transform: translateY(8px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

/* Animate in/out */
.rw-toast-show {
    transform: translateY(0);
    opacity: 1;
}

.rw-toast-hide {
    transform: translateY(8px);
    opacity: 0;
}

/* Clickable toast (you support clickToClose) */
.rw-toast[role="status"] {
    cursor: pointer;
}

/* The top progress bar (purely decorative) */
.rw-toast-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.25);
}

/* Content row */
.rw-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

/* Icon */
.rw-toast-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 900;
    flex: 0 0 auto;
    margin-top: 1px;
}

/* Message text */
.rw-toast-text {
    font-size: 13px;
    line-height: 1.35;
    opacity: 0.95;
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Close button */
.rw-toast-close {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    flex: 0 0 auto;
    margin-left: 2px;
}

    /* Make close button hover state obvious */
    .rw-toast-close:hover {
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
    }

    /* Prevent toast click-to-close from feeling weird on close button */
    .rw-toast-close:focus {
        outline: 2px solid rgba(255, 255, 255, 0.55);
        outline-offset: 2px;
    }

/* Optional: Slightly different bar color per type */
.rw-toast-success .rw-toast-bar {
    background: rgba(34, 197, 94, 0.65);
}

.rw-toast-error .rw-toast-bar {
    background: rgba(239, 68, 68, 0.70);
}

.rw-toast-info .rw-toast-bar {
    background: rgba(59, 130, 246, 0.65);
}

/* Optional: if you want the toast container to not steal clicks outside the toasts */
.rw-toast-container {
    pointer-events: none;
}

.rw-toast {
    pointer-events: auto;
}

.invalid {
    border: 2px solid red !important;
}
/* =========================
   RW Toast "Classic" Overrides
   - top centered
   - white background, dark text
   - type shown via accent (bar + icon), not full background
   Put this AFTER other toast CSS
   ========================= */

/* Top centered container */
.rw-toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* keep clicks only on toasts */
    pointer-events: none;
}

/* White card toast base */
.rw-toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: min(720px, 92vw);
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.rw-toast-show {
    transform: translateY(0);
    opacity: 1;
}

.rw-toast-hide {
    transform: translateY(-8px);
    opacity: 0;
}

/* The top bar becomes the accent line */
.rw-toast-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    width: 100%;
    background: #94a3b8; /* neutral default */
}

/* Content */
.rw-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

/* Text */
.rw-toast-text {
    color: #111 !important;
    font-size: 14px;
    line-height: 1.35;
    opacity: 1;
    overflow-wrap: anywhere;
}

/* Close button (dark) */
.rw-toast-close {
    color: rgba(0, 0, 0, 0.55);
}

    .rw-toast-close:hover {
        background: rgba(0, 0, 0, 0.06);
        color: rgba(0, 0, 0, 0.85);
    }

/* Icon as a subtle pill */
.rw-toast-icon {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

/* Type accents (bar + icon) */
.rw-toast-info .rw-toast-bar {
    background: #2563eb;
}

.rw-toast-success .rw-toast-bar {
    background: #16a34a;
}

.rw-toast-error .rw-toast-bar {
    background: #dc2626;
}

.rw-toast-info .rw-toast-icon {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.rw-toast-success .rw-toast-icon {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.rw-toast-error .rw-toast-icon {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.nav-current {
    background: #a8363a !important;
    color: #fff !important;
}

.nav-clear-last {
    background: transparent !important;
    color: inherit !important;
}

.main-nav > ul > li:last-child > a.nav-not-last {
    background: transparent;
    color: #fff;
    padding: 7px 15px;
    text-decoration: none;
    font-size: 1em;
    display: block;
    border-radius: 5px;
}

    .main-nav > ul > li:last-child > a.nav-not-last:hover {
        color: #d24629;
        background: #fff;
    }

.main-nav ul li a.nav-current {
    background: #a8363a;
    color: #fff;
}

    .main-nav ul li a.nav-current:hover {
        color: #d24629;
        background: #fff;
    }


.main-grid.k-grid {
    border: none;
    background: transparent;
    font-family: inherit;
    color: inherit;
}

.main-grid .k-grid-header,
.main-grid .k-grid-content,
.main-grid .k-grid-content-locked,
.main-grid .k-table-header,
.main-grid .k-table-tbody,
.main-grid .k-grid-pager {
    border: none;
    background: transparent;
}

.main-grid .k-grid-header-wrap {
    border: none;
}

.main-grid .k-table-th {
    text-align: left;
    font-size: 1.0em;
    font-weight: 700;
    padding: 10px;
    border-bottom: 3px solid #0e0d1b;
    border-left: none;
    border-right: none;
    background: #fff;
    color: inherit;
}

.main-grid .k-table-td {
    font-size: 1.05em;
    padding: 20px 10px;
    border-bottom: 1px solid #ccc;
    border-left: none;
    border-right: none;
    background: #fff;
    vertical-align: middle;
}

.main-grid.small .k-table-td {
    padding: 10px 5px;
}

.main-grid .k-table-tbody tr:hover .k-table-td {
    background: #f2f2f2;
}

.main-grid .k-table-td a {
    /*color: inherit;*/
    text-decoration: underline;
}

    .main-grid .k-table-td a:hover {
        text-decoration: underline;
    }

.main-grid .k-grid-pager {
    border: none;
    background: transparent;
    padding: 12px 0 0 0;
    font-size: 0.95em;
}

.main-grid .k-pager-info,
.main-grid .k-label {
    color: inherit;
}

.main-grid .k-pager-nav,
.main-grid .k-pager-numbers .k-link,
.main-grid .k-pager-numbers .k-button,
.main-grid .k-button {
    border: none;
    background: transparent;
    color: inherit;
    box-shadow: none;
}

    .main-grid .k-pager-nav:hover,
    .main-grid .k-pager-numbers .k-link:hover,
    .main-grid .k-pager-numbers .k-button:hover,
    .main-grid .k-button:hover {
        background: #f2f2f2;
    }

.main-grid .k-selected.k-link,
.main-grid .k-selected.k-button {
    background: #f2f2f2;
    color: inherit;
    border-radius: 3px;
}

.main-grid .k-sort-icon,
.main-grid .k-svg-icon {
    margin-left: 4px;
}

.main-grid .status-lnk {
    display: inline-block;
    vertical-align: middle;
}

.modal-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    padding: 0;
}

    .modal-close-x:hover {
        opacity: 0.7;
    }

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-secondary {
    background: #f2f2f2;
    color: #000;
    border: 1px solid #ccc;
    text-decoration: none;
}

input[type=tel], input[type=url] {
    font-size: 1em;
    padding: 10px;
    width: 100%;
    border: 1px solid #ccc;
}

.form-container input[type=tel], .form-container input[type=url] {
    border: 1px solid #ccc;
    background: #f5f6f7;
    -webkit-box-shadow: inset 5px 5px 10px 0 rgba(0, 0, 0, .05);
    box-shadow: inset 5px 5px 10px 0 rgba(0, 0, 0, .05);
}

.form-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    background: #1f5f99;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .info-icon:hover {
        background: #174a78;
        color: #fff;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    }

    .info-icon:focus {
        outline: 2px solid #174a78;
        outline-offset: 2px;
        color: #fff;
        text-decoration: none;
    }

    .info-icon:visited {
        color: #fff;
    }
.license-section {
    margin-top: 10px;
}

.license-table-header {
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0 6px;
}

.license-row {
    margin-bottom: 10px;
}

.license-col {
    float: left;
    box-sizing: border-box;
    padding-right: 10px;
}

.license-col-type {
    width: 30%;
}

.license-col-number {
    width: 30%;
}

.license-col-plant {
    width: 25%;
}

.license-col-remove {
    width: 15%;
    padding-right: 0;
}

.license-actions {
    margin-top: 10px;
}

#addOrgLicenseRows .form-item {
    margin-bottom: 0;
}

#addOrgLicenseRows .btn-remove-license-row {
    margin-top: 24px;
    display: inline-block;
}

.license-col-remove {
    width: 15%;
    padding-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#addOrgLicenseRows .btn-remove-license-row {
    margin-top: 0;
    display: inline-block;
}

.license-table-header,
.license-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.license-col {
    float: none;
    box-sizing: border-box;
    padding-right: 0;
}

.license-col-type {
    width: 30%;
    flex: 0 0 30%;
}

.license-col-number {
    width: 30%;
    flex: 0 0 30%;
}

.license-col-plant {
    width: 25%;
    flex: 0 0 25%;
}

.license-col-remove {
    width: 15%;
    flex: 0 0 15%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#addOrgLicenseRows .form-item {
    margin-bottom: 0;
}

#addOrgLicenseRows .btn-remove-license-row {
    margin-top: 0;
    display: inline-block;
}

.plant-count-item {
    min-height: 38px;
}

.license-row-display .license-display-value {
    min-height: 38px;
    box-sizing: border-box;
    padding: 8px 12px;
    line-height: 20px;
}

.license-row-display {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

    .license-row-display .license-col {
        box-sizing: border-box;
    }

#rw-modify-primary-person-dialog .form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Associated license section */
.associated-license-header,
.associated-license-row {
    width: 100%;
}

.associated-license-col {
    float: left;
    box-sizing: border-box;
    padding-right: 10px;
}

.associated-license-col-principal {
    width: 28%;
}

.associated-license-col-suffix {
    width: 22%;
}

.associated-license-col-issued {
    width: 18%;
}

.associated-license-col-expiration {
    width: 18%;
}

.associated-license-col-remove {
    width: 14%;
    padding-right: 0;
}

.associated-license-header {
    margin-bottom: 8px;
    font-weight: 600;
}

    .associated-license-header label {
        display: block;
        margin-bottom: 0;
    }

.associated-license-row {
    margin-bottom: 10px;
}

    .associated-license-row .form-item {
        margin-bottom: 0;
    }

#addLocationAssociatedLicenseRows:empty {
    margin-bottom: 0;
}

.btn-secondary:hover {
    background: #455a64;
    color: white;
}

.password-rules-box {
    margin: 15px 0 20px 0;
    padding: 14px 16px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    background: #f8f9fb;
}

.password-rules-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.password-rules-list {
    margin: 0;
    padding-left: 18px;
}

    .password-rules-list li {
        margin: 4px 0;
    }

.password-rules-box {
    margin: 15px 0 20px 0;
    padding: 14px 16px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    background: #f8f9fb;
}

.password-rules-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}

.password-rules-list {
    margin: 0;
    padding-left: 18px;
}

    .password-rules-list li {
        margin: 4px 0;
        color: #374151;
    }

.form-message {
    margin: 0 0 18px 0;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.form-message-error {
    background: #fff1f2;
    border: 1px solid #f5c2c7;
    color: #b42318;
}

.form-message-success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

#mfa-setup-form .password-rules-box p {
    margin: 0 0 10px 0;
}

    #mfa-setup-form .password-rules-box p:last-child {
        margin-bottom: 0;
    }

.mfa-qr-box {
    width: 220px;
    min-height: 220px;
    padding: 12px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#mfaManualKey[readonly] {
    background: #f8f9fb;
}

.form-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.associated-license-col-principal {
    float: left;
    width: 20%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-suffix {
    float: left;
    width: 13%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-issued {
    float: left;
    width: 14%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-expiration {
    float: left;
    width: 14%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-activities {
    float: left;
    width: 25%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-remove {
    float: left;
    width: 14%;
    box-sizing: border-box;
}

.associated-license-col-activities .k-multiselect {
    width: 100%;
    box-sizing: border-box;
}

    .associated-license-col-activities .k-multiselect .k-input-values {
        min-height: 40px;
    }

    .modal-content-wide {
        width:1300px;
        z-index:999;
    }

.associated-license-col-principal {
    float: left;
    width: 18%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-suffix {
    float: left;
    width: 12%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-issued {
    float: left;
    width: 13%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-expiration {
    float: left;
    width: 13%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-max-plants {
    float: left;
    width: 12%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-activities {
    float: left;
    width: 20%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-remove {
    float: left;
    width: 12%;
    box-sizing: border-box;
}

.form-lnk-list a.active {
    background: #a8363a;
    color: #fff;
}
.form-item .k-combobox {
    border-radius: 5px;
}

    .form-item .k-combobox .k-input-inner {
        padding: 10px 12px;
        box-sizing: border-box;
    }

.mother-plant-badge {
    display: inline-block;
    background-color: #2e7d32;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    letter-spacing: 0.03em;
}

.mother-plant-none {
    color: #bbb;
    font-size: 14px;
}

td:has(.mother-plant-badge),
td:has(.mother-plant-none) {
    padding-left: 40px;
}

.associated-license-col-license-number {
    float: left;
    width: 24%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-issued {
    float: left;
    width: 16%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-expiration {
    float: left;
    width: 16%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-activities {
    float: left;
    width: 28%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-remove {
    float: left;
    width: 16%;
    box-sizing: border-box;
}
.k-multiselect.invalid {
    border: 2px solid #a94442;
    border-radius: 4px;
}
.associated-license-col-activities .k-multiselect.invalid {
    outline: 1px solid #a8363a !important;
    border-radius: 5px;
}
.modal2, .modal3 {
    background: #0e0d1ba7;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    z-index: 100;
}

.modal-content2{
    background: #fff;
    width: 1000px;
    position: absolute;
    top: 0;
    bottom: 0;
    right: -1000px;
    padding: 30px;
    -webkit-box-shadow: 0 0 50px 0 rgba(0, 0, 0, .1);
    box-shadow: 0 0 50px 0 rgba(0, 0, 0, .1);
    overflow: auto;
}
.modal-content3 {
    background: #fff;
    width: 1200px;
    position: absolute;
    top: 0;
    bottom: 0;
    right: -1000px;
    padding: 30px;
    -webkit-box-shadow: 0 0 50px 0 rgba(0, 0, 0, .1);
    box-shadow: 0 0 50px 0 rgba(0, 0, 0, .1);
    overflow: auto;
}

.associated-license-col-license-number {
    float: left;
    width: 18%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-biotrack-unique-id {
    float: left;
    width: 18%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-issued {
    float: left;
    width: 14%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-expiration {
    float: left;
    width: 14%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-activities {
    float: left;
    width: 20%;
    padding-right: 10px;
    box-sizing: border-box;
}

.associated-license-col-remove {
    float: left;
    width: 16%;
    box-sizing: border-box;
}
.associated-license-row-display .associated-license-col {
    display: flex;
    align-items: center;
}

.associated-license-row-display .license-display-value {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.lc-event {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.lc-icon {
    font-family: "Segoe UI Symbol", "Arial Unicode MS", "Noto Sans Symbols", sans-serif;
    line-height: 1;
}

.lc-destruction {
    background: #fff4e5;
    color: #8a5300;
}

.lc-partial-harvest {
    background: #f3ecff;
    color: #5d3ea8;
}

.k-tooltip {
    z-index: 999999 !important;
}
.btn-right {
    float: right;
}

.mono-text {
    font-family: Consolas, "Courier New", monospace;
    font-size:larger;
}
.lc-manifest {
    background: #f1f5f9;
    border: 1px solid #94a3b8;
    color: #334155;
}

a.lc-manifest:hover {
    background: #e2e8f0;
}
.manifest-item-detail-edit {
    padding: 10px 12px 4px;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
}

.manifest-item-decision {
    width: 100%;
    min-width: 170px;
}

.mono-text {
    font-family: Consolas, "Courier New", monospace;
}
#manifestInventoryGrid .k-hierarchy-col,
#manifestInventoryGrid td.k-hierarchy-cell {
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

    #manifestInventoryGrid td.k-hierarchy-cell > a,
    #manifestInventoryGrid td.k-hierarchy-cell .k-icon,
    #manifestInventoryGrid td.k-hierarchy-cell .k-svg-icon {
        display: none !important;
    }

.mono-text {
    font-family: Consolas, "Courier New", monospace;
}

.rw-copyids-dialog {
    max-width: 42rem;
}

.rw-copyids-message {
    margin-bottom: 1rem;
    line-height: 1.45;
}

.rw-copyids-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.rw-copyid-row {
    border: 1px solid #d9dce3;
    border-radius: 0.5rem;
    padding: 0.85rem;
    background: #fafbfc;
}

.rw-copyid-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.rw-copyid-value-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rw-copyid-value {
    display: inline-block;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border: 1px solid #cfd5df;
    border-radius: 0.35rem;
    font-size: 1rem;
    line-height: 1.2;
    word-break: break-all;
    user-select: all;
}

.rw-btn-copy {
    white-space: nowrap;
}

.rw-copyid-status {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #2d6a4f;
    min-height: 1.1rem;
}

.rw-copyid-temp {
    position: absolute;
    left: -9999px;
    top: 0;
}

.rw-copyids-dialog {
    max-width: 42rem;
}

.rw-copyids-message {
    margin-bottom: 1rem;
    line-height: 1.45;
}

.rw-copyids-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-height: 24rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.rw-copyid-row {
    border: 1px solid #d9dce3;
    border-radius: 0.5rem;
    padding: 0.85rem;
    background: #fafbfc;
}

.rw-copyid-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.rw-copyid-label {
    font-weight: 600;
    min-width: 0;
}

.rw-copyid-value {
    display: block;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border: 1px solid #cfd5df;
    border-radius: 0.35rem;
    font-size: 1rem;
    line-height: 1.2;
    word-break: break-all;
    user-select: all;
}

.rw-btn-copy {
    white-space: nowrap;
    flex: 0 0 auto;
}

.rw-copyid-status {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #2d6a4f;
    min-height: 1.1rem;
}

.rw-copyid-temp {
    position: absolute;
    left: -9999px;
    top: 0;
}

.rw-copyids-dialog {
    max-width: 42rem;
}

.rw-copyids-message {
    margin-bottom: 1rem;
    line-height: 1.45;
}

.rw-copyids-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-height: 24rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.rw-copyid-row {
    border: 1px solid #d9dce3;
    border-radius: 0.5rem;
    padding: 0.85rem;
    background: #fafbfc;
}

.rw-copyid-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.rw-copyid-label {
    font-weight: 600;
    flex: 0 0 auto;
    white-space: nowrap;
}

.rw-copyid-value {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border: 1px solid #cfd5df;
    border-radius: 0.35rem;
    font-size: 1rem;
    line-height: 1.2;
    word-break: break-all;
    user-select: all;
}

.rw-btn-copy {
    white-space: nowrap;
    flex: 0 0 auto;
}

.rw-copyid-status {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #2d6a4f;
    min-height: 1.1rem;
}

.rw-copyid-temp {
    position: absolute;
    left: -9999px;
    top: 0;
}

.grid-copy-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
}

.grid-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 1px solid #cfd5df;
    border-radius: 0.3rem;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}

    .grid-copy-btn:hover {
        background: #f5f7fa;
    }

    .grid-copy-btn:focus {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    .grid-copy-btn svg {
        display: block;
        fill: currentColor;
    }

    .grid-copy-btn.is-copied .grid-copy-icon-copy {
        display: none;
    }

    .grid-copy-btn.is-copied .grid-copy-icon-check {
        display: inline-flex !important;
    }


.grid-copy-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
}

.grid-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 1px solid #cfd5df;
    border-radius: 0.3rem;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}

    .grid-copy-btn:hover {
        background: #f5f7fa;
    }

    .grid-copy-btn:focus {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    .grid-copy-btn svg {
        display: block;
        fill: currentColor;
    }

    .grid-copy-btn.is-copied .grid-copy-icon-copy {
        display: none;
    }

    .grid-copy-btn.is-copied .grid-copy-icon-check {
        display: inline-flex !important;
    }
.readonly-multi-value {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    background: #fff5f3;
    border-radius: 4px;
    line-height: 1.5;
    white-space: normal;
}

    .readonly-multi-value .origin-id {
        display: inline-block;
        margin: 0 8px 8px 0;
        padding: 4px 8px;
        border: 1px solid #d0d0d0;
        border-radius: 14px;
        background: #fff;
        font-size: 13px;
    }
.k-pager-sizes {
    width: auto;
}

    .k-pager-sizes .k-dropdown,
    .k-pager-sizes .k-picker,
    .k-pager-sizes .k-widget.k-dropdown {
        width: 100px !important;
        min-width: 100px;
    }

    .k-pager-sizes .k-input-inner,
    .k-pager-sizes .k-input-value-text,
    .k-pager-sizes .k-dropdown-wrap {
        padding-right: 24px;
    }

.k-pager-wrap {
    flex-wrap: wrap;
}
.muted {
    color: #777;
    font-size: 0.8em;
    margin-top: 2px;
}

a.lc-testing-pending,
a.lc-testing-in-progress {
    text-decoration: none;
}

    a.lc-testing-pending .lc-event-text,
    a.lc-testing-in-progress .lc-event-text {
        text-decoration: underline;
    }

.lc-testing-icon {
    font-size: 1.15em;
    line-height: 1;
    display: inline-block;
    margin-right: 4px;
    text-decoration: none !important;
}

.lc-testing-pending {
    background: #fef9c3;
    border: 1px solid #eab308;
    color: #713f12;
}

a.lc-testing-pending:hover {
    background: #fef08a;
    color: #713f12;
}

.lc-testing-in-progress {
    background: #f3e8ff;
    border: 1px solid #c084fc;
    color: #6b21a8;
}

a.lc-testing-in-progress:hover {
    background: #e9d5ff;
    color: #6b21a8;
}

.tr-sample-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 18px 0;
    padding: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.tr-sample-summary-item {
    min-width: 0;
}

    .tr-sample-summary-item span {
        display: block;
        font-size: 12px;
        color: #666;
        margin-bottom: 2px;
    }

    .tr-sample-summary-item strong {
        display: block;
        font-size: 14px;
        color: #111;
        overflow-wrap: anywhere;
    }

.tr-calculated-summary {
    margin-top: 18px;
}

.tr-panel-heading-badge {
    margin-left: 12px;
    vertical-align: middle;
}

.tl-panel-heading .tl-status-badge {
    font-size: 12px;
}

.tr-wide-result-select {
    min-width: 150px;
    width: 100%;
}

.tr-result-status {
    min-width: 95px;
}

.tl-solvent-table th:nth-child(4),
.tl-solvent-table td:nth-child(4),
#trPanelTable4 th:nth-child(4),
#trPanelTable4 td:nth-child(4) {
    min-width: 170px;
}

.tl-solvent-table th:nth-child(5),
.tl-solvent-table td:nth-child(5),
#trPanelTable4 th:nth-child(5),
#trPanelTable4 td:nth-child(5) {
    min-width: 115px;
}

.tr-analyte-result-value {
    width: 100%;
    box-sizing: border-box;
}

.tr-pesticide-table th:nth-child(4),
.tr-pesticide-table td:nth-child(4) {
    min-width: 170px;
}

.tr-pesticide-table th:nth-child(5),
.tr-pesticide-table td:nth-child(5) {
    min-width: 115px;
}

.tr-result-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 230px;
}

    .tr-result-input-wrap .tr-wide-result-select {
        min-width: 135px;
        width: 135px;
        flex: 0 0 135px;
    }

    .tr-result-input-wrap .tr-inline-result-value {
        min-width: 80px;
        width: 80px;
        flex: 0 0 80px;
        margin-top: 0 !important;
    }

.tr-result-status {
    min-width: 105px;
}

.tr-pesticide-table th:nth-child(1),
.tr-pesticide-table td:nth-child(1) {
    width: 34%;
    max-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tr-pesticide-table th:nth-child(2),
.tr-pesticide-table td:nth-child(2),
.tr-pesticide-table th:nth-child(3),
.tr-pesticide-table td:nth-child(3) {
    width: 95px;
}

.tr-pesticide-table th:nth-child(4),
.tr-pesticide-table td:nth-child(4) {
    min-width: 240px;
    width: 240px;
}

.tr-pesticide-table th:nth-child(5),
.tr-pesticide-table td:nth-child(5) {
    min-width: 115px;
    width: 115px;
}
.tr-result-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tr-inline-result-value {
    width: 85px;
    max-width: 85px;
}
.readonly-field {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff5f3;
    color: #333;
    line-height: 1.4;
    box-sizing: border-box;
    word-break: break-word;
    white-space: normal;
}

.rcts-required-retest {
    display: inline-block;
    margin: 3px 5px 3px 0;
    padding: 4px 8px;
    border: 1px solid #d9b8b8;
    background: #fff5f5;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}
.lc-retest-pending {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

a.lc-retest-pending:hover {
    background: #ffedd5;
}

.lc-retest-icon {
    font-weight: 700;
}
.lc-retest-pending {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

a.lc-retest-pending:hover {
    background: #ffedd5;
}

.lc-retest-approved {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

a.lc-retest-approved:hover {
    background: #dcfce7;
}

.lc-retest-denied {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

a.lc-retest-denied:hover {
    background: #fee2e2;
}

.lc-retest-icon {
    font-weight: 700;
}
.test-history-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 2px 4px 2px 0;
    padding: 3px 7px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

    .test-history-item:hover {
        text-decoration: none;
        background: #e2e8f0;
    }

.test-history-result {
    font-weight: 700;
}

.test-history-date {
    font-size: 11px;
    opacity: .8;
}

.test-history-pass {
    border-color: #86efac;
    background: #ecfdf3;
    color: #166534;
}

    .test-history-pass:hover {
        background: #dcfce7;
    }

.test-history-fail {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

    .test-history-fail:hover {
        background: #fee2e2;
    }
.lc-event {
    margin: 2px 4px 2px 0;
    cursor: default;
}

.rw-copyids-copyall-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #2d6a4f;
    min-height: 1.1rem;
}


.rw-global-search-dialog {
    width: min(1100px, 96vw);
    max-width: 1100px;
}

.rw-global-search-top {
    margin-bottom: 1rem;
}

.rw-global-search-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.rw-global-search-input-row {
    display: flex;
    gap: 0.5rem;
}

    .rw-global-search-input-row .rw-input {
        width: 100%;
    }

.rw-global-search-status {
    margin-top: 0.5rem;
    min-height: 1.2rem;
    color: #555;
}

    .rw-global-search-status.rw-global-search-status-error {
        color: #b42318;
    }

.rw-global-search-grid-wrap {
    margin-top: 0.75rem;
}

.rw-global-search-dialog .k-grid {
    border-radius: 0.5rem;
    overflow: hidden;
}

.readonly-field,
input[readonly],
textarea[readonly] {
    background: #fff5f3;
    color: #555;
    cursor: default;
}

.modal-button-row {
    margin-top: 15px;
    text-align: right;
}

    .modal-button-row .btn {
        margin-left: 8px;
    }

.secondary-btn {
    background: #777;
}

.hidden {
    display: none !important;
}

.associated-license-header,
.associated-license-row {
    width: 100%;
}

.associated-license-col {
    float: left;
    box-sizing: border-box;
    padding-right: 8px;
}

.associated-license-col-license-number {
    width: 16%;
}

.associated-license-col-biotrack-unique-id {
    width: 16%;
}

.associated-license-col-issued {
    width: 13%;
}

.associated-license-col-expiration {
    width: 13%;
}

.associated-license-col-activities {
    width: 18%;
}

.associated-license-col-class {
    width: 8%;
}

.associated-license-col-remove {
    width: 16%;
    padding-right: 0;
}

.associated-license-col-remove {
    text-align: right;
    padding-right: 0;
}

.associated-license-action-wrap {
    text-align: right;
    white-space: nowrap;
}
.associated-license-col-remove {
    text-align: right;
    padding-right: 0;
}

.associated-license-action-wrap {
    text-align: right;
    white-space: nowrap;
}

.associated-license-col-class {
    min-height: 1px;
}


.associated-license-header,
.associated-license-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.1fr) /* License Number */
    minmax(120px, 1.1fr) /* Biotrack Unique ID */
    minmax(115px, 0.9fr) /* Issued Date */
    minmax(115px, 0.9fr) /* Expiration Date */
    minmax(140px, 1.1fr) /* Activity */
    minmax(70px, 0.45fr) /* Class */
    minmax(90px, 0.55fr); /* Remove/Delete */

    column-gap: 8px;
    align-items: center;
}

.associated-license-col {
    float: none;
    width: auto;
    box-sizing: border-box;
    padding-right: 0;
}

.associated-license-col-remove {
    text-align: right;
}

.associated-license-action-wrap {
    text-align: right;
    white-space: nowrap;
}

.associated-license-col-remove .btn {
    display: inline-block;
}

.associated-license-row .form-item,
.associated-license-row .license-display-value {
    margin-bottom: 0;
}
.associated-license-header,
.associated-license-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.1fr) /* License Number */
    minmax(120px, 1.1fr) /* Biotrack Unique ID */
    minmax(115px, 0.9fr) /* Issued Date */
    minmax(115px, 0.9fr) /* Expiration Date */
    minmax(140px, 1.1fr) /* Activity */
    minmax(70px, 0.45fr) /* Class */
    minmax(65px, 0.35fr) /* Active */
    minmax(90px, 0.55fr); /* Remove/Delete */

    column-gap: 8px;
    align-items: center;
}

.associated-license-col {
    float: none;
    width: auto;
    box-sizing: border-box;
    padding-right: 0;
}

.associated-license-col-active {
    text-align: center;
}

.associated-license-col-remove {
    text-align: right;
}

.associated-license-action-wrap {
    text-align: right;
    white-space: nowrap;
}

.associated-license-row .form-item,
.associated-license-row .license-display-value {
    margin-bottom: 0;
}
.mfg-action-section input[readonly],
.mfg-action-section textarea[readonly], #inv-action-section-container input[readonly],
#inv-action-section-container textarea[readonly], .inv-details-content input[readonly],
.inv-details-content textarea[readonly] {
    background-color: #fff5f3;
}

.item-history-table {
    table-layout: fixed;
    width: 100%;
}

    .item-history-table .event-col,
    .item-history-table td.event-col {
        width: 240px;
        max-width: 240px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .item-history-table .date-col,
    .item-history-table td.date-col {
        width: 120px;
    }

    .item-history-table .triggered-by-col,
    .item-history-table td.triggered-by-col {
        width: 150px;
    }
.origin-summary-block {
    margin: 12px 0 18px 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.origin-summary-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.origin-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.origin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    text-decoration: none;
    min-width: 190px;
}

.origin-barcode {
    font-family: Consolas, monospace;
    font-weight: 600;
}

.origin-entity-type {
    font-size: .85em;
    color: #666;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f7f7f7;
}

.rw-origin-history-dialog {
    width: min(950px, calc(100vw - 40px));
    max-height: calc(100vh - 60px);
}

    .rw-origin-history-dialog .rw-modal-body {
        max-height: calc(100vh - 180px);
        overflow: auto;
    }

.origin-history-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.origin-history-back {
    text-decoration: none;
    font-weight: 600;
}

.origin-history-current {
    font-size: .9em;
    color: #666;
}

.origin-history-loading,
.origin-history-error,
.origin-history-notice {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.origin-history-error {
    border-color: #d8a1a1;
    background: #fff5f5;
}

.origin-history-notice {
    margin: 12px 0;
    border-color: #d8c88a;
    background: #fffbea;
}

.origin-history-item-summary {
    margin: 0 0 14px 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.origin-history-label {
    font-weight: 600;
    margin-bottom: 6px;
}

.origin-history-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.origin-history-barcode {
    font-size: 1.05em;
    font-weight: 600;
}

.origin-history-entity-type,
.origin-entity-type {
    font-size: .85em;
    color: #666;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f7f7f7;
}

.origin-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: .9em;
    color: #555;
}

.origin-history-deleted {
    color: #a33;
    font-weight: 600;
}

.origin-summary-block {
    margin: 12px 0 18px 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.origin-summary-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.origin-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.origin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    text-decoration: none;
    min-width: 190px;
}

    .origin-link:hover {
        background: #f5f5f5;
    }

.origin-barcode {
    font-family: Consolas, monospace;
    font-weight: 600;
}

.origin-history-section-title {
    font-weight: 600;
    margin: 14px 0 8px 0;
}

.origin-history-table {
    table-layout: fixed;
    width: 100%;
}

    .origin-history-table .event-col {
        width: 55%;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .origin-history-table .date-col {
        width: 140px;
    }

    .origin-history-table .triggered-by-col {
        width: 180px;
    }
.read-only-emulation-banner {
    width: 100%;
    background: #fff3cd;
    border-bottom: 1px solid #d6b656;
    color: #5c4400;
    box-sizing: border-box;
    padding: 10px 18px;
    z-index: 9999;
}

.read-only-emulation-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.read-only-emulation-message {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .read-only-emulation-message strong {
        font-weight: 700;
    }

.read-only-emulation-exit {
    color: #5c4400;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

    .read-only-emulation-exit:hover {
        text-decoration: none;
    }
.read-only-emulation-banner {
    display: none;
}
.location-access-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 350px;
    overflow-y: auto;
    background: #fff;
}

.location-access-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

    .location-access-row:last-child {
        border-bottom: none;
    }

.location-access-location {
    flex: 1;
}

    .location-access-location label {
        margin: 0;
        cursor: pointer;
    }

.location-access-name {
    font-weight: 300;
}

.location-access-city {
    color: #666;
}

.location-access-type {
    width: 140px;
}

    .location-access-type:disabled {
        opacity: 0.6;
    }

