@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap");
/* previous font stack: "Trebuchet MS", "Segoe UI", "Verdana", sans-serif */

:root {
    --color-border: #CFCBCB;
    --color-surface: #F7F6F4;
    --color-ink: #222222;
    --color-primary: #0A3E6D;

    --color-bg: #f6eeee;
    --color-muted: rgba(34, 34, 34, 0.72);
    --color-primary-soft: rgba(10, 62, 109, 0.1);
    --color-primary-contrast: #ffffff;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 14px;
    --space-4: 18px;
    --space-5: 24px;
    --shadow-card: 0 8px 20px rgba(34, 34, 34, 0.08);
    --shadow-soft: 0 4px 12px rgba(34, 34, 34, 0.05);
    --font-main: "Source Sans 3", "Segoe UI", "Verdana", sans-serif;
    --sticky-top-offset: 12px;
}

* { box-sizing: border-box; }

html,
body {
    overflow-x: hidden;
}

html {
    overflow-y: auto;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

body {
    overflow-y: hidden;
    margin: 0;
    color: var(--color-ink);
    background:
        radial-gradient(circle at 0% 0%, rgba(10, 62, 109, 0.1), transparent 30%),
        radial-gradient(circle at 100% 0%, rgba(207, 203, 203, 0.5), transparent 25%),
        linear-gradient(90deg, rgba(10, 62, 109, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(10, 62, 109, 0.04) 1px, transparent 1px),
        var(--color-bg);
    font-family: var(--font-main);
    background-size: auto, auto, 140px 140px, 140px 140px, auto;
}

.page-department-edit {
    overflow-y: auto;
    min-height: 100vh;
}

.page-department-edit .app-shell {
    min-height: 100vh;
}

/* From AER-36 */

html:not(.page-ready) .app-shell {
    opacity: 0;
}

html.page-ready .app-shell {
    opacity: 1;
    transition: opacity 0.35s ease;
}

/* Disable transform on order so sticky headers work correctly. */
.page-order .app-shell {
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html:not(.page-ready) .app-shell,
    html.page-ready .app-shell {
        transition: none;
    }
}

/* End from AER-36 */

a { color: inherit; }

.app-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-5) var(--space-5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-shell > footer,
.app-shell .site-footer {
    margin-top: auto;
}

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.hero {
    background: linear-gradient(130deg, var(--color-primary), #08345a);
    color: var(--color-primary-contrast);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: 0 14px 28px rgba(10, 62, 109, 0.22);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(var(--space-5), calc((100vw - 1280px) / 2 + var(--space-5)));
    padding-right: max(var(--space-5), calc((100vw - 1280px) / 2 + var(--space-5)));
    position: relative;
    overflow: hidden;
    padding-bottom: var(--space-5);
}

.hero.has-tabs {
    padding-bottom: calc(var(--space-5) + 50px);
}

/* From AER-36 */

/*.modern-hero {*/
/*    border-radius: 0;*/
/*}*/

/* End from AER-36 */

.modern-hero {
    position: sticky;
    top: 0;
    z-index: 30;
    overflow: visible;
    border-radius: 0 !important;
    transition: none;
    opacity: 1;
    transform: none;
    /*border-radius: 0; TODO : Verify if it causes problems */
}

.modern-hero.is-pinned {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
    z-index: 80;
}

.modern-hero-spacer {
    display: none;
    width: 100%;
    height: 0;
}

.modern-hero-spacer.is-active {
    display: block;
}

.modern-hero.is-hidden {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.modern-hero.is-collapsed {
    display: none;
}

.hero-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.hero-head-main {
    min-width: 0;
}

.hero h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.2px;
    position: relative;
}

.hero h1::after {
    content: "";
    display: block;
    width: 54px;
    height: 3px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 999px;
}

.breadcrumbs {
    margin-top: var(--space-3);
}

.page-access-structure .breadcrumbs {
    margin-bottom: var(--space-3);
}

.page-access-rules .breadcrumbs {
    margin-bottom: var(--space-3);
}

.products-breadcrumbs .breadcrumbs {
    margin-bottom: 12px;
}

.crumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.crumb-list.is-tabs {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.crumb-item {
    display: inline-flex;
    align-items: center;
}

.crumb-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 800;
    border-right: 1px solid var(--color-border);
    background: #fff;
}

.crumb-icon {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    flex: 0 0 auto;
}

.crumb-item:last-child .crumb-tab {
    border-right: 0;
}

.crumb-tab:hover {
    background: rgba(10, 62, 109, 0.08);
}

.crumb-tab.is-active {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
}

.app-footer {
    margin-top: var(--space-5);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 13px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.footer-brand {
    font-weight: 700;
    color: #1f2a33;
}

.footer-dot {
    color: var(--color-border);
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.brand-logo {
    display: inline-block;
    height: 44px;
    width: auto;
    margin: 0;
}

.brand-link {
    display: inline-flex;
    align-items: center;
}

.hero p {
    margin: var(--space-1) 0 0;
    color: rgba(255, 255, 255, 0.86);
}

.hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta-pill {
    display: inline-grid;
    gap: 2px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    min-width: 210px;
}

.hero-meta-k {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    opacity: 0.82;
}

.hero-meta-v {
    font-size: 15px;
    font-weight: 700;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.45;
    pointer-events: none;
}

.hero::before {
    width: 220px;
    height: 220px;
    right: -40px;
    top: -60px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 60%);
    animation: floatPulse 8s ease-in-out infinite;
}

.hero::after {
    width: 280px;
    height: 280px;
    right: 180px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 65%);
    animation: floatPulse 10s ease-in-out infinite;
}

.hero-tabs-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50px;
    background: #222222;
}

.hero-tabs-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 max(var(--space-5), calc((100vw - 1280px) / 2 + var(--space-5)));
    overflow: auto hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hero-tabs-inner::-webkit-scrollbar {
    display: none;
}

.hero-tab {
    height: auto;
    display: inline-flex;
    align-items: center;
    padding: 0;
    padding-bottom: 3px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    background: transparent;
    border: 0;
    box-shadow: inset 0 -2px 0 transparent;
    cursor: pointer;
    transition: all 0.4s ease;
}

.hero-tab:hover,
.hero-tab:focus-visible,
.hero-tab.is-active {
    color: #fff;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.95);
    outline: none;
}

.hero-tab-dropdown {
    position: relative;
    height: 100%;
    display: inline-flex;
    align-items: center;
}

.hero-tab-toggle {
    border: 0;
    line-height: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hero-tab-caret {
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4.5px solid currentColor;
    transform: translateY(1px);
    opacity: 0.72;
    display: inline-block;
}

.hero-tab-menu {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    display: block;
    z-index: 2000;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .32s ease, transform .32s ease, visibility 0s linear .32s;
}

.hero-tab-dropdown.is-open .hero-tab-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity .32s ease, transform .32s ease, visibility 0s linear 0s;
}

.hero-tab-menu-item {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--color-ink);
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    transition: all 0.4s ease;
}

.hero-tab-menu-item:last-child {
    border-bottom: 0;
}

.hero-tab-menu-item:hover,
.hero-tab-menu-item:focus-visible {
    background: var(--color-surface);
    color: var(--color-primary);
    outline: none;
}

.actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.lang-switch {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.lang-pill {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-primary-contrast);
    letter-spacing: 0.4px;
}

.lang-pill.active {
    background: rgba(255, 255, 255, 0.28);
}

.btn {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(0.2);
    box-shadow: none;
    transform: none;
}

.has-tooltip {
    display: inline-block;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: #072c4d;
    box-shadow: 0 0 0 3px rgba(10, 62, 109, 0.2);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: var(--color-primary);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: #f3f6fb;
    border-color: #94a7bb;
    box-shadow: 0 0 0 3px rgba(10, 62, 109, 0.12);
    transform: translateY(-1px);
}

.btn-warning {
    background: #f1d36a;
    color: #1f2a33;
    border-color: #e2c25e;
}

.btn-warning:hover {
    background: #e8c85e;
    border-color: #d2b34f;
    box-shadow: 0 0 0 3px rgba(241, 211, 106, 0.25);
    transform: translateY(-1px);
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.btn-danger {
    background: #b53030;
    color: #fff;
    border-color: #b53030;
}

.btn-danger:hover { background: #8f2323; }

.icon-btn {
    width: 42px;
    height: 42px;
    position: relative;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-primary-contrast);
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.profile-toggle {
    padding-right: 18px;
}

.profile-toggle > svg {
    width: 28px;
    height: 28px;
    margin-right: 6px;
}

.profile-caret {
    position: absolute;
    right: 7px;
    top: 50%;
    width: 12px;
    height: 8px;
    color: currentColor;
    opacity: 0.8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    transition: transform .15s ease;
    pointer-events: none;
}

.profile-caret svg {
    width: 12px;
    height: 8px;
}

.profile-toggle.is-open .profile-caret {
    transform: translateY(-50%) rotate(180deg);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.75);
    transform: translateY(-1px);
}

.icon-btn.active {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.85);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

.icon-btn.profile-toggle > svg {
    width: 22px;
    height: 22px;
    transform: scale(1.6);
    transform-origin: center;
}

.cart-icon-wrap {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ffffff;
    color: #0A3E6D;
    border: 1px solid rgba(10, 62, 109, 0.35);
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.profile-menu {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    z-index: 20;
    display: block;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .32s ease, transform .32s ease, visibility 0s linear .32s;
}

.profile-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity .32s ease, transform .32s ease, visibility 0s linear 0s;
}

.profile-dropdown-item {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--color-ink);
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}

.profile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-item-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
    flex: 0 0 auto;
}

