/* User Portal Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Template Selection */
.template-selection {
    margin: 30px 0;
}

.template-selection h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #333;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.template-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.template-preview {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-placeholder {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
}

.template-info {
    padding: 20px;
}

.template-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.company-name {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.template-description {
    color: #666;
    margin-bottom: 20px;
}

/* Builder Layout */
.builder-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }
}

.builder-form, .builder-preview {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.builder-preview {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.builder-preview h3 {
    margin-bottom: 20px;
    color: #333;
}

.card-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.preview-note {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e74c3c;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Preview Layout */
.preview-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .preview-layout {
        grid-template-columns: 1fr;
    }
}

.card-preview-section, .order-summary {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-preview-large {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.summary-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.summary-item .label {
    font-weight: 600;
    color: #666;
}

.summary-item .value {
    color: #333;
    text-align: right;
}

/* Success Page */
.success-message {
    background: white;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 800px;
    margin: 30px auto;
}

.success-icon {
    margin-bottom: 30px;
}

.success-message h2 {
    color: #4CAF50;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.order-info {
    margin: 30px 0;
}

.order-number {
    font-size: 1.3em;
    color: #667eea;
    margin: 20px 0;
}

.next-steps {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.next-steps h3 {
    margin-bottom: 15px;
    color: #333;
}

.next-steps ol {
    padding-left: 25px;
}

.next-steps li {
    margin: 10px 0;
    line-height: 1.8;
}

.important-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.important-note h4 {
    color: #856404;
    margin-bottom: 10px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}