/* assets/style.css */
/* Grund-Reset & Layout */
body {
    background: #f8f9fb;
    color: #222;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 75px 0;
}

/* Header: Titel + Nav immer untereinander */
.backend-header {
  margin-bottom: 2rem;
}
.backend-header h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  color: #1a202c;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.header-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dropdown-Menü */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.3rem;
  display: none;
  z-index: 999;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  min-width: 160px;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

/* Buttons im Header */
.header-nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1rem;
  font-size: 0.95rem;
  border-radius: 0.5rem;
}

/* ---------------------------------- */
/* Login-Seite (index.php)            */
/* ---------------------------------- */
body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f0f2f5;
  margin: 0;
  padding: 0;
}
.login-container {
  background: #ffffff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-container h1 {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: #2565a7;
}
.login-container .form-group {
  text-align: left;
  margin-bottom: 1rem;
}
.login-container .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}
.login-container .form-control {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccd0d5;
  border-radius: 0.5rem;
  transition: border-color 0.2s;
}
.login-container .form-control:focus {
  border-color: #2565a7;
  outline: none;
}
.login-container .btn-primary {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}
.login-container .form-links {
  margin-top: 1rem;
  font-size: 0.9rem;
}
.login-container .form-links a {
  color: #2565a7;
}
@media (max-width: 420px) {
  .login-container {
    margin: 1rem;
    padding: 1.5rem;
  }
}