.profile-dropdown-item:last-child {
    border-bottom: 0;
}

.profile-dropdown-item {
    background: #fff;
}

.profile-dropdown-item:not(.is-danger):hover {
    background: #f6f7f9;
    color: var(--color-ink);
}

.profile-dropdown-item.is-danger {
    color: #b53030;
}

.profile-dropdown-item.is-danger:hover {
    background: #fbeeee;
}

.profile-dropdown-item.lang-item {
    padding: 8px 10px;
}

.lang-switch-dropdown {
    border-color: var(--color-border);
    background: var(--color-surface);
}

.lang-pill-dropdown {
    color: var(--color-primary);
}

.lang-pill-dropdown.active {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
}

.profile-card {
    margin-top: var(--space-4);
    padding: var(--space-4);
    display: grid;
    gap: var(--space-4);
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1.4fr;
    gap: var(--space-4);
    align-items: start;
}

.profile-summary {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: var(--space-3);
    align-items: center;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
}

.profile-name {
    margin: 0;
    font-size: 22px;
}

.profile-meta {
    color: var(--color-muted);
    font-size: 13px;
    margin-top: 4px;
}

.profile-badges {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(10, 62, 109, 0.12);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge.outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-ink);
}

.profile-details {
    display: grid;
    gap: var(--space-2);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.detail-label {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.2px;
    color: #1f2a33;
    font-weight: 700;
}

.detail-value {
    font-weight: 700;
}

.required-star {
    color: #b53030;
    margin-left: 4px;
    font-weight: 800;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.profile-actions .btn {
    min-width: 150px;
    text-align: center;
    justify-content: center;
}

.user-edit-card .profile-actions .btn {
    min-width: 150px;
    justify-content: center;
    text-align: center;
}

.swal2-popup.swal-compact {
    width: 360px;
    padding: 18px 18px 16px;
    font-size: 14px;
}

.swal2-popup.swal-compact .swal2-title {
    font-size: 18px;
    margin: 6px 0 6px;
}

.swal2-popup.swal-compact .swal2-html-container {
    font-size: 14px;
    margin: 6px 0 12px;
}

.swal2-popup.swal-compact .swal2-actions {
    margin: 10px auto 0;
}

.filters {
    margin-top: var(--space-4);
    padding: var(--space-4);
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: var(--space-3);
    animation: riseIn 0.4s ease both;
}

.filters-actions {
    align-self: end;
}

.filters-actions-row {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: nowrap;
}

.filters-actions-row .btn {
    white-space: nowrap;
}

.filters .input {
    height: 44px;
}

.autocomplete-wrap {
    position: relative;
    z-index: 1300;
}

.autocomplete-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: max(100%, 560px);
    max-width: min(760px, calc(100vw - 48px));
    z-index: 1800;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    max-height: 260px;
    overflow: auto;
}

.autocomplete-item {
    width: 100%;
    display: block;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-ink);
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
}

.autocomplete-item:last-child {
    border-bottom: 0;
}

.autocomplete-item:hover,
.autocomplete-item:focus-visible {
    background: var(--color-surface);
    outline: none;
}

.autocomplete-empty {
    padding: 10px 12px;
    color: var(--color-muted);
    font-size: 13px;
}

.filters.panel {
    margin-bottom: 15px;
}

.field label {
    display: block;
    font-size: 13px;
    color: #1f2a33;
    margin-bottom: var(--space-1);
    text-transform: none;
    letter-spacing: 0.2px;
    font-weight: 700;
}

.field {
    margin-bottom: var(--space-3);
}

.field.is-open {
    position: relative;
    z-index: 220;
}

input::placeholder,
textarea::placeholder {
    color: #b0b7c2 !important;
    -webkit-text-fill-color: #b0b7c2;
    opacity: 1;
}

input::-ms-input-placeholder,
textarea::-ms-input-placeholder {
    color: #b0b7c2 !important;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #b0b7c2 !important;
}

textarea.input {
    resize: vertical;
    min-height: 110px;
    max-height: 220px;
}

.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--color-muted);
}

.notice-success {
    margin-top: var(--space-3);
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border: 1px solid rgba(16, 122, 72, 0.35);
    background: rgba(16, 122, 72, 0.08);
    color: #0f5e39;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.notice-warning {
    margin-top: var(--space-2);
    padding: var(--space-3);
    border: 1px solid rgba(205, 138, 18, 0.42);
    background: rgba(205, 138, 18, 0.12);
    color: #805300;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.order-number {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.6px;
    margin: 6px 0 var(--space-3);
    color: var(--color-ink);
}

.action-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

.order-confirm-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.order-confirm-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.order-confirm-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.order-confirm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}

.order-confirm-panel .meta-grid {
    display: grid;
    gap: var(--space-2);
}

.order-confirm-panel .details-grid {
    display: grid;
    gap: var(--space-3);
}

