/* ============================================================
   🌍 GLOBAL SETTINGS
   ------------------------------------------------------------
   - Allgemeine Resets und Basislayout
   - Grundlegende Schriftarten und Margins
============================================================ */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* ============================================================
   📱 MOBILE NAVBAR VISIBILITY
   ------------------------------------------------------------
   - Navbar ausblenden auf kleinen Bildschirmen
============================================================ */
@media (max-width: 900px) {
  .navbar {
    display: none;
  }
}

/* ============================================================
   🖼️ CANVAS ELEMENT (Logo-Kreise etc.)
============================================================ */
canvas {
  display: block;
  margin: 10px auto;
  max-width: 260px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   🧱 LAYOUT & CONTAINERS
   ------------------------------------------------------------
   - Hauptcontainer-Definition
   - Responsive Abstände (mit Navbar-Offset)
============================================================ */
.container {
  max-width: 920px;
  margin: 10px auto 20px;
  padding: 0 10px;
}

@media (min-width: 901px) {
  .container {
    margin-top: 100px; /* Abstand zur festen Navbar */
  }
}

/* ============================================================
   🗂️ CARDS (Allgemeine Boxen)
============================================================ */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  padding: 20px;
  margin: 0 auto 10px;
  width: 100%;
  max-width: 900px;
}

.card.narrow {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  padding: 20px;
  margin: 0 auto 10px;
  width: 100%;
  max-width: 450px;
}

/* ============================================================
   🐾 LOGO & TITEL
============================================================ */
.logo {
  background: rgba(0, 0, 0, 0.7);
  display: block;
  margin: 0 auto 10px;
  max-height: 100px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Titelkarten (z. B. Überschriftenbereiche) */
.title {
  display: table;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  margin: 16px auto 10px;
  padding: 0;
  text-align: center;
}

.title h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 5px 14px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.title h3::before,
.title h3::after {
  content: " 🐾 ";
  color: #f0f0f0;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

/* ============================================================
   🧭 NAVBAR (DESKTOP)
============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: saturate(1.2) blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.navbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hauptmenü (Desktop) */
.menu-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-links a,
.dropdown > a {
  padding: 8px 14px;
  text-decoration: none;
  color: #000;
  font-weight: 600;
  border-radius: 6px;
  display: inline-block;
}

.menu-links a:hover,
.dropdown > a:hover {
  background: #f5f5f5;
}

/* Dropdown (Desktop) */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  min-width: 180px;
  z-index: 1100;
  padding: 6px 0;
}

.dropdown-content a {
  display: block;
  padding: 12px 16px;
  color: #333;
  background: #fff;
  font-weight: 500;
  border-bottom: 1px solid #eee;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: #f9f9f9;
  color: #007bff;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ============================================================
   ✏️ FORMS & INPUT ELEMENTS
   ------------------------------------------------------------
   - Einheitliche Eingabefelder
   - Label-Designs
   - Formularfelder mit Rundungen
============================================================ */
label {
  display: block;
  margin: 10px 0 4px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  margin-bottom: 12px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 1px solid #a67c3b;
  outline-offset: 1px;
}

/* ============================================================
   🖲️ BUTTONS & ACTION LINKS
   ------------------------------------------------------------
   - Einheitliche Größe & Abstand
   - Mehrere Farbvarianten
============================================================ */
button {
  background: #000;
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 8px;
  text-decoration: none;
  display: inline-block;
}

button:hover {
  opacity: 0.9;
}

/* Gefährliche Aktionen */
button.danger {
  background: #cc0000;
}

button.danger:hover {
  background: #a30000;
}

/* Edit-Button (neutral dunkelgrau) */
.edit-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 8px;
  text-decoration: none;
  display: inline-block;
}

.edit-btn:hover {
  opacity: 0.9;
}

/* Toggle-Buttons */
.toggle-btn.active {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 8px;
  text-decoration: none;
  display: inline-block;
}

.toggle-btn.inactive {
  background: #dc3545;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 8px;
  text-decoration: none;
  display: inline-block;
}

.toggle-btn:hover {
  opacity: 0.9;
}

/* Links */
a {
  color: #333;
  text-decoration: none;
}

a:hover {
  color: #000;
  text-decoration: none;
}

/* Link-Stil für Formularaktionen */
.btn-link {
  display: inline-block;
  color: #333;
  font-weight: 700;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link.danger {
  color: #dc3545;
  margin-left: 10px;
}

/* Schwarze Primärbuttons (Export etc.) */
.btn-export,
.btn-download {
  display: inline-block;
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 8px;
  text-decoration: none;
}

.btn-export:hover,
.btn-download:hover {
  background: #555;
}

/* Formular-Action-Reihe */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-actions .btn-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0077cc;
  margin: 0;
}

.form-actions .btn-link:hover {
  text-decoration: underline;
}

/* ============================================================
   ⚡ FLASH MESSAGES
   ------------------------------------------------------------
   - Erfolg / Fehler / Info-Meldungen
============================================================ */
.flash-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-weight: 700;
}

