/* =============================================
   TerminTap App – style.css
   ============================================= */

/* --- Lokale Fonts --- */
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('/assets/fonts/Lora-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('/assets/fonts/Lora-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --- Variablen --- */
:root {
  --blue:       #2563eb;
  --blue-dark:  #1d4ed8;
  --navy:       #0f1f3d;
  --white:      #ffffff;
  --gray-light: #f5f7fa;
  --gray-mid:   #e2e8f0;
  --text:       #1e293b;
  --text-muted: #64748b;
  --border:     #e5e7eb;
  --focus:      #2563eb;
  --radius:     8px;
  --shadow:     0 4px 24px rgba(15, 31, 61, 0.08);
}

/* --- Reset & Basis --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--gray-light);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
.app-header {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6e 100%);
  color: var(--white);
  padding: 1.5rem;
}

.app-header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-header h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.app-header p  { font-size: 0.9rem; opacity: 0.85; margin: 0.2rem 0 0; }

.login-header { text-align: center; padding: 3.5rem 1.5rem 2.5rem; }
.login-header img { margin: 0 auto 1.25rem; width: 80px; }
.login-header h1 { font-size: 2rem; }
.login-header p  { opacity: 0.85; margin-top: 0.4rem; }

.display-header { text-align: center; padding: 2rem 1.5rem 1.5rem; }
.display-header h1 { font-size: 1.75rem; }
.display-header p  { opacity: 0.85; margin-top: 0.4rem; }

/* --- Main --- */
main {
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  width: 100%;
}

/* --- Card --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; color: var(--navy); }

/* --- Floating Label Form Fields --- */
.form-field { position: relative; margin-bottom: 1rem; }

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  padding: 1.1rem 1rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.form-field input:hover,
.form-field textarea:hover { background: #fafafa; }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: var(--white);
}

.form-field label {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: #9ca3af; pointer-events: none;
  background: var(--white); padding: 0 0.25rem;
  transition: transform 0.15s ease, top 0.15s ease, color 0.15s ease, font-size 0.15s ease;
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: 0.35rem; transform: translateY(0); font-size: 0.82rem; color: var(--focus);
}

.form-field input[type="date"] + label,
.form-field input[type="time"] + label,
.form-field input[type="number"] + label {
  top: 0.35rem; transform: translateY(0); font-size: 0.82rem; color: var(--text-muted);
}
.form-field input[type="date"],
.form-field input[type="time"],
.form-field input[type="number"] { padding-top: 1.35rem; }

.form-field textarea { resize: vertical; min-height: 100px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* --- Buttons --- */
.btn {
  display: inline-block; appearance: none; border: 0; cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 600; line-height: 1;
  padding: 0.9rem 1.5rem;
  background: var(--blue); color: var(--white);
  border-radius: 9999px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.05s;
  text-decoration: none;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: rgba(255,255,255,0.15); }
.btn-ghost:hover { background: rgba(255,255,255,0.25); }
.btn-full { width: 100%; text-align: center; }

/* --- Status --- */
.status-msg { font-size: 0.9rem; padding: 0.5rem 0; min-height: 1.4rem; text-align: center; }
.status-msg.ok    { color: #166534; }
.status-msg.error { color: #b91c1c; }

/* --- Display-Link --- */
.display-link-row { display: flex; gap: 0.5rem; align-items: center; }
.display-link-row input {
  flex: 1; font-size: 0.9rem; padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--gray-light); color: var(--text-muted);
  font-family: 'Outfit', sans-serif; outline: none;
}
.display-link-info { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem; }

/* --- QR Display --- */
.qr-card {
  background: var(--white); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow);
  text-align: center; max-width: 380px; margin: 0 auto 1rem;
}
#qrContainer {
  min-height: 270px; display: flex;
  align-items: center; justify-content: center; background: var(--white);
}
#noData { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }
#apptInfo { margin-top: 1rem; font-size: 0.95rem; color: var(--text); font-weight: 500; }
.display-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; }

/* --- Biz Logo --- */
#bizLogo {
  width: 48px; height: 48px; border-radius: 0.5rem;
  background: rgba(255,255,255,0.15); padding: 0.2rem;
  object-fit: cover; flex-shrink: 0;
}

/* --- Footer --- */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 1.75rem 1rem;
  font-size: 0.85rem;
  margin-top: auto;
}
footer a { color: rgba(255,255,255,0.8); margin: 0 0.4rem; }
footer a:hover { color: white; text-decoration: none; }
footer p + p { margin-top: 0.3rem; }
footer .footer-note {
  font-family: 'Lora', serif;
  font-style: italic;
  opacity: 0.6;
  margin-top: 0.4rem;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .display-link-row { flex-direction: column; align-items: stretch; }
  .card { padding: 1.25rem; }
}
