@charset "utf-8";

body {
    width: 50vw;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 0.5rem;
}

form {
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    width: 100%;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group.password-toggle {
    position: relative;
}

.form-group.password-toggle span {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    color: #666;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.buttons button {
    width: 48%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.buttons .cancel {
    background-color: #ddd;
    color: #555;
}

.buttons .cancel:hover {
    background-color: #bbb;
}

/* パスワード入力欄の親要素 */
.password-container {
    position: relative;
}

.password-container input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    /* 右側にアイコン分のスペース */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.password-container .toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.password-container .toggle-password:hover {
    opacity: 0.7;
}

.errors {
    background-color: #ffe5e5;
    border: 1px solid #ff7a7a;
    color: #d8000c;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.errors p {
    margin: 0;
    font-size: 0.9rem;
}

.username-error {
    margin-top: 5px;
    font-size: 0.9rem;
}