* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: #172033;
    background: linear-gradient(180deg, #ffe8d1 0%, #fff8f1 42%, #fff 100%);
    font-family: Inter, Roboto, Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

a {
    text-decoration: none !important;
}

.pos-index-page {
    width: 100%;
    min-height: 100vh;
    padding: 18px;
}

.pos-index-shell {
    width: min(1260px, 100%);
    margin: 0 auto;
}

.pos-index-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.pos-index-title {
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto minmax(44px, max-content);
    align-items: end;
    justify-content: start;
    gap: 10px;
}

.pos-index-title span {
    align-self: center;
    padding: 6px 9px;
    color: #873600;
    background: #fff4eb;
    border: 1px solid rgba(217, 93, 5, 0.18);
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.pos-index-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.55rem, 4vw, 2.3rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
}

.pos-index-title strong {
    min-width: 44px;
    padding: 5px 9px;
    color: #fff;
    background: #d95d05;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
}

.pos-index-search {
    min-width: 0;
    height: 48px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 46px;
    align-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(49, 35, 22, 0.09);
}

.pos-index-search > i {
    color: #d95d05;
    text-align: center;
    font-size: 1rem;
}

.pos-index-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    color: #111827;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 1rem;
}

.pos-index-search input::placeholder {
    color: #9ca3af;
}

.pos-index-search button {
    width: 46px;
    height: 100%;
    color: #fff;
    background: #d95d05;
    border: 0;
    font-size: 1rem;
}

.pos-index-filters {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(217, 93, 5, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(49, 35, 22, 0.07);
}

.pos-filter-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    color: #873600;
    background: transparent;
    border-radius: 8px;
    font-size: 0.96rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none !important;
}

.pos-filter-button.active,
.pos-filter-button:hover,
.pos-filter-button:focus {
    color: #fff;
    background: #d95d05;
}

.pos-delivery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pos-delivery-card {
    min-width: 0;
}

.pos-delivery-card a {
    min-height: 100%;
    display: grid;
    gap: 12px;
    padding: 14px;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-top: 5px solid #d95d05;
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(49, 35, 22, 0.10);
    text-decoration: none !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pos-delivery-card a *,
.pos-filter-button * {
    text-decoration: none !important;
}

.pos-delivery-card a:hover,
.pos-delivery-card a:focus {
    border-color: rgba(217, 93, 5, 0.40);
    box-shadow: 0 18px 34px rgba(49, 35, 22, 0.16);
    transform: translateY(-2px);
}

.pos-delivery-card-top {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 10px;
    align-items: center;
}

.pos-delivery-card-top span,
.pos-delivery-details span {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.pos-delivery-card-top h2 {
    margin: 4px 0 0;
    color: #111827;
    font-size: 1.42rem;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.pos-delivery-card-top > i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d95d05;
    background: #fff4eb;
    border-radius: 999px;
}

.pos-delivery-client {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #fff8f2;
    border: 1px solid rgba(217, 93, 5, 0.12);
    border-radius: 8px;
}

.pos-delivery-client i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #d95d05;
    border-radius: 8px;
}

.pos-delivery-client strong {
    min-width: 0;
    color: #111827;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.pos-delivery-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pos-delivery-details div {
    min-width: 0;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid rgba(17, 24, 39, 0.07);
    border-radius: 8px;
}

.pos-delivery-details strong {
    display: block;
    margin-top: 5px;
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.pos-delivery-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pos-delivery-status span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.pos-delivery-status .is-ok {
    color: #0f5c2a;
    background: #dcfce7;
}

.pos-delivery-status .is-pending {
    color: #9f2d09;
    background: #ffedd5;
}

.pos-empty-state {
    display: grid;
    place-items: center;
    min-height: 40vh;
    padding: 28px;
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 8px;
}

.empty-img img {
    width: min(230px, 70vw);
    height: auto;
}

.empty-title {
    margin: 14px 0 4px;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 900;
}

.empty-subtitle {
    margin: 0;
    color: #667085;
}

.pos-pagination {
    display: flex;
    justify-content: center;
    padding: 22px 0 72px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pagination li a,
.pagination li span {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #873600;
    background: #fff;
    border: 1px solid rgba(217, 93, 5, 0.18);
    border-radius: 8px;
    font-weight: 850;
}

.pagination li.active a,
.pagination li a:hover {
    color: #fff;
    background: #d95d05;
    border-color: #d95d05;
}

.pagination li.disabled span {
    color: #a3a3a3;
    background: #f3f4f6;
}

@media (max-width: 760px) {
    .pos-index-page {
        padding: 10px;
    }

    .pos-index-header {
        grid-template-columns: 1fr;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 15;
        padding: 10px 0;
        background: linear-gradient(180deg, #ffe8d1 0%, rgba(255, 248, 241, 0.96) 100%);
    }

    .pos-index-title {
        grid-template-columns: auto minmax(0, auto) minmax(40px, max-content);
    }

    .pos-index-search {
        height: 46px;
        grid-template-columns: 38px minmax(0, 1fr) 44px;
    }

    .pos-index-filters {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-bottom: 12px;
    }

    .pos-delivery-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pos-delivery-card a {
        padding: 12px;
        gap: 10px;
    }

    .pos-delivery-card-top h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 390px) {
    .pos-index-page {
        padding: 0;
    }

    .pos-index-shell {
        padding: 10px;
    }

    .pos-index-title h1 {
        font-size: 1.45rem;
    }

    .pos-index-title span {
        display: none;
    }

    .pos-index-title {
        grid-template-columns: minmax(0, auto) minmax(38px, max-content);
    }

    .pos-delivery-details {
        grid-template-columns: 1fr;
    }

    .pos-filter-button {
        padding: 0 10px;
    }
}