.order-confirm-panel .product-primary {
    font-weight: 600;
    color: var(--color-ink);
}

.order-confirm-panel .product-secondary {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 2px;
}

.access-rules-card {
    padding: var(--space-4);
}

.access-rules-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.access-rules-actions {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
}

.access-rules-card .table th,
.access-rules-card .table td {
    vertical-align: middle;
}

.access-rules-card .mono {
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

.access-structure-card {
    padding: var(--space-4);
}

.access-structure-add {
    margin-bottom: var(--space-4);
}

.access-structure-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: var(--space-3);
    align-items: end;
}

.access-structure-grid .field-small {
    max-width: 140px;
}

.access-structure-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    gap: var(--space-3);
}

.access-structure-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-ink);
}

.access-structure-editor {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.access-structure-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
}

.access-structure-add-page {
    margin-top: var(--space-3);
}

.access-page-label {
    font-weight: 600;
    color: var(--color-ink);
}

.access-page-path {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 4px;
}

.btn-compact {
    padding: 6px 10px;
    font-size: 12px;
}

.access-rules-section {
    margin-top: var(--space-4);
}

.access-rules-section:first-of-type {
    margin-top: var(--space-2);
}

.access-rules-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-bottom: var(--space-2);
}

.access-cell {
    text-align: center;
}

.order-confirm-panel .meta-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #243242;
    text-transform: uppercase;
}

.order-confirm-panel .meta-value {
    font-size: 15px;
    color: var(--color-ink);
    font-weight: 400;
}

.order-confirm-panel .meta-item .meta-value {
    font-size: 15px;
    font-weight: 400;
}

.order-confirm-wrap {
    margin-top: var(--space-4);
    max-width: 1200px;
    width: min(1200px, 94vw);
}

.order-confirm-card {
    padding: var(--space-5);
}

.order-confirm-panel {
    padding: var(--space-4);
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.2px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
    z-index: 2000;
    animation: toastIn 0.25s ease both;
    max-width: 320px;
}

.toast.is-hidden {
    animation: toastOut 0.35s ease both;
}

.toast-created,
.toast-updated {
    border: 1px solid rgba(16, 122, 72, 0.45);
    background: #e8f6ef;
    color: #0c4f34;
}

.toast-error {
    border: 1px solid rgba(181, 48, 48, 0.45);
    background: #fdecec;
    color: #8f2323;
}

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

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

.user-edit-card {
    margin-top: var(--space-4);
    padding: var(--space-4);
}

.unsaved-inline {
    display: none;
    grid-column: 1 / -1;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #8f2323;
    letter-spacing: 0.2px;
}

.unsaved-inline.is-visible {
    display: inline-flex;
}

.unsaved-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #b53030;
}

.field.is-dirty .input,
.field.is-dirty .select-display,
.field.is-dirty .toggle input {
    border-color: #b53030;
    box-shadow: 0 0 0 2px rgba(181, 48, 48, 0.15);
}

.user-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: var(--space-3);
}

.user-edit-status {
    grid-column: 2 / 3;
    justify-self: end;
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.user-edit-grid .section-title {
    grid-column: 1 / -1;
    margin-top: var(--space-2);
}

.toggle-group {
    display: grid;
    gap: 10px;
}

.user-view-card {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 239, 239, 0.9));
}

.user-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.user-view-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.user-view-kpis .pill-status {
    min-width: 96px;
}

.user-view-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.user-view-actions .btn {
    min-width: 170px;
    justify-content: center;
    text-align: center;
}

.user-view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: var(--space-4);
}

.user-view-section {
    padding: var(--space-3);
    background: #fff;
}

.section-title {
    margin: 0 0 var(--space-3);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-ink);
}

.section-subtitle {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--color-muted);
    font-weight: 600;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(10, 62, 109, 0.04);
    border: 1px solid rgba(10, 62, 109, 0.08);
    margin-bottom: 8px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: var(--color-muted);
    font-weight: 600;
}

.detail-value {
    font-weight: 700;
    color: #1f2a33;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.field.autosave-flash .input,
.field.autosave-flash .select-display,
.field.autosave-flash textarea {
    border-color: rgba(16, 122, 72, 0.75) !important;
    box-shadow: 0 0 0 2px rgba(16, 122, 72, 0.18) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field.autosave-flash .input:focus,
.field.autosave-flash .select-display:focus,
.field.autosave-flash textarea:focus {
    border-color: rgba(16, 122, 72, 0.9) !important;
    box-shadow: 0 0 0 2px rgba(16, 122, 72, 0.22) !important;
}

.field.autosave-flash .input:focus-visible,
.field.autosave-flash .select-display:focus-visible,
.field.autosave-flash textarea:focus-visible {
    border-color: rgba(16, 122, 72, 0.9) !important;
    box-shadow: 0 0 0 2px rgba(16, 122, 72, 0.22) !important;
}

.field.autosave-flash:focus-within .input,
.field.autosave-flash:focus-within .select-display,
.field.autosave-flash:focus-within textarea {
    border-color: rgba(16, 122, 72, 0.9) !important;
    box-shadow: 0 0 0 2px rgba(16, 122, 72, 0.22) !important;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: default;
    user-select: none;
    line-height: 1;
}

.toggle input {
    cursor: pointer;
}

.toggle input {
    display: inline-block;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d6d0d0;
    position: relative;
    transition: background-color .2s ease;
    appearance: none;
    outline: none;
    margin: 0;
    vertical-align: middle;
    box-sizing: border-box;
    overflow: hidden;
}

.toggle input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: auto;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: left .2s ease, right .2s ease;
}

.toggle input:checked {
    background: var(--color-primary);
}

.toggle input:checked::after {
    left: auto;
    right: 3px;
}

.toggle-text {
    font-weight: 700;
    color: #1f2a33;
    line-height: 24px;
}

.password-summary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 12px;
    border: 1px dashed var(--color-border);
    background: #fff;
    border-radius: var(--radius-md);
}

.password-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.password-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-muted);
    font-weight: 700;
}

.password-value {
    font-weight: 700;
    color: #1f2a33;
}

.password-meter {
    margin-top: 10px;
    display: grid;
    gap: 6px;
    max-width: 360px;
}

.meter-track {
    height: 8px;
    background: #e8e3e3;
    border-radius: 999px;
    overflow: hidden;
}

.meter-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: #b53030;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.meter-label {
    font-size: 12px;
    color: var(--color-muted);
    font-weight: 700;
}

.password-rules {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--color-muted);
    font-size: 12px;
}

.password-rules li {
    margin: 4px 0;
}

.password-rules li.is-met {
    color: #0f5e39;
    font-weight: 700;
}

.input,
.select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px;
    background: #fff;
    color: var(--color-ink);
        appearance: none;
}

.select-shell {
    position: relative;
    width: 100%;
    max-width: 360px;
    z-index: 5;
}

.select-shell--full {
    max-width: none;
}

.select-native-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.select-display {
    width: 100%;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.select-shell.is-disabled .select-display {
    cursor: not-allowed;
    background: #f5f6f8;
    color: rgba(43, 54, 80, 0.6);
    border-color: var(--color-border);
    box-shadow: none;
}

.select-shell.is-disabled .select-caret {
    opacity: 0.4;
}

.select-display:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 62, 109, 0.2);
    border-color: rgba(10, 62, 109, 0.4);
}

