329 lines
5.3 KiB
CSS
329 lines
5.3 KiB
CSS
/* Passkey Authentication - Main Styles */
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.container {
|
|
background: white;
|
|
padding: 40px;
|
|
border-radius: 15px;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
width: 100%;
|
|
max-width: 400px;
|
|
text-align: center;
|
|
}
|
|
|
|
.view {
|
|
display: none;
|
|
}
|
|
|
|
.view.active {
|
|
display: block;
|
|
}
|
|
|
|
h1 {
|
|
color: #333;
|
|
margin-bottom: 30px;
|
|
font-weight: 300;
|
|
font-size: 28px;
|
|
}
|
|
|
|
h2 {
|
|
color: #555;
|
|
margin-bottom: 20px;
|
|
font-weight: 400;
|
|
font-size: 22px;
|
|
}
|
|
|
|
input[type="text"] {
|
|
width: 100%;
|
|
padding: 15px;
|
|
border: 2px solid #e1e5e9;
|
|
border-radius: 8px;
|
|
font-size: 16px;
|
|
margin-bottom: 20px;
|
|
box-sizing: border-box;
|
|
transition: border-color 0.3s ease;
|
|
}
|
|
|
|
input[type="text"]:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
}
|
|
|
|
button {
|
|
width: 100%;
|
|
padding: 15px;
|
|
margin-bottom: 15px;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
border: none;
|
|
border-radius: 8px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover:not(:disabled) {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: transparent;
|
|
color: #667eea;
|
|
border: 2px solid #667eea;
|
|
}
|
|
|
|
.btn-secondary:hover:not(:disabled) {
|
|
background: #667eea;
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: #dc3545;
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger:hover:not(:disabled) {
|
|
background: #c82333;
|
|
}
|
|
|
|
button:disabled {
|
|
background: #ccc !important;
|
|
cursor: not-allowed !important;
|
|
transform: none !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
.status {
|
|
padding: 10px;
|
|
margin: 15px 0;
|
|
border-radius: 5px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.status.success {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
border: 1px solid #c3e6cb;
|
|
}
|
|
|
|
.status.error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
border: 1px solid #f5c6cb;
|
|
}
|
|
|
|
.status.info {
|
|
background: #d1ecf1;
|
|
color: #0c5460;
|
|
border: 1px solid #bee5eb;
|
|
}
|
|
|
|
.credential-list {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.credential-item {
|
|
background: #f8f9fa;
|
|
border: 1px solid #e9ecef;
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
margin: 10px 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.credential-item.current-session {
|
|
border: 2px solid #007bff;
|
|
background: #f8f9ff;
|
|
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
|
|
}
|
|
|
|
.credential-item.current-session .credential-info h4 {
|
|
color: #0056b3;
|
|
}
|
|
|
|
.credential-header {
|
|
display: grid;
|
|
grid-template-columns: 32px 1fr auto auto;
|
|
gap: 12px;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.credential-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.auth-icon {
|
|
border-radius: 4px;
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
.auth-emoji {
|
|
font-size: 24px;
|
|
display: block;
|
|
text-align: center;
|
|
}
|
|
|
|
.credential-info {
|
|
min-width: 0;
|
|
}
|
|
|
|
.credential-info h4 {
|
|
margin: 0;
|
|
color: #333;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.credential-dates {
|
|
text-align: right;
|
|
flex-shrink: 0;
|
|
margin-left: 20px;
|
|
display: grid;
|
|
grid-template-columns: auto auto;
|
|
gap: 5px 10px;
|
|
align-items: center;
|
|
}
|
|
|
|
.date-label {
|
|
color: #666;
|
|
font-weight: normal;
|
|
font-size: 12px;
|
|
text-align: right;
|
|
}
|
|
|
|
.date-value {
|
|
color: #333;
|
|
font-size: 12px;
|
|
text-align: left;
|
|
}
|
|
|
|
.user-info {
|
|
background: #e7f3ff;
|
|
border: 1px solid #bee5eb;
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.user-info h3 {
|
|
margin: 0 0 10px 0;
|
|
color: #0c5460;
|
|
}
|
|
|
|
.user-info p {
|
|
margin: 5px 0;
|
|
color: #0c5460;
|
|
}
|
|
|
|
.toggle-link {
|
|
color: #667eea;
|
|
text-decoration: underline;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.toggle-link:hover {
|
|
color: #764ba2;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.credential-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.btn-delete-credential {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-size: 16px;
|
|
color: #dc3545;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.btn-delete-credential:hover:not(:disabled) {
|
|
background-color: #f8d7da;
|
|
}
|
|
|
|
.btn-delete-credential:disabled {
|
|
opacity: 0.3;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.token-info {
|
|
background: #f5f5f5;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
margin: 15px 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.token-info strong {
|
|
color: #333;
|
|
}
|
|
|
|
.token-info code {
|
|
background: #e9ecef;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.qr-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.qr-code {
|
|
border: 1px solid #ddd;
|
|
border-radius: 8px;
|
|
padding: 10px;
|
|
background: white;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.link-container {
|
|
background: #f8f9fa;
|
|
border: 1px solid #e9ecef;
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
margin: 10px 0;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.link-container .link-text {
|
|
font-family: monospace;
|
|
font-size: 14px;
|
|
color: #495057;
|
|
margin: 0;
|
|
}
|