/* ── Basis ── */
body { background: #F4F6FA; font-family: 'Inter', system-ui, sans-serif; color: #1E293B; }

/* ── Navigation ── */
.top-header { height: 52px; background: #1E4D8C; }
.logo-text { font-weight: 700; letter-spacing: .05em; font-size: .875rem; color: white; }
.username-text { font-size: .8rem; color: rgba(255,255,255,.65); }
.role-badge { border: 1px solid rgba(255,255,255,.3); font-size: .7rem; color: white; padding: 2px 8px; border-radius: 9999px; }
.logout-link { font-size: .8rem; color: rgba(255,255,255,.5); text-decoration: none; }
.logout-link:hover { color: white; }

.sub-nav { height: 42px; background: white; border-bottom: 1.5px solid #E2E8F0; position: sticky; top: 0; z-index: 10; }
.sub-nav a { padding: .375rem 1rem; font-size: .875rem; font-weight: 500; color: #475569; border-radius: .25rem; text-decoration: none; }
.sub-nav a:hover  { background: #EFF6FF; color: #1E4D8C; }
.sub-nav a.active { background: #1E4D8C; color: white; }

/* ── Layout ── */
.page-content { padding: 1rem; }
@media (min-width: 640px) { .page-content { padding: 1.5rem; } }

/* ── Card ── */
.card { background: white; border: 1px solid #E2E8F0; border-radius: .4rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 1.25rem; }

/* ── Buttons ── */
.btn-primary { background: #1E4D8C; color: white; border: none; padding: .5rem 1.25rem; border-radius: .3rem; font-weight: 600; font-size: .875rem; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; text-decoration: none; }
.btn-primary:hover { background: #163a6e; }
.btn-secondary { background: white; color: #1E4D8C; border: 1.5px solid #1E4D8C; padding: .45rem 1.1rem; border-radius: .3rem; font-weight: 500; font-size: .875rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.btn-secondary:hover { background: #EFF6FF; }
.btn-info { background: #EFF6FF; color: #1E4D8C; border: 1px solid #BFDBFE; padding: .35rem .85rem; border-radius: .25rem; font-weight: 500; font-size: .8rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.btn-info:hover { background: #DBEAFE; }
.btn-danger { background: #DC2626; color: white; border: none; padding: .35rem .85rem; border-radius: .25rem; font-size: .8rem; cursor: pointer; }
.btn-danger:hover { background: #991B1B; }

/* ── Formulare ── */
.form-label { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #64748B; margin-bottom: .3rem; }
.form-input { width: 100%; border: 1px solid #CBD5E1; border-radius: .3rem; padding: .5rem .75rem; font-size: .9rem; background: white; color: #1E293B; font-family: inherit; }
.form-input:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* ── Tabellen ── */
table { border-collapse: collapse; width: 100%; }
th { background: #F8FAFC; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748B; padding: .6rem 1rem; border-bottom: 1.5px solid #E2E8F0; white-space: nowrap; }
td { padding: .7rem 1rem; font-size: .875rem; border-bottom: 1px solid #F1F5F9; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFC; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .75rem; border-radius: 9999px; font-size: .78rem; font-weight: 600; }
.badge-sm { font-size: .75rem; padding: .18rem .55rem; }
.badge-green  { background: #DCFCE7; color: #166534; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-blue   { background: #DBEAFE; color: #1D4ED8; }
.badge-gray   { background: #F1F5F9; color: #475569; }
.badge-orange { background: #FFF7ED; color: #C2410C; }

/* ── Flash ── */
.flash-success { background: #F0FDF4; border: 1px solid #86EFAC; color: #166534; padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }
.flash-error   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;  padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }
.flash-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E;  padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }
.flash-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E4D8C;  padding: .65rem 1rem; border-radius: .3rem; font-size: .875rem; }

/* ── Modal ── */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-bg.open { display: flex; }
.modal { background: white; border-radius: .5rem; box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 100%; max-width: 32rem; max-height: 90vh; overflow-y: auto; }
.modal-header { background: #1E4D8C; color: white; padding: .85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; border-radius: .5rem .5rem 0 0; }
.modal-header h2 { font-size: .95rem; font-weight: 600; margin: 0; }
.modal-close { background: rgba(255,255,255,.2); border: none; cursor: pointer; color: white; font-size: 16px; padding: 3px 9px; border-radius: 5px; }
.modal-close:hover { background: rgba(255,255,255,.3); }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: .85rem 1.25rem; border-top: 1px solid #E2E8F0; display: flex; gap: .6rem; justify-content: flex-end; }

/* ── Akkordeon ── */
.accordion-item { border: 1px solid #E2E8F0; border-radius: 8px; background: white; margin-bottom: 8px; overflow: hidden; }
.accordion-item.open { border-color: #BFDBFE; box-shadow: 0 2px 12px rgba(30,77,140,.08); }
.accordion-trigger { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; cursor: pointer; gap: 12px; font-size: 14px; font-weight: 600; color: #1E293B; user-select: none; }
.accordion-chevron { flex-shrink: 0; width: 17px; height: 17px; stroke: #94A3B8; fill: none; transition: transform .2s; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); stroke: #1E4D8C; }
.accordion-body { display: none; padding: 0 15px 15px; font-size: 13.5px; color: #475569; line-height: 1.7; border-top: 1px solid #F1F5F9; }
.accordion-item.open .accordion-body { display: block; }

/* ── Zeitleiste ── */
.tl-line { position: absolute; left: 62px; top: 0; bottom: 0; width: 1px; background: #E2E8F0; }
.tl-year-dot { position: absolute; left: 56px; width: 14px; height: 14px; border-radius: 50%; background: white; border: 2px solid #CBD5E1; z-index: 1; }
.tl-year-dot.active { border-color: #1E4D8C; }
.tl-entry-card { background: white; border: 1px solid #E2E8F0; border-radius: .4rem; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s; text-decoration: none; display: block; color: inherit; }
.tl-entry-card:hover { border-color: #BFDBFE; }
.tl-entry-card.intern { border-left: 3px solid #16A34A; }

/* ── Responsive ── */
@media (max-width: 639px) {
  th, td { padding: .5rem .65rem; font-size: .8rem; }
  .accordion-trigger { font-size: 13px; padding: 11px 13px; }
}
