.owner-orders-page {
    padding-bottom: 3rem;
}

.compact-admin-page {
    font-size: .92rem;
}

.owner-orders-hero,
.compact-admin-hero {
    min-height: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0 .85rem;
}

.owner-orders-hero h1,
.compact-admin-hero h1 {
    margin: .2rem 0 .3rem;
    color: #201b18;
    font-size: clamp(1.85rem, 3vw, 2.75rem);
    line-height: .98;
    letter-spacing: -.05em;
}

.owner-orders-hero p,
.compact-admin-hero p {
    max-width: 660px;
    margin: 0;
    color: #736960;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
}

.owner-orders-hero-actions {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.owner-orders-hero-actions .cr-btn,
.owner-order-modal .cr-btn {
    min-height: 38px;
    padding-inline: .9rem;
    border-radius: 13px;
    font-size: .86rem;
}

.compact-admin-alert {
    margin: .5rem 0 .75rem;
    padding: .7rem .85rem;
    border-radius: 14px;
    font-size: .9rem;
}

.owner-orders-quickbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    gap: .75rem;
    align-items: stretch;
    margin-bottom: .75rem;
}

.owner-orders-stats,
.compact-admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 0;
}

.owner-orders-stats article,
.compact-admin-stats article {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 64px;
    padding: .65rem .8rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(70, 45, 25, .08);
    box-shadow: 0 10px 24px rgba(45, 30, 18, .045);
}

.owner-orders-stats article > i,
.compact-admin-stats article > i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff0e6;
    color: #d85b1f;
    font-size: .95rem;
}

.owner-orders-stats strong,
.compact-admin-stats strong {
    display: block;
    color: #1e1815;
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 1000;
}

.owner-orders-stats span,
.compact-admin-stats span {
    display: block;
    margin-top: .18rem;
    color: #766d65;
    font-size: .74rem;
    font-weight: 850;
}

.owner-orders-search,
.compact-admin-search {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: 0 .85rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(70, 45, 25, .10);
    box-shadow: 0 10px 24px rgba(45, 30, 18, .045);
}

.owner-orders-search i,
.compact-admin-search i {
    color: #d85b1f;
}

.owner-orders-search input,
.compact-admin-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: .9rem;
    font-weight: 800;
}

.owner-orders-search button,
.compact-admin-search button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #fff0e6;
    color: #bf4c14;
}

.owner-orders-toolbar,
.compact-admin-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .7rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.owner-order-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: .45rem;
    min-width: 0;
}

.owner-order-tabs .owner-filter {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid rgba(70, 45, 25, .10);
    border-radius: 999px;
    background: #fff;
    color: #241d19;
    padding: 0 .75rem;
    font-size: .84rem;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
}

.owner-order-tabs .owner-filter span {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #fff1e8;
    color: #c55217;
    font-size: .72rem;
}

.owner-order-tabs .owner-filter.active {
    background: #211a16;
    color: #fff;
    border-color: #211a16;
    box-shadow: 0 8px 18px rgba(20, 12, 8, .13);
}

.owner-orders-table-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(70, 45, 25, .10);
    box-shadow: 0 12px 34px rgba(45, 30, 18, .06);
}

.owner-orders-table {
    width: 100%;
    display: grid;
}

.owner-orders-table-head,
.owner-orders-table-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.15fr) minmax(145px, .9fr) minmax(105px, .62fr) 70px 115px 105px minmax(210px, 1fr);
    align-items: center;
    gap: .65rem;
}