.select-caret {
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(10, 62, 109, 0.6);
    border-bottom: 2px solid rgba(10, 62, 109, 0.6);
    transform: rotate(45deg);
    margin-left: 10px;
}

.select-menu {
    position: absolute;
    z-index: 200;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 6px;
    display: none;
    max-height: 260px;
    overflow: auto;
}

.select-menu-portal {
    position: fixed;
    z-index: 400;
    display: block;
}

.select-shell.is-open .select-menu {
    display: block;
}

.select-shell.is-open {
    z-index: 200;
}

.page-order .order-panel {
    overflow: visible;
}

.users-toolbar {
    position: relative;
    z-index: 20;
}

.users-toolbar .order-links {
    position: relative;
    z-index: 21;
}

.departments-card {
    margin-top: var(--space-4);
    padding: var(--space-3);
}

.departments-card .table-wrap {
    margin-top: var(--space-2);
}

.select-option {
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
}

.select-option:hover,
.select-option.is-active {
    background: rgba(10, 62, 109, 0.08);
    color: var(--color-primary);
}

.inventory-select-display [data-select-label] {
    width: 100%;
}

.inventory-select-display .select-caret {
    display: none;
}

.inventory-select-label-inner {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.inventory-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 400;
}

.inventory-select-display {
    height: 39px;
    font-weight: 400;
}

.input-compact {
    max-width: 360px;
}

.input-with-action {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-edit-card .input-with-action {
    width: 100%;
    display: flex;
}

.user-edit-card .input-with-action .input {
    width: 100%;
}

.input-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 0;
    background: transparent;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.input-action.inside {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.has-inline-action {
    padding-right: 52px;
}

.input-action:hover {
    background: rgba(10, 62, 109, 0.08);
}

.input-action svg {
    width: 18px;
    height: 18px;
}

.input-action.icon-only {
    width: 32px;
    height: 32px;
}

.input-action .is-hidden {
    display: none;
}

.input.is-invalid,
.select.is-invalid {
    border-color: #b53030;
    box-shadow: 0 0 0 3px rgba(181, 48, 48, 0.18);
}

.field.is-invalid label {
    color: #8f2323;
}

.radio-list.is-invalid {
    border: 1px solid #b53030;
    background: #fff5f5;
    padding: var(--space-2);
    border-radius: var(--radius-md);
}

textarea.input {
    resize: vertical;
}

.field.actions { align-items: end; }

.summary {
    margin-top: var(--space-4);
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: var(--space-3);
    animation: riseIn 0.5s ease both;
}

.sticky-overview {
    margin-top: 0;
    padding: var(--space-3);
    position: sticky;
    top: 0;
    isolation: isolate;
    opacity: 1;
    transform: translateY(0);
}

.sticky-overview.is-hidden {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sticky-overview .summary {
    margin-top: 0;
}

.sticky-overview .filters {
    position: relative;
    z-index: 5;
    margin-top: 0;
}

.sticky-overview .legend {
    position: relative;
    z-index: 1;
    margin-top: var(--space-3);
}

.product-view-head {
    margin-top: var(--space-4);
    padding: var(--space-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.product-view-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.product-view-grid {
    margin-top: var(--space-4);
    display: grid;
    grid-template-columns: minmax(360px, 460px) 1fr;
    gap: var(--space-4);
    align-items: start;
    position: relative;
}

.product-view-media,
.product-view-info {
    padding: var(--space-3);
}

.product-view-grid:not(.product-edit-grid) .product-view-media {
    grid-column: 1;
}

.product-view-grid:not(.product-edit-grid) .product-view-info {
    grid-column: 2;
}

.product-view-media h2,
.product-view-info h2 {
    margin: 0 0 var(--space-3);
    font-size: 18px;
    color: var(--color-primary);
}

.product-view-legacy-list {
    display: grid;
    gap: 8px;
}

.product-view-legacy-list .line {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 10px;
    align-items: start;
    padding: 6px 0;
    border-bottom: 1px solid rgba(207, 203, 203, 0.6);
}

.product-view-legacy-list .line.block {
    grid-template-columns: 1fr;
    gap: 4px;
}

.product-view-legacy-list .k {
    font-weight: 700;
    color: var(--color-ink);
}

.product-view-legacy-list .v {
    color: var(--color-ink);
}

.product-view-legacy-list .v.multiline {
    white-space: normal;
}

.product-gallery-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    max-height: 560px;
    overflow: auto;
    padding-right: 4px;
}

.product-gallery-edit {
    margin-top: 10px;
}

.product-media-upload {
    margin-bottom: 6px;
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(10, 62, 109, 0.06), rgba(10, 62, 109, 0.02)),
        #fff;
    border: 1px dashed rgba(10, 62, 109, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.product-media-upload:hover,
.product-media-upload:focus-within {
    border-color: rgba(10, 62, 109, 0.75);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.75),
        0 8px 20px rgba(10, 62, 109, 0.14);
    transform: translateY(-1px);
}

.product-media-upload label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: .25px;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 800;
}

.product-media-upload .input[type="file"] {
    padding: 8px;
    height: auto;
    border: 1px solid rgba(10, 62, 109, 0.25);
    background: rgba(255, 255, 255, 0.92);
}

.product-media-upload .input[type="file"]::file-selector-button {
    border: 1px solid rgba(10, 62, 109, 0.55);
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    padding: 7px 10px;
    margin-right: 10px;
    cursor: pointer;
}

.product-media-upload .input[type="file"]:hover::file-selector-button {
    background: #072c4d;
}

.product-image-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 6px;
}

.product-image-card .product-photo-link {
    display: block;
    border: 0;
}

.product-image-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 1px solid rgba(181, 48, 48, 0.45);
    background: rgba(255, 255, 255, 0.92);
    color: #b53030;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all 0.22s ease;
}

.product-image-card:hover .product-image-delete,
.product-image-card:focus-within .product-image-delete {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.product-image-delete:hover {
    background: #b53030;
    color: #fff;
}

.product-view-media .product-photo-link {
    display: block;
}

.product-view-media .product-photo-thumb {
    width: 100%;
    height: 150px;
    object-fit: contain;
}

.product-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.product-kv {
    display: grid;
    gap: 3px;
    align-content: start;
    grid-auto-rows: min-content;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--color-border);
}

.product-kv .k {
    font-size: 12px;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.product-kv .v {
    font-size: 14px;
    color: var(--color-ink);
    word-break: break-word;
}

.product-edit-card {
    margin-top: 0;
    padding: var(--space-4);
    grid-column: 2;
}

.product-edit-grid .product-view-media {
    grid-column: 1;
    position: relative;
    align-self: start;
    max-height: none;
    overflow: visible;
    transform: none;
    will-change: auto;
}

.product-edit-grid .product-view-media-inner {
    position: relative;
}

.product-edit-grid {
    position: relative;
}

.product-edit-grid .product-view-media.is-fixed {
    position: fixed;
    top: 12px;
    left: var(--media-fixed-left, 0);
    width: var(--media-fixed-width, 100%);
    z-index: 20;
}

.product-edit-grid .product-view-media.is-bottom {
    position: absolute;
    top: auto;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--media-fixed-width, 100%);
    z-index: 10;
}

.product-view-grid:not(.product-edit-grid) .product-view-media.is-fixed {
    position: fixed;
    top: 12px;
    left: var(--media-fixed-left, 0);
    width: var(--media-fixed-width, 100%);
    z-index: 20;
}

.product-view-grid:not(.product-edit-grid) .product-view-media.is-bottom {
    position: absolute;
    top: auto;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--media-fixed-width, 100%);
    z-index: 10;
}

