/* Basic Mobile-First Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f8;
    color: #333;
    margin: 0;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 500px;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: 500;
}

input, select, textarea, .button {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; /* Important for consistent sizing */
}

textarea {
    resize: vertical;
}

button, .button {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* Navigation & Links */
nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-link, .back-link {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Status Messages */
#status {
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}
.status-success {
    color: #28a745;
}
.status-error {
    color: #dc3545;
}

/* New Header and Logo Styles */
header {
    /* This makes the header a flex container to easily center its contents */
    display: flex;
    justify-content: center; /* This centers the logo horizontally */
    align-items: center;
    
    /* We are overriding a previous style, so let's be explicit */
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.header-logo {
    /* This is the key property for resizing */
    max-width: 250px; /* You can change this value to make the logo bigger or smaller */
    
    /* This ensures the image scales proportionally */
    height: auto; 
}
/* --- New Modal and Info Icon Styles --- */

/* The info icon (?) */
.info-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background-color: #aaa;
    color: white;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    user-select: none; /* Prevents text selection */
}

.info-icon:hover {
    background-color: #007bff;
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 40% auto; /* 40% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content ul {
    padding-left: 20px;
}

/* The Close Button */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* --- New Dashboard Logout Button Styles --- */

.logout-section {
    margin-top: 2.5rem; /* Adds space above the logout button */
    padding-top: 1.5rem; /* Adds a line and space */
    border-top: 1px solid #eee;
}

.button-secondary {
    background-color: #6c757d; /* A neutral gray color */
}

.button-secondary:hover {
    background-color: #5a6268; /* A slightly darker gray for hover */
}

/* --- New Header Layout Styles --- */

.header-content {
    width: 100%; /* Ensure it takes the full width */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;   /* Center them horizontally */
    gap: 0.5rem;           /* Add a little space between title and link */
}

/* --- Rule for all button-like elements --- */
.button, button {
    display: inline-block;
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; /* Ensures padding is included in the width */
    
    background-color: #007bff;
    color: white;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

/* Specific rule for the submit button to override any defaults */
button[type="submit"] {
    border: none; /* Remove default button border */
}