.kd-orders-page {
    min-height: calc(100vh - 90px);
    padding: 28px 18px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 32%),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
}

body.dark-mode .kd-orders-page,
html[data-theme="dark"] .kd-orders-page {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .18), transparent 30%),
        linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

.kd-orders-hero,
.kd-orders-filter-card,
.kd-orders-card {
    width: min(1180px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.kd-orders-hero {
    margin-bottom: 20px;
    border-radius: 30px;
    padding: 34px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .28), transparent 36%),
        linear-gradient(145deg, #071f44 0%, #0f172a 100%);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
    overflow: hidden;
    position: relative;
}

.kd-orders-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -85px;
    bottom: -95px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.kd-orders-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 900;
}

.kd-orders-hero h1 {
    margin: 18px 0 8px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -.05em;
    font-weight: 950;
}

.kd-orders-hero p {
    max-width: 650px;
    margin: 0;
    color: #bfdbfe;
    line-height: 1.7;
    font-weight: 750;
}

.kd-orders-filter-card {
    padding: 20px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .10);
    margin-bottom: 20px;
    overflow: visible;
}

body.dark-mode .kd-orders-filter-card,
html[data-theme="dark"] .kd-orders-filter-card {
    background: rgba(15, 23, 42, .94);
    border-color: rgba(148, 163, 184, .22);
}

.kd-orders-filter-form {
    display: grid;
    grid-template-columns: 1fr 210px auto;
    gap: 12px;
    align-items: center;
}

.kd-orders-search {
    position: relative;
}

.kd-orders-search > i {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.kd-orders-search input {
    width: 100%;
    height: 56px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 18px;
    outline: none;
    background: #fff;
    color: #0f172a;
    font-weight: 900;
    padding: 0 52px 0 46px;
    transition: .22s ease;
}

.kd-orders-search input::placeholder {
    color: #94a3b8;
}

body.dark-mode .kd-orders-search input,
html[data-theme="dark"] .kd-orders-search input {
    background: #111827;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, .24);
}

.kd-orders-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, .12);
}

.kd-orders-search-clear {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f1f5f9;
    text-decoration: none;
    transition: .2s ease;
}

body.dark-mode .kd-orders-search-clear,
html[data-theme="dark"] .kd-orders-search-clear {
    background: #020617;
    color: #cbd5e1;
}

.kd-orders-search-clear:hover {
    color: #fff;
    background: #ef4444;
}

.kd-status-select {
    position: relative;
    width: 100%;
    z-index: 20;
}

.kd-status-select-btn {
    width: 100%;
    height: 56px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 18px;
    background: #fff;
    color: #0f172a;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    font-weight: 950;
    transition: .22s ease;
}

body.dark-mode .kd-status-select-btn,
html[data-theme="dark"] .kd-status-select-btn {
    background: #111827;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, .24);
}

.kd-status-select.open .kd-status-select-btn,
.kd-status-select-btn:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, .12);
}

.kd-status-select-btn i {
    color: #64748b;
    transition: .22s ease;
}

.kd-status-select.open .kd-status-select-btn i {
    transform: rotate(180deg);
}

.kd-status-select-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .20);
    display: none;
    z-index: 999;
}

body.dark-mode .kd-status-select-panel,
html[data-theme="dark"] .kd-status-select-panel {
    background: #0f172a;
    border-color: rgba(148, 163, 184, .22);
}

.kd-status-select.open .kd-status-select-panel {
    display: grid;
    gap: 6px;
    animation: kdOrderDrop .18s ease;
}

.kd-status-select-panel button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    padding: 0 12px;
    background: transparent;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    font-weight: 900;
    transition: .18s ease;
}

body.dark-mode .kd-status-select-panel button,
html[data-theme="dark"] .kd-status-select-panel button {
    color: #cbd5e1;
}

.kd-status-select-panel button i {
    width: 18px;
    color: #64748b;
}

.kd-status-select-panel button:hover,
.kd-status-select-panel button.selected {
    background: #eff6ff;
    color: #1d4ed8;
}

body.dark-mode .kd-status-select-panel button:hover,
body.dark-mode .kd-status-select-panel button.selected,
html[data-theme="dark"] .kd-status-select-panel button:hover,
html[data-theme="dark"] .kd-status-select-panel button.selected {
    background: rgba(37, 99, 235, .16);
    color: #93c5fd;
}

.kd-orders-clear {
    height: 56px;
    border-radius: 18px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 950;
    text-decoration: none;
    background: #fee2e2;
    color: #991b1b;
    white-space: nowrap;
    transition: .2s ease;
}

