| 1 |
/** |
| 2 |
* Two-Factor Authentication Admin Styles |
| 3 |
* |
| 4 |
* Styles for the 2FA settings section in Vigilante admin panel |
| 5 |
* |
| 6 |
* @package Vigilante |
| 7 |
*/ |
| 8 |
|
| 9 |
/* 2FA Settings Section */ |
| 10 |
.vigilante-2fa-section { |
| 11 |
background: #fff; |
| 12 |
border: 1px solid #c3c4c7; |
| 13 |
border-radius: 4px; |
| 14 |
padding: 0; |
| 15 |
margin-bottom: 20px; |
| 16 |
} |
| 17 |
|
| 18 |
.vigilante-2fa-section h3 { |
| 19 |
margin: 0; |
| 20 |
padding: 15px 20px; |
| 21 |
background: #f6f7f7; |
| 22 |
border-bottom: 1px solid #c3c4c7; |
| 23 |
font-size: 14px; |
| 24 |
font-weight: 600; |
| 25 |
} |
| 26 |
|
| 27 |
.vigilante-2fa-section .inside { |
| 28 |
padding: 20px; |
| 29 |
} |
| 30 |
|
| 31 |
/* Role checkboxes */ |
| 32 |
.vigilante-2fa-roles { |
| 33 |
display: flex; |
| 34 |
flex-wrap: wrap; |
| 35 |
gap: 12px 24px; |
| 36 |
margin-top: 8px; |
| 37 |
} |
| 38 |
|
| 39 |
.vigilante-2fa-roles label { |
| 40 |
display: flex; |
| 41 |
align-items: center; |
| 42 |
gap: 6px; |
| 43 |
cursor: pointer; |
| 44 |
padding: 4px 0; |
| 45 |
} |
| 46 |
|
| 47 |
.vigilante-2fa-roles input[type="checkbox"] { |
| 48 |
margin: 0; |
| 49 |
} |
| 50 |
|
| 51 |
.vigilante-2fa-roles .role-name { |
| 52 |
font-weight: 500; |
| 53 |
} |
| 54 |
|
| 55 |
.vigilante-2fa-roles .role-count { |
| 56 |
color: #646970; |
| 57 |
font-size: 12px; |
| 58 |
} |
| 59 |
|
| 60 |
/* User exclusion search */ |
| 61 |
.vigilante-2fa-user-search-container { |
| 62 |
margin-top: 8px; |
| 63 |
} |
| 64 |
|
| 65 |
.vigilante-2fa-user-search { |
| 66 |
position: relative; |
| 67 |
max-width: 400px; |
| 68 |
} |
| 69 |
|
| 70 |
.vigilante-2fa-user-search input[type="text"] { |
| 71 |
width: 100%; |
| 72 |
padding: 8px 12px 8px 36px; |
| 73 |
border: 1px solid #8c8f94; |
| 74 |
border-radius: 4px; |
| 75 |
font-size: 14px; |
| 76 |
} |
| 77 |
|
| 78 |
.vigilante-2fa-user-search input[type="text"]:focus { |
| 79 |
border-color: #2271b1; |
| 80 |
box-shadow: 0 0 0 1px #2271b1; |
| 81 |
outline: none; |
| 82 |
} |
| 83 |
|
| 84 |
.vigilante-2fa-user-search .search-icon { |
| 85 |
position: absolute; |
| 86 |
left: 12px; |
| 87 |
top: 50%; |
| 88 |
transform: translateY(-50%); |
| 89 |
color: #8c8f94; |
| 90 |
pointer-events: none; |
| 91 |
} |
| 92 |
|
| 93 |
.vigilante-2fa-user-search .search-icon::before { |
| 94 |
content: "\f179"; |
| 95 |
font-family: dashicons; |
| 96 |
font-size: 16px; |
| 97 |
} |
| 98 |
|
| 99 |
/* Search results dropdown */ |
| 100 |
.vigilante-2fa-search-results, |
| 101 |
.vigilante-pwexp-search-results { |
| 102 |
position: absolute; |
| 103 |
top: 100%; |
| 104 |
left: 0; |
| 105 |
right: 0; |
| 106 |
background: #fff; |
| 107 |
border: 1px solid #c3c4c7; |
| 108 |
border-top: none; |
| 109 |
border-radius: 0 0 4px 4px; |
| 110 |
box-shadow: 0 4px 8px rgba(0,0,0,0.1); |
| 111 |
max-height: 200px; |
| 112 |
overflow-y: auto; |
| 113 |
z-index: 100; |
| 114 |
display: none; |
| 115 |
} |
| 116 |
|
| 117 |
.vigilante-2fa-search-results.active, |
| 118 |
.vigilante-pwexp-search-results.active { |
| 119 |
display: block; |
| 120 |
} |
| 121 |
|
| 122 |
.vigilante-2fa-search-results .search-result-item, |
| 123 |
.vigilante-pwexp-search-results .search-result-item { |
| 124 |
padding: 10px 12px; |
| 125 |
cursor: pointer; |
| 126 |
border-bottom: 1px solid #f0f0f1; |
| 127 |
display: flex; |
| 128 |
align-items: center; |
| 129 |
gap: 10px; |
| 130 |
} |
| 131 |
|
| 132 |
.vigilante-2fa-search-results .search-result-item:last-child, |
| 133 |
.vigilante-pwexp-search-results .search-result-item:last-child { |
| 134 |
border-bottom: none; |
| 135 |
} |
| 136 |
|
| 137 |
.vigilante-2fa-search-results .search-result-item:hover, |
| 138 |
.vigilante-pwexp-search-results .search-result-item:hover { |
| 139 |
background: #f0f6fc; |
| 140 |
} |
| 141 |
|
| 142 |
.vigilante-2fa-search-results .search-result-item .user-avatar, |
| 143 |
.vigilante-pwexp-search-results .search-result-item .user-avatar { |
| 144 |
width: 32px; |
| 145 |
height: 32px; |
| 146 |
border-radius: 50%; |
| 147 |
background: #dcdcde; |
| 148 |
} |
| 149 |
|
| 150 |
.vigilante-2fa-search-results .search-result-item .user-info, |
| 151 |
.vigilante-pwexp-search-results .search-result-item .user-info { |
| 152 |
flex: 1; |
| 153 |
min-width: 0; |
| 154 |
} |
| 155 |
|
| 156 |
.vigilante-2fa-search-results .search-result-item .user-name, |
| 157 |
.vigilante-pwexp-search-results .search-result-item .user-name { |
| 158 |
font-weight: 500; |
| 159 |
color: #1d2327; |
| 160 |
white-space: nowrap; |
| 161 |
overflow: hidden; |
| 162 |
text-overflow: ellipsis; |
| 163 |
} |
| 164 |
|
| 165 |
.vigilante-2fa-search-results .search-result-item .user-email, |
| 166 |
.vigilante-pwexp-search-results .search-result-item .user-email { |
| 167 |
font-size: 12px; |
| 168 |
color: #646970; |
| 169 |
white-space: nowrap; |
| 170 |
overflow: hidden; |
| 171 |
text-overflow: ellipsis; |
| 172 |
} |
| 173 |
|
| 174 |
.vigilante-2fa-search-results .no-results, |
| 175 |
.vigilante-pwexp-search-results .no-results { |
| 176 |
padding: 12px; |
| 177 |
text-align: center; |
| 178 |
color: #646970; |
| 179 |
font-style: italic; |
| 180 |
} |
| 181 |
|
| 182 |
.vigilante-2fa-search-results .searching, |
| 183 |
.vigilante-pwexp-search-results .searching { |
| 184 |
padding: 12px; |
| 185 |
text-align: center; |
| 186 |
color: #646970; |
| 187 |
} |
| 188 |
|
| 189 |
/* Excluded users tags */ |
| 190 |
.vigilante-2fa-excluded-users, |
| 191 |
.vigilante-pwexp-excluded-users { |
| 192 |
display: flex; |
| 193 |
flex-wrap: wrap; |
| 194 |
gap: 8px; |
| 195 |
margin-top: 12px; |
| 196 |
} |
| 197 |
|
| 198 |
.vigilante-2fa-excluded-user, |
| 199 |
.vigilante-pwexp-excluded-user { |
| 200 |
display: inline-flex; |
| 201 |
align-items: center; |
| 202 |
gap: 6px; |
| 203 |
background: #f0f0f1; |
| 204 |
border: 1px solid #c3c4c7; |
| 205 |
border-radius: 4px; |
| 206 |
padding: 4px 8px 4px 12px; |
| 207 |
font-size: 13px; |
| 208 |
} |
| 209 |
|
| 210 |
.vigilante-2fa-excluded-user .user-display, |
| 211 |
.vigilante-pwexp-excluded-user .user-display { |
| 212 |
color: #1d2327; |
| 213 |
} |
| 214 |
|
| 215 |
.vigilante-2fa-excluded-user .remove-user, |
| 216 |
.vigilante-pwexp-excluded-user .remove-user { |
| 217 |
display: flex; |
| 218 |
align-items: center; |
| 219 |
justify-content: center; |
| 220 |
width: 18px; |
| 221 |
height: 18px; |
| 222 |
border: none; |
| 223 |
background: transparent; |
| 224 |
color: #646970; |
| 225 |
cursor: pointer; |
| 226 |
border-radius: 50%; |
| 227 |
padding: 0; |
| 228 |
font-size: 16px; |
| 229 |
line-height: 1; |
| 230 |
} |
| 231 |
|
| 232 |
.vigilante-2fa-excluded-user .remove-user:hover, |
| 233 |
.vigilante-pwexp-excluded-user .remove-user:hover { |
| 234 |
background: #d63638; |
| 235 |
color: #fff; |
| 236 |
} |
| 237 |
|
| 238 |
/* Email sender name field */ |
| 239 |
.vigilante-2fa-email-from { |
| 240 |
max-width: 300px; |
| 241 |
} |
| 242 |
|
| 243 |
/* Notification options */ |
| 244 |
.vigilante-2fa-notification-options { |
| 245 |
margin-top: 12px; |
| 246 |
padding-left: 24px; |
| 247 |
} |
| 248 |
|
| 249 |
.vigilante-2fa-notification-options label { |
| 250 |
display: block; |
| 251 |
margin-bottom: 8px; |
| 252 |
cursor: pointer; |
| 253 |
} |
| 254 |
|
| 255 |
.vigilante-2fa-notification-options input[type="radio"] { |
| 256 |
margin-right: 6px; |
| 257 |
} |
| 258 |
|
| 259 |
/* Send notification button */ |
| 260 |
.vigilante-2fa-send-notification { |
| 261 |
display: flex; |
| 262 |
align-items: center; |
| 263 |
gap: 12px; |
| 264 |
margin-top: 16px; |
| 265 |
} |
| 266 |
|
| 267 |
.vigilante-2fa-notification-status { |
| 268 |
font-style: italic; |
| 269 |
} |
| 270 |
|
| 271 |
.vigilante-2fa-notification-status.success { |
| 272 |
color: #00a32a; |
| 273 |
} |
| 274 |
|
| 275 |
.vigilante-2fa-notification-status.error { |
| 276 |
color: #d63638; |
| 277 |
} |
| 278 |
|
| 279 |
/* Disabled state when 2FA is not enabled */ |
| 280 |
.vigilante-2fa-settings-disabled { |
| 281 |
opacity: 0.6; |
| 282 |
pointer-events: none; |
| 283 |
} |
| 284 |
|
| 285 |
/* Method indicator badge */ |
| 286 |
.vigilante-method-badge { |
| 287 |
display: inline-block; |
| 288 |
background: #dcdcde; |
| 289 |
color: #1d2327; |
| 290 |
padding: 2px 8px; |
| 291 |
border-radius: 3px; |
| 292 |
font-size: 11px; |
| 293 |
font-weight: 500; |
| 294 |
text-transform: uppercase; |
| 295 |
margin-left: 8px; |
| 296 |
vertical-align: middle; |
| 297 |
} |
| 298 |
|
| 299 |
.vigilante-method-badge.php { |
| 300 |
background: #8b5cf6; |
| 301 |
color: #fff; |
| 302 |
} |
| 303 |
|
| 304 |
.vigilante-method-badge.database { |
| 305 |
background: #3b82f6; |
| 306 |
color: #fff; |
| 307 |
} |
| 308 |
|
| 309 |
.vigilante-method-badge.htaccess { |
| 310 |
background: #10b981; |
| 311 |
color: #fff; |
| 312 |
} |
| 313 |
|
| 314 |
.vigilante-method-badge.filter { |
| 315 |
background: #f59e0b; |
| 316 |
color: #fff; |
| 317 |
} |
| 318 |
|
| 319 |
.vigilante-method-badge.rewrite { |
| 320 |
background: #ec4899; |
| 321 |
color: #fff; |
| 322 |
} |
| 323 |
|
| 324 |
.vigilante-method-badge.email { |
| 325 |
background: #06b6d4; |
| 326 |
color: #fff; |
| 327 |
} |
| 328 |
|
| 329 |
.vigilante-method-badge.config { |
| 330 |
background: #ea580c; |
| 331 |
color: #fff; |
| 332 |
} |
| 333 |
|
| 334 |
.vigilante-method-badge.settings { |
| 335 |
background: #64748b; |
| 336 |
color: #fff; |
| 337 |
} |
| 338 |
|
| 339 |
/* Responsive */ |
| 340 |
@media screen and (max-width: 782px) { |
| 341 |
.vigilante-2fa-roles { |
| 342 |
flex-direction: column; |
| 343 |
gap: 8px; |
| 344 |
} |
| 345 |
|
| 346 |
.vigilante-2fa-user-search { |
| 347 |
max-width: 100%; |
| 348 |
} |
| 349 |
|
| 350 |
.vigilante-2fa-method-selector { |
| 351 |
flex-direction: column; |
| 352 |
} |
| 353 |
} |
| 354 |
|
| 355 |
/* Method selector */ |
| 356 |
.vigilante-2fa-method-selector { |
| 357 |
display: flex; |
| 358 |
gap: 16px; |
| 359 |
flex-wrap: wrap; |
| 360 |
} |
| 361 |
|
| 362 |
.vigilante-2fa-method-option { |
| 363 |
display: flex; |
| 364 |
align-items: flex-start; |
| 365 |
gap: 12px; |
| 366 |
padding: 16px; |
| 367 |
border: 2px solid #c3c4c7; |
| 368 |
border-radius: 6px; |
| 369 |
cursor: pointer; |
| 370 |
flex: 1; |
| 371 |
min-width: 240px; |
| 372 |
transition: border-color 0.2s, background 0.2s; |
| 373 |
} |
| 374 |
|
| 375 |
.vigilante-2fa-method-option:hover { |
| 376 |
border-color: #2271b1; |
| 377 |
background: #f0f6fc; |
| 378 |
} |
| 379 |
|
| 380 |
.vigilante-2fa-method-option.selected { |
| 381 |
border-color: #2271b1; |
| 382 |
background: #f0f6fc; |
| 383 |
} |
| 384 |
|
| 385 |
.vigilante-2fa-method-option input[type="radio"] { |
| 386 |
margin-top: 3px; |
| 387 |
} |
| 388 |
|
| 389 |
.vigilante-2fa-method-option .dashicons { |
| 390 |
font-size: 24px; |
| 391 |
width: 24px; |
| 392 |
height: 24px; |
| 393 |
color: #2271b1; |
| 394 |
margin-top: 2px; |
| 395 |
} |
| 396 |
|
| 397 |
.vigilante-2fa-method-option .method-info { |
| 398 |
flex: 1; |
| 399 |
} |
| 400 |
|
| 401 |
.vigilante-2fa-method-option .method-info strong { |
| 402 |
display: block; |
| 403 |
margin-bottom: 4px; |
| 404 |
color: #1d2327; |
| 405 |
} |
| 406 |
|
| 407 |
.vigilante-2fa-method-option .method-info span { |
| 408 |
color: #646970; |
| 409 |
font-size: 13px; |
| 410 |
line-height: 1.4; |
| 411 |
} |
| 412 |
|
| 413 |
/* TOTP reset container */ |
| 414 |
.vigilante-totp-reset-container { |
| 415 |
margin-top: 8px; |
| 416 |
} |
| 417 |
|
| 418 |
.vigilante-totp-reset-results { |
| 419 |
position: absolute; |
| 420 |
top: 100%; |
| 421 |
left: 0; |
| 422 |
right: 0; |
| 423 |
background: #fff; |
| 424 |
border: 1px solid #c3c4c7; |
| 425 |
border-top: none; |
| 426 |
border-radius: 0 0 4px 4px; |
| 427 |
box-shadow: 0 4px 8px rgba(0,0,0,0.1); |
| 428 |
max-height: 200px; |
| 429 |
overflow-y: auto; |
| 430 |
z-index: 100; |
| 431 |
display: none; |
| 432 |
} |
| 433 |
|
| 434 |
.vigilante-totp-reset-results.active { |
| 435 |
display: block; |
| 436 |
} |
| 437 |
|
| 438 |
.vigilante-totp-reset-selected { |
| 439 |
display: flex; |
| 440 |
flex-wrap: wrap; |
| 441 |
gap: 8px; |
| 442 |
margin: 12px 0; |
| 443 |
} |
| 444 |
|
| 445 |
.vigilante-totp-reset-status { |
| 446 |
margin-left: 12px; |
| 447 |
font-style: italic; |
| 448 |
} |
| 449 |
|
| 450 |
.vigilante-totp-reset-status.success { |
| 451 |
color: #00a32a; |
| 452 |
} |
| 453 |
|
| 454 |
.vigilante-totp-reset-status.error { |
| 455 |
color: #d63638; |
| 456 |
} |
| 457 |
|
| 458 |
/* TOTP profile section (user profile page) */ |
| 459 |
.vigilante-totp-profile .vigilante-totp-status { |
| 460 |
display: inline-flex; |
| 461 |
align-items: center; |
| 462 |
gap: 4px; |
| 463 |
font-weight: 500; |
| 464 |
padding: 4px 12px; |
| 465 |
border-radius: 4px; |
| 466 |
font-size: 13px; |
| 467 |
} |
| 468 |
|
| 469 |
.vigilante-totp-active { |
| 470 |
background: #d4edda; |
| 471 |
color: #155724; |
| 472 |
} |
| 473 |
|
| 474 |
.vigilante-totp-active .dashicons { |
| 475 |
color: #00a32a; |
| 476 |
} |
| 477 |
|
| 478 |
.vigilante-totp-pending { |
| 479 |
background: #fff3cd; |
| 480 |
color: #856404; |
| 481 |
} |
| 482 |
|
| 483 |
.vigilante-totp-pending .dashicons { |
| 484 |
color: #dba617; |
| 485 |
} |
| 486 |
|
| 487 |
.vigilante-totp-grace-notice { |
| 488 |
color: #d63638; |
| 489 |
font-weight: 500; |
| 490 |
} |
| 491 |
|
| 492 |
.vigilante-totp-backup-count { |
| 493 |
font-weight: 500; |
| 494 |
} |
| 495 |
|
| 496 |
.vigilante-totp-backup-count.warning { |
| 497 |
color: #d63638; |
| 498 |
} |
| 499 |
|
| 500 |
/* QR code setup */ |
| 501 |
.vigilante-totp-setup-qr { |
| 502 |
max-width: 500px; |
| 503 |
} |
| 504 |
|
| 505 |
.vigilante-totp-setup-qr > .description { |
| 506 |
margin-bottom: 16px; |
| 507 |
} |
| 508 |
|
| 509 |
.vigilante-totp-qr-container { |
| 510 |
margin: 16px 0; |
| 511 |
} |
| 512 |
|
| 513 |
.vigilante-totp-qr-container img, |
| 514 |
.vigilante-totp-qr-container canvas { |
| 515 |
display: block; |
| 516 |
border: 8px solid #fff; |
| 517 |
box-shadow: 0 2px 8px rgba(0,0,0,0.1); |
| 518 |
border-radius: 4px; |
| 519 |
} |
| 520 |
|
| 521 |
.vigilante-totp-manual-key { |
| 522 |
margin: 16px 0; |
| 523 |
} |
| 524 |
|
| 525 |
.vigilante-totp-manual-key p { |
| 526 |
margin-bottom: 8px; |
| 527 |
color: #646970; |
| 528 |
font-size: 13px; |
| 529 |
} |
| 530 |
|
| 531 |
.vigilante-totp-secret-display { |
| 532 |
display: inline-block; |
| 533 |
font-family: monospace; |
| 534 |
font-size: 14px; |
| 535 |
letter-spacing: 2px; |
| 536 |
background: #f6f7f7; |
| 537 |
padding: 8px 16px; |
| 538 |
border: 1px solid #dcdcde; |
| 539 |
border-radius: 4px; |
| 540 |
user-select: all; |
| 541 |
word-break: break-all; |
| 542 |
} |
| 543 |
|
| 544 |
.vigilante-totp-verify-setup { |
| 545 |
margin-top: 20px; |
| 546 |
padding-top: 16px; |
| 547 |
border-top: 1px solid #dcdcde; |
| 548 |
display: flex; |
| 549 |
align-items: center; |
| 550 |
gap: 8px; |
| 551 |
flex-wrap: wrap; |
| 552 |
} |
| 553 |
|
| 554 |
.vigilante-totp-verify-setup label { |
| 555 |
font-weight: 600; |
| 556 |
} |
| 557 |
|
| 558 |
.vigilante-totp-verify-setup input[type="text"] { |
| 559 |
width: 120px; |
| 560 |
font-size: 16px; |
| 561 |
letter-spacing: 4px; |
| 562 |
text-align: center; |
| 563 |
font-family: monospace; |
| 564 |
} |
| 565 |
|
| 566 |
.vigilante-totp-setup-status { |
| 567 |
font-size: 13px; |
| 568 |
} |
| 569 |
|
| 570 |
.vigilante-totp-setup-status.error { |
| 571 |
color: #d63638; |
| 572 |
} |
| 573 |
|
| 574 |
/* Success and backup codes */ |
| 575 |
.vigilante-totp-success-msg { |
| 576 |
display: flex; |
| 577 |
align-items: center; |
| 578 |
gap: 8px; |
| 579 |
background: #d4edda; |
| 580 |
color: #155724; |
| 581 |
padding: 12px 16px; |
| 582 |
border-radius: 4px; |
| 583 |
margin-bottom: 16px; |
| 584 |
font-weight: 500; |
| 585 |
} |
| 586 |
|
| 587 |
.vigilante-totp-success-msg .dashicons { |
| 588 |
color: #00a32a; |
| 589 |
font-size: 20px; |
| 590 |
width: 20px; |
| 591 |
height: 20px; |
| 592 |
} |
| 593 |
|
| 594 |
.vigilante-totp-backup-codes-box { |
| 595 |
border: 1px solid #dcdcde; |
| 596 |
border-radius: 4px; |
| 597 |
padding: 16px; |
| 598 |
margin-top: 16px; |
| 599 |
background: #fff; |
| 600 |
} |
| 601 |
|
| 602 |
.vigilante-totp-backup-warning { |
| 603 |
display: flex; |
| 604 |
align-items: center; |
| 605 |
gap: 6px; |
| 606 |
color: #d63638; |
| 607 |
font-weight: 600; |
| 608 |
margin: 0 0 12px; |
| 609 |
font-size: 13px; |
| 610 |
} |
| 611 |
|
| 612 |
.vigilante-totp-backup-warning .dashicons { |
| 613 |
color: #d63638; |
| 614 |
} |
| 615 |
|
| 616 |
.vigilante-totp-codes-grid { |
| 617 |
display: grid; |
| 618 |
grid-template-columns: repeat(2, 1fr); |
| 619 |
gap: 8px; |
| 620 |
} |
| 621 |
|
| 622 |
.vigilante-totp-codes-grid code { |
| 623 |
display: block; |
| 624 |
font-family: monospace; |
| 625 |
font-size: 14px; |
| 626 |
background: #f6f7f7; |
| 627 |
padding: 6px 12px; |
| 628 |
border: 1px solid #dcdcde; |
| 629 |
border-radius: 3px; |
| 630 |
letter-spacing: 1px; |
| 631 |
} |