* {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
  }

.OPbody {
    min-height: 100vh;
    background: #fef8e4;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal scrolling only */
    position: relative; /* Ensure proper positioning context */
  }

  .OPcontainer {
    display: flex;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0; /* Remove margin to prevent overflow */
    padding: 15px; /* Use padding instead of margin */
}

/* Sticky positioning for desktop */
@media (min-width: 1025px) {
    .OPbody {
        height: 100vh;
        overflow: hidden;
    }
    
    .OPcontainer {
        align-items: flex-start;
        position: relative;
        height: 100vh;
        overflow: hidden;
    }
    
    .OPpreview-container {
        position: sticky;
        top: 15px;
        height: calc(100vh - 30px);
        overflow-y: auto;
        align-self: flex-start;
        z-index: 10;
    }
    
    /* Ensure OR menu bar is also sticky */
    .ORmenu-bar {
        position: sticky;
        top: 15px;
        height: calc(100vh - 30px);
        align-self: flex-start;
        z-index: 10;
    }
    
    .OPcontent {
        flex: 1;
        overflow-y: auto;
        max-height: calc(100vh - 30px);
        padding-right: 10px; /* Add some padding to prevent content from touching the sticky sidebar */
    }
  }

.OPcontent {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Filter Container */
.OPfilter-container {
    background-color: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.OPfilter-container h3 {
    color: #5b4a33;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.OPfilter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.OPfilter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.OPfilter-group label {
    font-weight: 600;
    color: #5b4a33;
    font-size: 0.9rem;
}

.OPfilter-select,
.OPfilter-input,
.OPfilter-date {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s ease;
}

.OPfilter-select:focus,
.OPfilter-input:focus,
.OPfilter-date:focus {
    outline: none;
    border-color: #6F4F37;
    box-shadow: 0 0 0 3px rgba(111, 79, 55, 0.1);
}

.OPfilter-input::placeholder {
    color: #999;
}

.OPclear-filters {
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.OPclear-filters:hover {
    background-color: #c82333;
}

.OPresults-count {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6F4F37;
}

/* No Orders Message */
.OPno-orders {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.OPno-orders p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Order Container */
.OPorder-container {
    position: relative; /* enable absolute positioning inside */
    flex: content;
    height: fit-content;
    background-color: #fff; /* match ordering page */
    border-radius: 15px;
    padding: 12px;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.OPorder-container::before {
    content: "Your Orders";
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: #6F4F37;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #6F4F37;
}

.OPorder-details {
    display: flex;
    flex-direction: column;
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.OPorder-details h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #5b4a33;
}

.OPorder-details img {
    max-width: 100px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 2px solid #ab9679;
}

.OPorder-info{
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.OPdetails-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: #5b4a33;
    padding: 6px 0px 0px 15px;
}

.OPdetails-list b {
    color: #5b4a33;
}

/* Status Styling */
.OPstatus {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Order Status Badge Styling - New class to avoid conflicts */
.order-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

/* Order Status Colors - Clean implementation without conflicts */
.order-status-badge.order-confirmed {
    background-color: #17a2b8;
    color: #fff;
    border: 1px solid #138496;
}

.order-status-badge.preparing {
    background-color: #fd7e14;
    color: #fff;
    border: 1px solid #e55a00;
}

.order-status-badge.almost-done {
    background-color: #fd7e14;
    color: #fff;
    border: 1px solid #e55a00;
}

.order-status-badge.ready-for-pickup {
    background-color: #28a745;
    color: #fff;
    border: 1px solid #1e7e34;
}

.order-status-badge.picked-up {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #5a6268;
}

.order-status-badge.cancelled {
    background-color: #dc3545;
    color: #fff;
    border: 1px solid #c82333;
}

.order-status-badge.unknown {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #5a6268;
}

.OPstatus.pending {
    background-color: #ffc107;
    color: #000;
    border: 1px solid #e0a800;
}

.OPstatus.confirmed {
    background-color: #17a2b8;
    color: #fff;
}

.OPstatus.preparing {
    background-color: #fd7e14;
    color: #fff;
}

.OPstatus.ready {
    background-color: #28a745;
    color: #fff;
}

.OPstatus.completed {
    background-color: #6c757d;
    color: #fff;
}

.OPstatus.paid {
    background-color: #28a745;
    color: #fff;
}

.OPstatus.cancelled {
    background-color: #dc3545;
    color: #fff;
    border: 1px solid #c82333;
}

.OPstatus.not-yet-paid {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #5a6268;
}

.OPstatus.order-received {
    background-color: #17a2b8;
    color: #fff;
    border: 1px solid #138496;
}

.OPstatus.order-confirmed {
    background-color: #17a2b8;
    color: #fff;
    border: 1px solid #138496;
}

.OPstatus.almost-done {
    background-color: #fd7e14;
    color: #fff;
    border: 1px solid #e55a00;
}

.OPstatus.ready-for-pickup {
    background-color: #28a745;
    color: #fff;
    border: 1px solid #1e7e34;
}

.OPstatus.picked-up {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #5a6268;
}

.OPstatus.unknown {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #5a6268;
}

/* Removed duplicate status variations - using the ones defined earlier */

.OPview-details {
    position: absolute;
    bottom: 15px;   /* distance from bottom */
    right: 20px;    /* distance from right */
    padding: 6px 16px;
    background: #6F4F37;
    color: #ffffff;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.OPview-details:hover {
    background: #946e50;
}

/* Order Preview */
.OPpreview-container{
    width: 25%;
    min-width: 260px;
    height: 100%;
    flex-shrink: 0;
  
    /* menu-bar visual language */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  
    /* layout */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* content flows top -> bottom */
    padding: 20px;
    box-sizing: border-box;
    gap: 12px;
}

.OPorder-preview {
    height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.OPorder-preview h2{
    padding: 0;
    display: flex;
    justify-items: center;
}

.OPpreview-button {
    padding: 10px 20px;
    background-color: #ab9679;
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: flex-end;
}

.OPpreview-button:hover {
    background-color: #946e50;
}

/* Preview Content Styles */
.OPpreview-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.OPpreview-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6F4F37;
}

.OPpreview-section h3 {
    color: #6F4F37;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.OPpreview-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.OPinfo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.OPlabel {
    font-weight: 600;
    color: #5b4a33;
    font-size: 0.9rem;
}

.OPvalue {
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Removed conflicting general .OPstatus rule that was overriding specific status colors */

.OPtotal {
    color: #6F4F37;
    font-weight: 700;
    font-size: 1rem;
}

/* Items List */
.OPitems-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.OPitem-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.OPitem-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.OPitem-name {
    font-weight: 600;
    color: #5b4a33;
    font-size: 0.9rem;
}

.OPitem-details {
    color: #666;
    font-size: 0.8rem;
}

.OPitem-total {
    color: #6F4F37;
    font-weight: 600;
    font-size: 0.9rem;
}

/* QR Code Section */
.OPqr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #6F4F37;
    box-shadow: 0 4px 15px rgba(111, 79, 55, 0.1);
}

.OPqr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.OPqr-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    background: white;
}

.OPqr-loading {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.OPqr-loading p {
    color: #6F4F37;
    font-size: 0.8rem;
    text-align: center;
    margin: 0;
}

.OPqr-error {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8d7da;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

.OPqr-error p {
    color: #721c24;
    font-size: 0.8rem;
    text-align: center;
    margin: 0;
}

.OPqr-info {
    text-align: center;
    color: #5b4a33;
}

.OPqr-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #6F4F37;
}

.OPqr-order-id {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #5b4a33;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #6F4F37;
}

/* Download QR Code Button */
.OPdownload-qr-btn {
    background: #6F4F37;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(111, 79, 55, 0.2);
}

.OPdownload-qr-btn:hover:not(:disabled) {
    background: #5a3d2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 79, 55, 0.3);
}

.OPdownload-qr-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(111, 79, 55, 0.3);
}

.OPdownload-qr-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.OPdownload-qr-btn i {
    font-size: 0.9rem;
}

/* Preview Actions */
.OPpreview-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.OPclose-button {
    padding: 10px 20px;
    background-color: #dc3545;
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.OPclose-button:hover {
    background-color: #c82333;
}

/* Empty State */
.OPpreview-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
}

/* Tablets (≤ 1024px) */
@media (max-width: 1024px) {
    .OPcontainer {
      flex-direction: column;
      height: auto;
    }
  
    .OPcontent {
      flex-direction: column;
      padding: 15px;
    }
  
    .OPpreview-container {
      width: 100%;
      min-width: unset;
      height: auto;
      margin-top: 15px;
      position: static; /* Override sticky positioning on tablets */
    }
    
    .ORmenu-bar {
      position: static; /* Override sticky positioning on tablets */
      height: auto;
    }

    .OPfilter-grid {
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .OPfilter-section {
      padding: 15px;
      margin-bottom: 15px;
    }
    
    .OPfilter-controls {
      gap: 15px;
      margin-bottom: 15px;
    }
    
    .OPfilter-group {
      min-width: 150px;
    }
    
    .OPfilter-select {
      padding: 9px 11px;
      font-size: 13px;
    }
    
    .OPclear-filters {
      padding: 9px 18px;
      font-size: 13px;
    }
  }
  
  /* Mobile (≤ 768px) */
  @media (max-width: 768px) {
    .OPcontainer {
      padding: 8px;
    }
    
    .OPcontent {
      padding: 10px;
    }
    
    .OPfilter-grid {
      grid-template-columns: 1fr;
    }

    .OPfilter-container {
      padding: 10px;
      margin-bottom: 10px;
    }
    
    .OPfilter-section {
      padding: 12px;
      margin-bottom: 12px;
      border-radius: 15px;
    }
    
    .OPsearch-container {
      margin-bottom: 12px;
    }
    
    .OPsearch-input {
      padding: 10px 14px;
      font-size: 14px;
      border-radius: 10px;
    }
    
    .OPfilter-controls {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 12px;
    }
    
    .OPfilter-group {
      min-width: unset;
      width: 100%;
    }
    
    .OPfilter-group label {
      font-size: 13px;
      margin-bottom: 4px;
    }
    
    .OPfilter-select {
      padding: 10px 12px;
      font-size: 14px;
      border-radius: 8px;
      width: 100%;
    }
    
    .OPclear-filters {
      padding: 10px 16px;
      font-size: 14px;
      border-radius: 8px;
      width: 100%;
      margin-top: 8px;
    }
    
    .OPresults-count {
      font-size: 0.8rem;
      padding: 8px;
      text-align: center;
      background-color: #f8f9fa;
      border-radius: 8px;
      border-left: 3px solid #6F4F37;
    }

    .OPorder-details {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      margin: auto;
      padding: 8px;
    }
    
    .OPorder-details h2 {
      font-size: 1rem;
      margin-bottom: 8px;
    }
  
    .OPorder-info {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 8px 0;
    }
  
    .OPdetails-list {
      font-size: 0.8rem;
      margin: 8px 0;
      text-align: center;
      gap: 4px;
    }
  
    .OPview-details {
      position: static;
      margin-top: 10px;
      align-self: center;
      padding: 6px 12px;
      font-size: 0.8rem;
    }

    /* QR Code Mobile Styles */
    .OPqr-container {
      padding: 10px;
      gap: 8px;
    }

    .OPqr-image {
      width: 80px;
      height: 80px;
    }

    .OPqr-label {
      font-size: 0.7rem;
    }

    .OPqr-order-id {
      font-size: 0.8rem;
      padding: 4px 8px;
    }

    .OPdownload-qr-btn {
      padding: 6px 10px;
      font-size: 0.7rem;
      margin-top: 8px;
      max-width: 150px;
    }

    /* Preview Actions Mobile */
    .OPpreview-actions {
      flex-direction: column;
      gap: 6px;
    }

    .OPpreview-button,
    .OPclose-button {
      width: 100%;
      padding: 8px 16px;
      font-size: 0.8rem;
    }
    
    /* Preview Content Mobile */
    .OPpreview-container {
      padding: 10px;
    }
    
    .OPpreview-section {
      margin-bottom: 12px;
      padding: 8px;
    }
    
    .OPpreview-section h3 {
      font-size: 0.9rem;
      margin: 0 0 8px 0;
    }
    
    .OPinfo-row {
      padding: 4px 0;
    }
    
    .OPlabel {
      font-size: 0.8rem;
    }
    
    .OPvalue {
      font-size: 0.8rem;
    }
    
    .OPitem-row {
      padding: 6px;
    }
    
    .OPitem-name {
      font-size: 0.8rem;
    }
    
    .OPitem-details {
      font-size: 0.7rem;
    }
    
    .OPitem-total {
      font-size: 0.8rem;
    }
    
    /* Pagination Mobile */
    .OPpagination {
      gap: 12px;
      margin-top: 12px;
      padding: 10px;
    }
    
    .OPpagination-btn {
      padding: 8px 14px;
      font-size: 0.85rem;
    }
    
    .OPpagination-info {
      font-size: 0.85rem;
    }
  }
  
  
  /* Small Mobile (≤ 480px) */
  @media (max-width: 480px) {
    .OPcontainer {
      margin: 4px;
      padding: 4px;
    }
    
    .OPcontent {
      padding: 6px;
    }
  
    .OPfilter-container {
      padding: 8px;
      margin-bottom: 8px;
    }
    
    .OPfilter-section {
      padding: 10px;
      margin-bottom: 10px;
      border-radius: 12px;
    }
    
    .OPsearch-input {
      padding: 8px 12px;
      font-size: 14px;
      border-radius: 8px;
    }
    
    .OPfilter-controls {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 10px;
    }
    
    .OPfilter-group {
      min-width: unset;
      width: 100%;
    }
    
    .OPfilter-group label {
      font-size: 12px;
      margin-bottom: 3px;
    }
    
    .OPfilter-select {
      padding: 8px 10px;
      font-size: 13px;
      border-radius: 6px;
      width: 100%;
    }
    
    .OPclear-filters {
      padding: 8px 14px;
      font-size: 13px;
      border-radius: 6px;
      width: 100%;
      margin-top: 6px;
    }
    
    .OPresults-count {
      font-size: 0.7rem;
      padding: 6px;
      text-align: center;
      background-color: #f8f9fa;
      border-radius: 6px;
      border-left: 2px solid #6F4F37;
    }
  
    .OPorder-container {
      padding: 6px;
    }
    
    .OPorder-details {
      padding: 6px;
    }
  
    .OPorder-details h2 {
      font-size: 0.9rem;
      margin-bottom: 6px;
    }
    
    .OPdetails-list {
      font-size: 0.75rem;
      margin: 6px 0;
      gap: 3px;
    }
  
    .OPview-details {
      width: 100%;
      text-align: center;
      padding: 5px 10px;
      font-size: 0.75rem;
      margin-top: 8px;
    }
  
    .OPpreview-container {
      padding: 6px;
    }
    
    .OPpreview-section {
      margin-bottom: 8px;
      padding: 6px;
    }
    
    .OPpreview-section h3 {
      font-size: 0.8rem;
      margin: 0 0 6px 0;
    }
    
    .OPinfo-row {
      padding: 3px 0;
    }
    
    .OPlabel {
      font-size: 0.75rem;
    }
    
    .OPvalue {
      font-size: 0.75rem;
    }
    
    .OPitem-row {
      padding: 4px;
    }
    
    .OPitem-name {
      font-size: 0.75rem;
    }
    
    .OPitem-details {
      font-size: 0.65rem;
    }
    
    .OPitem-total {
      font-size: 0.75rem;
    }
    
    .OPqr-container {
      padding: 6px;
      gap: 6px;
    }
    
    .OPqr-image {
      width: 60px;
      height: 60px;
    }
    
    .OPqr-label {
      font-size: 0.65rem;
    }
    
    .OPqr-order-id {
      font-size: 0.7rem;
      padding: 3px 6px;
    }
    
    .OPdownload-qr-btn {
      padding: 4px 8px;
      font-size: 0.65rem;
      margin-top: 6px;
      max-width: 120px;
    }
    
    .OPpreview-button,
    .OPclose-button {
      padding: 6px 12px;
      font-size: 0.75rem;
    }
    
    /* Pagination Mobile */
    .OPpagination {
      gap: 10px;
      margin-top: 10px;
      padding: 8px;
    }
    
    .OPpagination-btn {
      padding: 6px 12px;
      font-size: 0.8rem;
    }
    
    .OPpagination-info {
      font-size: 0.8rem;
    }

    .OPfilter-select,
    .OPfilter-input,
    .OPfilter-date {
      font-size: 16px; /* Prevent zoom on iOS */
    }
  }

/* Order Details Modal Styles */
.order-details-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.order-details-modal {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #6F4F37, #8B5A3C);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-content {
    padding: 25px;
}

.order-info-section,
.customer-info-section,
.items-section {
    margin-bottom: 30px;
}

.order-info-section h3,
.customer-info-section h3,
.items-section h3 {
    color: #5b4a33;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #6F4F37;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f8f8;
    border-radius: 10px;
    border-left: 4px solid #6F4F37;
}

.info-item .label {
    font-weight: 600;
    color: #5b4a33;
}

.info-item .value {
    color: #333;
    font-weight: 500;
}

.info-item .value.status {
    background: #ffa500;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.info-item .value.total {
    color: #6F4F37;
    font-weight: 700;
    font-size: 1.1rem;
}

.items-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: #6F4F37;
    color: white;
    font-weight: 600;
    padding: 15px;
    text-align: center;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
    align-items: center;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:nth-child(even) {
    background: #f9f9f9;
}

.item-name {
    text-align: left;
    font-weight: 500;
    color: #5b4a33;
}

.quantity,
.price,
.total {
    font-weight: 500;
    color: #333;
}

.total {
    color: #6F4F37;
    font-weight: 600;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .order-details-modal {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .table-header span,
    .table-row span {
        padding: 5px;
        border-bottom: 1px solid #eee;
    }
    
    .table-header span:last-child,
    .table-row span:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .order-details-modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* New Filter Section Styles */
.OPfilter-section {
    background-color: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.OPsearch-container {
    margin-bottom: 20px;
}

.OPsearch-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s ease;
}

.OPsearch-input:focus {
    outline: none;
    border-color: #6F4F37;
    box-shadow: 0 0 0 3px rgba(111, 79, 55, 0.1);
}

.OPsearch-input::placeholder {
    color: #999;
}

.OPfilter-controls {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.OPfilter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.OPfilter-group label {
    font-weight: 600;
    color: #5b4a33;
    font-size: 14px;
}

.OPfilter-select {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.OPfilter-select:focus {
    outline: none;
    border-color: #6F4F37;
    box-shadow: 0 0 0 3px rgba(111, 79, 55, 0.1);
}

.OPclear-filters {
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
    height: fit-content;
}

.OPclear-filters:hover {
    background-color: #c82333;
}

.OPresults-count {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6F4F37;
}

/* Status Styling */
.OPstatus {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.OPstatus-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.OPstatus-in-progress {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.OPstatus-completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.OPstatus-paid {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.OPstatus-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Pagination Styles */
.OPpagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.OPpagination-btn {
    padding: 8px 16px;
    background: #6F4F37;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.OPpagination-btn:hover:not(:disabled) {
    background: #5a3f2a;
    transform: translateY(-2px);
}

.OPpagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.OPpagination-info {
    color: #5b4a33;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Print View Styles */
.OPprint-view {
  display: none;
}

@media print {
  /* Hide everything except print view */
  body * {
    visibility: hidden;
  }
  
  .OPprint-view,
  .OPprint-view * {
    visibility: visible;
  }
  
  .OPprint-view {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block !important;
  }
}

.OPprint-content {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.OPprint-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #6F4F37;
}

.OPprint-header h1 {
  font-size: 24px;
  font-weight: bold;
  color: #6F4F37;
  margin: 0 0 5px 0;
}

.OPprint-header p {
  font-size: 14px;
  color: #8B7355;
  margin: 0;
}

.OPprint-section {
  margin-bottom: 20px;
}

.OPprint-section h2 {
  font-size: 18px;
  font-weight: bold;
  color: #6F4F37;
  margin: 0 0 15px 0;
}

.OPprint-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
}

.OPprint-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.OPprint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

.OPprint-label {
  font-weight: 600;
  color: #6F4F37;
  font-size: 14px;
}

.OPprint-value {
  color: #333;
  font-size: 14px;
}

.OPprint-status {
  background: #d4edda;
  color: #155724;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* Print status specific colors */
.OPprint-status.paid {
  background: #d4edda;
  color: #155724;
}

.OPprint-status.pending {
  background: #fff3cd;
  color: #856404;
}

.OPprint-status.cancelled {
  background: #f8d7da;
  color: #721c24;
}

.OPprint-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.OPprint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.OPprint-item:last-child {
  border-bottom: none;
}

.OPprint-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.OPprint-item-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.OPprint-item-details {
  font-size: 12px;
  color: #666;
}

.OPprint-item-total {
  font-weight: 600;
  color: #6F4F37;
  font-size: 14px;
}

.OPprint-total {
  margin: 20px 0;
  padding: 15px 0;
  border-top: 2px solid #6F4F37;
  border-bottom: 2px solid #6F4F37;
}

.OPprint-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.OPprint-total-label {
  font-size: 16px;
  font-weight: bold;
  color: #6F4F37;
}

.OPprint-total-value {
  font-size: 18px;
  font-weight: bold;
  color: #6F4F37;
}

.OPprint-qr {
  text-align: center;
  margin: 25px 0;
}

.OPprint-qr h3 {
  margin-bottom: 15px;
  color: #6F4F37;
}

.OPprint-qr-container {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.OPprint-qr-text {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.OPprint-qr-security {
  font-size: 10px;
  color: #8B7355;
  margin: 5px 0 0 0;
  font-weight: 500;
}

.OPprint-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.OPprint-footer p {
  margin: 5px 0;
  font-size: 12px;
  color: #666;
}

.OPprint-footer p:first-child {
  font-weight: 600;
  color: #6F4F37;
}

/* Extra Items Styles for Print View */
.OPprint-item-extras {
    margin-top: 4px;
    padding-left: 10px;
    border-left: 1px solid #6F4F37;
}

.OPprint-extras-label {
    font-size: 0.75rem;
    color: #6F4F37;
    font-weight: 600;
    margin-bottom: 2px;
}

.OPprint-extra-detail {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 1px;
    display: block;
}

.OPprint-extra-request {
    font-size: 0.7rem;
    color: #666;
    font-style: italic;
    margin-top: 2px;
}