/* MRF Form - ASN Style Redesign */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    /* Colors matches ASN Design */
    --primary-color: #3498db; /* Blue for focus/active states */
    --success-gradient: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    --success-hover: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    
    --text-heading: #2C3E50;
    --text-body: #34495E;
    --text-light: #7f8c8d;
    
    --input-border: #D1D5DB;
    --input-focus-border: #3498DB;
    --input-bg: #ffffff;
    
    --bg-page: #f9f9f9;
    --bg-white: #ffffff;
    
    /* Shadows */
    --shadow-card: 0px 2px 8px rgba(0, 0, 0, 0.08), 0px 0px 50px rgba(52, 152, 219, 0.5); /* The Blue Glow */
    --shadow-input-focus: 0 0 0 3px rgba(52, 152, 219, 0.1);
    --shadow-btn: 0px 4px 12px rgba(46, 204, 113, 0.25);
    
    /* Spacing & Radius */
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

.mrf-form-wrapper {
    min-height: 100vh;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.mrf-form-container {
    width: 100%;
    max-width: 1000px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 40px;
    border: 1px solid #E8E8E8;
    position: relative;
}

/* Headers */
.mrf-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.mrf-logo h1 {
    font-family: 'Lexend', sans-serif;
    color: var(--text-heading);
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.mrf-subtitle {
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 400;
    margin: 0;
}

/* Sections */
.mrf-form-section {
    margin-bottom: 30px;
}

.mrf-form-section h3 {
    font-family: 'Lexend', sans-serif;
    color: var(--text-heading);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Grid Layout */
.mrf-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .mrf-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Form Fields */
.mrf-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mrf-form-field label {
    font-family: 'Poppins', sans-serif;
    color: var(--text-body);
    font-size: 14px;
    font-weight: 600;
}

.required {
    color: #e74c3c;
}

.mrf-form-field input[type="text"],
.mrf-form-field input[type="email"],
.mrf-form-field input[type="date"],
.mrf-form-field input[type="number"],
.mrf-form-field textarea,
.mrf-form-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--input-border);
    border-radius: 6px; /* Specific from ASN */
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-body);
    background: var(--input-bg);
    transition: all 0.2s ease;
}

.mrf-form-field input:focus,
.mrf-form-field textarea:focus,
.mrf-form-field select:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: var(--shadow-input-focus);
}

/* Material Search Select2 Override */
.select2-container--default .select2-selection--single {
    height: 44px !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 30px !important;
    color: var(--text-body) !important;
    font-family: 'Poppins', sans-serif !important;
}

.select2-dropdown {
    border: 1px solid var(--input-focus-border) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Tables */
.mrf-selected-parts h4 {
    font-family: 'Lexend', sans-serif;
    font-size: 18px;
    color: var(--text-heading);
    margin-bottom: 15px;
}

.mrf-parts-table-wrapper {
    border: 1px solid var(--input-border);
    border-radius: 8px;
    overflow: hidden;
}

.mrf-parts-table {
    width: 100%;
    border-collapse: collapse;
}

.mrf-parts-table th {
    background: #f8f9fa;
    color: var(--text-heading);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-family: 'Lexend', sans-serif;
    border-bottom: 1px solid #eee;
}

.mrf-parts-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    color: var(--text-body);
    font-size: 14px;
}

/* Signatures */
.mrf-signature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .mrf-signature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.signature-pad-wrapper {
    border: 1px solid var(--input-border);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #fff;
}

.mrf-btn-clear-signature {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 11px;
    padding: 4px 8px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
}

.mrf-btn-clear-signature:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* Buttons */
.mrf-form-actions {
    margin-top: 40px;
    text-align: center;
}

.mrf-btn-submit {
    background: var(--success-gradient);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.3s ease;
    min-width: 200px;
}

.mrf-btn-submit:hover {
    background: var(--success-hover); /* Gradient slightly adjusted via CSS variables if needed, or simple opacity/transform */
    transform: translateY(-2px);
    box-shadow: 0px 6px 16px rgba(46, 204, 113, 0.35);
}

.mrf-btn-delete-part {
    background: #fff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.mrf-btn-delete-part:hover {
    background: #e74c3c;
    color: white;
}

/* Responsive */
@media (max-width: 767px) {
    .mrf-form-container {
        padding: 20px;
    }
    
    .mrf-form-wrapper {
        padding: 20px 10px;
    }
}