/* rent-hier Verleih – Core CSS */
:root {
  --rhv-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --rhv-bg: #f5f5f7;
  --rhv-surface: #ffffff;
  --rhv-surface2: #f5f5f7;
  --rhv-border: rgba(0,0,0,.1);
  --rhv-text: #1d1d1f;
  --rhv-text2: #6e6e73;
  --rhv-blue: #0071e3;
  --rhv-blue-h: #0077ed;
  --rhv-green: #34c759;
  --rhv-red: #ff3b30;
  --rhv-orange: #ff9500;
  --rhv-ski: #378ADD;
  --rhv-bike: #1D9E75;
  --rhv-radius: 18px;
  --rhv-radius-sm: 10px;
  --rhv-shadow: 0 4px 24px rgba(0,0,0,.08);
  --rhv-shadow-lg: 0 20px 60px rgba(0,0,0,.15);
}

#rhv-app, #rhv-terminal { font-family: var(--rhv-font); color: var(--rhv-text); }
#rhv-app *, #rhv-terminal * { box-sizing: border-box; }

/* ── Inputs ── */
.rhv-input, .rhv-select {
  width: 100%; background: var(--rhv-surface2); border: 1px solid var(--rhv-border);
  border-radius: var(--rhv-radius-sm); padding: 11px 14px;
  font-size: 15px; font-family: var(--rhv-font); color: var(--rhv-text);
  transition: border-color .15s, box-shadow .15s; outline: none; appearance: none;
}
.rhv-input:focus, .rhv-select:focus {
  border-color: var(--rhv-blue); box-shadow: 0 0 0 3px rgba(0,113,227,.15);
}
.rhv-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e6e73' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer;
}
.rhv-field { display: flex; flex-direction: column; gap: 6px; }
.rhv-field label { font-size: 13px; font-weight: 500; color: var(--rhv-text2); }

/* ── Buttons ── */
.rhv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rhv-blue); color: #fff; border: none;
  border-radius: var(--rhv-radius-sm); padding: 12px 22px;
  font-size: 15px; font-weight: 500; font-family: var(--rhv-font);
  cursor: pointer; transition: background .15s, transform .1s; text-decoration: none;
}
.rhv-btn:hover { background: var(--rhv-blue-h); }
.rhv-btn:active { transform: scale(.98); }
.rhv-btn.secondary { background: var(--rhv-surface2); color: var(--rhv-text); border: 1px solid var(--rhv-border); }
.rhv-btn.secondary:hover { background: #e8e8ed; }
.rhv-btn.success { background: var(--rhv-green); }
.rhv-btn.danger { background: var(--rhv-red); }
.rhv-btn.large { padding: 16px 28px; font-size: 17px; border-radius: var(--rhv-radius); }
.rhv-btn.full { width: 100%; }
.rhv-btn.ski-btn { background: var(--rhv-ski); }
.rhv-btn.bike-btn { background: var(--rhv-bike); }
.rhv-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Cards ── */
.rhv-card {
  background: var(--rhv-surface); border-radius: var(--rhv-radius);
  box-shadow: var(--rhv-shadow); padding: 22px; margin-bottom: 18px;
}
.rhv-card-title {
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--rhv-text2); margin-bottom: 18px;
}

/* ── Grid ── */
.rhv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rhv-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media(max-width:640px) { .rhv-grid2, .rhv-grid3 { grid-template-columns: 1fr; } }

/* ── Badges ── */
.rhv-badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.rhv-badge.active   { background: rgba(52,199,89,.15); color: #1a7f3c; }
.rhv-badge.returned { background: rgba(110,110,115,.12); color: var(--rhv-text2); }
.rhv-badge.cancelled{ background: rgba(255,59,48,.1); color: var(--rhv-red); }
.rhv-badge.ski      { background: rgba(55,138,221,.12); color: #0C447C; }
.rhv-badge.bike     { background: rgba(29,158,117,.12); color: #085041; }

/* ── Alert ── */
.rhv-alert {
  padding: 14px 18px; border-radius: var(--rhv-radius-sm);
  font-size: 14px; margin-bottom: 14px; display: none;
}
.rhv-alert.success { background: rgba(52,199,89,.12); color: #1a7f3c; border: 1px solid rgba(52,199,89,.3); }
.rhv-alert.error   { background: rgba(255,59,48,.1); color: var(--rhv-red); border: 1px solid rgba(255,59,48,.2); }
.rhv-alert.shown   { display: block; }

/* ── Spinner ── */
.rhv-spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: rhv-spin .7s linear infinite;
}
@keyframes rhv-spin { to { transform: rotate(360deg); } }

/* ── Scanner ── */
.rhv-scan-btn {
  width: 44px; height: 44px; background: var(--rhv-blue); border: none;
  border-radius: 10px; cursor: pointer; color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.rhv-scan-btn:hover { background: var(--rhv-blue-h); }
.rhv-scan-row { display: flex; gap: 8px; align-items: flex-end; }
.rhv-scan-row .rhv-field { flex: 1; }

.rhv-eq-card {
  background: #E6F1FB; border-radius: 8px; border-left: 3px solid var(--rhv-blue);
  padding: 10px 14px; font-size: 13px; display: none; margin-top: 8px;
}
.rhv-eq-card.shown { display: block; }
.rhv-eq-card strong { font-size: 14px; font-weight: 600; color: #0C447C; }
.rhv-eq-card span { color: #185FA5; }

/* ── Scanner Modal ── */
.rhv-scanner-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  display: none; align-items: center; justify-content: center; z-index: 9999;
}
.rhv-scanner-modal.open { display: flex; }
.rhv-scanner-box { background: #000; border-radius: var(--rhv-radius); overflow: hidden; width: min(480px, 95vw); }
.rhv-scanner-hdr { background: rgba(255,255,255,.1); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.rhv-scanner-hdr p { color: #fff; font-size: 14px; font-weight: 500; }
.rhv-scanner-close { background: rgba(255,255,255,.2); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 16px; }
#rhv-preview { width: 100%; display: block; }
.rhv-crosshair { position: absolute; top:50%; left:50%; transform: translate(-50%,-50%); width: 200px; height: 120px; border: 2px solid var(--rhv-blue); border-radius: 8px; pointer-events: none; }

/* ── Summary ── */
.rhv-summary { background: #1d1d1f; color: #fff; border-radius: var(--rhv-radius); padding: 24px; margin-bottom: 18px; }
.rhv-summary h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.rhv-sum-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.rhv-sum-row:last-child { border: none; font-size: 18px; font-weight: 700; padding-top: 12px; }
.rhv-sum-row:last-child span:last-child { color: #30d158; }
.rhv-sum-label { color: rgba(255,255,255,.55); }

/* ── Success ── */
.rhv-success { text-align: center; padding: 60px 32px; display: none; }
.rhv-success.shown { display: block; }
.rhv-success-icon { font-size: 80px; animation: rhv-pop .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes rhv-pop { from { transform: scale(.3); opacity:0; } to { transform:scale(1); opacity:1; } }
.rhv-success h2 { font-size: 28px; font-weight: 700; margin: 14px 0 6px; letter-spacing: -0.5px; }
.rhv-success p { color: var(--rhv-text2); margin-bottom: 28px; }
.rhv-success-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Module color accent ── */
.rhv-module-ski .rhv-btn.primary-action { background: var(--rhv-ski); }
.rhv-module-bike .rhv-btn.primary-action { background: var(--rhv-bike); }
.rhv-module-ski .rhv-card-title { border-bottom-color: rgba(55,138,221,.3); }
.rhv-module-bike .rhv-card-title { border-bottom-color: rgba(29,158,117,.3); }
