/* NEF-Friesach Design System -- extrahiert aus design.md */

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #1E293B;
    background: #F4F6FA;
    margin: 0;
}

a { color: #8C1E1E; }

.page-content { padding: 24px; max-width: 960px; margin: 0 auto; }
.page-hd { margin-bottom: 20px; }
.page-hd h1 { font-size: 20px; font-weight: 700; color: #8C1E1E; margin: 0; }
.page-hd p { font-size: 12px; font-weight: 400; color: #64748B; margin: 2px 0 0; }

.divider { border: none; border-top: 1px solid #E2E8F0; margin: 20px 0; }

.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: #64748B; font-size: 13px; text-decoration: none; margin-bottom: 16px;
    transition: color .15s;
}
.back-link:hover { color: #8C1E1E; }

.sec-title {
    font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: #64748B; margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}

.navbar {
    height: 48px; background: #8C1E1E; position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
}
.nb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nb-logo {
    width: 28px; height: 28px; border-radius: 6px;
    background: rgba(255,255,255,.18); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}
.nb-title { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.2; }
.nb-subtitle { font-size: 10px; color: rgba(255,255,255,.5); line-height: 1.2; }

.nb-links { display: flex; align-items: center; gap: 4px; }
.nb-link {
    padding: 5px 11px; border-radius: 5px; font-size: 13px; font-weight: 500;
    color: rgba(255,255,255,.72); text-decoration: none; transition: background .15s, color .15s;
}
.nb-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.nb-link.active { background: rgba(255,255,255,.2); color: #fff; }

.nb-sep { width: 1px; height: 20px; background: rgba(255,255,255,.15); margin: 0 8px; }

.nb-user { display: flex; align-items: center; gap: 10px; }
.nb-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,.18); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
}
.nb-name { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.2; }
.nb-role { font-size: 10px; color: rgba(255,255,255,.5); line-height: 1.2; }
.nb-logout {
    color: rgba(255,255,255,.45); text-decoration: none; display: flex; align-items: center;
    transition: color .15s;
}
.nb-logout:hover { color: #fff; }

.card { background: #fff; border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-p { padding: 20px; }

.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    background: #8C1E1E; color: #fff; border: none;
    padding: 8px 20px; border-radius: 5px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: background .15s;
}
.btn-primary:hover { background: #6b1616; }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; color: #8C1E1E; border: 1.5px solid #8C1E1E;
    padding: 7px 18px; border-radius: 5px;
    font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn-secondary:hover { background: #FDEEEE; }

.btn-info {
    display: inline-flex; align-items: center; gap: 5px;
    background: #FDEEEE; color: #8C1E1E; border: 1px solid #F3C6C6;
    padding: 6px 14px; border-radius: 4px;
    font-size: 12.8px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn-info:hover { background: #F9D9D9; }

.btn-danger {
    display: inline-flex; align-items: center; gap: 5px;
    background: #DC2626; color: #fff; border: none;
    padding: 6px 14px; border-radius: 4px;
    font-size: 12.8px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn-danger:hover { background: #991B1B; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
button { font-family: inherit; }

.form-label {
    display: block; font-size: 12px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    color: #64748B; margin-bottom: 5px;
}
.form-input, select.form-input, textarea.form-input {
    width: 100%; border: 1px solid #CBD5E1; border-radius: 5px;
    padding: 8px 12px; font-size: 14.4px;
    background: #fff; color: #1E293B; font-family: inherit;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
    border-color: #8C1E1E;
    box-shadow: 0 0 0 3px rgba(140,30,30,.12);
}
.form-input::placeholder { color: #CBD5E1; }
.form-group { margin-bottom: 16px; }
.form-hint { font-size: 12px; color: #94A3B8; margin: 5px 0 0; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-full { grid-column: span 2; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
    background: #F8FAFC; font-size: 11.5px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: #64748B; padding: 10px 16px;
    border-bottom: 1.5px solid #E2E8F0; text-align: left; white-space: nowrap;
}
.tbl td { padding: 11px 16px; font-size: 14px; border-bottom: 1px solid #F1F5F9; color: #1E293B; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: #F8FAFC; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 12px; border-radius: 9999px;
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.badge-admin   { background: #DBEAFE; color: #1D4ED8; }
.badge-portier { background: #F1F5F9; color: #475569; }
.badge-green   { background: #DCFCE7; color: #166534; }
.badge-orange  { background: #FFF7ED; color: #C2410C; }
.badge-purple  { background: #F3E8FF; color: #6B21A8; }
.badge-gray    { background: #F1F5F9; color: #6B7280; }
.badge-red     { background: #FEE2E2; color: #991B1B; }

.flash { padding: 10px 16px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.flash-success { background: #F0FDF4; border-color: #86EFAC; color: #166534; }
.flash-error   { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.flash-info    { background: #FDEEEE; border-color: #F3C6C6; color: #8C1E1E; }
.flash-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }

.check-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #F1F5F9;
}
.check-row:last-child { border-bottom: none; }
.check-row .check-row-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.check-row span.name { font-size: 14px; color: #1E293B; }
.check-row span.hint { font-size: 12px; color: #94A3B8; }
.check-row input[type=checkbox] { width: 20px; height: 20px; accent-color: #8C1E1E; cursor: pointer; flex: none; }
.check-row select.form-input { width: 170px; padding: 5px 10px; font-size: 13px; flex: none; }

@media (max-width: 639px) {
    .form-grid2 { grid-template-columns: 1fr; }
    .form-full { grid-column: span 1; }
    .card .tbl { min-width: 480px; }
    .card.tbl-card { overflow-x: auto; }
    .nb-links { display: none; }
}
