.md-topedge-stoc {
    --te-navy: #083446;
    --te-navy-soft: #123f54;
    --te-blue: #6195b6;
    --te-blue-dark: #477f9f;
    --te-yellow: #f3cf23;
    --te-text: #22313a;
    --te-muted: #6b7b86;
    --te-line: #dce6ed;
    --te-row: #f7fafc;
    --te-row-alt: #edf3f7;
    --te-bg: #ffffff;
    width: 100%;
    color: var(--te-text);
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.45;
}

.md-topedge-stoc * {
    box-sizing: border-box;
}

.md-topedge-stoc__search {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 26px;
    padding: 16px;
    border: 1px solid var(--te-line);
    border-left: 4px solid var(--te-blue);
    border-radius: 8px;
    background: #f8fbfd;
    box-shadow: 0 12px 30px rgba(8, 52, 70, 0.07);
}

.md-topedge-stoc__label {
    margin: 0;
    color: var(--te-navy);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.md-topedge-stoc__label strong {
    font-weight: 800;
}

.md-topedge-stoc__label span {
    color: var(--te-muted);
}

.md-topedge-stoc__input {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid #cfdbe3;
    border-radius: 6px;
    background: #fff;
    color: var(--te-text);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 46px;
    box-shadow: none;
    outline: 0;
    appearance: none;
}

.md-topedge-stoc__input:focus {
    border-color: var(--te-blue);
    box-shadow: 0 0 0 3px rgba(97, 149, 182, 0.18);
}

.md-topedge-stoc__button {
    height: 46px;
    margin: 0;
    padding: 0 22px;
    border: 1px solid var(--te-blue-dark);
    border-radius: 6px;
    background: var(--te-blue);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 44px;
    letter-spacing: 0;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.md-topedge-stoc__button:hover,
.md-topedge-stoc__button:focus {
    border-color: var(--te-navy-soft);
    background: var(--te-navy-soft);
    color: #fff;
    transform: translateY(-1px);
}

.md-topedge-stoc__table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--te-line);
    border-radius: 8px;
    background: var(--te-bg);
    box-shadow: 0 18px 45px rgba(8, 52, 70, 0.08);
}

.md-topedge-stoc__table {
    width: 100%;
    min-width: 900px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: var(--te-text);
    font-size: 16px;
    font-weight: 400;
}

.md-topedge-stoc__table th,
.md-topedge-stoc__table td {
    padding: 16px 20px!important;
    border: 0;
    vertical-align: middle;
}

.md-topedge-stoc__table th {
    background: var(--te-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    text-align: left!important;
    text-transform: uppercase;
}

.md-topedge-stoc__table th + th {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.md-topedge-stoc__table th:first-child {
    border-top-left-radius: 7px;
}

.md-topedge-stoc__table th:last-child {
    border-top-right-radius: 7px;
}

.md-topedge-stoc__table tbody tr.md-topedge-stoc__row--even {
    background: var(--te-row);
}

.md-topedge-stoc__table tbody tr.md-topedge-stoc__row--odd {
    background: #fff;
}

.md-topedge-stoc__table tbody tr:hover {
    background: var(--te-row-alt);
}

.md-topedge-stoc__table tbody td {
    border-bottom: 1px solid var(--te-line);
}

.md-topedge-stoc__table tbody tr:last-child td {
    border-bottom: 0;
}

.md-topedge-stoc__col-id,
.md-topedge-stoc__cell-id {
    width: 78px;
    text-align: center;
}

.md-topedge-stoc__cell-id {
    color: var(--te-muted);
    font-variant-numeric: tabular-nums;
}

.md-topedge-stoc__col-cod,
.md-topedge-stoc__cell-cod {
    width: 170px;
}

.md-topedge-stoc__cell-cod {
    color: var(--te-navy);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.md-topedge-stoc__col-denumire,
.md-topedge-stoc__cell-denumire {
    width: auto;
}

.md-topedge-stoc__cell-denumire {
    font-weight: 400;
}

.md-topedge-stoc__col-stoc,
.md-topedge-stoc__cell-stoc {
    width: 170px;
    text-align: center;
}

.md-topedge-stoc__col-data,
.md-topedge-stoc__cell-data {
    width: 170px;
    text-align: center;
}

.md-topedge-stoc__cell-data {
    color: var(--te-muted);
    font-size: 14px;
    font-weight: 700;
}

.md-topedge-stoc__cell-cod,
.md-topedge-stoc__cell-denumire,
.md-topedge-stoc__cell-stoc,
.md-topedge-stoc__cell-data {
    overflow-wrap: anywhere;
}

.md-topedge-stoc__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.md-topedge-stoc__badge--in {
    background: #e5f5ec;
    color: #196b3a;
}

.md-topedge-stoc__badge--limited {
    background: #fff4cf;
    color: #81600b;
}

.md-topedge-stoc__badge--order {
    background: #eef3f6;
    color: #4e6471;
}

.md-topedge-stoc__empty td,
.md-topedge-stoc__notice {
    padding: 18px;
    border: 1px solid var(--te-line);
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--te-muted);
}

.md-topedge-stoc__notice--admin {
    margin-top: 8px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .md-topedge-stoc__search {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .md-topedge-stoc__label {
        white-space: normal;
    }

    .md-topedge-stoc__button {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .md-topedge-stoc__search {
        margin-bottom: 18px;
        padding: 14px;
    }

    .md-topedge-stoc__label {
        font-size: 18px;
        line-height: 1.25;
    }

    .md-topedge-stoc__input,
    .md-topedge-stoc__button {
        height: 48px;
    }

    .md-topedge-stoc__table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .md-topedge-stoc__table {
        display: block;
        min-width: 0;
        width: 100%;
        font-size: 15px;
    }

    .md-topedge-stoc__table thead {
        display: none;
    }

    .md-topedge-stoc__table tbody {
        display: grid;
        gap: 12px;
    }

    .md-topedge-stoc__table tr[data-md-topedge-row] {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
        border: 1px solid var(--te-line);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(8, 52, 70, 0.08);
    }

    .md-topedge-stoc__table tbody tr.md-topedge-stoc__row--even,
    .md-topedge-stoc__table tbody tr.md-topedge-stoc__row--odd,
    .md-topedge-stoc__table tbody tr:hover {
        background: #fff;
    }

    .md-topedge-stoc__table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        width: auto;
        padding: 9px 0;
        border-bottom: 1px solid #edf3f7;
        text-align: left;
    }

    .md-topedge-stoc__table td::before {
        content: attr(data-label);
        color: var(--te-muted);
        font-size: 12px;
        font-weight: 800;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .md-topedge-stoc__table td:last-child {
        border-bottom: 0;
    }

    .md-topedge-stoc__cell-id {
        display: none !important;
    }

    .md-topedge-stoc__cell-cod {
        color: var(--te-navy);
        font-size: 18px;
        font-weight: 800;
    }

    .md-topedge-stoc__cell-denumire {
        align-items: start;
        font-size: 16px;
        line-height: 1.45;
    }

    .md-topedge-stoc__cell-stoc,
    .md-topedge-stoc__cell-data {
        text-align: left;
    }

    .md-topedge-stoc__badge {
        min-width: 0;
        width: fit-content;
        max-width: 100%;
    }

    .md-topedge-stoc__empty {
        display: block;
    }

    .md-topedge-stoc__empty td {
        display: block;
        padding: 16px;
    }
}
