html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background-color: #fff;
  text-align: center;
  overflow: auto; /* normaal gedrag */
}

/* Alleen scrollen toestaan op WorkItem view */
.view:not(.workitem-view) {
  height: 100vh;
  overflow: hidden;
}

/* ========== Views + Fade ========== */
.view {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.view.active {
  display: block;
  opacity: 1;
}

/* ========== Splashscreen ========== */
.splash-screen {
  background: url('splash2.png') no-repeat center center;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.splash-overlay {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  color: white;
}

.splash-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
}

.loader {
  border: 4px solid #fff;
  border-top: 4px solid #f49600;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== Login ========== */
.login-wrapper {
  height: 100vh;
  background-color: #f5f5f5;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.header-curve {
  height: 120px;
  width: 100%;
  background: linear-gradient(to right, #fcb045, #fd1d1d, #833ab4);
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  transform: scaleX(2);
  position: absolute;
  top: 0;
  z-index: -1;
}

.footer-curve {
  height: 100px;
  width: 100%;
  background: linear-gradient(to right, #833ab4, #fd1d1d);
  border-top-left-radius: 50px;
  border-top-right-radius: 50px;
  transform: scaleX(2);
  position: absolute;
  bottom: 0;
  z-index: -1;
}

.login-container {
  padding: 160px 30px 120px;
  text-align: center;
}

.logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin: 0 auto 20px auto;
}

.title {
  font-size: 34px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 16px;
  color: #777;
  margin-bottom: 30px;
}

.input-container {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 10px;
  padding: 0 10px;
  margin-bottom: 15px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.input-container input {
  border: none;
  flex: 1;
  height: 50px;
  font-size: 16px;
  outline: none;
  padding: 0 10px;
}

.button-container {
  margin-top: 10px;
}

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  background: linear-gradient(to right, #ff6e02, #f49600, #ff6e02);
  border: none;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 600;
  color: white;
  gap: 8px;
  cursor: pointer;
}

.button:hover {
  opacity: 0.95;
}

.error {
  color: darkblue;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

/* ========== Dashboard ========== */
.dashboardView {
  background-color: #084179;
  color: white;
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.dashboard-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 30px;
  padding: 20px;
  box-sizing: border-box;
}

.dashboard-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
  color: white;
}

.scan-button {
  background: linear-gradient(to right, #ff6e02, #f49600, #ff6e02);
  border: none;
  border-radius: 10px;
  padding: 16px 24px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.barcode-icon {
  width: 180px;
  height: 50px;
  object-fit: contain;
}

.logout-wrapper {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.logout-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
}

/* ========== Scannerpagina ========== */
#scannerView {
  background-color: #f5f5f5;
  color: #333;
  height: 100vh;
  padding: 40px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

#scannerView h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
}

#video {
  width: 100%;
  max-width: 320px;
  height: 100px;
  object-fit: cover;
  border: 4px solid #084179;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#result {
  font-size: 16px;
  color: #084179;
  font-weight: bold;
  margin-top: 10px;
}

#scannerView .button {
  background: linear-gradient(to right, #ff6e02, #f49600, #ff6e02);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  padding: 12px 24px;
  cursor: pointer;
  margin-top: 20px;
}

#scannerView .button:hover {
  opacity: 0.95;
}

/* ========== WorkItem View ========== */
.workitem-view {
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  box-sizing: border-box;
  background-color: #f5f5f5;
}

.workitem-view h1 {
  text-align: center;
  color: #084179;
  margin-bottom: 30px;
}

.info-card {
  margin: 0;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  padding: 16px 20px;
  margin: 20px auto;
  font-size: 15px;
  line-height: 1.4;
  max-width: 340px;
  text-align: left;
}

.info-card p {
  margin: 6px 0;
}

.info-card strong {
  color: #333;
}

.icon-row {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  padding: 0 10px;
}

.icon-button {
  width: 50px;
  height: 50px;
  background-color: #e8f0fe;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 30px 0 15px;
  text-align: center;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

.grey-button {
  background-color: #e0e0e0;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  cursor: pointer;
}

.grey-button.active {
  background-color: #084179;
  color: white;
  font-weight: bold;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.orange-button {
  background: linear-gradient(to right, #ff6e02, #f49600, #ff6e02);
}

.red-button {
  background: linear-gradient(to right, #e53935, #d32f2f);
}

/* ========== Modal ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  max-width: 90%;
  width: 320px;
  text-align: left;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #ff0000;
}
