feat: implement role-based entry and navigation enhancements

- Replace credential login with Admin/Practitioner role selection
- Add role-switcher toggle in header with automatic reversion for Admin mode
- Implement immediate return to role selection via system logo click
- Integrate role state management into global app state
This commit is contained in:
2026-06-01 17:56:22 +09:00
parent 19d4222470
commit 9e8ab11f99
5 changed files with 226 additions and 81 deletions

View File

@@ -11,12 +11,12 @@
.login-card {
width: 100%;
max-width: 400px;
max-width: 500px;
background-color: var(--white);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 2.5rem;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
padding: 3rem;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
animation: slideUp 0.4s ease-out;
}
@@ -27,79 +27,89 @@
.login-header {
text-align: center;
margin-bottom: 2rem;
margin-bottom: 2.5rem;
}
.login-logo {
height: 48px;
margin-bottom: 1rem;
height: 52px;
margin-bottom: 1.25rem;
}
.login-header h2 {
font-size: 1.5rem;
font-size: 1.75rem;
font-weight: 800;
color: var(--text-main);
margin-bottom: 0.5rem;
}
.login-header p {
font-size: 0.875rem;
color: var(--text-muted);
}
.login-form {
display: flex;
flex-direction: column;
gap: 1.25rem;
}
.login-form .form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.login-form label {
font-size: 0.8125rem;
font-weight: 600;
color: var(--text-muted);
}
.login-form input {
height: 44px;
padding: 0 1rem;
border: 1px solid var(--border-color);
border-radius: 6px;
font-size: 0.9375rem;
outline: none;
color: var(--text-muted);
}
.login-selection {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
}
.role-card {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 2rem 1.5rem;
border: 2px solid var(--bg-light);
border-radius: 10px;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
background-color: var(--bg-light);
}
.role-card:hover {
border-color: var(--primary-color);
background-color: var(--white);
transform: translateY(-4px);
box-shadow: 0 10px 20px rgba(30, 81, 73, 0.08);
}
.role-icon {
width: 56px;
height: 56px;
background-color: var(--white);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.25rem;
color: var(--primary-color);
border: 1px solid var(--border-color);
transition: all 0.2s;
}
.login-form input:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(30, 81, 73, 0.1);
}
.btn-login {
height: 48px;
margin-top: 0.5rem;
font-size: 1rem;
.role-card:hover .role-icon {
background-color: var(--primary-color);
color: var(--white);
border: none;
border-radius: 6px;
font-weight: 700;
cursor: pointer;
transition: background-color 0.2s;
border-color: var(--primary-color);
}
.btn-login:hover {
background-color: var(--primary-hover);
.role-card h3 {
font-size: 1.125rem;
font-weight: 700;
color: var(--text-main);
margin-bottom: 0.5rem;
}
.role-card p {
font-size: 0.8125rem;
color: var(--text-muted);
line-height: 1.4;
}
.login-footer {
margin-top: 2rem;
margin-top: 3rem;
text-align: center;
font-size: 0.75rem;
color: var(--text-muted);
}