/*
 * beweis01.css
 * Angepasste Stile für die Beweis01-Webanwendung
 * Keine externen Font-Imports!
 */

/* =========================================================
   Basis-Typografie – systemnahe Schriften, kein CDN
   ========================================================= */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas,
    "DejaVu Sans Mono", monospace;

  /* Beweis01-Farbpalette */
  --b01-primary:        #0d6efd;
  --b01-primary-dark:   #0a58ca;
  --b01-success:        #198754;
  --b01-warning:        #fd7e14;
  --b01-warning-light:  #fff3cd;
  --b01-warning-border: #ffc107;
  --b01-danger:         #dc3545;
  --b01-secondary:      #6c757d;
  --b01-info:           #0dcaf0;
  --b01-muted:          #6c757d;

  /* Status-Farben */
  --status-pending:   #6c757d;
  --status-running:   #0d6efd;
  --status-completed: #198754;
  --status-failed:    #dc3545;
  --status-cancelled: #fd7e14;

  /* Private-IP-Warnung */
  --private-ip-bg:     #fff8e1;
  --private-ip-border: #ff9800;
  --private-ip-text:   #e65100;

  /* Hash-Anzeige */
  --hash-bg:     #f8f9fa;
  --hash-border: #dee2e6;
  --hash-color:  #212529;
}

body {
  font-family: var(--font-sans);
}

/* =========================================================
   Layout-Hilfsstile
   ========================================================= */
.min-vh-fill {
  min-height: calc(100vh - 56px - 60px); /* Viewport minus Navbar und Footer */
}

/* =========================================================
   Status-Badges
   ========================================================= */
.badge-status-pending {
  background-color: var(--status-pending);
  color: #fff;
}

.badge-status-running {
  background-color: var(--status-running);
  color: #fff;
  animation: pulse-running 1.5s ease-in-out infinite;
}

.badge-status-completed {
  background-color: var(--status-completed);
  color: #fff;
}

.badge-status-failed {
  background-color: var(--status-failed);
  color: #fff;
}

.badge-status-cancelled {
  background-color: var(--status-cancelled);
  color: #fff;
}

@keyframes pulse-running {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* =========================================================
   Hash-Anzeige
   ========================================================= */
.hash-display {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background-color: var(--hash-bg);
  border: 1px solid var(--hash-border);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  color: var(--hash-color);
  word-break: break-all;
  user-select: all;
}

.hash-copy-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.hash-copy-btn.copied {
  color: var(--b01-success);
  border-color: var(--b01-success);
}

/* =========================================================
   Warnung bei privater IP-Adresse
   ========================================================= */
.private-ip-warning {
  display: none;
  background-color: var(--private-ip-bg);
  border: 2px solid var(--private-ip-border);
  border-radius: 6px;
  color: var(--private-ip-text);
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.private-ip-warning.visible {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.private-ip-warning .warning-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* =========================================================
   Tabellen-Stile
   ========================================================= */
.table-evidence thead th {
  background-color: #212529;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.table-evidence tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.table-evidence td.url-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-evidence td.url-cell a {
  text-decoration: none;
  color: var(--b01-primary);
}

.table-evidence td.url-cell a:hover {
  text-decoration: underline;
}

/* =========================================================
   Statistik-Karten (Dashboard)
   ========================================================= */
.stat-card {
  border-left: 4px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-card.stat-total    { border-left-color: var(--b01-primary); }
.stat-card.stat-running  { border-left-color: var(--status-running); }
.stat-card.stat-done     { border-left-color: var(--status-completed); }
.stat-card.stat-failed   { border-left-color: var(--status-failed); }

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--b01-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================================
   Formular-Sektionen (aufklappbar)
   ========================================================= */
.section-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 0;
}

.section-header:hover {
  background-color: #e9ecef;
}

.section-header .section-chevron {
  transition: transform 0.2s ease;
  font-style: normal;
}

.section-header.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.section-body {
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 1rem;
  background-color: #fff;
}

/* =========================================================
   URL-Eingabe (prominent)
   ========================================================= */
.url-input-prominent {
  font-size: 1.1rem;
  padding: 0.6rem 1rem;
  border-width: 2px;
}

.url-input-prominent:focus {
  border-color: var(--b01-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* =========================================================
   Navbar-Anpassungen
   ========================================================= */
.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.navbar-brand .brand-badge {
  font-size: 0.55rem;
  vertical-align: super;
  opacity: 0.7;
  margin-left: 2px;
}

/* =========================================================
   Ladeanimation
   ========================================================= */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* =========================================================
   Footer
   ========================================================= */
footer.site-footer {
  border-top: 1px solid #343a40;
}

footer.site-footer .footer-disclaimer {
  font-size: 0.78rem;
  color: #adb5bd;
}

/* =========================================================
   Auth-Layout
   ========================================================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f2f5;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.auth-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--b01-primary);
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--b01-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* =========================================================
   Fehler-Meldungsbox
   ========================================================= */
.alert-auth-error {
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
}

/* =========================================================
   Paginierung
   ========================================================= */
.pagination-info {
  font-size: 0.85rem;
  color: var(--b01-muted);
}

/* =========================================================
   Detail-Seite: Abschnitt
   ========================================================= */
.detail-section-title {
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  color: #212529;
}

.detail-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.detail-label {
  flex-shrink: 0;
  width: 200px;
  color: var(--b01-muted);
  font-weight: 500;
}

.detail-value {
  flex: 1;
  word-break: break-all;
}

/* =========================================================
   Responsive Anpassungen
   ========================================================= */
@media (max-width: 576px) {
  .stat-card .stat-number {
    font-size: 1.5rem;
  }

  .detail-row {
    flex-direction: column;
    gap: 0.1rem;
  }

  .detail-label {
    width: auto;
  }

  .table-evidence td.url-cell {
    max-width: 150px;
  }
}
