* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

h2 {
    margin-bottom: 24px;
    color: #333;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #666;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: #0066cc;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #0052a3;
}

.error-message {
    color: #df2020;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}
/* --- Dashboard & Notes Layout --- */
.dashboard-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    align-self: flex-start; /* Overrides the login flex center positioning */
}

body {
    align-items: flex-start; /* Allows dashboard to scroll naturally */
    overflow-y: auto;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}

.logout-btn {
    padding: 8px 16px;
    background: #e03131;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.logout-btn:hover {
    background: #c92a2a;
}

/* Note Creation Form */
.note-form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.note-form-container input, 
.note-form-container textarea {
    width: 100%;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 15px;
}

.note-form-container textarea {
    resize: vertical;
}

.save-btn {
    background: #2b8a3e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.save-btn:hover {
    background: #237032;
}

/* Notes Grid Display */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.note-card {
    background: #fff;
    border-left: 5px solid #0066cc;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    word-break: break-word;
}

.note-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #222;
}

.note-card p {
    font-size: 14px;
    color: #555;
    flex-grow: 1;
    margin-bottom: 15px;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-date {
    font-size: 11px;
    color: #999;
}

.delete-btn {
    background: none;
    border: none;
    color: #cf2323;
    font-size: 13px;
    cursor: pointer;
}

.delete-btn:hover {
    text-decoration: underline;
}

.no-notes {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    font-style: italic;
    margin-top: 20px;
}
/* --- Auth View Utilities --- */
.auth-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.hidden {
    display: none !important;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.auth-btn.success { background: #2b8a3e; }
.auth-btn.success:hover { background: #237032; }

.auth-btn.warning { background: #f08c00; }
.auth-btn.warning:hover { background: #e67e22; }

.auth-links {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.auth-links a {
    color: #0066cc;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}


.auth-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #666;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.auth-btn.success {
    width: 100%;
    padding: 12px;
    background: #2b8a3e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.auth-btn.success:hover {
    background: #237032;
}

.auth-links {
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: #0066cc;
    text-decoration: none;
}
