.scw-panel {
    --scw-border: #d6dde6;
    --scw-text: #1f2933;
    --scw-muted: #667586;
    --scw-accent: #0b6bcb;
    --scw-accent-dark: #084f96;
    color: var(--scw-text);
    max-width: 760px;
}

.scw-panel *,
.scw-panel *::before,
.scw-panel *::after {
    box-sizing: border-box;
}

.scw-panel__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.scw-panel__row {
    display: flex;
    gap: 10px;
}

.scw-panel__input {
    appearance: none !important;
    -webkit-appearance: none !important;
    min-width: 0;
    flex: 1;
    width: auto !important;
    max-width: 100%;
    min-height: 38px !important;
    height: 38px !important;
    border: 1px solid var(--scw-border) !important;
    border-radius: 6px !important;
    padding: 7px 10px !important;
    background: #fff !important;
    color: var(--scw-text) !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.scw-panel__button {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    height: 38px !important;
    border: 0 !important;
    border-radius: 6px !important;
    padding: 7px 14px !important;
    background: var(--scw-accent) !important;
    color: #fff !important;
    cursor: pointer !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    width: auto !important;
    max-width: max-content !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: none !important;
    text-transform: none !important;
}

.scw-panel--button-theme .scw-panel__button {
    appearance: auto !important;
    -webkit-appearance: button !important;
    display: inline-block !important;
    align-items: initial !important;
    justify-content: initial !important;
    min-height: initial !important;
    height: auto !important;
    border: initial;
    border-radius: initial;
    padding: initial;
    background: initial;
    color: initial;
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit !important;
    box-shadow: initial;
}

.scw-panel--button-theme .scw-panel__button:hover,
.scw-panel--button-theme .scw-panel__button:focus {
    background: initial;
    color: initial;
}

.scw-panel__button:hover,
.scw-panel__button:focus {
    background: var(--scw-accent-dark) !important;
}

.scw-panel--button-outline .scw-panel__button {
    border: 1px solid var(--scw-accent) !important;
    background: transparent !important;
    color: var(--scw-accent) !important;
}

.scw-panel--button-outline .scw-panel__button:hover,
.scw-panel--button-outline .scw-panel__button:focus {
    background: #eef6ff !important;
}

.scw-panel--button-dark .scw-panel__button {
    background: #1f2933 !important;
    color: #fff !important;
}

.scw-panel--button-dark .scw-panel__button:hover,
.scw-panel--button-dark .scw-panel__button:focus {
    background: #111827 !important;
}

.scw-panel--button-light .scw-panel__button {
    border: 1px solid var(--scw-border) !important;
    background: #f6f8fa !important;
    color: var(--scw-text) !important;
}

.scw-panel--button-light .scw-panel__button:hover,
.scw-panel--button-light .scw-panel__button:focus {
    background: #e9eef5 !important;
}

.scw-panel--size-medium .scw-panel__input,
.scw-panel[data-form-size="medium"] .scw-panel__input {
    min-height: 44px !important;
    height: 44px !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
}

.scw-panel--size-medium:not(.scw-panel--button-theme) .scw-panel__button,
.scw-panel[data-form-size="medium"]:not(.scw-panel--button-theme) .scw-panel__button {
    min-height: 44px !important;
    height: 44px !important;
    padding: 10px 18px !important;
    font-size: 15px !important;
}

.scw-panel__button:disabled {
    cursor: progress;
    opacity: .72;
}

.scw-panel__message {
    margin-top: 12px;
    color: #a13018;
}

.scw-panel__results {
    display: block;
    margin-top: 16px;
}

.scw-modal[hidden] {
    display: none;
}

.scw-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.scw-modal__overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(17, 24, 39, .54);
    opacity: 0;
    transition: opacity .16s ease;
}

.scw-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 28px));
    margin: 0;
    overflow: auto;
    border-radius: 10px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .28);
    opacity: 0;
    transform: translateY(16px) scale(.96);
    transition: opacity .16s ease, transform .16s ease;
}

.scw-modal--open .scw-modal__overlay {
    opacity: 1;
}

.scw-modal--open .scw-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.scw-modal__title {
    margin: 0 40px 14px 0;
    font-size: 22px;
    line-height: 1.2;
}

.scw-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--scw-border);
    border-radius: 999px;
    background: #fff;
    color: var(--scw-text);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.scw-modal-open {
    overflow: hidden;
}

.scw-line {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr);
    gap: 14px;
    align-items: start;
    border: 1px solid var(--scw-border);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    margin-bottom: 8px;
}

.scw-panel--table .scw-line {
    grid-template-columns: 1.2fr 1.4fr;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-bottom: 0;
}

.scw-panel[data-layout="table"] .scw-line {
    grid-template-columns: 1.2fr 1.4fr;
    border-radius: 0;
    border-left: 1px solid var(--scw-border);
    border-right: 1px solid var(--scw-border);
    margin-bottom: 0;
}

.scw-panel--table .scw-line:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-left: 1px solid var(--scw-border);
    border-right: 1px solid var(--scw-border);
}

.scw-panel--table .scw-line:not(:first-child) {
    border-top: 0;
}

.scw-panel--table .scw-line {
    border-left: 1px solid var(--scw-border);
    border-right: 1px solid var(--scw-border);
}

.scw-panel--cards .scw-panel__results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.scw-panel[data-layout="cards"] .scw-panel__results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.scw-panel[data-layout="cards"] .scw-line {
    display: block;
    margin-bottom: 0;
}

.scw-panel[data-layout="cards"] .scw-line__tracking {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--scw-border);
}

.scw-panel--cards .scw-line {
    display: block;
    margin-bottom: 0;
}

.scw-panel--cards .scw-line__tracking {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--scw-border);
}

.scw-line__main,
.scw-line__tracking {
    display: grid;
    gap: 4px;
}

.scw-line__title {
    font-size: 16px;
}

.scw-line__status {
    width: max-content;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eef6ff;
    color: #084f96;
    font-weight: 700;
    white-space: nowrap;
}

.scw-line__muted,
.scw-line__empty,
.scw-line__items {
    color: var(--scw-muted);
}

.scw-track {
    display: grid;
    gap: 2px;
}

.scw-track__code {
    font-weight: 800;
}

.scw-track__status {
    font-weight: 700;
}

.scw-track__muted,
.scw-line__empty {
    color: var(--scw-muted);
}

@media (max-width: 620px) {
    .scw-panel__row,
    .scw-line {
        display: block;
    }

    .scw-panel__button {
        width: auto !important;
        margin-top: 10px;
    }

    .scw-line__tracking {
        margin-top: 10px;
    }

    .scw-modal__dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        margin: 0;
        padding: 14px;
    }
}
