/* Reset cơ bản */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
  font-family: 'Segoe UI', Tahoma, sans-serif; 
  background: #eef1f5; 
  color: #333; 
  line-height: 1.5; 
}

/* Header */
header {
  background: linear-gradient(90deg, #007bff, #0056b3);
  color: white;
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
}
header h1 { margin-bottom: 8px; font-size: 22px; }
header p { font-size: 14px; opacity: 0.9; }

/* Container chung */
.container {
  max-width: 520px;
  margin: 0 auto 30px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #007bff;
}

/* Form */
.row { margin-bottom: 15px; display: flex; flex-direction: column; }
label { font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border 0.3s;
}
input:focus, select:focus, textarea:focus {
  border-color: #007bff;
  outline: none;
}

/* Buttons */
button {
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s;
}
button:hover { opacity: 0.9; }
#btnLogin { background: #28a745; color: white; width: 100%; }
#btnCapture { background: #ffc107; color: black; flex: 1; }
#btnSwitchCamera { background: #17a2b8; color: white; flex: 1; }
.btn-primary { background: #007bff; color: white; width: 100%; margin-top: 10px; }

/* Nhóm nút camera */
.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Camera & Preview ảnh */
#video {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: black;
  max-height: 300px;
}
#previewWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
#previewWrap img {
  max-width: 100px;
  border-radius: 6px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Status & Error */
#status { margin-top: 10px; font-weight: bold; }
.error { color: red; margin-top: 10px; }

/* Footer */
footer {
  background: #f0f0f0;
  padding: 15px;
  text-align: center;
  font-size: 13px;
  border-top: 1px solid #ddd;
  color: #555;
}

.preview-item {
  position: relative;
  display: inline-block;
  margin: 5px;
}

.preview-item img {
  max-height: 100px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.preview-item .remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: transform 0.2s;
}

.preview-item .remove-btn:hover {
  transform: scale(1.1);
}
