forked from ttc/micro-frontend
291 lines
5.8 KiB
CSS
291 lines
5.8 KiB
CSS
|
|
:root {
|
||
|
|
--bg-1: #f3f6f9;
|
||
|
|
--card-bg: #ffffff;
|
||
|
|
--muted: #6b737a;
|
||
|
|
--text: #0b1a2b;
|
||
|
|
--primary: #0078d4;
|
||
|
|
--primary-600: #0065b8;
|
||
|
|
--radius: 8px;
|
||
|
|
--shadow: 0 10px 30px rgba(11,26,43,0.08);
|
||
|
|
--glass: rgba(255,255,255,0.6);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Page layout */
|
||
|
|
.login-widget {
|
||
|
|
/* Fill the viewport and center the card. Do not let the page itself
|
||
|
|
scroll; the card gets an internal max-height instead. */
|
||
|
|
min-height: 100vh;
|
||
|
|
height: 100vh;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
padding: 28px 18px;
|
||
|
|
background: linear-gradient(180deg, #f7f9fb 0%, var(--bg-1) 100%);
|
||
|
|
color: var(--text);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/* Card */
|
||
|
|
.login-widget .card{
|
||
|
|
width: 380px;
|
||
|
|
max-width: calc(100% - 40px);
|
||
|
|
background: var(--card-bg);
|
||
|
|
border-radius: calc(var(--radius) + 2px);
|
||
|
|
box-shadow: var(--shadow);
|
||
|
|
padding: 22px;
|
||
|
|
box-sizing: border-box;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
gap: 14px;
|
||
|
|
/* Constrain the card so it never forces the page to scroll. If content
|
||
|
|
grows, the card will scroll internally. */
|
||
|
|
max-height: calc(100vh - 56px);
|
||
|
|
overflow: auto;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Modal/backdrop styles */
|
||
|
|
.login-backdrop{
|
||
|
|
position: fixed;
|
||
|
|
inset: 0; /* top:0; right:0; bottom:0; left:0; */
|
||
|
|
background: rgba(0,0,0,0.38);
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
z-index: 1040;
|
||
|
|
padding: 24px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.login-modal{ width: 480px; max-width: 480px; }
|
||
|
|
|
||
|
|
.modal-card{
|
||
|
|
border-radius: 12px;
|
||
|
|
padding: 0; /* card children control internal padding */
|
||
|
|
overflow: hidden;
|
||
|
|
box-shadow: 0 20px 50px rgba(2,6,23,0.4);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Slightly larger brand area inside modal */
|
||
|
|
.modal-card .brand{ padding: 18px; }
|
||
|
|
|
||
|
|
/* Make the primary button pill-shaped and slightly larger */
|
||
|
|
button.primary{
|
||
|
|
color: #000;
|
||
|
|
border-radius: 999px;
|
||
|
|
padding: 10px 18px;
|
||
|
|
font-size: 15px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Make biometric and other action buttons visually lighter */
|
||
|
|
.biometric{
|
||
|
|
border-radius: 999px;
|
||
|
|
padding: 8px 12px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* On small screens reduce modal padding and width to avoid overflow */
|
||
|
|
@media (max-width: 420px){
|
||
|
|
.login-backdrop{ padding: 12px; }
|
||
|
|
.login-modal{ max-width: 100%; }
|
||
|
|
.modal-card .brand{ padding: 12px; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Brand area */
|
||
|
|
.brand{
|
||
|
|
text-align: center;
|
||
|
|
padding-bottom: 4px;
|
||
|
|
border-bottom: 1px solid #eef2f5;
|
||
|
|
}
|
||
|
|
.brand .logo{
|
||
|
|
height: 44px;
|
||
|
|
width: 44px;
|
||
|
|
object-fit: contain;
|
||
|
|
display: inline-block;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
.brand h1{
|
||
|
|
margin: 0;
|
||
|
|
font-size: 20px;
|
||
|
|
font-weight: 600;
|
||
|
|
letter-spacing: -0.2px;
|
||
|
|
color: var(--text);
|
||
|
|
}
|
||
|
|
.brand .subtitle{
|
||
|
|
margin: 6px 0 12px;
|
||
|
|
color: var(--muted);
|
||
|
|
font-size: 13px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Form area */
|
||
|
|
.form{
|
||
|
|
/* keep compact spacing inside the card */
|
||
|
|
/* width: 410px; */
|
||
|
|
margin-top: 6px;
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
gap: 12px;
|
||
|
|
padding: 6px 0 2px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Field label wrapper */
|
||
|
|
.field{
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
gap: 6px;
|
||
|
|
}
|
||
|
|
.field .label-text{
|
||
|
|
font-size: 13px;
|
||
|
|
color: var(--muted);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Inputs */
|
||
|
|
input[type="email"],
|
||
|
|
input[type="password"],
|
||
|
|
input[type="text"]{
|
||
|
|
width: 100%;
|
||
|
|
box-sizing: border-box;
|
||
|
|
padding: 10px 12px;
|
||
|
|
font-size: 15px;
|
||
|
|
color: var(--text);
|
||
|
|
background: #fff;
|
||
|
|
border: 1px solid #d8dee6;
|
||
|
|
border-radius: 6px;
|
||
|
|
outline: none;
|
||
|
|
transition: box-shadow .14s ease, border-color .14s ease, transform .06s ease;
|
||
|
|
-webkit-appearance: none;
|
||
|
|
appearance: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
input::placeholder{
|
||
|
|
color: #9aa3ad;
|
||
|
|
}
|
||
|
|
input:focus{
|
||
|
|
border-color: var(--primary);
|
||
|
|
box-shadow: 0 6px 20px rgba(0,120,212,0.10);
|
||
|
|
transform: translateZ(0);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Checkbox / stay signed */
|
||
|
|
.stay-signed{
|
||
|
|
display: inline-flex;
|
||
|
|
gap: 8px;
|
||
|
|
align-items: center;
|
||
|
|
font-size: 13px;
|
||
|
|
color: var(--muted);
|
||
|
|
}
|
||
|
|
.stay-signed input[type="checkbox"]{
|
||
|
|
width: 16px;
|
||
|
|
height: 16px;
|
||
|
|
accent-color: var(--primary);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Actions row */
|
||
|
|
.actions{
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: space-between;
|
||
|
|
gap: 12px;
|
||
|
|
margin-top: 4px;
|
||
|
|
}
|
||
|
|
button.primary{
|
||
|
|
background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
|
||
|
|
color: #000000;
|
||
|
|
border: none;
|
||
|
|
padding: 10px 14px;
|
||
|
|
border-radius: 6px;
|
||
|
|
font-weight: 600;
|
||
|
|
cursor: pointer;
|
||
|
|
font-size: 14px;
|
||
|
|
box-shadow: 0 6px 18px rgba(0,120,212,0.12);
|
||
|
|
transition: transform .06s ease, box-shadow .12s ease, opacity .12s ease;
|
||
|
|
}
|
||
|
|
button.primary:hover:not(:disabled){
|
||
|
|
transform: translateY(-1px);
|
||
|
|
box-shadow: 0 10px 24px rgba(0,120,212,0.14);
|
||
|
|
}
|
||
|
|
button.primary:active{
|
||
|
|
transform: translateY(0);
|
||
|
|
}
|
||
|
|
button.primary:disabled{
|
||
|
|
opacity: 0.55;
|
||
|
|
cursor: not-allowed;
|
||
|
|
box-shadow: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Alternative options */
|
||
|
|
.alt-options{
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 12px;
|
||
|
|
margin-top: 6px;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
}
|
||
|
|
.biometric{
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 10px;
|
||
|
|
padding: 8px 10px;
|
||
|
|
background: transparent;
|
||
|
|
color: var(--primary);
|
||
|
|
border: 1px solid rgba(0,120,212,0.14);
|
||
|
|
border-radius: 6px;
|
||
|
|
cursor: pointer;
|
||
|
|
font-weight: 600;
|
||
|
|
font-size: 13px;
|
||
|
|
}
|
||
|
|
.biometric svg{ display: block; opacity: .95; }
|
||
|
|
.biometric:hover{
|
||
|
|
background: rgba(0,120,212,0.04);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Help link */
|
||
|
|
.help-link{
|
||
|
|
margin-left: auto;
|
||
|
|
font-size: 13px;
|
||
|
|
color: var(--primary);
|
||
|
|
text-decoration: none;
|
||
|
|
}
|
||
|
|
.help-link:hover{ text-decoration: underline; }
|
||
|
|
|
||
|
|
/* Footer */
|
||
|
|
.footer{
|
||
|
|
display: flex;
|
||
|
|
justify-content: center;
|
||
|
|
align-items: center;
|
||
|
|
gap: 8px;
|
||
|
|
margin-top: 6px;
|
||
|
|
padding-top: 10px;
|
||
|
|
border-top: 1px solid #eef2f5;
|
||
|
|
font-size: 13px;
|
||
|
|
color: var(--muted);
|
||
|
|
}
|
||
|
|
.footer a{
|
||
|
|
color: var(--primary);
|
||
|
|
text-decoration: none;
|
||
|
|
font-weight: 600;
|
||
|
|
}
|
||
|
|
.footer a:hover{ text-decoration: underline; }
|
||
|
|
.divider{ color: #d0d6db; }
|
||
|
|
|
||
|
|
/* Focus styles for keyboard users */
|
||
|
|
:focus{
|
||
|
|
outline: none;
|
||
|
|
}
|
||
|
|
:focus-visible{
|
||
|
|
outline: 3px solid rgba(0,120,212,0.12);
|
||
|
|
outline-offset: 2px;
|
||
|
|
border-radius: 6px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Small screens */
|
||
|
|
@media (max-width:420px){
|
||
|
|
.login-widget .card{
|
||
|
|
padding: 18px;
|
||
|
|
width: 100%;
|
||
|
|
}
|
||
|
|
.brand h1{ font-size: 18px; }
|
||
|
|
.brand .subtitle{
|
||
|
|
font-family: "Kanit";
|
||
|
|
font-weight: 1000;
|
||
|
|
font-style: normal; }
|
||
|
|
.biometric span, .primary{ font-size: 13px; }
|
||
|
|
}
|