* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: "Segoe UI", Arial, sans-serif; background: #f1f5f9; color: #0f172a; }
.hidden { display: none !important; }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.card { background: #fff; max-width: 520px; width: 100%; border-radius: 14px; padding: 28px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); text-align: center; }
.card h1 { margin: 0 0 12px; font-size: 22px; }
.card ul { text-align: left; line-height: 1.7; padding-left: 20px; }
.info { background: #f1f5f9; border-radius: 8px; padding: 10px 14px; text-align: left; font-size: 14px; line-height: 1.6; }
.text-danger { color: #dc2626; }
.text-success { color: #0d9488; }

.btn { border: 0; border-radius: 8px; padding: 12px 24px; font-size: 16px; cursor: pointer; background: #0d9488; color: #fff; text-decoration: none; display: inline-block; font-family: inherit; }
.btn:hover { background: #0f766e; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-secondary { background: #64748b; margin-right: 8px; }
.btn-secondary:hover { background: #475569; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 14px; font-size: 14px; }

/* Login */
.login { max-width: 420px; text-align: left; }
.login h1 { text-align: center; margin-bottom: 6px; }
.login .sub { margin: 0 0 20px; text-align: center; color: #64748b; font-size: 14px; }
.login label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.login input { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; }
.login input:focus { outline: 2px solid #0d9488; border-color: #0d9488; }
.login .btn { width: 100%; margin-top: 22px; }
#kode_ujian { text-transform: uppercase; letter-spacing: 2px; }
.alert { background: #fee2e2; color: #b91c1c; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }

/* Ujian */
body.exam { user-select: none; }
#exam { position: fixed; inset: 0; display: flex; flex-direction: column; background: #fff; }
#exam-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 16px; background: #0f766e; color: #fff; font-size: 14px; }
#exam-bar .btn { margin-left: 12px; }
#exam iframe { flex: 1; width: 100%; border: 0; }
#timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.overlay { background: rgba(15, 23, 42, .92); z-index: 10; }
#overlay h1, #locked h1 { color: #dc2626; }
#finished h1 { color: #0d9488; }
