.ess-dashboard,
.ess-tracking,
.ess-admin {
    direction: rtl;
}

.ess-panel,
.ess-admin-card {
    padding: 22px;
    border: 1px solid rgba(5, 19, 13, 0.1);
    border-radius: 8px;
    background: #fff;
}

.ess-dashboard-head {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 22px;
    border-radius: 8px;
    background: #102319;
    color: #fff;
}

.ess-dashboard-head h2 {
    margin: 0;
    color: #fff;
}

.ess-dashboard-head span,
.ess-totals strong {
    color: #d4af37;
    font-weight: 900;
}

.ess-btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: #d4af37;
    color: #07140e !important;
    font-weight: 900;
    text-decoration: none !important;
    cursor: pointer;
}

.ess-btn-secondary {
    margin-inline-start: 8px;
    background: #102319;
    color: #fff !important;
}

.ess-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #e7f6ec;
    color: #11622d;
    font-weight: 800;
}

.ess-alert-error {
    background: #fff1f1;
    color: #a40019;
}

.ess-totals {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.ess-totals div {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(5, 19, 13, 0.1);
    border-radius: 8px;
    background: #fff;
}

.ess-totals strong,
.ess-totals span {
    display: block;
}

.ess-totals strong {
    overflow-wrap: anywhere;
    font-size: 24px;
}

.ess-totals span,
.ess-muted {
    color: #63716a;
}

.ess-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.ess-grid-bottom {
    margin-top: 20px;
}

.ess-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ess-one-col {
    grid-template-columns: 1fr;
}

.ess-form-grid label,
.ess-track-form label {
    display: grid;
    gap: 7px;
    color: #152018;
    font-weight: 800;
}

.ess-form-grid input,
.ess-form-grid select,
.ess-form-grid textarea,
.ess-track-form input,
.ess-track-form select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid rgba(5, 19, 13, 0.18);
    border-radius: 6px;
    background: #fff;
}

.ess-full {
    grid-column: 1 / -1;
}

.ess-check {
    display: flex !important;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.ess-check input {
    width: 18px;
    min-height: 18px;
}

.ess-track-form {
    display: grid;
    gap: 10px;
}

.ess-track-form div {
    display: flex;
    gap: 10px;
}

.ess-table-wrap {
    overflow-x: auto;
}

.ess-admin-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.ess-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.ess-table th,
.ess-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(5, 19, 13, 0.1);
    text-align: right;
}

.ess-table th {
    background: #f4f6f3;
}

.ess-status {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff7df;
    color: #73520b;
    font-size: 13px;
    font-weight: 900;
}

.ess-status-delivered {
    background: #dcfce7;
    color: #166534;
}

.ess-timeline {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.ess-timeline div {
    position: relative;
    padding: 0 28px 0 0;
}

.ess-timeline div:before {
    content: "";
    position: absolute;
    right: 0;
    top: 7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d4af37;
}

.ess-timeline strong,
.ess-timeline span,
.ess-timeline small {
    display: block;
}

.ess-timeline span,
.ess-timeline small {
    color: #63716a;
}

.ess-admin-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.ess-admin-filter input,
.ess-admin-filter select,
.ess-admin-filter button {
    max-width: 100%;
}

.ess-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ess-shipment-title {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.ess-shipment-title strong {
    display: block;
}

.ess-edit-under-title {
    width: fit-content;
}

.ess-no-edit {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 6px;
    background: #f1f3f2;
    color: #63716a;
    font-weight: 800;
}

@media screen and (max-width: 991px) {
    .ess-totals,
    .ess-grid,
    .ess-form-grid {
        grid-template-columns: 1fr;
    }

    .ess-dashboard-head,
    .ess-track-form div,
    .ess-admin-filter,
    .ess-inline-form {
        display: grid;
    }
}

@media screen and (max-width: 600px) {
    .ess-dashboard,
    .ess-tracking,
    .ess-admin {
        max-width: 100%;
    }

    .ess-panel,
    .ess-admin-card,
    .ess-dashboard-head,
    .ess-totals div {
        padding: 14px;
    }

    .ess-totals {
        gap: 10px;
    }

    .ess-totals strong {
        font-size: 20px;
    }

    .ess-admin-filter input,
    .ess-admin-filter select,
    .ess-admin-filter button,
    .ess-inline-form select,
    .ess-inline-form button {
        width: 100%;
    }

    .ess-admin-table-wrap {
        overflow-x: visible;
    }

    .ess-admin-table,
    .ess-admin-table thead,
    .ess-admin-table tbody,
    .ess-admin-table tr,
    .ess-admin-table th,
    .ess-admin-table td,
    .ess-table,
    .ess-table thead,
    .ess-table tbody,
    .ess-table tr,
    .ess-table th,
    .ess-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .ess-admin-table thead,
    .ess-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .ess-admin-table tr,
    .ess-table tr {
        margin-bottom: 12px;
        border: 1px solid rgba(5, 19, 13, 0.1);
        border-radius: 8px;
        background: #fff;
    }

    .ess-admin-table td,
    .ess-table td {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(5, 19, 13, 0.08);
        white-space: normal;
        word-break: break-word;
    }

    .ess-admin-table td:last-child,
    .ess-table td:last-child {
        border-bottom: 0;
    }

    .ess-track-form div {
        gap: 8px;
    }

    .ess-btn,
    .ess-btn-secondary {
        width: 100%;
        margin-inline-start: 0;
    }
}