/* Links/Buttons */
a { color: #2565a7; text-decoration: none; }
.backend-header nav .btn { display: inline-flex; align-items: center; justify-content: center; }
a.btn, button.btn {
    display: inline-block;
    font-weight: 500;
    border-radius: 0.5em;
    min-height: 36px;
    padding: 0.5em 1.3em;
    margin: 0.1em;
    font-size: 1em;
    line-height: 36px;
    border: none;
    background: #2565a7;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 6px 0 #0001;
    vertical-align: middle;
}
a.btn-secondary, button.btn-secondary { background: #d6d7da; color: #234; }
a.btn-success, button.btn-success { background: #36b37e; color: #fff; }
a.btn-warning, button.btn-warning { background: #ffc400; color: #333; }
a.btn-danger, button.btn-danger { background: #ff5f57; color: #fff; }
a.btn-outline-secondary, button.btn-outline-secondary {
    background: #fff; color: #2565a7; border: 1px solid #2565a7;
}
a.btn-info, button.btn-info { background: #08c; color: #fff; }
a.btn-sm, button.btn-sm { font-size: 0.93em; min-height: 36px; padding: 0.35em 1.2em; }
button:focus, a.btn:focus { outline: 2px solid #36b37e; }

nav { margin-bottom: 1.5em; }

.backend-header, .event-list, .user-list, .guest-list, .event-edit-form, .event-create-form, .import-form, .login-centerbox, .waitlist-section, .guest-edit-form, .mail-form-container, .stats-overview, .user-edit-form, .registration-stats, .overview-item, .location-list {
    background: #fff;
    box-shadow: 0 1px 12px #0001;
    padding: 1.5em 1em 1em 1em;
    border-radius: 1.5em;
    margin: auto;
    margin-bottom: 2em;
    text-align: left;
    max-width: 95%;
}

.rsvp-form-container {
    background: #fff;
    box-shadow: 0 1px 12px #0001;
    padding: 1.5em 1em 1em 1em;
    border-radius: 1.5em;
    margin: auto;
    margin-bottom: 2em;
    text-align: left;
max-width: 1320px;
}

.backend-header h1 { font-size: 2em; margin: 0 0 0.3em 0; }

.alert { border-radius: 0.6em; padding: 1em 1.2em; margin-bottom: 1.3em; font-weight: 500; }
.alert-success {
    background: #eafaf1; color: #1a6535; border-left: 5px solid #36b37e; margin-top: 20px;
}
.alert-danger { background: #fbeaea; color: #8c1616; border-left: 5px solid #ff5f57; }
.form-group { margin-bottom: 1.3em; }

/* Inputs */
.form-control {
    display: block;
    width: 100%;
    padding: 8px 14px;
    font-size: 1em;
    border: 1px solid #ccd2da;
    border-radius: 7px;
    background: #fff;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: #2e8cff;
    box-shadow: 0 0 0 2px #e0f0ff;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
select,
textarea {
    border-radius: 0.5em;
    padding: 0.6em;
    border: 1px solid #b8bac4;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    transition: border 0.18s;
    background: #fff;
    color: #222;
}
input:focus, select:focus, textarea:focus {
    border-color: #2565a7;
    outline: none;
}
input[type="checkbox"], input[type="radio"] {
    transform: scale(1.2);
    margin-right: 0.4em;
    accent-color: #2565a7;
}
input[readonly], textarea[readonly] { background: #eaeaea; color: #777; }
input[type="file"] { padding: 0.4em 0; background: none; }
h1, h2, h3, h4 { font-family: 'Segoe UI', Arial, sans-serif; margin: 0 0 0.7em 0; }

/* Karten/Listen (optional) */
.radioboxCreate {
    padding: 10px 20px;
    background: #F8F9FB;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: .3s;
}
.radioboxCreate:hover {
    background: #D6D7DA;
    box-shadow: 0 1px 12px #0001;
    transition: .3s;
}
.radioboxCreate p { font-size: 80%; }

/* Tabellen */
.table-responsive {
    overflow-x: auto;
    display: block;
    width: 100%;
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 1.5em;
    font-size: 1em;
    min-width: 900px;
}
@media (max-width: 900px) {
  .table { min-width: 700px; }
}

/* Kopf & Spalten */
.table th, .table td {
    text-align: left;
    vertical-align: top;
    padding: 0.6em 0.7em;
    word-break: break-word;
}
.table th { background: #f2f3f6; font-weight: 600; color: #333; }
.table tr:last-child td { border-bottom: none; }
.table-striped tbody tr:nth-child(odd) { background: #f8fafc; }
.table-striped tbody tr:hover { background: #e6effa; }
.number-col { width: 3em; }
.flyer-thumb { max-width: 60px; cursor: pointer; }
.public-hint { color: #26922e; font-size:.98em; line-height:1.4; }

/* Modal */
#flyerModal {
    display: none; position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.6); align-items:center; justify-content:center;
}
#flyerModal .modal-content {
    background:#fff; padding:2em; border-radius:8px; text-align:center;
    max-width:90%; width:300px; position:relative;
}
#flyerModal .close-btn {
    position:absolute; top:0.5em; right:0.5em; background:none; border:none;
    font-size:1.5em; cursor:pointer;
}

/* Responsive Tabelle: "Karten"-Ansicht auf kleinen Geräten */
@media (max-width: 700px) {
  .backend-header, .rsvp-form-container, .event-create-form, .import-form {
      padding: 1em 0.5em 1em 0.5em;
  }
  .table-responsive table,
  .table-responsive thead,
  .table-responsive tbody,
  .table-responsive th,
  .table-responsive td,
  .table-responsive tr {
      display: block;
      width: 100%;
  }
  .table-responsive thead { display: none; }
  .table-responsive tr {
      margin-bottom: 1.5em;
      border: 1px solid #e1e3e7;
      border-radius: 1em;
      box-shadow: 0 1px 6px #0001;
      background: #fff;
      padding: 1em 0.5em;
  }
  .table-responsive td {
      position: relative;
      padding-left: 45%;
      padding-top: 0.5em;
      padding-bottom: 0.5em;
      border: none;
      border-bottom: 1px solid #e1e3e7;
      min-height: 36px;
      font-size: 1em;
      text-align: left;
      vertical-align: top;
      box-sizing: border-box;
      width: 100%;
      display: flex;
      align-items: flex-start;
      word-break: break-word;
  }
  .table-responsive td:last-child { border-bottom: none; }
  .table-responsive td::before {
      position: absolute;
      left: 0.7em;
      top: 50%;
      transform: translateY(-50%);
      width: 44%;
      white-space: normal;
      font-weight: 600;
      color: #2565a7;
      font-size: 0.99em;
      content: attr(data-label);
      display: block;
      text-align: left;
      padding-right: 0.8em;
      line-height: 1.3;
  }
}




/* Badge in der oberen rechten Ecke der Zelle */
.badge-corner {
  position: relative;
  padding-right: 1.5em; /* Platz schaffen für das Badge */
}

.badge-corner .special-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ff9800;
  color: white;
  font-size: 0.65em;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 0 0 0 6px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 10;
}





/* Druck */
@media print {
  body { background: white !important; color: black !important; font-size: 12pt; }
  nav, .btn, .form-group, .alert, input, select, textarea, button, a[href]:after { display: none !important; }
  input, select, textarea { display: none !important; }
  tr, p, div { page-break-inside: avoid !important; }
  table { width: 100% !important; border-collapse: collapse !important; }
  th, td { border: 1px solid #000 !important; padding: 4px 8px !important; }
  th { background-color: #eee !important; }
}