.product-edit-legacy-body {
    background: transparent;
    padding: 0;
}

.product-edit-legacy-body > div::after {
    content: "";
    display: block;
    clear: both;
}

.product-edit-legacy-body > div > [style*="float: left"],
.product-edit-legacy-body > div > [style*="float: right"] {
    width: 48.5% !important;
    min-width: 0;
}

.product-edit-legacy-body .modernized-column {
    display: grid;
    gap: 10px;
}

.product-edit-legacy-body .modernized-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    align-items: start;
}

.product-edit-legacy-body .field-card {
    border: 0;
    background: transparent;
    padding: 4px 0;
    display: block;
    gap: 6px;
    overflow: hidden;
}

.product-edit-legacy-body .field-card > label:first-child {
    margin: 0;
    min-width: 0;
    width: 100%;
    font-size: 12px;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    font-weight: 700;
}

.product-edit-legacy-body .field-card.full {
    grid-column: 1 / -1;
    padding: 0;
}

.product-edit-legacy-body [style*="float: left"],
.product-edit-legacy-body [style*="float: right"] {
    background: transparent !important;
}

.product-edit-legacy-body [style*="background-color: #b2adad"],
.product-edit-legacy-body [style*="background-color: #9e9a9a"],
.product-edit-legacy-body [style*="background-color: #FFFFFF"] {
    background: transparent !important;
}

.product-edit-legacy-body label {
    display: inline-block;
    min-width: 210px;
    margin: 0 12px 6px 0;
    font-weight: 700;
    color: var(--color-ink);
    vertical-align: top;
    line-height: 1.35;
}

.product-edit-legacy-body .field-card label,
.product-edit-legacy-body .field-card label:not(.radioLabel):not(.radioLabelLong) {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 0 6px 0 !important;
}

.product-edit-legacy-body .field-card:empty {
    display: none !important;
}

.product-edit-legacy-body input[type="text"],
.product-edit-legacy-body input[type="password"],
.product-edit-legacy-body input[type="file"],
.product-edit-legacy-body textarea,
.product-edit-legacy-body select {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(10, 62, 109, 0.22);
    background: #fffaf9;
    color: var(--color-ink);
    font: inherit;
    transition: all 0.25s ease;
    margin-bottom: 10px;
}

.product-edit-legacy-body input[type="text"]:hover,
.product-edit-legacy-body input[type="password"]:hover,
.product-edit-legacy-body input[type="file"]:hover,
.product-edit-legacy-body textarea:hover,
.product-edit-legacy-body select:hover {
    border-color: rgba(10, 62, 109, 0.35);
    background: #fff;
}

.product-edit-legacy-body input[type="text"]:focus,
.product-edit-legacy-body input[type="password"]:focus,
.product-edit-legacy-body input[type="file"]:focus,
.product-edit-legacy-body textarea:focus,
.product-edit-legacy-body select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 62, 109, 0.16);
}

.product-edit-legacy-body textarea {
    min-height: 100px;
    resize: vertical;
}

.product-edit-legacy-body input[type="radio"],
.product-edit-legacy-body input[type="checkbox"] {
    accent-color: var(--color-primary);
    transform: translateY(1px);
    margin-right: 6px;
}

.product-edit-legacy-body .radioLabel,
.product-edit-legacy-body .radioLabelLong {
    min-width: 0;
    margin-right: 8px;
    font-weight: 600;
    text-transform: none;
    font-size: 13px;
    color: var(--color-ink);
}

.product-edit-legacy-body .noTechInfoWarning,
.product-edit-legacy-body .Reminder {
    margin: 6px 0 12px;
    padding: 8px 10px;
    border: 1px solid rgba(10, 62, 109, 0.2);
    background: var(--color-primary-soft);
    color: var(--color-ink);
}

.product-edit-legacy-body .WhiteSection {
    border: 1px solid rgba(10, 62, 109, 0.16);
    background: rgba(249, 239, 239, 0.55);
    padding: 12px;
    margin-bottom: 12px;
}

.product-edit-legacy-body .pictureZone {
    border: 1px solid var(--color-border) !important;
    background: #fffaf9 !important;
    padding: 10px !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

/* Hide legacy inline photo block: modern left column handles photos now */
.product-edit-legacy-body .header,
.product-edit-legacy-body .pictureZone {
    display: none !important;
}

.product-edit-legacy-body .header {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
}

.product-edit-legacy-body .divError {
    border: 1px solid #b53030;
    background: #fff5f5;
    color: #8f2323;
    padding: 10px;
    margin-bottom: 12px;
}

.product-edit-legacy-body .divError h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.product-edit-legacy-body .info-panel {
    max-width: min(92vw, 640px) !important;
    width: min(92vw, 640px) !important;
    left: 50% !important;
    top: calc(100% + 6px) !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
}

.product-edit-legacy-body [style*="border: dashed 3px red"] {
    border: 1px solid rgba(10, 62, 109, 0.22) !important;
    background: rgba(249, 239, 239, 0.65) !important;
}

.product-edit-legacy-body .pictureZone a[rel="skid_pics"] {
    display: block;
    border: 1px solid var(--color-border);
    background: #fff;
}

.product-edit-legacy-body .pictureZone img {
    display: block;
    width: 100% !important;
    height: 130px;
    object-fit: cover;
    margin: 0 !important;
}

.product-edit-errors {
    margin-top: var(--space-4);
    padding: var(--space-3);
    border-color: #b53030;
    background: #fff5f5;
}

.product-edit-errors h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #8f2323;
}

.product-edit-errors ul {
    margin: 0;
    padding-left: 18px;
}

.product-edit-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
}

.product-edit-inline-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-xs {
    padding: 6px 10px;
    font-size: 12px;
}

.product-edit-warning {
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.req-mark {
    color: #b53030;
    font-weight: 800;
    font-size: 1.45em;
    line-height: 1;
    vertical-align: -2px;
}

.required-legend {
    margin-top: 10px;
    color: #222;
    font-size: 14px;
}

.required-legend .req-mark {
    font-size: 1.45em;
    vertical-align: -1px;
}

.itar-forbidden-warning {
    color: #b53030;
    font-weight: 700;
}

.warning-soft {
    border: 1px solid rgba(10, 62, 109, 0.2);
    background: var(--color-primary-soft);
    color: var(--color-ink);
}

.warning-danger {
    border: 2px dashed #b53030;
    background: #fff;
}

.product-edit-top-warning {
    margin-top: 20px;
    padding: 20px;
}

.product-edit-itar-block {
    grid-column: 1 / -1;
}

.product-edit-itar-block .itar-row.instruction {
    margin-bottom: 10px;
}

.product-edit-itar-block .itar-row.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-edit-itar-block .itar-col {
    padding: 8px;
    border: 1px solid rgba(10, 62, 109, 0.2);
    background: #fffaf9;
}

.info-wrap {
    position: relative;
}

.info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 45;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    border-radius: 8px;
    padding: 16px;
    display: none;
}

