/* === General Styles & Typography === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
}

h1 {
    color: #3498db;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-weight: 600;
}

h2 {
    color: #4a4a4a;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 500;
}

hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* === Summary Cards === */
.summary-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.summary-cards > div {
    background-color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    font-size: 1.1em;
    min-width: 150px;
    text-align: center;
}

.action-links a {
    padding: 6px 12px;
    border-radius: 4px;
    color: black;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid black;       /* black outline */
    transition: all 0.3s ease;     /* smooth hover transition */
}

.action-links a:hover {
    background-color: #3498db;       /* black background on hover */
    color: white;                  /* text turns white */
}

#lowStockTable, table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table th, table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

table th {
    background-color: #3498db;
    color: white;
}

/* === MRF Popup === */
#mrfPopup {
    display: none;
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#mrfPopup > div {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

#closeMRF {
    font-size: 2em;
    position: absolute;
    top: 10px; right: 15px;
    cursor: pointer;
}

#closeMRF:hover { color: #dc3545; }

#mrfForm h4 {
    color: #007bff;
    margin-top: 25px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

/* === Form Styles === */
#mrfForm .formRow {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

#mrfForm .formRow .formGroup {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#mrfForm label {
    font-weight: 500;
    margin-bottom: 5px;
}

#mrfForm input, #mrfForm select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#itemsContainer .itemRow {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 5px;
    background: #f9f9f9;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

#itemsContainer .itemRow button.removeItem {
    width: 100px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px;
    cursor: pointer;
}

#addItem {
    margin-top: 10px;
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#mrfForm button[type="submit"] {
    margin-top: 20px;
    padding: 10px 20px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* === Responsive === */
@media (max-width:768px){
    #mrfForm .formRow { flex-direction: column; }
    #itemsContainer .itemRow { flex-direction: column; }
    #itemsContainer .itemRow button.removeItem { width: 100%; }
}
.view-mrf-btn {
    position: relative;
    display: inline-block;
    background-color: white;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    text-decoration: none;
}

.pending-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}