.flash-card.success {
  border-left: 6px solid #28a745;
  color: #155724;
  background: #d4edda;
}

.flash-card.error {
  border-left: 6px solid #dc3545;
  color: #721c24;
  background: #f8d7da;
}

.flash-card.info {
  border-left: 6px solid #17a2b8;
  color: #0c5460;
  background: #d1ecf1;
}

/* ============================================================
   🔍 SEARCH & PAGINATION
============================================================ */
.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.search-row input[type="text"],
.search-row button {
  height: 46px;
  margin: 0;
  padding: 0 14px;
  font-size: 1rem;
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.search-row input[type="text"] {
  flex: 1;
  border: 1px solid #d1d5db;
}

.search-row button {
  background: #333;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.search-row button:hover {
  opacity: 0.9;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.page-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  background: #f1f1f1;
  color: #333;
  font-weight: 600;
  text-decoration: none;
}

.page-link:hover {
  background: #e2e2e2;
}

.page-link.active {
  background: #333;
  color: #fff;
}

/* ============================================================
   🎖️ BADGES, CHIPS & TOGGLES
============================================================ */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8em;
  font-weight: 700;
  color: #fff;
  margin: 2px;
}

.badge.verified {
  background: #28a745;
}

.badge.not-verified {
  background: #dc3545;
}

.badge.active {
  background: #007bff;
}

.badge.inactive {
  background: #6c757d;
}

.badge.old {
  background: #ffc107;
  color: #000;
}

/* Chips */
.chip {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 16px;
  background: #fff;
  margin: 2px;
  font-size: 0.9em;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.chip:hover {
  background: #eee;
  transform: scale(1.05);
}

.chip-active {
  background: #333;
  color: #fff;
  border-color: #000;
}

/* Button-Container */
.per-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

/* ============================================================
   💬 MESSAGES & THREADS
============================================================ */
.thread-list {
  margin-bottom: 20px;
}

.thread-card {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
  cursor: pointer;
}

.thread-card:hover {
  background: #f9f9f9;
}

.thread-card .title {
  font-weight: 700;
}

.thread-card .meta {
  font-size: 0.85rem;
  color: #555;
}

/* Nachrichtenverlauf */
.message-thread {
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.message {
  margin: 6px 0;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 70%;
  clear: both;
}

.message.me {
  background: #007bff;
  color: #fff;
  margin-left: auto;
  text-align: right;
}

.message.other {
  background: #f1f1f1;
  color: #000;
  margin-right: auto;
}

.message small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* Antwortbox */
.reply-box {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.reply-box textarea {
  flex: 1;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #ccc;
}

.reply-box button {
  align-self: flex-end;
  margin-top: 0;
}

/* Thread-Kopfbereich */
.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.thread-header strong {
  font-size: 1.2rem;
}

.thread-info {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #555;
}

/* Löschbutton */
.delete-form {
  margin: 0;
}

.delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #dc3545;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-btn:hover {
  background: #a30000;
}

/* ============================================================
   🔐 PASSWORD RESET – STÄRKE & MATCH ANZEIGE
============================================================ */
#strength-text,
#match {
  font-weight: 600;
  margin: 6px 0 8px;
  text-align: left;
}

.strength-bar {
  height: 8px;
  border-radius: 6px;
  background: #e5e5e5;
  margin-bottom: 10px;
  overflow: hidden;
}

.strength-bar-inner {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ============================================================
   💾 DOWNLOADS
============================================================ */
.download-card {
  position: relative;
  padding: 16px;
}

.download-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.download-thumb {
  flex: 0 0 120px;
  height: 180px;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #777;
  background: #f5f5f5;
  border: 1px dashed #ccc;
  border-radius: 10px;
}

.download-info {
  flex: 1;
}

.download-info h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.download-info p {
  margin: 0 0 12px;
  color: #444;
}

/* Admin-Aktionen in Karten */
.download-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}

/* Link-Buttons */
.btn-linkpage {
  display: inline-block;
  background: #79680f;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-linkpage:hover {
  background: #7a6910;
}

/* ============================================================
   📱 MOBILE NAVIGATION (Slide-In Menü)
============================================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);
  transition: left 0.3s ease;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  padding-top: 60px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding-bottom: 60px;
}

.mobile-menu.open {
  left: 0;
}

/* Menü-Tab (öffnet/schließt) */
.mobile-tab {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: #111;
  font-weight: 700;
  padding: 12px 6px;
  border-radius: 0 8px 8px 0;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: left 0.3s ease;
}

body.menu-open .mobile-tab {
  left: 260px;
}

.mobile-tab span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 1rem;
  font-weight: 700;
}

