/* =============================
   1. GLOBAL STYLES
============================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #0f1014;
  color: #e6e8ee;
}

/* =============================
   2. LAYOUT
============================= */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* =============================
   SIDEBAR
============================= */
.sidebar {
  background: linear-gradient(180deg, #14151b 0%, #101116 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: bold;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-decoration: none;
  color: #cfd2d9;
  border-radius: 8px;
  transition: 0.15s;
}

.nav-link:hover, .nav-link.active {
  background: #1b1d26;
  color: #fff;
}

.logout-form { margin-top: auto; }

/* =============================
   TOP BAR
============================= */
.topbar {
  background: #13151c;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-chip {
  background: #1b1d24;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* =============================
   CONTENT CONTAINER
============================= */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* =============================
   SECTION & CARD
============================= */
.card {
  background: #171922;
  border: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 18px;
  border-radius: 12px;
  padding: 16px;
}

.section-head h2 {
  font-size: 1.1rem;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

/* Extra Abstand unter „Fahrzeug hinzufügen“ */
.section:first-of-type {
  margin-bottom: 30px;
}

/* =============================
   BUTTONS
============================= */
.btn {
  background: linear-gradient(180deg, #3a86ff, #2f6ed3);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: .2s;
}
.btn:hover { filter: brightness(1.1); }

.btn-danger {
  background: linear-gradient(180deg, #ff4c39, #d43a2d);
  color: #fff;
}

.btn-ghost {
  background: #11131a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #cfd2d9;
}

/* =============================
   ICON-BUTTONS (Fahrzeugkopf)
============================= */
.vehicle-actions {
  display: flex;
  gap: 8px;
}

.vehicle-actions .icon-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
}
.vehicle-actions .icon-btn:hover { background: rgba(255,255,255,0.1); }
.vehicle-actions .icon-btn i { color: #fff; font-size: 14px; }
.vehicle-actions .delete-btn i { color: #ff4c4c; }

/* =============================
   INPUT FIELDS
============================= */
input[type="text"],
input[type="email"],
input[type="password"] {
  background: #11131a;
  border: 1px solid rgba(255,255,255,0.07);
  color: #e6e8ee;
  padding: 8px 12px;
  border-radius: 6px;
}
input:focus {
  border-color: #3a86ff;
  box-shadow: 0 0 0 3px rgba(58,134,255,0.2);
  outline: none;
}

/* =============================
   SUCHFELD (größer + mehr Abstand)
============================= */
.search-bar {
  display: flex;
  align-items: center;
  background: #171922;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 30px;
}
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  margin-left: 10px;
  color: #fff;
  outline: none;
  font-size: 0.95rem;
}

/* =============================
   VEHICLE CARDS
============================= */
.vehicle-card { padding: 16px; }

.vehicle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vehicle-title h3 { font-size: 1rem; margin-bottom: 4px; }

.vehicle-info {
  font-size: 0.8rem;
  color: #9fa3ad;
}

/* Mehr Abstand zwischen Titelbereich und Details */
.vehicle-details {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* =============================
   UPLOADROW
============================= */
.upload-row {
  margin-top: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.upload-row .btn-ghost {
  min-width: 150px;
  justify-content: center;
}
.upload-row input[type="text"] { flex: 1; }

/* =============================
   DATEITABELLE
============================= */
.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* sorgt für saubere Spaltenausrichtung */
}
.table th {
  background: #141722;
  color: #cfd3df;
  font-weight: 500;
}
.table th, .table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Einheitliche Spaltenbreiten (optional feintunen) */
.table th:nth-child(1), .table td:nth-child(1) { width: 90px; }    /* Version */
.table th:nth-child(2), .table td:nth-child(2) { width: 45%; }     /* Dateiname */
.table th:nth-child(3), .table td:nth-child(3) { width: 35%; }     /* Kommentar */
.table th:nth-child(4), .table td:nth-child(4) { width: 120px; }   /* Aktionen */

/* =============================
   ICON-BUTTONS (AUFGEKLAPPTER BEREICH)
   → gleichen Stil wie oben
============================= */
.vehicle-details .btn-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
  margin-right: 6px;
}
.vehicle-details .btn-icon:hover { background: rgba(255,255,255,0.1); }
.vehicle-details .btn-icon i { color: #fff; font-size: 14px; }
.vehicle-details .btn-icon.btn-danger i { color: #ff4c4c; }

/* =============================
   TOAST
============================= */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2b2f3b;
  padding: 12px 18px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s;
  z-index: 999;
  color: #fff;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* =============================
   MODAL (EDIT)
============================= */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: #1d1f27;
  padding: 22px;
  width: 380px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
}

.modal h2 { margin-bottom: 8px; }

.modal label {
  display: block;
  font-size: 0.85rem;
  margin: 10px 0 4px;
  color: #cfd3df;
}
.modal input {
  width: 100%;
  padding: 8px 10px;
  background: #11131a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 6px;
  margin-bottom: 6px;
}
.modal input:focus {
  border-color: #3a86ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(58,134,255,0.15);
}

.modal-buttons {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

/* ===========================
   LOGIN PAGE – HEXDRIVE STYLE
   =========================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(180deg, #0d0e12, #14151b);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #171922;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
}

.login-card h1 {
    color: #ffffff;
    font-size: 1.6rem;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.login-subtitle {
    color: #9da3b1;
    margin-bottom: 22px;
    font-size: 0.95rem;
}

/* Fehlertext */
.error-msg {
    color: #ff4c4c;
    margin-bottom: 14px;
}

/* Input mit Icons */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 38px;
    background: #11131a;
    border: 1px solid rgba(255,255,255,0.08);
    color: #e6e8ee;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: 0.2s;
}

.input-group input:focus {
    border-color: #3a86ff;
    box-shadow: 0 0 0 3px rgba(58,134,255,0.15);
    outline: none;
}

/* Login Button */
.login-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
}

.login-btn i {
    font-size: 0.95rem;
}

.login-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ===== Zusatz für Register + Passwort vergessen ===== */
.login-switch {
    margin-top: 18px;
    font-size: 0.9rem;
    color: #b0b4c0;
}

.login-switch a {
    color: #3a86ff;
    text-decoration: none;
}

.login-switch a:hover {
    text-decoration: underline;
}

.success-msg {
    color: #4cd964;
    margin-bottom: 14px;
}

/* Passwort vergessen Link */
.forgot-password {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 18px;
}

.forgot-password a {
    font-size: 0.9rem;
    color: #9ea3ad !important;    /* dezentes Grau */
    text-decoration: none !important;
    transition: 0.2s;
}

.forgot-password a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}
