/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif; /* Modern font stack */
    background: #f5f7fa;
    color: #1a1a1a;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Page - Mobile-First */
.login-page {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #004e92, #2a5298);
}

.login-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 360px;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo-placeholder {
    width: 48px;
    height: 48px;
    background: #2a5298;
    color: white;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 12px;
}

.login-header h1 {
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: #666;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus {
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
    outline: none;
}

.error-message {
    font-size: 13px;
    color: #dc2626;
    background: #fee2e2;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.login-button {
    width: 100%;
    padding: 12px;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-button:hover {
    background: #1e3c72;
}

.back-button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: #16a34a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s ease;
}

.back-button:hover {
    background: #15803d;
}

/* Desktop Enhancements */
@media (min-width: 640px) {
    .login-card {
        padding: 32px;
        max-width: 400px;
    }

    .login-header h1 {
        font-size: 28px;
    }

    .login-header p {
        font-size: 16px;
    }

    .logo-placeholder {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
}

/* Existing Dashboard Styles (unchanged, included for completeness) */
.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    color: #2a5298;
}

.logout-btn {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #ffe6e6;
    text-decoration: none;
}

.upload-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.upload-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.hidden {
    display: none;
}

.text-box {
    text-align: left;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    word-wrap: break-word;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#results h2 {
    color: #2a5298;
    margin: 15px 0 10px;
}

button {
    padding: 10px 20px;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #1e3c72;
}

.print-btn {
    display: block;
    margin: 20px auto 0;
    background: #16a34a;
}

.print-btn:hover {
    background: #15803d;
}

#status {
    margin: 10px 0;
    font-style: italic;
    color: #666;
}

@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    header h1 {
        font-size: 20px;
    }

    .upload-form {
        flex-direction: column;
    }

    .upload-form input, .upload-form button {
        width: 100%;
    }
}