/* ===================================================
   SOFT MODERN THEME
   Shared theme for all installer pages
   Lightweight, no images, pure CSS
   =================================================== */

/* Body - soft, light background */
body {
  background: linear-gradient(135deg, #f4f6fa 0%, #eef1f6 100%) !important;
  background-attachment: fixed;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif !important;
}

/* Login-flow pages (PIN entry, pick reseller) - same background photo used
   on the admin login page (templates/default/gfx/reseller/background.jpg) */
body.login-page {
  background: url('../../templates/default/gfx/reseller/background.jpg') no-repeat center center fixed !important;
  background-size: cover !important;
}

/* Containers - clean white cards */
.pin-login-container,
.reseller-picker-container,
.serial-lookup-container,
body > div[align="center"] {
  background: #ffffff !important;
  border: 1px solid #e5e9f0 !important;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06) !important;
  position: relative;
}

/* Headings */
h3 {
  color: #1e293b !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif !important;
}

/* Device info label - soft info panel */
body > div[align="center"] > form .form-group label[for="data-change"] {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: none !important;
}

/* Status label - soft pill badge */
label[for="data-change"] > label[for="status-show"],
fieldset.form-group > label[for="status-show"] {
  color: #16a34a !important;
  font-weight: 600 !important;
  background: #dcfce7 !important;
  padding: 4px 10px !important;
  border-radius: 999px;
  border: 1px solid #bbf7d0 !important;
}

/* Input fields */
input[type="text"],
input[type="number"],
select {
  background: #f8fafc !important;
  border: 1px solid #dbe3ea !important;
  color: #1e293b !important;
  box-shadow: none !important;
}

/* Reset the native select widget and draw our own arrow. Without this,
   mobile browsers (iOS Safari in particular) compute the selected value's
   text position against their own default padding/line-height, so once we
   add custom padding the chosen option's text renders clipped inside the
   closed select box. */
select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  line-height: normal !important;
  padding: 10px 30px 10px 12px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 14px 14px !important;
}

select::-ms-expand {
  display: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

input::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

select option {
  background: #ffffff;
  color: #1e293b;
}

/* Buttons - flat, soft, modern */
.btn {
  background: #2563eb !important;
  border: 1px solid #1d4ed8 !important;
  color: #ffffff !important;
  text-shadow: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
  border-radius: 8px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: #1d4ed8 !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12) !important;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1) !important;
}

/* Red button (DEMONTAGE) - soft warning style */
.btn.data-deinstallation-report {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
}

.btn.data-deinstallation-report:hover {
  background: #b91c1c !important;
}

/* Neutral/secondary buttons (Scan with camera, Cancel, BLE conf, etc.) -
   keep these visually distinct from primary blue actions. */
.btn.btn-default,
.btn.btn-secondary,
.btn.check-older-data,
.btn.check-tacho-status {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  text-shadow: none !important;
}

.btn.btn-default:hover,
.btn.btn-secondary:hover,
.btn.check-older-data:hover,
.btn.check-tacho-status:hover {
  background: #e2e8f0 !important;
}

/* Stop scan - distinct "stop" look instead of the same neutral gray as
   Scan with camera. */
.btn.btn-default.imei-scan-stop,
.btn.btn-default.ble-scan-stop {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

.btn.btn-default.imei-scan-stop:hover,
.btn.btn-default.ble-scan-stop:hover {
  background: #fee2e2 !important;
}

/* Barcode/QR mode toggle - clear selected vs unselected states instead of
   opacity dimming. */
.imei-scan-modes button.btn.btn-default,
.ble-scan-modes button.btn.btn-default {
  color: #64748b !important;
}

.imei-scan-modes button.btn.btn-default.active,
.ble-scan-modes button.btn.btn-default.active {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Action buttons - soft outline style */
.action-button {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.action-button:hover {
  background: #e2e8f0 !important;
}

.action-button:active {
  background: #cbd5e1 !important;
}

/* Tables - clean data display */
.table-bordered {
  background: #ffffff !important;
  border: 1px solid #e5e9f0 !important;
}

.table-bordered td {
  border-color: #eef1f6 !important;
  background: transparent;
}

.table-bordered tr:nth-child(even) td {
  background: #f8fafc;
}

.table-4 {
  background: #ffffff !important;
  border-color: #e5e9f0 !important;
}

.table-4 td {
  border-color: #eef1f6 !important;
}

/* Info cards (status overview / device details / system & I/O / last event) */
.info-card {
  background: #ffffff !important;
  border: 1px solid #e5e9f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05) !important;
}

/* Alert messages - soft notification style */
.alert-info {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1e40af !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

/* Checkbox - simple modern toggle */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background: #2563eb;
  border-color: #1d4ed8;
}

input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  top: -2px;
  left: 3px;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
}

/* Labels - clean text */
label {
  color: #334155;
}

/* Fieldset - clean borders */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Links */
a {
  color: #2563eb;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
}

/* High contrast for bright outdoor conditions */
@media (prefers-contrast: high) {
  .pin-login-container,
  .reseller-picker-container,
  .serial-lookup-container,
  body > div[align="center"] {
    border-width: 2px !important;
    border-color: #94a3b8 !important;
  }
}
