/* ============================================================
   EDV-Ticketsystem – Stylesheet
   Palette:
     Dark    #1e3a5f  (Sidebar)
     Blue    #2563eb  (Primary)
     Sky     #dbeafe  (Light-Bg)
     Ink     #1e293b  (Text)
     Muted   #64748b  (Secondary text)
     Surface #f8fafc  (Page bg)
     White   #ffffff
     Green   #10b981  (Success)
     Amber   #f59e0b  (Warning)
     Red     #ef4444  (Danger)
============================================================ */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css');

/* ── Icon Utilities ───────────────────────────────────────── */
.ic { display: inline-flex; align-items: center; justify-content: center; }
.ic-muted { color: #94a3b8; }
.ic-blue  { color: #60a5fa; }
.ic-green { color: #34d399; }
.ic-amber { color: #fbbf24; }
.ic-red   { color: #f87171; }
.ic-navy  { color: #93c5fd; }

/* Nav-Icons gleichmäßig ausrichten */
.nav-item .nav-icon i { font-size: 15px; width: 16px; text-align: center; }

/* Brand-Icon */
.brand-icon i { font-size: 18px; color: #fff; }

/* Alert-Icons */
.alert i { font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.alert-success i { color: #059669; }
.alert-error   i { color: #dc2626; }
.alert-info    i { color: #2563eb; }
.alert-warning i { color: #d97706; }

/* Badges mit Icons */
.badge i { font-size: 10px; margin-right: 3px; }

/* Buttons mit Icons */
.btn i { font-size: 13px; }
.btn-sm i { font-size: 11px; }

/* Leerer Zustand */
.empty-state .empty-icon { font-size: 36px; color: #cbd5e1; margin-bottom: 10px; display: block; }

/* Upload-Bereich */
.upload-area .upload-icon i { font-size: 28px; color: #94a3b8; }

/* Attachment PDF-Icon */
.pdf-preview i { color: #f97316; }

/* Rücklink */
.back-link i { font-size: 12px; }

/* Topbar Hamburger */
.hamburger i { font-size: 18px; }

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark:    #0f1117;
  --dark-d:  #152d4a;
  --dark-l:  #2a4f7c;
  --blue:    #2563eb;
  --blue-h:  #1d4ed8;
  --sky:     #dbeafe;
  --ink:     #1e293b;
  --muted:   #64748b;
  --border:  #e2e8f0;
  --surface: #f8fafc;
  --white:   #ffffff;
  --green:   #10b981;
  --amber:   #f59e0b;
  --red:     #ef4444;
  --red-d:   #dc2626;
  --orange:  #f97316;

  --sidebar-w: 260px;
  --radius:    8px;
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --transition: .2s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Layout ────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────*/
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--dark-l);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand .brand-icon {
  width: 38px; height: 38px;
  background: var(--blue);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 0;
  flex-shrink: 0;
}
.sidebar-brand .brand-name {
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-brand .brand-sub {
  color: #94a3b8;
  font-size: 11px;
}

.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748b;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,.06);
  color: var(--white);
  border-left-color: var(--blue);
  text-decoration: none;
}
.nav-item.active { color: var(--white); background: rgba(37,99,235,.2); }
.nav-item .nav-icon { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--dark-l);
  font-size: 11px;
  color: #475569;
  text-align: center;
}

/* ── Main Content ─────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0;
        display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.page-content { padding: 28px; flex: 1; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 20px; }

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 4px;
}
.stat-card.stat-blue .stat-value { color: var(--blue); }
.stat-card.stat-green .stat-value { color: var(--green); }
.stat-card.stat-amber .stat-value { color: var(--amber); }
.stat-card.stat-red .stat-value { color: var(--red); }
.stat-card.stat-orange .stat-value { color: var(--orange); }

/* ── Forms ────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.form-group label .req { color: var(--red); margin-left: 2px; }
.form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  line-height: 1.5;
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-h); color: var(--white); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #059669; color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: var(--red-d); color: var(--white); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: var(--sky); color: #1e40af; border: 1px solid #93c5fd; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* ── Badges & Chips ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.status-neu           { background: #dbeafe; color: #1e40af; }
.status-gelesen       { background: #e0e7ff; color: #3730a3; }
.status-bearbeitung   { background: #fef3c7; color: #92400e; }
.status-geloest       { background: #d1fae5; color: #065f46; }
.prio-niedrig  { background: #f1f5f9; color: #475569; }
.prio-normal   { background: #dbeafe; color: #1e40af; }
.prio-dringend { background: #fee2e2; color: #991b1b; }

/* ── Ticket Table / List ───────────────────────────────────── */
.ticket-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ticket-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}
.ticket-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink);
}
.ticket-table tr:hover td { background: #f8fbff; }
.ticket-table .ticket-id { color: var(--muted); font-size: 12px; font-weight: 600; }
.ticket-table .ticket-title { font-weight: 600; }
.ticket-table .ticket-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.table-wrap { overflow-x: auto; }

/* ── Ticket Detail / Conversation ─────────────────────────── */
.ticket-detail { max-width: 860px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.detail-meta-item { display: flex; flex-direction: column; gap: 2px; }
.detail-meta-item .label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.detail-meta-item .value { font-size: 14px; font-weight: 500; color: var(--ink); }

.conversation { margin-top: 24px; }
.conversation-title {
  font-size: 14px; font-weight: 700; color: var(--ink);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.message-list { display: flex; flex-direction: column; gap: 12px; }
.message-item {
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border);
}
.message-item.from-mitarbeiter {
  background: var(--sky);
  border-color: #bfdbfe;
  margin-right: 48px;
}
.message-item.from-edv {
  background: #f0fdf4;
  border-color: #a7f3d0;
  margin-left: 48px;
}
.message-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.message-sender { font-size: 12px; font-weight: 700; color: var(--dark); }
.message-time   { font-size: 11px; color: var(--muted); }
.message-badge  { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; }
.message-badge.edv-badge  { background: var(--green); color: #fff; }
.message-badge.mita-badge { background: var(--blue); color: #fff; }
.message-text { font-size: 14px; color: var(--ink); word-break: break-word; }

.reply-form { margin-top: 18px; }
.reply-form textarea { min-height: 80px; }

/* ── File Upload ──────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--blue);
  background: var(--sky);
}
.upload-area .upload-icon { margin-bottom: 8px; display: block; }
.upload-area .upload-text { font-size: 14px; color: var(--muted); }
.upload-area .upload-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.upload-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.preview-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  width: 100px;
}
.preview-item img { width: 100px; height: 80px; object-fit: cover; display: block; }
.preview-item .preview-name {
  font-size: 10px; padding: 4px 6px; truncate: ellipsis;
  white-space: nowrap; overflow: hidden; color: var(--ink);
}
.preview-item .remove-btn {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none; cursor: pointer;
  width: 20px; height: 20px;
  border-radius: 50%; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.pdf-preview {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--orange);
}
.pdf-preview i { font-size: 16px; }

/* ── Attachment display ────────────────────────────────────── */
.attachments-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.attachment-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}
.attachment-item img {
  width: 100px; height: 80px;
  object-fit: cover; display: block; cursor: zoom-in;
}
.attachment-item a.pdf-link {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  font-size: 12px; color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}
.attachment-item a.pdf-link:hover { text-decoration: underline; }
.attachment-label {
  font-size: 10px; padding: 3px 6px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100px;
}

/* ── Filters ─────────────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar label { font-size: 11px; }
.filter-bar .form-control { font-size: 13px; padding: 6px 10px; }

/* ── Search Bar ──────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 8px; align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  margin-bottom: 20px;
}
.search-bar input {
  border: none; outline: none; flex: 1;
  font-size: 14px; color: var(--ink);
  background: transparent;
}
.search-bar button { padding: 5px 14px; font-size: 13px; }

/* ── Login Form ────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--surface);
}
.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-card .login-icon {
  font-size: 28px; text-align: center; margin-bottom: 8px; color: #475569;
}
.login-card h1 { font-size: 22px; text-align: center; margin-bottom: 4px; color: var(--ink); }
.login-card p  { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 24px; }

/* ── Modal / Image viewer ──────────────────────────────────── */
.img-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.img-modal.open { display: flex; }
.img-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.img-modal-close {
  position: fixed; top: 16px; right: 20px;
  color: #fff; font-size: 32px; cursor: pointer;
  background: none; border: none; line-height: 1;
}

/* ── Overlay ─────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 150;
}

/* ── Admin inline edit ───────────────────────────────────── */
.inline-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-form .form-control { font-size: 13px; padding: 5px 8px; }

/* ── Utilities ────────────────────────────────────────────── */
.text-muted  { color: var(--muted); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 11px; }
.text-right  { text-align: right; }
.fw-bold     { font-weight: 700; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-24       { margin-top: 24px; }
.mb-8        { margin-bottom: 8px; }
.mb-16       { margin-bottom: 16px; }
.mb-0        { margin-bottom: 0; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.flex-wrap   { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.w-100       { width: 100%; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 32px; margin-bottom: 12px; display: block; color: #94a3b8; }
.empty-state p { font-size: 14px; }

/* ── Pagination / ticket back link ───────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
  margin-bottom: 16px;
  text-decoration: none;
}
.back-link:hover { color: var(--blue); text-decoration: none; }

/* ── Progress / Stepper ──────────────────────────────────── */
.ticket-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  display: inline-block;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { gap: 8px; }
  .ticket-table thead { display: none; }
  .ticket-table td { display: block; padding: 4px 12px; }
  .ticket-table td::before {
    content: attr(data-label) ": ";
    font-weight: 700; font-size: 11px;
    text-transform: uppercase; color: var(--muted);
    margin-right: 4px;
  }
  .ticket-table tr { border-bottom: 2px solid var(--border); display: block; padding: 10px 0; }
  .message-item.from-mitarbeiter { margin-right: 0; }
  .message-item.from-edv { margin-left: 0; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 28px 20px; }
  .card-body { padding: 14px; }
  .btn-lg { padding: 11px 20px; font-size: 14px; }
}

/* ── Print ────────────────────────────────────────────────── */


/* ── Sidebar Footer (Logout) ─────────────────────────────────── */
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: all .18s;
  width: 100%;
}
.logout-btn:hover {
  background: rgba(220, 38, 38, .15);
  color: #f87171;
  text-decoration: none;
}
.logout-btn i { font-size: 14px; width: 16px; text-align: center; }

/* ── Sidebar User ─────────────────────────────────────────────── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-user .user-avatar {
  width: 32px; height: 32px;
  background: var(--blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user .user-name {
  color: #e2e8f0; font-size: 13px; font-weight: 600;
  display: block; line-height: 1.2;
}
.sidebar-user .user-role {
  color: #94a3b8; font-size: 11px;
}

/* ── App Footer (Hauptbereich) ────────────────────────────────── */
.app-footer {
  padding: 13px 28px;
  border-top: 1px solid var(--border);
  background: var(--white);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.app-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.app-footer a:hover { text-decoration: underline; }
.app-footer-sep { color: var(--border); }

@media (max-width: 900px) {
  .app-footer { padding: 12px 16px; }
}

/* ── Demo-Banner ─────────────────────────────────────────────── */
.demo-banner {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  padding: 9px 28px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.demo-banner i    { font-size: 14px; opacity: .85; }
.demo-banner strong { font-weight: 700; }

@media (max-width: 900px) {
  .demo-banner { padding: 9px 16px; }
}

/* ── Modal ────────────────────────────────────────────────────── */
#appModal {
  display: none;
  position: fixed; inset: 0; z-index: 9100;
  background: rgba(15, 23, 42, .55);
  align-items: center; justify-content: center;
  padding: 16px; backdrop-filter: blur(2px);
}
#appModal.open { display: flex; animation: modalFadeIn .18s ease; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--white); border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0,0,0,.22);
  padding: 28px 28px 22px; width: 100%; max-width: 400px;
  text-align: center; animation: modalSlideIn .2s ease;
}
@keyframes modalSlideIn {
  from { transform: translateY(-14px) scale(.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal-icon-wrap {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin: 0 auto 14px;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.modal-body  { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.modal-actions .btn { min-width: 110px; justify-content: center; }

/* ── Toasts ──────────────────────────────────────────────────── */
#toastContainer {
  position: fixed; bottom: 20px; right: 20px; z-index: 9200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: 340px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 11px 14px; font-size: 13px; color: var(--ink);
  pointer-events: all; opacity: 0; transform: translateX(16px);
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast.hide { opacity: 0; transform: translateX(16px); }
.toast-close {
  margin-left: auto; background: none; border: none;
  cursor: pointer; color: var(--muted); font-size: 13px; padding: 2px 4px;
}
.toast-close:hover { color: var(--ink); }

@media print {
  .sidebar, .topbar, .hamburger, .reply-form, .filter-bar, .search-bar { display: none !important; }
  .main { margin-left: 0; }
  .page-content { padding: 0; }
}
