/* --- return_mrf.css --- */

/* Import or define variables if not already included via a shared header/CSS file */
/* Assuming 'view_mrf.css' variables are accessible or defined globally */
:root {
    --color-primary-accent: #3498db;
    --color-secondary-accent: #2980b9;
    --color-bg-light: #f4f7f9;
    --color-card-bg: #ffffff;
    --color-text-dark: #2c3e50;
    --color-text-light: #7f8c8d;
    --color-input-border: #e0e6ec;

    --font-family-body: 'Inter', sans-serif;
    --font-family-heading: 'Montserrat', sans-serif;
    --border-radius-sm: 6px;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
}

body {
    background-color: var(--color-bg-light);
    font-family: var(--font-family-body);
    color: var(--color-text-dark);
    padding: var(--spacing-lg);
}

/* --- Headings --- */
h2 {
    font-family: var(--font-family-heading);
    color: var(--color-primary-accent);
    font-size: 2em;
    font-weight: 800;
    border-bottom: 2px solid var(--color-input-border);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    display: inline-block;
}

/* --- Form Container (Optional, for centering/max-width) --- */
form {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--color-card-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- Tables (Reusing view_mrf.css styles) --- */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    /* Remove redundant box-shadow/margin if form styles are applied */
    /* box-shadow: 0 4px 10px rgba(0,0,0,0.05); */
    margin-bottom: var(--spacing-md);
}

table th, table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

table th {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

table tr:nth-child(even) {
    background-color: #fcfcfc;
}

table tr:hover {
    background-color: #eff5ff;
}

/* --- Input Field for Return Quantity --- */
input[type="number"] {
    width: 80px; /* Smaller width for quantity input */
    padding: var(--spacing-xs);
    border: 1px solid var(--color-input-border);
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-family: var(--font-family-body);
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    border-color: var(--color-primary-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Specific Column Styling for quantities */
table tr td:nth-child(2), /* Issued Qty */
table tr td:nth-child(3), /* Returned Qty */
table tr td:nth-child(4) { /* Currently Issued */
    font-weight: 600;
    text-align: center;
}

table tr td:nth-child(5) { /* Return Qty column */
    text-align: center;
}

/* --- Process Return Button --- */
button[type="submit"] {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: #2ecc71; /* A distinct 'Success' green for return */
    color: var(--color-card-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 1em;
    margin-top: var(--spacing-sm);
}

button[type="submit"]:hover {
    background-color: #27ae60;
    transform: translateY(-1px);
}

/* --- Messages (Success/Error) --- */
p[style*="color:green"], p[style*="color:red"] {
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

p[style*="color:green"] {
    background-color: #e6ffe6; /* Light green background */
    border: 1px solid #2ecc71;
}

p[style*="color:red"] {
    background-color: #ffe6e6; /* Light red background */
    border: 1px solid #e74c3c;
}

/* --- Links --- */
a {
    color: var(--color-primary-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-secondary-accent);
    text-decoration: underline;
}

/* --- Responsive Table (Similar to view_mrf.css) --- */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-md);
    }
    
    form {
        padding: var(--spacing-sm);
    }

    table, table th, table td {
        display: block;
        width: 100%;
    }

    table th {
        text-align: right;
        padding-right: var(--spacing-sm);
        font-size: 0.9em;
    }

    table td {
        text-align: right;
        padding: var(--spacing-xs) var(--spacing-sm);
        position: relative;
        padding-left: 50%;
        border-bottom: 1px solid #e0e6ec;
        margin-bottom: var(--spacing-sm);
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: var(--color-text-light);
    }
    
    /* Ensure the input field still works in responsive view */
    table td:last-child {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    
    table td:last-child::before {
        content: "Return Qty"; /* Specific label */
    }

    button[type="submit"] {
        width: 100%;
    }
}