/* ============================================================
   Feuerwehr Verwaltungstool - Custom Styles
   Farbschema: Dunkelrot / Anthrazit / Gold-Akzent
   ============================================================ */

:root {
    --fw-primary: #8B1A1A;
    --fw-primary-dark: #5C1111;
    --fw-primary-light: #A82020;
    --fw-secondary: #2D2D2D;
    --fw-accent: #D4A530;
    --fw-accent-light: #E8C05A;
    --fw-success: #2D8B55;
    --fw-warning: #D4A530;
    --fw-danger: #C0392B;
    --fw-info: #2980B9;
    --fw-bg: #F4F5F7;
    --fw-card-bg: #FFFFFF;
    --fw-text: #1A1A1A;
    --fw-text-muted: #6C757D;
    --fw-border: #DEE2E6;
    --fw-sidebar: #1A1A2E;
}

* { box-sizing: border-box; }

body {
    background-color: var(--fw-bg);
    color: var(--fw-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.bg-fw-primary {
    background: linear-gradient(135deg, var(--fw-primary-dark) 0%, var(--fw-primary) 100%) !important;
}

.navbar-brand {
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

.navbar .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    margin: 0 2px;
    transition: background 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: rgba(255,255,255,0.15);
}

.badge.bg-fw-accent {
    background-color: var(--fw-accent) !important;
    color: #1A1A1A;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Login Seite */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fw-primary-dark) 0%, #1A1A2E 50%, var(--fw-secondary) 100%);
}

.login-card {
    background: var(--fw-card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-card .login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--fw-primary), var(--fw-accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    color: white;
}

/* Cards */
.card {
    border: 1px solid var(--fw-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--fw-border);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Stat Cards (Dashboard) */
.stat-card {
    border: none;
    border-radius: 14px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.stat-card .stat-icon {
    font-size: 2.2rem;
    opacity: 0.85;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.stat-primary { background: linear-gradient(135deg, var(--fw-primary), var(--fw-primary-light)); }
.stat-accent { background: linear-gradient(135deg, var(--fw-accent), #C4950A); }
.stat-success { background: linear-gradient(135deg, var(--fw-success), #27AE60); }
.stat-info { background: linear-gradient(135deg, var(--fw-info), #3498DB); }

/* Tabellen */
.table {
    font-size: 0.9rem;
}

.table thead th {
    background: var(--fw-secondary);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table thead th:first-child { border-radius: 8px 0 0 0; }
.table thead th:last-child { border-radius: 0 8px 0 0; }

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: rgba(139, 26, 26, 0.04);
}

.table td {
    padding: 0.65rem 1rem;
    vertical-align: middle;
}

/* Buttons */
.btn-fw-primary {
    background: var(--fw-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}

.btn-fw-primary:hover {
    background: var(--fw-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 26, 26, 0.25);
}

.btn-fw-accent {
    background: var(--fw-accent);
    color: #1A1A1A;
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-fw-accent:hover {
    background: var(--fw-accent-light);
    color: #1A1A1A;
}

/* Action buttons in tables */
.btn-action {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
    line-height: 1;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--fw-border);
    padding: 0.6rem 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--fw-primary);
    box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

/* Status-Badges */
.badge-aktiv { background: var(--fw-success); color: white; }
.badge-inaktiv { background: var(--fw-text-muted); color: white; }
.badge-ausgetreten { background: var(--fw-danger); color: white; }
.badge-hauptamtlich { background: var(--fw-info); color: white; }
.badge-ehrenamtlich { background: var(--fw-accent); color: #1A1A1A; }

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filter Bar */
.filter-bar {
    background: var(--fw-card-bg);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--fw-border);
}

/* Member Detail Tabs */
.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    color: var(--fw-text-muted);
}

.nav-tabs .nav-link.active {
    color: var(--fw-primary);
    border-color: var(--fw-border) var(--fw-border) white;
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    color: var(--fw-primary);
    border: 1px solid var(--fw-border);
}

.pagination .page-item.active .page-link {
    background: var(--fw-primary);
    border-color: var(--fw-primary);
}

/* Profile Header */
.profile-header {
    background: linear-gradient(135deg, var(--fw-primary-dark) 0%, var(--fw-primary) 100%);
    color: white;
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border: 3px solid rgba(255,255,255,0.3);
}

/* Footer */
.footer {
    margin-top: auto;
    font-size: 0.8rem;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.82rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .filter-bar { display: none !important; }
    .card { border: 1px solid #ccc; box-shadow: none; }
}

/* Dropdown Dark */
.dropdown-menu-dark {
    background: var(--fw-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0.5rem;
}

.dropdown-menu-dark .dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.dropdown-menu-dark .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--fw-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* Toast / Flash Messages */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
