* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 360px;
    padding: 16px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

h1 {
    margin-top: 0;
    text-align: center;
    color: #333;
    font-size: 22px;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 10px;
    font-size: 13px;
    color: #555;
}

input[type="text"],
input[type="password"] {
    padding: 10px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

button {
    margin-top: 16px;
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: #667eea;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

button:hover {
    background: #5a67d8;
}

.switch-link {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
}

.flashes {
    list-style: none;
    padding: 10px;
    margin: 0 0 16px 0;
    background: #fff3cd;
    color: #856404;
    border-radius: 6px;
    font-size: 13px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header-row h1 {
    margin: 0;
}

.user-info {
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.user-info a {
    color: #667eea;
    text-decoration: none;
}

#display {
    width: 100%;
    padding: 14px;
    font-size: 22px;
    text-align: right;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #f7f7f7;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.buttons button {
    margin-top: 0;
    padding: 14px;
    font-size: 16px;
    background: #eef0fb;
    color: #333;
}

.buttons button:hover {
    background: #dde1f7;
}