.info-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.info-panel__close {
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: var(--color-ink);
}

.pill {
    padding: 12px;
    position: relative;
}

.pill::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(10, 62, 109, 0.08), transparent 55%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pill:hover::before {
    opacity: 1;
}

.pill .k {
    font-size: 12px;
    color: var(--color-muted);
    text-transform: uppercase;
}

.pill .v {
    font-size: 20px;
    font-weight: 700;
    margin-top: 4px;
}

.pager {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
}

.pager-info {
    color: var(--color-muted);
    font-size: 13px;
}

.pager-info-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pager-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    border: 1px solid rgba(10, 62, 109, 0.2);
    background: rgba(10, 62, 109, 0.08);
}

.pager-nav { display: flex; gap: var(--space-1); flex-wrap: wrap; }

.p-link {
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-primary);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.p-link.active {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    border-color: var(--color-primary);
}

.p-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pager-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.table-wrap {
    margin-top: var(--space-4);
    overflow: visible;
    box-shadow: var(--shadow-card);
    position: relative;
    animation: riseIn 0.5s ease both;
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: visible;
}

thead th {
    text-align: left;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    padding: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

thead th:first-child {
    border-top-left-radius: var(--radius-lg);
}

thead th:last-child {
    border-top-right-radius: var(--radius-lg);
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-lg);
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-lg);
}

tbody td {
    padding: 12px;
    border-top: 1px solid var(--color-border);
    font-size: 14px;
    vertical-align: middle;
    overflow: visible; /* From AER-36 */
}

.cell-description {
    max-width: 380px;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.35;
}

/* From AER-36 */
thead,
tbody,
tr {
    overflow: visible;
}

.action-bar {
    overflow: visible;
}

.has-tooltip {
    position: relative;
    z-index: 300;
}

/* End from AER-36 */

tbody tr:hover { background: rgba(10, 62, 109, 0.04); }

tbody tr.product-row {
    cursor: pointer;
}

.legend {
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    font-size: 13px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-item img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.inventory-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 0;
    width: 18px;
    height: 18px;
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
}

.inventory-icon i {
    font-size: 15px;
    line-height: 1;
}

.inventory-icon--in { color: #1f8b4c; }
.inventory-icon--pending { color: #c99500; }
.inventory-icon--out { color: #c0392b; transform: rotate(180deg); }
.inventory-icon--return { color: #e67e22; }

.legend-photo {
    font-weight: 700;
    color: var(--color-primary);
}

.inventory-solex-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.inventory-solex-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.inventory-solex-icon .inventory-icon {
    width: 20px;
    height: 20px;
    font-size: 18px;
}

.product-photo-link {
    display: inline-block;
    border: 1px solid var(--color-border);
    background: #fff;
}

.product-photo-thumb {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.product-gallery-hidden {
    display: none;
}

.state-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.state-cell img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(10, 62, 109, 0.12);
    color: var(--color-primary);
}

.tag.warn {
    background: rgba(34, 34, 34, 0.12);
    color: var(--color-ink);
}

.tag.ok {
    background: rgba(16, 122, 72, 0.16);
    color: #0f5e39;
}

.order-items .tag {
    min-width: 110px;
    text-align: center;
}

.action-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-1);
    align-items: center;
    min-width: 170px;
}

.row-action-menu {
    position: relative;
    z-index: 1200;
}

.row-action-toggle {
    min-width: 34px;
    padding: 4px 8px;
    text-align: center;
    cursor: pointer;
}

.row-action-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 150px;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: all 0.25s ease;
}

tbody tr {
    position: relative;
    z-index: 0;
}

tbody tr.is-menu-open {
    z-index: 1300;
}

.users-table tbody tr {
    position: relative;
    z-index: 0;
}

.users-table tbody tr:hover {
    z-index: 1;
}

.users-table tbody tr.is-menu-open {
    z-index: 5;
}

.users-table td.action-cell {
    overflow: visible;
    position: relative;
}

.row-action-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.row-action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-ink);
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    font-size: 12px;
    font-weight: 700;
}

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

.row-action-item:hover {
    background: var(--color-surface);
}

.row-action-item.item-view:hover {
    background: #eef6ff;
    color: #1f4b7a;
}

.row-action-item.item-edit:hover {
    background: #fff5db;
    color: #7a5a12;
}

.row-action-item.item-password:hover {
    background: #f0f3ff;
    color: #31408a;
}

.row-action-item.item-delete:hover {
    background: #fdecec;
    color: #9b2c2c;
}

.row-action-item.item-view:hover svg,
.row-action-item.item-edit:hover svg,
.row-action-item.item-password:hover svg,
.row-action-item.item-delete:hover svg {
    color: currentColor;
}

.row-action-item svg {
    width: 14px;
    height: 14px;
    color: var(--color-primary);
    display: block;
}

.row-action-item.is-disabled {
    color: #8b8f97;
    opacity: 0.7;
    cursor: not-allowed;
}

.row-action-item.is-disabled svg {
    color: #8b8f97;
}

.action-link {
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-primary);
    border-radius: var(--radius-md);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    transition: all 0.4s ease;
}