.mobile-tab::before,
.mobile-tab::after {
  content: "🐾";
  font-size: 18px;
  line-height: 1;
}

/* Menü-Links */
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 20px 0;
}

.mobile-menu-inner a {
  font-weight: 500;
  color: #333;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu-inner a:hover {
  color: #007bff;
}

.mobile-menu-inner .logout {
  margin-top: 5px;
  color: #dc3545;
}

/* Overlay (Abdunkelung beim Öffnen) */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: none;
}

.menu-overlay.active {
  display: block;
}

/* Scrollbar (mobil) */
.mobile-menu::-webkit-scrollbar {
  width: 6px;
}

.mobile-menu::-webkit-scrollbar-thumb {
  background-color: #b8860b;
  border-radius: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
  background-color: #fff5e1;
}

/* Desktop-Fix: Mobile Menü ausblenden */
@media (min-width: 901px) {
  .mobile-menu,
  .mobile-tab {
    display: none !important;
  }
}

/* ============================================================
   🖼️ BACKGROUND-AUSWAHL (Profil-Seite)
============================================================ */
.background-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.background-options label {
  cursor: pointer;
}

.background-options input[type="radio"] {
  display: none;
}

.background-options img.bg-thumb {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  border: 3px solid transparent;
  object-fit: cover;
  transition: 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.background-options input[type="radio"]:checked + img.bg-thumb {
  border-color: #a66c3b;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   👤 PROFILBILD-VORSCHAU
============================================================ */
.profile-pic-preview {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin: 0 auto 10px;
  display: block;
  background: #fff;
  aspect-ratio: 1 / 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-pic-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   📊 SYSTEM STATUS / CLOUD EXPLORER
============================================================ */
.cloud-explorer {
  text-align: center;
}

.cloud-filter {
  margin: 10px 0 14px;
  text-align: center;
}

.cloud-filter label {
  margin-right: 6px;
  font-weight: 600;
}

.cloud-filter select {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  background: #fff;
}

.table-wrapper {
  overflow-x: auto;
  margin: 1em auto;
  max-width: 95%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fffaf4;
  font-size: 0.9rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #d6b999;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: #f2e0c4;
  color: #3b2a14;
  font-weight: 700;
}

.data-table tr:hover td {
  background: #fdf2e0;
}

/* ============================================================
   ⚙️ ADMIN UTILITIES & HELFERKLASSEN
============================================================ */
.fullwidth {
  width: 100%;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.center {
  text-align: center;
}

.muted {
  color: #666;
  font-size: 0.9em;
}

.small {
  font-size: 0.9em;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 10px;
}

/* ============================================================
   🦶 FOOTER & MODALS
============================================================ */
.footer {
  width: 100%;
  background: #f5f1eb;
  color: #444;
  font-size: 0.85em;
  text-align: center;
  padding: 8px 0 10px;
  border-top: 1px solid #c7b49a;
  margin-top: 40px;
  position: relative;
}

.footer-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-link {
  color: #6b4f2d;
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #fffdf8;
  color: #222;
  border-radius: 10px;
  padding: 20px 25px;
  max-width: 700px;
  width: 95%;
  max-height: 80vh;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: fadeIn 0.25s ease;
}

.modal-scroll {
  overflow-y: auto;
  max-height: 60vh;
  margin-top: 10px;
  padding-right: 6px;
}

.modal h3 {
  margin-top: 0;
  color: #6b4f2d;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.4em;
  cursor: pointer;
  color: #6b4f2d;
  font-weight: bold;
}

.modal-close:hover {
  color: #a94442;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   📬 MAIL PROTECTION / E-MAIL VERSCHLEIERUNG
============================================================ */
.mail-protect {
  color: #888;
  font-style: italic;
  cursor: help;
}

.mail-protect a {
  color: #6b4f2d;
  text-decoration: none;
  font-style: normal;
}

.mail-protect a:hover {
  text-decoration: underline;
}

/* ============================================================
   📦 DOWNLOADS – Platzhalter-Bild
============================================================ */
.download-thumb img.no-image {
  object-fit: contain;
  background: #f5f5f5;
  border: 1px dashed #ccc;
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  height: 100%;
  color: #777;
}