/* --- Global Styles --- */
body, input, textarea, select, button {
    font-family: 'Inter', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    font-weight: 400;
}

body {
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2em;
    box-sizing: border-box;
}

h1, h2, h3 {
    color: #212529;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 1.75em;
    margin-bottom: 0.5em;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
}

/* --- App Layout --- */
#app-wrapper {
    width: 100%;
    max-width: 800px;
    background: #ffffff;
    padding: 2.5em;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.app-header {
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1.5em;
    margin-bottom: 2em;
}

.app-header h1 {
    font-size: 2.25em;
    margin: 0;
}

.app-header p {
    font-size: 1.1em;
    color: #6c757d;
    margin-top: 0.5em;
}

/* --- Authentication & User Info --- */
.auth-container {
    background: #f8f9fa;
    padding: 2em;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.auth-toggle {
    margin-top: 1.5em;
    text-align: center;
    font-size: 0.9em;
}

.auth-toggle a {
    cursor: pointer;
    font-weight: 600;
}

.hidden {
    display: none;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 2em;
    border: 1px solid #e9ecef;
}

.user-info p { margin: 0; }

#logout-button {
    background: #dc3545;
    color: white;
    padding: 0.5em 1em;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#logout-button:hover {
    background: #c82333;
}

/* --- Forms & Buttons --- */
.form-group {
    margin-bottom: 1.5em;
}

label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5em;
    font-size: 0.9em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 0.8em;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

button[type="submit"] {
    width: 100%;
    padding: 0.9em;
    background: #007bff;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease-in-out;
}

button[type="submit"]:hover {
    background: #0069d9;
}

button[type="submit"]:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* --- Results Table --- */
.table-container {
    margin-top: 2em;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

th {
    background-color: #f8f9fa;
    text-transform: uppercase;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.05em;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f1f3f5;
}
