/* ============================================================
   shared/portal.css  –  CargoNet Subunternehmer-Portal
   Eingebunden von allen Frontend-HTML-Seiten per absolutem Pfad.
   Branding-Farben kommen als CSS-Custom-Properties, die vom
   inline <style> im <head> überschrieben werden (aus tenant.env).
   ============================================================ */

/* --- Basis-Reset --- */
*, *::before, *::after { box-sizing: border-box; }

/* --- Branding-Variablen (Defaults, werden per page-inline überschrieben) --- */
:root {
  --primary:      #0074d9;
  --primary-dark: #005fa3;
  --text-dark:    #222;
  --bg-light:     rgba(255, 255, 255, 0.95);
  --radius-card:  16px;
  --radius-input: 8px;
  --shadow-card:  0 4px 24px rgba(0,0,0,0.22);
}

/* --- Layout --- */
body {
  margin: 0;
  font-family: system-ui, 'Segoe UI', Arial, sans-serif;
  background-image: url('/shared/img/bg.jpg');
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: var(--bg-light);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 480px;
  padding: 30px 25px;
  text-align: center;
  backdrop-filter: blur(4px);
}

/* --- Logo --- */
.logo {
  max-width: 160px;
  width: 50%;
  margin: 0 auto 20px;
  display: block;
}

/* --- Überschriften --- */
h1 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--primary);
  margin: 0 0 6px;
}
h2.subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-dark);
  margin: 0 0 20px;
}

/* --- Formular --- */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

label {
  font-weight: 600;
  font-size: 0.95em;
  color: var(--text-dark);
}

.hint {
  font-size: 0.8em;
  color: #777;
  margin-bottom: 2px;
}

input[type="text"],
input[type="number"],
input[type="file"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: var(--radius-input);
  transition: border-color 0.2s;
  background: #fff;
}

input[readonly] {
  background: #f5f5f5;
  color: #555;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

/* --- Grid-Helfer --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* --- Button --- */
button[type="submit"],
button.btn-primary {
  margin-top: 15px;
  padding: 12px;
  font-size: 1.1em;
  border: none;
  border-radius: var(--radius-input);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s;
  width: 100%;
}

button[type="submit"]:hover,
button.btn-primary:hover {
  background: var(--primary-dark);
}

button.btn-scan {
  background: #28a745;
}
button.btn-scan:hover {
  background: #1e7e34;
}

/* --- Meldungen --- */
#message {
  margin: 10px 0;
  font-weight: 600;
  text-align: center;
  min-height: 1.4em;
}
#message.ok    { color: #1e7e34; }
#message.error { color: #c0392b; }

/* --- AGB-Hinweis --- */
.agb-hint {
  font-size: 0.82em;
  color: #666;
  line-height: 1.5;
}
.agb-hint a {
  color: var(--primary);
}

/* --- Danke-Seite --- */
.danke-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

/* --- Responsiv --- */
@media (min-width: 768px) {
  body        { padding: 40px; }
  .container  { padding: 40px 35px; }
}