.kd-orders-clear:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-2px);
}

.kd-orders-card {
    border-radius: 28px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .10);
    overflow: hidden;
}

body.dark-mode .kd-orders-card,
html[data-theme="dark"] .kd-orders-card {
    background: rgba(15, 23, 42, .94);
    border-color: rgba(148, 163, 184, .22);
}

.kd-orders-list {
    display: grid;
}

.kd-order-row {
    padding: 20px 22px;
    display: grid;
    grid-template-columns: 1.1fr 1.6fr auto;
    gap: 18px;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.kd-order-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.kd-order-icon {
    width: 48px;
    height: 48px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
    flex: 0 0 48px;
}

.kd-order-main span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 950;
}

.kd-order-main h3 {
    margin: 4px 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
}

body.dark-mode .kd-order-main h3,
html[data-theme="dark"] .kd-order-main h3 {
    color: #f8fafc;
}

.kd-order-main p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

body.dark-mode .kd-order-main p,
html[data-theme="dark"] .kd-order-main p {
    color: #cbd5e1;
}

.kd-order-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.kd-order-details div {
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
}

body.dark-mode .kd-order-details div,
html[data-theme="dark"] .kd-order-details div {
    background: #111827;
}

.kd-order-details span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

body.dark-mode .kd-order-details span,
html[data-theme="dark"] .kd-order-details span {
    color: #94a3b8;
}

.kd-order-details strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
    word-break: break-word;
}

body.dark-mode .kd-order-details strong,
html[data-theme="dark"] .kd-order-details strong {
    color: #f8fafc;
}

.kd-status-pill {
    display: inline-flex;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    font-size: 11px !important;
    font-weight: 950;
    white-space: nowrap;
}

.kd-status-pill.success {
    background: #dcfce7;
    color: #166534 !important;
}

.kd-status-pill.processing {
    background: #dbeafe;
    color: #1d4ed8 !important;
}

.kd-status-pill.progress {
    background: #ede9fe;
    color: #6d28d9 !important;
}

.kd-status-pill.pending {
    background: #fef3c7;
    color: #92400e !important;
}

.kd-status-pill.danger {
    background: #fee2e2;
    color: #991b1b !important;
}

.kd-order-actions a {
    height: 42px;
    padding: 0 14px;
    border-radius: 15px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 950;
    font-size: 13px;
    transition: .2s ease;
}

.kd-order-actions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(37, 99, 235, .28);
}

.kd-orders-empty {
    padding: 50px 22px;
    text-align: center;
}

.kd-orders-empty i {
    width: 78px;
    height: 78px;
    border-radius: 26px;
    background: #eff6ff;
    color: #2563eb;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    font-size: 30px;
}

.kd-orders-empty h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 25px;
    font-weight: 950;
}

body.dark-mode .kd-orders-empty h3,
html[data-theme="dark"] .kd-orders-empty h3 {
    color: #f8fafc;
}

.kd-orders-empty p {
    margin: 0;
    color: #64748b;
    font-weight: 800;
}

body.dark-mode .kd-orders-empty p,
html[data-theme="dark"] .kd-orders-empty p {
    color: #cbd5e1;
}

.kd-orders-pagination {
    padding: 18px 22px;
}

@keyframes kdOrderDrop {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1080px) {
    .kd-order-row {
        grid-template-columns: 1fr;
    }

    .kd-order-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kd-order-actions a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 820px) {
    .kd-orders-filter-form {
        grid-template-columns: 1fr;
    }

    .kd-status-select-panel {
        position: absolute;
    }

    .kd-orders-clear {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .kd-orders-page {
        padding: 18px 12px;
    }

    .kd-orders-hero,
    .kd-orders-filter-card,
    .kd-orders-card {
        border-radius: 22px;
    }

    .kd-orders-hero {
        padding: 24px;
    }

    .kd-order-row {
        padding: 18px;
    }

    .kd-order-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .kd-order-details div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 52px;
    }

    .kd-order-details span {
        margin: 0;
        flex: 0 0 42%;
    }

    .kd-order-details strong {
        text-align: right;
        font-size: 12.5px;
    }
}

@media (max-width: 420px) {
    .kd-orders-hero h1 {
        font-size: 32px;
    }

    .kd-orders-search input,
    .kd-status-select-btn {
        height: 54px;
        font-size: 13px;
    }

    .kd-order-main {
        align-items: flex-start;
    }

    .kd-order-main h3 {
        font-size: 15px;
    }

    .kd-order-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}