.inventory-receive-page {
    color: #17243a;
    background: linear-gradient(145deg, #f4f7fb 0%, #e5ecf7 100%);
}

.receive-workspace {
    width: min(1120px, 100%);
    margin-inline: auto;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 58px rgba(35, 52, 78, 0.16);
}

.receive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid #dce4ef;
}

.receive-header__main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
}

.receive-header__icon {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 15px;
    color: #465a78;
    background: #e7eefb;
}

.receive-header__icon svg { width: 34px; height: 34px; }
.receive-header h1 { margin: 0; color: #17243a; font-size: clamp(1.55rem, 2.4vw, 2rem); line-height: 1.08; letter-spacing: -.025em; }
.receive-header p { margin: 4px 0 0; color: #5d6c83; font-size: .9rem; line-height: 1.35; }

.receive-back,
.receive-actions button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

.receive-back {
    flex: 0 0 auto;
    padding: 9px 16px;
    border: 1px solid #ccd5e2;
    color: #465a78;
    background: #fff;
}

.receive-back svg,
.receive-actions svg { width: 18px; height: 18px; }
.receive-form { padding: 18px 24px 22px; }
.receive-form__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.receive-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.receive-field--wide { grid-column: span 2; }

.receive-field > label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #17243a;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.3;
}

.receive-field > label b { margin-inline-start: 2px; color: #a9434c; }
.receive-field > label small { color: #65758d; font-size: .72rem; font-weight: 500; }
.receive-field__icon { display: inline-grid; flex: 0 0 17px; width: 17px; height: 17px; place-items: center; color: #465a78; }
.receive-field__icon svg { width: 17px; height: 17px; }
.receive-control { position: relative; min-width: 0; }

.receive-control .form-control {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #c8d4e4;
    border-radius: 12px;
    box-sizing: border-box;
    color: #17243a;
    font: inherit;
    font-size: .86rem;
    line-height: 1.25;
    background: #fff;
    box-shadow: none;
    transition: border-color .16s ease-out, box-shadow .16s ease-out, background-color .16s ease-out;
}

.receive-control select.form-control { padding-inline-end: 36px; }
.receive-control textarea.form-control { height: 72px; min-height: 72px; resize: vertical; }
.receive-control--currency .form-control { padding-inline-end: 52px; }

.receive-control__suffix {
    position: absolute;
    inset-block: 1px;
    inset-inline-end: 1px;
    display: grid;
    width: 44px;
    place-items: center;
    border-inline-start: 1px solid #dbe3ee;
    border-radius: 0 12px 12px 0;
    color: #465a78;
    font-size: .76rem;
    font-weight: 800;
    background: #f4f7fb;
    pointer-events: none;
}

[dir="rtl"] .receive-control__suffix { border-radius: 12px 0 0 12px; }
.receive-control .form-control::placeholder { color: #6a7890; opacity: 1; }
.receive-control .form-control:hover { border-color: #99aac3; }
.receive-control .form-control:focus { border-color: #6f82a0; outline: 0; box-shadow: 0 0 0 4px rgba(111, 130, 160, .18); }
.receive-field .help-text { margin: 0; color: #66758b; font-size: .66rem; line-height: 1.35; }
.receive-field .error-message { margin: 0; color: #a9434c; font-size: .7rem; font-weight: 700; line-height: 1.35; }

.receive-supplier { color: #465a78; }
.receive-supplier summary {
    width: fit-content;
    min-height: 44px;
    align-content: center;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
}
.receive-supplier summary:hover { color: #354863; text-decoration: underline; }
.receive-supplier summary:focus-visible,
.receive-supplier__submit:focus-visible { outline: 3px solid #6f82a0; outline-offset: 3px; }
.receive-supplier__fields { display: grid; gap: 8px; padding-block: 4px 12px; }
.receive-supplier__fields label { color: #17243a; font-size: .78rem; font-weight: 600; }
.receive-supplier__fields label b { color: #a9434c; }
.receive-supplier__fields label small { color: #5d6c83; font-weight: 400; }
.receive-supplier__submit {
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #ccd5e2;
    border-radius: 12px;
    color: #465a78;
    background: #f5f7fa;
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    box-shadow: none;
    cursor: pointer;
}
.receive-supplier__submit:hover { color: #465a78; background: #eef2f7; }
.receive-supplier__submit:disabled { opacity: .65; cursor: wait; }
#supplier-create-status:empty { display: none; }

.receive-form__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
}

.receive-tip {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 15px;
    color: #465a78;
    background: #edf3ff;
}

.receive-tip > span { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #fff; background: #465a78; }
.receive-tip svg { width: 18px; height: 18px; }
.receive-tip strong { display: block; font-size: .76rem; }
.receive-tip p { margin: 2px 0 0; font-size: .68rem; line-height: 1.35; }
.receive-actions { display: flex; align-items: center; gap: 10px; }

.receive-actions button {
    width: auto;
    min-width: 132px;
    padding: 10px 16px;
    border: 1px solid #9eb4d3;
    font: inherit;
    font-size: .76rem;
    cursor: pointer;
}

.receive-reset { color: #465a78; background: #fff; }
.receive-submit { min-width: 190px !important; border-color: #465a78 !important; color: #fff; background: #465a78; box-shadow: 0 9px 22px rgba(70, 90, 120, .22); }
.receive-back:hover,
.receive-reset:hover { border-color: #6f82a0; background: #f3f6fa; }
.receive-submit:hover { background: #354863; }
.receive-back:focus-visible,
.receive-actions button:focus-visible { outline: 3px solid #6f82a0; outline-offset: 3px; }

.receive-workspace svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (min-width: 821px) {
    body.role-warehouse_worker:has(.inventory-receive-page) { overflow: hidden; }
    body.role-warehouse_worker:has(.inventory-receive-page--has-errors) { overflow: auto; }
    .inventory-receive-page { width: 100%; max-width: none; height: 100vh; margin: 0; padding: 12px 18px; box-sizing: border-box; }
    .receive-workspace { height: calc(100vh - 24px); overflow-y: auto; }
}

@media (min-width: 821px) and (max-height: 680px), (min-width: 821px) and (max-width: 1080px) {
    .receive-header { padding: 12px 18px; }
    .receive-header__icon { flex-basis: 46px; width: 46px; height: 46px; border-radius: 12px; }
    .receive-header__icon svg { width: 28px; height: 28px; }
    .receive-header h1 { font-size: 1.45rem; }
    .receive-header p { font-size: .76rem; }
    .receive-back { min-height: 40px; padding: 7px 13px; font-size: .74rem; }
    .receive-form { padding: 12px 18px 14px; }
    .receive-form__grid { gap: 9px 14px; }
    .receive-field { gap: 4px; }
    .receive-field > label { font-size: .7rem; }
    .receive-field__icon,
    .receive-field__icon svg { width: 15px; height: 15px; flex-basis: 15px; }
    .receive-control .form-control { min-height: 38px; padding: 7px 10px; font-size: .78rem; }
    .receive-control textarea.form-control { height: 58px; min-height: 58px; }
    .receive-control__suffix { width: 40px; }
    .receive-field .help-text { font-size: .58rem; }
    .receive-form__footer { gap: 14px; margin-top: 10px; }
    .receive-tip { min-height: 50px; padding: 7px 12px; }
    .receive-tip > span { flex-basis: 26px; width: 26px; height: 26px; }
    .receive-actions button { min-height: 40px; padding: 8px 13px; }
}

@media (max-width: 820px) {
    .inventory-receive-page { width: calc(100% - 20px); padding-block: 12px 86px; }
    .receive-workspace { overflow: visible; border-radius: 18px; }
    .receive-header { align-items: flex-start; padding: 16px; }
    .receive-header__icon { flex-basis: 48px; width: 48px; height: 48px; }
    .receive-header__icon svg { width: 28px; height: 28px; }
    .receive-header h1 { font-size: 1.45rem; }
    .receive-header p { font-size: .82rem; }
    .receive-back { width: 44px; min-width: 44px; padding: 0; }
    .receive-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .receive-form { padding: 16px; }
    .receive-form__grid { grid-template-columns: 1fr; gap: 13px; }
    .receive-field--wide { grid-column: auto; }
    .receive-control .form-control { min-height: 46px; font-size: 16px; }
    .receive-form__footer { grid-template-columns: 1fr; }
    .receive-actions { display: grid; grid-template-columns: 1fr 1.35fr; }
    .receive-actions button,
    .receive-submit { width: 100%; min-width: 0 !important; }
}

@media (max-width: 460px) {
    .receive-header__main { gap: 10px; }
    .receive-header__icon { display: none; }
    .receive-header h1 { font-size: 1.25rem; }
    .receive-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .receive-control .form-control { transition: none; }
}
