.orders-page {
    padding: 24px;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.orders-subtitle {
    color: #777;
    margin-top: 4px;
}

.orders-actions {
    display: flex;
    gap: 12px;
}

.orders-search {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.btn-create-order {
    background: var(--light-green);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.orders-table-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.orders-table td {
    padding: 10px;
    border-bottom: 1px solid #f3f3f3;
    cursor: pointer;
}

.orders-table tr:hover {
    background: #f7f7f7;
}


/* Drawer */

.order-drawer {
    position: fixed;
    right: -520px;
    top: 0;
    width: 520px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.order-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid #eee;
}

.drawer-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.icon-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.drawer-body {
    padding: 12px 18px;
}

.drawer-section {
    margin-bottom: 14px;
}

.drawer-section label {
    font-size: 12px;
    color: #888;
}

.drawer-section p {
    margin-top: 4px;
    font-size: 14px;
}

.drawer-items-title {
    margin-top: 20px;
}

.drawer-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.drawer-items-table th,
.drawer-items-table td {
    padding: 10px 4px;
}

.drawer-items-table th {
    text-align: left;
    font-weight: 600;
}

.drawer-items-table td:nth-child(2),
.drawer-items-table th:nth-child(2) {
    text-align: center;
}

.drawer-items-table td:nth-child(3),
.drawer-items-table th:nth-child(3) {
    text-align: right;
}

.create-order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.45);

    justify-content: center;
    align-items: center;

    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 10px;
    width: 500px;

    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.order-modal-card {
    width: 520px;
}

.order-row {
    display: flex;
    gap: 12px;
}

.order-row div {
    flex: 1;
}

.order-item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.order-item-row select,
.order-item-row input {
    flex: 1;
}

.order-add-item {
    margin-top: 8px;
    margin-bottom: 14px;
    background: #e7e7e7;
}

.order-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 22px;
    cursor: pointer;
}

.order-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.order-form-row label {
    width: 160px;
    font-weight: 500;
}

.order-form-row input,
.order-form-row select {
    flex: 1;
}

.order-status {
    padding: 18px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-status label {
    display: block;
    font-size: 13px;
    color: #777;
    margin-bottom: 0;
}

.order-status select {
    width: 160px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.items-section {
    margin-top: 24px;
    padding: 18px;
    border-top: 1px solid #eee;
}

#items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

#items-table th,
#items-table td {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.item-controls {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.item-controls button {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    background: #e7e7e7;
    cursor: pointer;
}

#items-table input,
#items-table select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.update-col,
.update-cell {
    text-align: center;
}

#items-table button {
    padding: 4px 8px;
    border-radius: 4px;
    background: #eee;
}

#items-table.edit-mode td {
    background: #fafafa;
}

.drawer-meta {
    display: flex;
    gap: 18px;

    padding: 10px 18px;   /* reduced from ~16–18px */
    font-size: 15px;      /* slightly larger text */

    border-bottom: 1px solid #eee;
}

.drawer-meta span {
    white-space: nowrap;
}

.drawer-meta strong {
    font-weight: 600;
    margin-right: 6px;
}

.drawer-meta span {
    display: flex;
    align-items: left;
}