.action-link.icon-only {
    padding: 6px;
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-link:hover {
    background: rgba(10, 62, 109, 0.08);
}

.action-link.order {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.action-link.order:hover {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(10, 62, 109, 0.22);
    transform: translateY(-1px);
}

.action-link.disabled {
    pointer-events: auto;
    opacity: 0.45;
    border-style: dashed;
    cursor: not-allowed;
}

.empty-row {
    text-align: center;
    color: var(--color-muted);
    padding: 22px;
}

.auth-wrap {
    margin-top: var(--space-4);
    max-width: 640px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.auth-card {
    padding: var(--space-5);
}

.auth-card .input-with-action {
    display: block;
    width: 100%;
}

.auth-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
}

.auth-title {
    margin: 0 0 var(--space-2);
    font-size: 24px;
}

.auth-lang-switch {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.auth-error {
    margin: 0 0 var(--space-3);
    padding: 10px 12px;
    border: 1px solid #b55252;
    background: #fff3f3;
    color: #7a1d1d;
}

.auth-forgot {
    margin-top: var(--space-3);
}

.auth-contact {
    margin-top: var(--space-3);
    padding: 10px 12px;
    background: #f3f7fb;
    border: 1px dashed rgba(10, 62, 109, 0.25);
    border-radius: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--color-muted);
    display: grid;
    gap: 4px;
}

.auth-contact-label {
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #2b3b4a;
}

.auth-contact-phone {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-primary);
}

.auth-forgot-link {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.auth-checkbox {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-helper {
    margin: 0 0 var(--space-3);
    color: var(--color-muted);
}

.auth-submit {
    margin-top: var(--space-3);
}

.auth-page .modern-hero {
    border-radius: 0;
}

.order-actions {
    margin-top: var(--space-4);
    padding: var(--space-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    animation: riseIn 0.45s ease both;
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.meta-item .meta-label {
    font-size: 13px;
    color: #1f2a33;
    text-transform: none;
    letter-spacing: 0.2px;
    font-weight: 700;
}

.meta-item .meta-value {
    font-size: 18px;
    font-weight: 700;
}

.meta-value.has-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.meta-value.is-expired {
    color: #8f2323;
}

.order-links {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.order-panel {
    margin-top: var(--space-4);
    padding: var(--space-4);
}

.order-summary {
    margin-top: var(--space-4);
    padding: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    position: relative;
}

.order-summary-sticky {
    position: sticky;
    top: calc(var(--hero-sticky-offset, 0px) + var(--space-3));
    background: rgba(246, 238, 238, 0.92);
    backdrop-filter: blur(6px);
    padding-top: var(--space-3);
}

.order-summary .order-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: var(--space-3);
    flex: 1 1 420px;
}

.order-summary .meta-item {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: #f3f5f8;
    border: 1px solid rgba(11, 40, 66, 0.08);
}

.order-summary .order-links {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.order-summary .order-links .btn {
    min-width: 150px;
    text-align: center;
}

.order-layout {
    margin-top: var(--space-4);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: var(--space-4);
    align-items: start;
}

.order-main {
    display: grid;
    gap: var(--space-4);
}

.order-side {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.order-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    align-items: stretch;
    margin-bottom: var(--space-4);
}

.order-details-left,
.order-details-right {
    display: flex;
    flex-direction: column;
}

.order-details-left .order-panel,
.order-details-right .order-panel {
    flex: 1;
}

.order-contact {
    width: 100%;
}

.order-details-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.order-main .order-panel,
.order-main .order-items,
.order-side .order-panel,
.order-side .order-submit {
    margin-top: 0;
}

.order-panel h2 {
    margin: 0 0 var(--space-3);
    font-size: 18px;
}

.order-notes {
    margin-bottom: 0;
    min-height: 320px;
}

.order-panel-equal {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.icon-title {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.icon-title.small {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.icon-circle {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(10, 62, 109, 0.12);
    color: var(--color-primary);
}

.icon-circle svg {
    width: 16px;
    height: 16px;
}

.order-panel-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
}

.order-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: var(--space-4);
}

.destination-fields {
    display: grid;
    gap: var(--space-3);
    position: relative;
    overflow: visible;
}

.page-order .destination-fields .field {
    position: relative;
}

.page-order .destination-fields .field.is-open {
    z-index: 400;
}

.page-order .destination-fields .select-menu {
    z-index: 500;
}

.destination-fields .field-group {
    margin-bottom: 0;
}

.radio-list {
    display: grid;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.field-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.address-preview {
    margin-top: var(--space-3);
    padding: var(--space-3);
    border: 1px dashed var(--color-border);
    background: #fff;
    font-size: 13px;
    color: var(--color-muted);
    max-width: 100%;
    word-break: break-word;
}

.address-preview-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.address-preview-row .address-preview {
    flex: 1 1 auto;
    min-width: 0;
}

.product-cell {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
}

.product-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
}

.product-link:hover {
    text-decoration: underline;
}

.order-items td.action-cell {
    vertical-align: middle;
    text-align: center;
}

.product-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 8px;
}

.thumb-button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: zoom-in;
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.image-modal[aria-hidden="false"] {
    display: block;
}

.image-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 62, 109, 0.35);
    backdrop-filter: blur(2px);
}

.image-modal__content {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    margin: 8vh auto 0;
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    padding: var(--space-3);
    border-radius: 12px;
    display: flex;
    justify-content: center;
}

.image-modal__content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.image-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(10, 62, 109, 0.12);
    color: var(--color-primary);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
}

.image-modal__nav.prev {
    left: -18px;
}

.image-modal__nav.next {
    right: -18px;
}

.image-modal__nav svg {
    width: 18px;
    height: 18px;
}

.image-modal__close {
    position: absolute;
    top: 6px;
    right: 6px;
    border: 0;
    background: rgba(10, 62, 109, 0.12);
    color: var(--color-primary);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    cursor: pointer;
}

.image-modal__close svg {
    width: 16px;
    height: 16px;
}

body.modal-open {
    overflow: hidden;
}

.product-title {
    font-weight: 700;
}

.product-sub {
    font-size: 13px;
    color: #1f2a33;
    font-weight: 600;
    margin-top: 2px;
}

.action-icon {
    width: 18px;
    height: 18px;
    margin-right: 0;
    vertical-align: -3px;
}

.protected-row td {
    background: rgba(10, 62, 109, 0.06);
}

.protected-panel {
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    background: #fff;
}

.protected-text {
    font-weight: 600;
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.protected-fields {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr);
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-2);
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}


.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    background: rgba(10, 62, 109, 0.12);
    color: var(--color-primary);
}

.help-icon svg {
    width: 14px;
    height: 14px;
}

.has-tooltip {
    position: relative;
}

.has-tooltip::after,
.has-tooltip::before {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.has-tooltip::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 6px);
    background: #111;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 200;
}

.has-tooltip::before {
    content: "";
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translate(-50%, 6px);
    border: 6px solid transparent;
    border-top-color: #111;
    z-index: 199;
}

.has-tooltip.is-floating::before,
.has-tooltip.is-floating::after {
    display: none;
}

.floating-tooltip {
    position: fixed;
    z-index: 1000;
    background: #111;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    max-width: 240px;
    pointer-events: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.has-tooltip:hover::after,
.has-tooltip:hover::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

.order-submit {
    margin-top: var(--space-3);
    padding: var(--space-4);
    display: grid;
    gap: var(--space-3);
    border: 1px solid rgba(10, 62, 109, 0.12);
    background: linear-gradient(135deg, rgba(10, 62, 109, 0.06), rgba(255, 255, 255, 0.95));
    box-shadow: 0 16px 30px rgba(10, 62, 109, 0.12);
}


.order-submit-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.order-submit .btn {
    min-width: 200px;
}

.order-submit-meta {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 600;
}

.action-link.danger {
    border-color: #b55252;
    color: #7a1d1d;
}

.action-link.danger:hover {
    background: #fff3f3;
}

.action-link.danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 6px;
}

.action-link.danger:hover {
    background: #ffe4e4;
    border-color: #9d2f2f;
}

.users-toolbar .order-links {
    flex-wrap: wrap;
}

.users-toolbar .order-links .btn {
    min-width: 190px;
    justify-content: center;
    text-align: center;
}

.users-toolbar .btn-export:hover {
    background: #e7f4f0;
    border-color: #5aa391;
    color: #1e5c52;
    box-shadow: 0 0 0 3px rgba(90, 163, 145, 0.2);
}

.users-toolbar .btn-export {
    background: #e7f4f0;
    border-color: #5aa391;
    color: #1e5c52;
}

.filters .btn-export {
    background: #e7f4f0;
    border-color: #5aa391;
    color: #1e5c52;
}

.filters .btn-export:hover {
    background: #e7f4f0;
    border-color: #5aa391;
    color: #1e5c52;
    box-shadow: 0 0 0 3px rgba(90, 163, 145, 0.2);
}

.table-sort {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 800;
}

.table-sort.active {
    color: #1f2a33;
    text-decoration: underline;
}

.table td,
.table th {
    vertical-align: middle;
}

.table td {
    height: 52px;
}

.users-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.users-table td:last-child {
    max-width: none;
}

