/* General body and typography styles */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5; 
    color: #333;
    line-height: 1.3;
    margin: 0;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

a {
  color: blue;           /* Default and visited link color */
  text-decoration: none; /* Optional: removes underline */
}

a:visited {
  color: blue;           /* Keeps visited links blue */
}

a:hover {
  color: purple;         /* Changes color when hovered */
  text-decoration: underline; /* Optional: adds underline on hover */
}

a:active {
  color: purple;         /* Optional: same as hover when clicked */
}

h1 {
    color: #1a73e8;
    text-align: center;
    font-weight: 300;
}

h2 {
    color: #e81a1a;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 300;
    font-size:1.1em;
}

form.login-form { 
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    width: 70%;
    display: flex !important; 
    flex-wrap: wrap !important; 
    justify-content: space-between !important; 
    gap: 10px; 
}

.position-group {
    width: calc(50% - 40px) !important; 
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fefefe;
    display: flex;
    flex-direction: column;
}

/* Add a new container to wrap the title and the save button */
.position-header {
    display: flex; /* Makes title and button sit side-by-side */
    justify-content: space-between; /* Pushes the button to the far right */
    align-items: center; /* Vertically centers the button with the title */
    margin-bottom: 15px; /* Replace the margin from .position-title */
    padding-bottom: 8px; /* Retain the padding from .position-title */
    border-bottom: 3px solid #1a73e8; /* Retain the border from .position-title */
}

/* Modify the existing .position-title to be just a span/label */
.position-title {
    color: #1a73e8;
    font-size: 1.2em;
    font-weight: 600;
    /* REMOVE all border-bottom, padding-bottom, and margin-bottom styles here */
    margin: 0; 
    padding: 0;
    border-bottom: none;
    text-transform: uppercase;
}

.save-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: #4CAF50; /* Green checkmark color */
    font-size: 1.8em; /* Large size */
    padding: 0;
    transition: transform 0.1s;
    line-height: 1; /* Ensures no extra vertical space */
}

.save-btn-icon:hover {
    color: #45A049;
    transform: scale(1.1);
}

/* --- Headings, Input Rows, and Button Styles --- */

.input-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.input-row > label {
    flex-basis: 80px;
    text-align: left;
    padding-right: 10px;
    font-weight: bold;
    font-size: 0.9em;
}

.form-input {
    flex-grow: 1; 
    width: 70%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 0.9em;
}

.form-input:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 5px rgba(26, 115, 232, 0.3);
}

.message-container {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #cce5ff; /* Light blue border */
    border-radius: 8px;
    background-color: #e6f3ff; /* Very light blue background */
    box-sizing: border-box;
    /* Ensure it doesn't wrap with the position-groups by taking full width */
    flex-basis: 100%; 
}

.message-container2 {
    width: 60%;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #cce5ff; /* Light blue border */
    border-radius: 8px;
    background-color: #e6f3ff; /* Very light blue background */
    box-sizing: border-box;
    /* Ensure it doesn't wrap with the position-groups by taking full width */
    flex-basis: 100%; 
}

.message-container h2 {
    color: #1a73e8;
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.message-container p {
    margin-bottom: 0;
    font-size: 0.95em;
    color: #333;
}

.system-message {
    /* Style for the PHP success/error message */
    font-weight: bold;
    color: #4CAF50; /* Green for success */
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #c0c0c0;
}

.button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0px;
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #bad2f0;
    color: black;
    transition: background-color 0.3s, transform 0.1s;
}

.btn:hover {
    background-color: #bad2f0;
    transform: translateY(-1px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 700px) {
    /* TARGETS: The <form> element with class="login-form" */
    form.login-form { 
        flex-direction: column !important; 
        width: 80%;
        gap: 0 !important;
    }
    .position-group {
        width: 90% !important; 
        min-width: unset;
        margin-bottom: 25px;
    }

    .input-row > label {
        font-size: 1em;
        font-weight:bold;
    }

    .form-input {
        font-size: 1em;
    }
}