Neuro-Track / assets /css /auth.css
afnrmdhn
first
c36a2b1
Raw History Blame Contribute Delete
11.3 kB
/* ========================================
NeuroTrack Authentication Styles
Modern Clinical Design | WCAG 2.1 AA
======================================== */
:root {
/* Color Palette: Medical SaaS */
--bg: #f4f7fb;
--panel: #ffffff;
--ink: #1f2a44;
--muted: #5f6b85;
--accent: #4c93ff;
--accent-2: #52c7b8;
--accent-3: #6f7dfb;
--outline: rgba(76, 147, 255, 0.35);
--stroke: #e2e8f0;
--success: #2eb67d;
--error: #c43d4b;
--warning: #f59e0b;
/* Shadows */
--shadow: 0 18px 45px rgba(31, 42, 68, 0.16);
--shadow-sm: 0 4px 12px rgba(31, 42, 68, 0.08);
--shadow-lg: 0 24px 60px rgba(31, 42, 68, 0.22);
/* Radius */
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 14px;
--radius-xl: 18px;
--radius-2xl: 10px;
/* Typography */
--font: "Inter", "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
/* Transitions */
--transition-fast: 150ms ease;
--transition-base: 250ms ease;
}
/* ========================================
Base Styles
======================================== */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font);
background: radial-gradient(circle at 10% 20%, rgba(82, 199, 184, 0.35), transparent 26%),
radial-gradient(circle at 90% 10%, rgba(111, 125, 251, 0.30), transparent 25%),
linear-gradient(135deg, #e9f2ff 0%, #eef6ff 45%, #f4f7fb 100%);
min-height: 100vh;
margin: 0;
color: var(--ink);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* ========================================
Split Layout Shell
======================================== */
.auth-shell {
display: grid;
grid-template-columns: 70% 30%;
min-height: 100vh;
position: relative;
}
/* ========================================
Left Panel: Hero Section
======================================== */
/* .auth-hero {
position: sticky;
top: 0;
height: 100vh;
background: linear-gradient(145deg, #0f3460 0%, #1e3a8a 50%, #0f172a 100%);
color: #e8edf5;
padding: 72px 72px 72px 30px;
display: flex;
align-items: center;
justify-content: flex-start;
} */
.auth-hero {
position: sticky;
top: 0;
height: 100vh;
background: linear-gradient(145deg, #0f3460 0%, #1e3a8a 50%, #0f172a 100%);
color: #e8edf5;
padding: 72px 72px 72px 30px;
display: flex;
align-items: center;
justify-content: flex-start;
overflow: hidden;
}
.auth-hero::before {
content: "";
position: absolute;
inset: 0;
background: url("../img/auth_hero.jpg") no-repeat left center / cover;
opacity: 0.8;
pointer-events: none;
}
.auth-hero__layer {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: var(--radius-2xl);
padding: 24px;
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
max-width: 650px;
width: 100%;
backdrop-filter: blur(12px);
}
.auth-hero__welcome {
font-family: 'Poppins', sans-serif;
font-size: 24px;
font-weight: 400;
color: #ffffff;
margin: 0 0 8px 0;
letter-spacing: 0.3px;
}
.auth-hero__title {
font-family: 'Poppins', sans-serif;
margin: 0 0 20px 0;
font-size: 60px;
font-weight: 700;
line-height: 1.1;
color: #ffffff;
letter-spacing: -0.5px;
}
.auth-hero__body {
font-family: 'Poppins', sans-serif;
margin: 0 0 32px;
color: rgba(255, 255, 255, 0.8);
font-size: 15px;
line-height: 1.6;
font-weight: 400;
}
.auth-hero__stats {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
width: 440px;
}
.auth-hero__stats > div {
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 14px;
padding: 10px 12px;
}
.stat-value {
font-weight: 700;
font-size: 16px;
}
.stat-label {
color: rgba(232, 237, 245, 0.72);
font-size: 12px;
}
.auth-panel {
display: flex;
align-items: center;
justify-content: center;
padding: 48px;
min-height: 100vh;
overflow-y: auto;
background-color: #f6f6f7;
}
.auth-card {
background: var(--panel);
border-radius: 10px;
box-shadow: var(--shadow);
padding: 40px;
width: min(520px, 100%);
border: 1px solid var(--stroke);
}
.auth-card__header h2 {
text-align: center;
margin: 0;
font-size: 26px;
}
.auth-card__subtitle {
margin: 6px 0 0;
color: var(--muted);
}
.auth-form {
display: grid;
gap: 16px;
margin-top: 24px;
}
.auth-field {
display: grid;
gap: 8px;
font-size: 14px;
color: var(--muted);
}
.auth-field input,
.auth-field select {
width: 100%;
padding: 12px 14px;
border-radius: var(--radius-md);
border: 1px solid var(--stroke);
background: #f9fbff;
color: var(--ink);
font-size: 15px;
font-family: inherit;
transition: border var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.auth-field input:focus,
.auth-field select:focus {
outline: 2px solid var(--outline);
border-color: var(--accent);
background: #ffffff;
box-shadow: 0 0 0 3px rgba(76, 147, 255, 0.18);
}
.auth-field input::placeholder {
color: #94a3b8;
}
/* Input Group (for password toggle button) */
.auth-field__input-group {
position: relative;
display: flex;
align-items: center;
}
.auth-field__input-group input {
padding-right: 45px;
}
.auth-field__toggle {
position: absolute;
right: 10px;
background: none;
border: none;
color: var(--muted);
cursor: pointer;
padding: 6px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-sm);
transition: color var(--transition-fast), background var(--transition-fast);
}
.auth-field__toggle:hover {
color: var(--accent);
background: rgba(76, 147, 255, 0.08);
}
.required-star {
color: var(--error);
margin-left: 2px;
}
.auth-error {
color: var(--error);
font-size: 12px;
display: block;
margin-top: 4px;
min-height: 18px;
}
.auth-inline {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
font-size: 14px;
}
.auth-checkbox {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--muted);
cursor: pointer;
user-select: none;
}
.auth-checkbox--block {
display: flex;
}
.auth-checkbox input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
accent-color: var(--accent);
}
.auth-button {
width: 100%;
padding: 14px;
border: none;
border-radius: var(--radius-lg);
background: linear-gradient(135deg, var(--accent-2), var(--accent));
color: #fff;
font-weight: 700;
font-size: 15px;
cursor: pointer;
transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
box-shadow: 0 14px 28px rgba(76, 147, 255, 0.25);
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.auth-button:hover:not(:disabled) {
transform: translateY(-1px);
filter: brightness(1.03);
box-shadow: 0 18px 35px rgba(76, 147, 255, 0.32);
}
.auth-button:active:not(:disabled) {
transform: translateY(0);
}
.auth-button:disabled {
cursor: not-allowed;
opacity: 0.7;
}
.auth-button__loader {
display: none;
width: 18px;
height: 18px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-top-color: #fff;
border-radius: 50%;
animation: spin 0.6s linear infinite;
margin-left: 10px;
}
.auth-button.is-loading .auth-button__loader {
display: block;
}
.auth-button.is-loading .auth-button__text {
opacity: 0.7;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.auth-divider {
display: flex;
align-items: center;
gap: 12px;
margin: 4px 0 0;
color: var(--muted);
font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
content: "";
flex: 1;
height: 1px;
background: var(--stroke);
}
.auth-oauth {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.auth-oauth__btn {
border: 1px solid var(--stroke);
background: #ffffff;
border-radius: var(--radius-md);
padding: 12px;
font-weight: 600;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--ink);
transition: border var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
font-size: 14px;
}
.auth-oauth__btn:hover {
border-color: var(--accent);
box-shadow: 0 10px 20px rgba(31, 42, 68, 0.10);
transform: translateY(-1px);
}
.auth-link {
color: var(--accent);
font-weight: 600;
text-decoration: none;
}
.auth-link:hover {
text-decoration: underline;
}
.auth-tabs {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 10px;
margin-top: 16px;
}
.auth-tab {
border: 1px solid var(--stroke);
background: #f7f9fc;
padding: 12px 14px;
border-radius: var(--radius-md);
text-align: left;
cursor: pointer;
transition: border var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}
.auth-tab__label {
font-weight: 700;
color: var(--ink);
font-size: 14px;
}
.auth-tab__sub {
color: var(--muted);
font-size: 13px;
margin-top: 2px;
}
.auth-tab.is-active {
border-color: var(--accent);
box-shadow: 0 10px 22px rgba(76, 147, 255, 0.18);
background: #ffffff;
transform: translateY(-2px);
}
.auth-tab:hover:not(.is-active) {
border-color: #cbd5e1;
background: #ffffff;
}
.auth-grid {
display: grid;
gap: 12px;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.auth-switch {
text-align: center;
color: var(--muted);
margin: 8px 0 0;
font-size: 14px;
}
/* ========================================
Role-Specific Fields (Dynamic Display)
======================================== */
.role-fields {
display: none;
animation: fadeIn 0.3s ease;
}
.role-fields.is-active {
display: grid;
gap: 16px;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ========================================
Responsive Design (Mobile-First)
======================================== */
@media (max-width: 1080px) {
.auth-shell {
grid-template-columns: 1fr;
}
.auth-hero {
display: none;
}
.auth-panel {
padding: 32px 18px;
}
.auth-card {
padding: 28px 22px;
border-radius: 20px;
}
.auth-tabs {
grid-template-columns: 1fr;
}
.auth-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.auth-panel {
padding: 20px 12px;
}
.auth-card {
padding: 24px 18px;
}
.auth-card__header h2 {
font-size: 22px;
}
.auth-oauth {
grid-template-columns: 1fr;
}
}
/* ========================================
Accessibility Enhancements
======================================== */
/* Focus visible for keyboard navigation */
*:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}