/* ========================================
   BOSPlusWEB - Modernes Feuerwehr Design
   Version 2.0
   ======================================== */

:root {
    /* Farbschema für Feuerwehr/Einsatzkräfte */
    --primary-red: #dc3545;
    --primary-red-dark: #b02a37;
    --primary-red-light: #e65d6a;
    --accent-blue: #0d6efd;
    --accent-blue-dark: #0b5ed7;
    --neutral-dark: #212529;
    --neutral-gray: #6c757d;
    --neutral-light: #f8f9fa;
    --background-gradient-start: #f0f2f5;
    --background-gradient-end: #e3e6ea;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16)
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    color: var(--neutral-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--neutral-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }

.text-muted {
    color: var(--neutral-gray) !important;
}

/* ========================================
   Cards & Containers
   ======================================== */

.modern-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    overflow: hidden;
}

.modern-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.wachbuch-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-red);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--border-radius);
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-red) !important;
    color: var(--white) !important;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-red-dark) !important;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--neutral-gray) !important;
    color: var(--white) !important;
}

.btn-secondary:hover {
    background: var(--neutral-dark) !important;
}

.btn-success {
    background: #28a745 !important;
    color: var(--white) !important;
}

.btn-success:hover {
    background: #218838 !important;
}

.tile-btn {
    border-radius: var(--border-radius) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--neutral-dark);
    border: 2px solid rgba(220, 53, 69, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    padding: 2rem 1rem;
    min-height: 140px;
    font-weight: 600;
}

.tile-btn:hover {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white) !important;
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.tile-btn i {
    transition: var(--transition);
}

.tile-btn:hover i {
    transform: scale(1.1);
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    background: var(--white) !important;
    border-radius: 0 !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    border-bottom: 3px solid #495057;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-red) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Fallback Emoji nur wenn kein Custom-Icon vorhanden */
.navbar-brand.no-custom-icon::before {
    content: "🚒";
    font-size: 1.8rem;
}

/* Custom Icon Styling */
.navbar-brand-icon {
    height: 1.8rem;
    width: auto;
    object-fit: contain;
}

.nav-link {
    color: var(--neutral-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--neutral-light);
    color: var(--primary-red) !important;
}

/* ========================================
   Toolbar (Digitales Wachbuch)
   ======================================== */

.toolbar {
    position: fixed;
    top: 150px;
    left: 0;
    width: 70px;
    background: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    z-index: 999;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.toolbar .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin: 0.75rem auto;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.toolbar .btn:hover {
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, #8b1e2a 100%);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Tables
   ======================================== */

.table {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
}

.table thead th {
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.table tbody tr:hover {
    background: var(--neutral-light);
}

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

.wachbuch-table {
    margin-top: 1.5rem;
}

/* ========================================
   Forms
   ======================================== */

.form-label {
    font-weight: 600;
    color: var(--neutral-dark);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid rgba(0,0,0,0.1);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.login-card {
    max-width: 450px;
    margin: 3rem auto;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Modal
   ======================================== */

.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.btn-close {
    background: transparent;
    opacity: 1;
    color: var(--white);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 3px solid var(--primary-red);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--neutral-gray);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    z-index: 1000;
}

/* ========================================
   Logo & Branding
   ======================================== */

.logo-img {
    max-height: 120px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.dashboard-license {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--neutral-dark);
    margin-bottom: 0.5rem;
}

.dashboard-user {
    font-weight: 500;
    font-size: 1rem;
    color: var(--neutral-gray);
}

/* ========================================
   Utilities
   ======================================== */

.centered-heading {
    text-align: center;
}

.wachbuch-heading {
    color: var(--neutral-dark);
    font-weight: 700;
    border-bottom: 3px solid var(--primary-red);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.wachbuch-label {
    font-weight: 600;
    color: var(--neutral-dark);
}

.wachbuch-hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
    margin: 2rem 0;
}

.small-text {
    font-size: 0.85rem;
    color: var(--neutral-gray);
}

/* Badge für Einsätze */
.badge-einsatz {
    background: var(--primary-red);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .modern-card {
        padding: 1.5rem !important;
    }
    
    .wachbuch-card {
        padding: 1.5rem;
    }
    
    .tile-btn {
        padding: 1.5rem 0.75rem;
        min-height: 120px;
    }
    
    .toolbar {
        flex-direction: row;
        justify-content: center;
        position: static;
        width: 100%;
        border-radius: var(--border-radius);
        margin: 1rem 0;
    }
    
    .toolbar .btn {
        margin: 0 0.25rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .content {
        margin-left: 0;
    }
    
    .logo-img {
        max-height: 80px;
    }
    
    .login-card {
        margin: 1rem;
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .tile-btn {
        font-size: 0.9rem;
    }
    
    .tile-btn i {
        font-size: 2rem !important;
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border: 0.4rem solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red-dark);
}