.owner-orders-table-head {
    min-height: 42px;
    padding: 0 .85rem;
    background: #fff8f2;
    color: #776e66;
    font-size: .72rem;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.owner-orders-table-row {
    min-height: 76px;
    padding: .65rem .85rem;
    border-top: 1px solid rgba(70, 45, 25, .08);
}

.owner-orders-table-row:hover,
.owner-orders-table-row.selected {
    background: #fffaf6;
}

.owner-orders-cell {
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.owner-orders-cell strong {
    display: block;
    overflow: hidden;
    color: #1f1814;
    font-size: .93rem;
    font-weight: 1000;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-orders-cell small {
    display: block;
    overflow: hidden;
    margin-top: .16rem;
    color: #766d65;
    font-size: .76rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-orders-cell.amount {
    color: #e05f20;
    font-weight: 1000;
    white-space: nowrap;
}

.owner-orders-cell.center,
.owner-orders-cell.date {
    color: #6f665e;
    font-weight: 850;
}

.owner-orders-cell.actions {
    display: flex;
    justify-content: flex-end;
    gap: .35rem;
    flex-wrap: wrap;
}

.owner-mini-action {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 0 .62rem;
    border-radius: 999px;
    border: 1px solid rgba(70, 45, 25, .10);
    background: #fffaf6;
    color: #241d19;
    font-size: .78rem;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
}

.owner-mini-action.primary {
    background: #e36425;
    color: #fff;
    border-color: #e36425;
}

.owner-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 .55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: .68rem;
    font-weight: 1000;
    white-space: nowrap;
}

.owner-badge.warn { background: #fff4d8; color: #a15c00; }
.owner-badge.ok { background: #e9f9ef; color: #13713a; }
.owner-badge.hot { background: #fff0e6; color: #c55217; }
.owner-badge.off { background: #f3f4f6; color: #6b7280; }

.owner-order-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(28, 20, 15, .42);
    backdrop-filter: blur(8px);
}

.owner-order-modal {
    width: min(1040px, 100%);
    max-height: min(88dvh, 820px);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(70, 45, 25, .12);
    box-shadow: 0 28px 80px rgba(20, 12, 8, .30);
}

.owner-order-modal-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(70, 45, 25, .08);
    background: #fffaf6;
}

.owner-order-modal-header h2 {
    margin: .12rem 0 0;
    color: #191411;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 1000;
}

.owner-order-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #fff0e6;
    color: #bf4c14;
    cursor: pointer;
}

.owner-order-modal-body {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1rem;
    padding: 1rem;
}

.owner-order-client-card,
.compact-client-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .7rem;
    padding: .7rem;
    border-radius: 16px;
    background: #fff8f2;
    border: 1px solid rgba(226, 98, 34, .10);
}

.owner-order-client-card > div:first-child {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: #d85b1f;
}

.owner-order-client-card strong,
.owner-order-client-card span {
    display: block;
}

.owner-order-client-card strong { color: #1f1814; font-weight: 1000; }
.owner-order-client-card span,
.owner-order-client-card p { margin: .15rem 0 0; color: #675f58; font-size: .86rem; font-weight: 750; }

.owner-order-items { margin-top: .8rem; }
.owner-order-items h3,
.owner-order-quick-flow h3,
.owner-status-form h3 {
    margin: 0 0 .55rem;
    color: #1f1814;
    font-size: .95rem;
    font-weight: 1000;
}

.owner-order-items article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .7rem;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(70, 45, 25, .08);
}

.owner-order-items strong { display: block; color: #1f1814; font-size: .9rem; }
.owner-order-items span { display: block; margin-top: .18rem; color: #776e66; font-size: .82rem; }
.owner-order-items em { font-style: normal; color: #e05f20; font-size: .9rem; font-weight: 1000; }

.owner-order-note,
.compact-note {
    margin-top: .75rem;
    padding: .7rem;
    border-radius: 14px;
    background: #fff8f2;
    border: 1px solid rgba(226, 98, 34, .10);
}

.owner-order-note strong { display: block; margin-bottom: .25rem; color: #1f1814; font-size: .9rem; }
.owner-order-note p { margin: 0; color: #655d55; font-size: .85rem; line-height: 1.35; }

.owner-order-modal-side {
    display: grid;
    align-content: start;
    gap: .8rem;
}

.owner-order-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

.owner-order-status-line small { color: #776e66; font-size: .8rem; font-weight: 850; }

.owner-order-totals,
.compact-totals {
    display: grid;
    gap: .4rem;
    padding: .75rem;
    border-radius: 16px;
    background: #fffaf6;
    border: 1px solid rgba(70, 45, 25, .08);
}

.owner-order-totals div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #665d55;
    font-size: .86rem;
}

.owner-order-totals .final {
    padding-top: .55rem;
    border-top: 1px solid rgba(70, 45, 25, .10);
    color: #1f1814;
    font-size: 1rem;
    font-weight: 1000;
}

.owner-order-contact-actions,
.compact-contact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

.owner-order-quick-flow,
.compact-flow {
    padding: .75rem;
    border-radius: 16px;
    background: #fffaf6;
    border: 1px solid rgba(70, 45, 25, .08);
}

.owner-order-quick-flow > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.owner-status-form,
.compact-status-form {
    padding: .75rem;
    display: grid;
    gap: .52rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(70, 45, 25, .08);
}

.owner-status-form label {
    color: #201915;
    font-size: .78rem;
    font-weight: 950;
}

.owner-status-form .cr-input {
    min-height: 38px;
    border-radius: 12px;
    font-size: .86rem;
}

.owner-status-form textarea.cr-input {
    min-height: 72px;
}

.owner-orders-loading,
.owner-orders-empty,
.compact-admin-empty {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .65rem;
    text-align: center;
}

.owner-orders-loading i,
.owner-orders-empty i,
.compact-admin-empty i {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff0e6;
    color: #d85b1f;
    font-size: 1.1rem;
}

@media (max-width: 1180px) {
    .owner-orders-quickbar {
        grid-template-columns: 1fr;
    }

    .owner-orders-table {
        overflow-x: auto;
    }

    .owner-orders-table-head,
    .owner-orders-table-row {
        min-width: 1040px;
    }
}

@media (max-width: 860px) {
    .owner-orders-hero,
    .compact-admin-hero {
        display: grid;
        padding-top: 1rem;
    }

    .owner-orders-stats,
    .compact-admin-stats {
        grid-template-columns: 1fr;
    }

    .owner-order-modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .owner-order-modal-backdrop {
        padding: 0;
        align-items: end;
    }

    .owner-order-modal {
        width: 100%;
        max-height: 94dvh;
        border-radius: 22px 22px 0 0;
    }

    .owner-order-contact-actions,
    .compact-contact-actions,
    .owner-order-quick-flow > div {
        grid-template-columns: 1fr;
    }
}
