nav {
    position: relative !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    background: white;
    z-index: 10;
}

.page-container {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
    min-height: 80vh;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.refresh-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

/* PREMIUM ORDER CARD */
.order-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    /* Soft premium shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: #e0e0e0;
}

/* Status Strip (Left Accent) */
.order-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #e0e0e0;
    /* Default */
    transition: background 0.3s;
}

/* Status Colors for Strip */
.order-card[data-status="uploaded"]::before {
    background: #f59e0b;
}

.order-card[data-status="printing"]::before {
    background: #3b82f6;
}

.order-card[data-status="printed"]::before {
    background: #c64cff;
}

.order-card[data-status="ready"]::before {
    background: #ff8a3c;
}

.order-card[data-status="delivered"]::before {
    background: #10b981;
}

.order-card[data-status="cancelled"]::before {
    background: #ef4444;
}

.order-card[data-status="failed"]::before {
    background: #222222;
}


/* ============================
   CARD HEADER
   ============================ */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    /* Spacing from body */
}

/* MODERN STATUS BADGE */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #f3f4f6;
    color: #4b5563;
}

/* Badge Colors */
.status-uploading {
    background: #fff7ed;
    color: #c2410c;
}

.status-uploaded {
    background: #ffedd5;
    color: #9a3412;
}

.status-focused,
.status-placed {
    background: #eff6ff;
    color: #1e40af;
}

.status-printed {
    background: #f4daff;
    color: #c64cff;
}

.status-printing {
    background: #e0f2fe;
    color: #0284c7;
    animation: pulse 2s infinite;
}

.status-ready {
    background: #ffcc9dc5;
    color: #ff8a3c;
}

.status-delivered {
    background: #b7fcd8;
    color: #047857;
}

.status-failed {
    background: #747474;
    color: #313131;
}

.status-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

/* Order ID (Top Right) */
.order-id {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: -0.5px;
}

/* ============================
   PROGRESS TRACK (4 Steps)
   ============================ */
.progress-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 4px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e5e7eb;
    transition: background-color 0.3s ease;
}

.step-dot.active {
    background-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Connecting lines */
.step-line {
    flex-grow: 1;
    height: 3px;
    background-color: #e5e7eb;
    margin: 0 4px;
    border-radius: 2px;
}

.step-line.active {
    background-color: #10b981;
}


/* ============================
   CARD BODY (Information)
   ============================ */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

/* Primary Stats: File/Page Counts */
.stats-primary {
    font-size: 1.0rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    letter-spacing: -0.02em;
}

.divider {
    color: #e5e7eb;
    font-weight: 300;
}

.divider2 {
    color: #8c00ff;
    font-weight: 600;
}

/* Secondary Stats: Attributes */
.stats-secondary {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}


/* ============================
   CARD FOOTER
   ============================ */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px dashed #e5e7eb;
    /* Subtle separation */
}

.time-info {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 500;
}

.time-muted {
    opacity: 0.6;
    font-size: 1em;
    margin-left: 6px;
}

.cost-info {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    background: -webkit-linear-gradient(45deg, #8c00ff, #da0a72);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-cancel {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #ef4444;
    color: white;
}


@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .orders-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================
   CUSTOM CONFIRM MODAL (Branded Light)
   ============================ */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Lighter backdrop */
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    width: 90%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(140, 0, 255, 0.15);
    /* Brand shadow hint */
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Poppins', sans-serif;
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    outline: none;
}

.modal-close-btn:hover {
    color: #da0a72;
    /* Brand accent hover */
}

.modal-body {
    padding: 30px 24px;
    text-align: center;
    /* Centered look for better focus */
}

.warning-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffeeee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.warning-icon i {
    color: #ef4444;
    /* Danger Red */
    font-size: 1.8rem;
}

.modal-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-title-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a1a1a;
    margin: 0;
}

.modal-sub-text {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.modal-footer {
    padding: 20px 24px;
    background: #fcfcfc;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    /* Centered buttons */
    gap: 15px;
}

.btn-modal {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    min-width: 100px;
}

.btn-secondary {
    background: white;
    color: #555;
    border: 1px solid #d1d1d1;
}

.btn-secondary:hover {
    background: #f3f3f3;
    color: #333;
    border-color: #bbb;
}

.btn-danger {
    background: #da0a72;
    /* Brand secondary/danger */
    color: white;
    border: 1px solid #c20965;
    box-shadow: 0 4px 12px rgba(218, 10, 114, 0.2);
}

.btn-danger:hover {
    background: #b90861;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(218, 10, 114, 0.3);
}

/* ============================
   CUSTOM TOAST (Top Positioned)
   ============================ */
.custom-toast {
    position: fixed;
    top: 30px;
    /* Moved to TOP */
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    /* Center horizontally, start slightly up */
    background: white;
    border-left: 5px solid;
    /* Colored strip based on type */
    border-radius: 8px;
    padding: 16px 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    z-index: 10000;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy enter */
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

/* Dynamic Border Colors */
.toast-success-border {
    border-color: #10b981;
}

.toast-loading-border {
    border-color: #8c00ff;
}

.toast-error-border {
    border-color: #ef4444;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-icon-success {
    color: #10b981;
    font-size: 1.3rem;
}

.toast-spinner {
    color: #8c00ff;
    /* Brand Primary */
    font-size: 1.3rem;
    animation: fa-spin 1s infinite linear;
}

.toast-content span {
    white-space: nowrap;
}