/* --- Base Profile Container & Layout --- */
.profile-container {
    max-width: 900px; /* Adjusted slightly for more content */
    margin: 40px auto;
    padding: 35px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.08); /* Kept original shadow */
    font-family: "Spartan", sans-serif;Okay, this is your ` /* Ensure font is consistent */
}

/* --- Profile Header --- */
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: #1815be; /* Your brand color */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: #fff; /* Changed for contrast */
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
}
.profile-title h2 {
    margin: 0;
    color: #1815be; /* Your brand color */
    font-size: 1.8rem;
}
.profile-title p {
    color: #666;
    margin: 5px 0 0;
}

/* --- Profile Stats --- */
.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0 30px;
    padding: 15px 0;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* Added subtle shadow */
}
.stat-item {
    text-align: center;
    flex: 1; /* Distribute space evenly */
}
.stat-value {
    font-size: 1.8rem; /* Increased size */
    font-weight: bold;
    color: #1815be; /* Your brand color */
    margin-bottom: 5px;
}
.stat-label {
    font-size: 0.9rem;
    color: #777;
    text-transform: uppercase; /* Consistency */
    letter-spacing: 0.5px; /* Consistency */
}

/* --- Profile Details --- */
.profile-details {
    background-color: #fbfbfb; /* Lighter background */
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}
.profile-details h3 {
    color: #1815be; /* Your brand color */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem; /* Adjusted size */
    border-bottom: 1px solid #eee; /* Added border */
    padding-bottom: 10px;
}
.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px dashed #f0f0f0; /* Changed to dashed for subtle look */
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    width: 140px;
    color: #666;
    font-weight: 600;
}
.detail-value {
    flex: 1;
    color: #333;
}

/* --- Recent Orders --- */
.recent-orders {
    margin-top: 30px;
}
.recent-orders h3 {
    color: #1815be; /* Your brand color */
    margin-bottom: 15px;
    font-size: 1.5rem; /* Adjusted size */
    border-bottom: 1px solid #eee; /* Added border */
    padding-bottom: 10px;
}
.order-card {
    background-color: #fcfcfc; /* Lighter background for cards */
    border: 1px solid #e0e0e0; /* Subtle border */
    border-radius: 8px;
    padding: 20px; /* Increased padding */
    margin-bottom: 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s ease-in-out;
    display: flex; /* Make order-card a flex container */
    flex-direction: column; /* Stack children vertically */
}
.order-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}
.order-number {
    font-weight: bold;
    color: #1815be; /* Your brand color */
    font-size: 1.1em;
    margin-right: 10px; /* Space between order number and date */
}
.order-date {
    color: #777;
    font-size: 0.9em;
    white-space: nowrap; /* Prevent date from wrapping */
}

/* --- NEW STATUS BADGE STYLES (from order_completed.blade.php's CSS) --- */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.8em;
    font-size: 0.85em;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 0.5rem;
    color: #fff;
    text-transform: uppercase;
}

/* Specific colors for each status (copied from order_completed.blade.php's CSS) */
.status-paid { background-color: #28a745; } /* Green */
.status-due { background-color: #dc3545; } /* Red */
.status-pending { background-color: #007bff; } /* Blue */
.status-failed { background-color: #6c757d; } /* Gray for failed */
.status-cancelled { background-color: #6c757d; } /* Gray for cancelled */
.status-partial { background-color: #ffc107; color: #343a40; } /* Orange for partial */
.status-ordered { background-color: #17a2b8; } /* Teal (used for 'ordered' in switch) */
.status-unknown { background-color: #6f42c1; } /* Purple for unknown/default */


.order-details-row { /* New row for status and total */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px; /* Space from the next row */
    flex-wrap: wrap; /* Allow items to wrap */
}
.order-status { /* Specific class for the status badge in this row */
    margin-right: 10px; /* Space between status and total if on same line */
    margin-bottom: 5px; /* Space if wraps to new line */
}
.order-total {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
    white-space: nowrap; /* Prevent total from wrapping */
}

.order-footer {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px; /* Space between buttons */
    margin-top: auto; /* Push footer to the bottom of the card if content above varies */
    border-top: 1px dashed #eee;
    padding-top: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap to next line if space is tight */
}
.view-order-details, .pay-now-btn-small { /* Combined button styles */
    padding: 8px 15px;
    font-size: 0.85em;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap; /* Keep button text on one line */
    cursor: pointer;
    text-align: center;
    display: inline-block; /* Ensure it takes up space correctly */
    flex-shrink: 0; /* Prevent buttons from shrinking too much */
}
.view-order-details {
    background-color: #f8f8f8;
    color: #1815be; /* Your brand color */
    border: 1px solid #1815be; /* Your brand color */
}
.view-order-details:hover {
    background-color: #e8e8e8;
}

/* Specific styles for the "Pay Now" button on profile (smaller version) */
.pay-now-btn-small {
    background-color: #007bff; /* Blue */
    color: #fff;
    border: 1px solid #007bff;
}
.pay-now-btn-small:hover {
    background-color: #0056b3; /* Darker blue on hover */
    color: #fff;
}


/* --- Profile Actions (Logout) --- */
.profile-actions {
    text-align: right;
    margin-top: 30px;
}
/* Re-using your existing action-button styles */
.action-button {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}
.logout-button {
    background-color: #dc3545; /* Red for logout */
    color: white;
    border: none;
}
.logout-button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* --- General Alert Styling (reused from other pages) --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95em;
    border: 1px solid transparent; /* Ensure border exists */
}
.alert .icon {
    font-size: 1.8em;
}
.alert-success {
    background-color: #e6f7ee;
    color: #28a745;
    border-color: #d4edda;
}
.alert-success .icon { color: #28a745; }
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
.alert-danger .icon { color: #dc3545; }
.alert-info { /* Added for info alerts */
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}
.alert-info .icon { color: #007bff; }


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .profile-container {
        padding: 20px;
        margin: 20px auto;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .profile-stats {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .stat-item {
        width: 100%;
        text-align: center;
    }
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
    .profile-actions {
        flex-direction: column;
        gap: 15px;
    }
    .action-button {
        width: 100%;
        margin-left: 0 !important; /* Ensure full width */
        margin-right: 0 !important;
    }
    .order-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start; /* Align buttons to the left if column */
    }
    .view-order-details, .pay-now-btn-small {
        width: 100%;
        text-align: center;
    }
}