.pill-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.pill-status.active {
    background: rgba(16, 122, 72, 0.15);
    color: #0f5e39;
    border: 1px solid rgba(16, 122, 72, 0.35);
}

.pill-status.inactive {
    background: rgba(181, 48, 48, 0.12);
    color: #8f2323;
    border: 1px solid rgba(181, 48, 48, 0.35);
}

.pill-status.expired {
    background: rgba(181, 48, 48, 0.12);
    color: #8f2323;
    border: 1px solid rgba(181, 48, 48, 0.35);
}

.action-link.danger .action-icon {
    width: 20px;
    height: 20px;
}

.muted {
    color: var(--color-muted);
    font-size: 13px;
}

.help-hero {
    margin-top: var(--space-3);
    padding: 20px 22px;
    border: 1px solid rgba(10, 62, 109, 0.2);
    background: linear-gradient(125deg, rgba(10, 62, 109, 0.09), rgba(249, 239, 239, 0.9));
}

.help-hero-kicker {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 4px;
}

.help-hero h2 {
    margin: 0 0 6px;
    font-size: 26px;
    color: var(--color-ink);
}

.help-hero p {
    margin: 0;
    color: #38454f;
}

.help-grid {
    margin-top: var(--space-3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.help-card {
    padding: 18px;
    border: 1px solid rgba(10, 62, 109, 0.16);
}

.help-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.help-actions {
    display: grid;
    gap: 10px;
}

.help-actions .btn {
    justify-content: center;
}

.help-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.help-contact-item {
    border: 1px solid rgba(10, 62, 109, 0.18);
    background: #fff;
    padding: 12px;
    line-height: 1.45;
}

.help-contact-title {
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.help-contact-phone {
    margin-top: 5px;
    font-weight: 800;
    color: var(--color-ink);
}

.files-layout {
    margin-top: var(--space-3);
    align-items: start;
}

.files-list-card h2,
.files-upload-card h2 {
    margin-top: 0;
    margin-bottom: var(--space-3);
}

.files-list-card,
.files-upload-card {
    padding: 20px;
}

.files-list-card .table-wrap {
    padding: 12px;
}

.files-upload-card form {
    display: grid;
    gap: var(--space-2);
}

.humidity-search-card,
.humidity-table-card {
    margin-top: var(--space-3);
    padding: 18px;
}

.humidity-card-head h2 {
    margin: 0 0 4px;
}

.humidity-card-head p {
    margin: 0;
    color: var(--color-muted);
}

.humidity-search-form {
    display: grid;
    grid-template-columns: 1fr minmax(140px, auto);
    gap: 10px;
    margin-top: 14px;
    align-items: end;
}

.humidity-search-form label {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-muted);
    letter-spacing: 0.3px;
}

.humidity-alert {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(181, 48, 48, 0.35);
    background: rgba(181, 48, 48, 0.08);
    color: #7f1b1b;
}

.humidity-alert ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

.humidity-result {
    margin-top: 14px;
    border: 1px solid rgba(10, 62, 109, 0.2);
    background: #fff;
    padding: 14px;
}

.humidity-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.humidity-result-item {
    border: 1px solid var(--color-border);
    padding: 10px;
    background: #fff;
}

.humidity-result-item .k {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 4px;
}

.humidity-result-item .v {
    font-weight: 700;
}

.humidity-entry-form {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.humidity-entry-form .field {
    margin: 0;
}

.humidity-table-card h3 {
    margin: 0 0 12px;
}

.humidity-engine-col {
    text-align: center;
}

.humidity-state {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 14px;
}

.humidity-state.yes {
    background: rgba(15, 94, 57, 0.12);
    color: #0f5e39;
}

.humidity-state.no {
    background: rgba(181, 48, 48, 0.12);
    color: #b53030;
}

.is-hidden {
    display: none !important;
}

@keyframes floatPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

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

@media (max-width: 980px) {
    .filters { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .summary { grid-template-columns: 1fr 1fr; }
    .order-layout { grid-template-columns: 1fr; }
    .order-summary .order-meta { grid-template-columns: 1fr 1fr; }
    .order-grid { grid-template-columns: 1fr; }
    .field-group { grid-template-columns: 1fr; }
    .order-details { grid-template-columns: 1fr; }
    .protected-fields { grid-template-columns: 1fr; }
    .product-view-grid { grid-template-columns: 1fr; }
    .product-view-grid:not(.product-edit-grid) .product-view-media { grid-column: auto; }
    .product-view-grid:not(.product-edit-grid) .product-view-info { grid-column: auto; }
    .product-edit-card { grid-column: auto; }
    .product-edit-grid .product-view-media { grid-column: auto; }
    .product-kv-grid { grid-template-columns: 1fr; }
    .help-grid { grid-template-columns: 1fr; }
    .help-contact-grid { grid-template-columns: 1fr; }
    .product-view-legacy-list .line { grid-template-columns: 1fr; gap: 4px; }
    .product-gallery-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 420px; }
    .product-view-media .product-photo-thumb { height: 120px; }
    .product-edit-legacy-body [style*="width: 400px"],
    .product-edit-legacy-body [style*="width: 450px"],
    .product-edit-legacy-body [style*="width: 500px"] {
        float: none !important;
        width: 100% !important;
    }
    .product-edit-legacy-body > div > [style*="float: left"],
    .product-edit-legacy-body > div > [style*="float: right"] {
        float: none !important;
        width: 100% !important;
    }
    .product-edit-legacy-body .modernized-form-grid {
        grid-template-columns: 1fr;
    }
    .product-edit-legacy-body label {
        min-width: 0;
        width: 100%;
        margin-bottom: 4px;
    }
    .product-edit-legacy-body input[type="text"],
    .product-edit-legacy-body input[type="password"],
    .product-edit-legacy-body input[type="file"],
    .product-edit-legacy-body textarea,
    .product-edit-legacy-body select {
        width: 100%;
    }
    /* From AER-36 TODO : Verify if it breaks something */
    .table-wrap { overflow-x: auto; overflow-y: visible; }
    .user-edit-grid { grid-template-columns: 1fr; }
    .user-view-grid { grid-template-columns: 1fr; }
    .user-view-kpis { grid-template-columns: 1fr 1fr; }
    .humidity-result-grid { grid-template-columns: 1fr 1fr; }
    .humidity-entry-form { grid-template-columns: 1fr 1fr; }
    /* End from AER-36 */
}

@media (max-width: 640px) {
    .app-shell { padding: 0 var(--space-3) var(--space-3); }
    .hero {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }
    .hero-head { flex-direction: column; align-items: flex-start; }
    .filters,
    .summary { grid-template-columns: 1fr; }
    .pager { flex-direction: column; align-items: flex-start; }
    .table-wrap { overflow-x: auto; }
    table { min-width: 980px; }
    .order-summary { flex-direction: column; align-items: flex-start; }
    .order-summary .order-meta { grid-template-columns: 1fr; }
    .humidity-search-form,
    .humidity-entry-form,
    .humidity-result-grid { grid-template-columns: 1fr; }
    .user-view-kpis { grid-template-columns: 1fr; }
}

.panel,
.destination-fields,
.page-order .order-panel {
    overflow: visible !important;
}

.select-shell.is-open {
    z-index: 9999;
}

.select-menu {
    z-index: 10000;
}