/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: #f0f2f5; /* Lighter background */
    color: #1e293b;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.page-header {
    background: white;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-content {
    width: 100%;
    max-width: 900px; /* Match main content width */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e293b;
}

/* Main Content */
.main-content {
    flex: 1; /* Takes available space */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top */
    padding: 2rem;
}

.order-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 700px; /* Max width for the form */
}

/* Form Styles (reused from admin-styles.css) */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem; /* Add margin bottom for spacing */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
    color: #334155;
    background-color: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* File Upload (reused from admin-styles.css) */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fdfdfe;
}

.file-upload-area:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.file-upload-area.dragover {
    border-color: #2563eb;
    background: #e0e7ff;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: #64748b;
}

.upload-placeholder svg {
    color: #94a3b8;
    width: 40px;
    height: 40px;
}

.upload-placeholder p {
    font-weight: 500;
    font-size: 1rem;
}

.upload-placeholder span {
    font-size: 0.85rem;
    color: #94a3b8;
}

.uploaded-files {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.uploaded-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #334155;
    position: relative;
    max-width: 120px;
}

.uploaded-file img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Buttons (reused from admin-styles.css) */
.btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    width: 100%; /* Full width button */
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Add to order.css or inside a <style> tag */
.btn.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn.btn-primary .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid #fff;
    border-top: 2.5px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Styles (reused from admin-styles.css) */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.notification.success {
    background: #10b981;
}
.notification.error {
    background: #ef4444;
}
.notification.warning {
    background: #f59e0b;
}
.notification.info {
    background: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 1rem;
    }

    .order-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr; /* Stack form groups in rows */
        gap: 1rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 0.8rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .order-card {
        padding: 1rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
    }
    .file-upload-area {
        padding: 1.5rem;
    }
}
