/* ===================================
   BRIEFESCHREIBER PRO - DARK THEME
   =================================== */

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-card-header: #1a1a1a;
    --border-color: #333333;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --accent-primary: #6c63ff;
    --accent-secondary: #4a47a3;
    --success: #00d4aa;
    --danger: #ff4757;
    --warning: #ffa502;
    --info: #3742fa;
}

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

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* ===================================
   NAVIGATION
   =================================== */

.navbar {
    background: var(--bg-card) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary) !important;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px var(--accent-primary);
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ===================================
   CARDS
   =================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(108, 99, 255, 0.2);
}

.card-header {
    background: var(--bg-card-header);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-header h5 {
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* ===================================
   FORMS
   =================================== */

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(108, 99, 255, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 200px;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #00d4aa 0%, #00a885 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4757 0%, #e84118 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #3742fa 0%, #2f3cdb 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(55, 66, 250, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffa502 0%, #ff7f00 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 165, 2, 0.4);
}

.btn-outline-light {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--bg-card-header);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-outline-light.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* ===================================
   TEMPLATE BUTTONS
   =================================== */

.template-btn {
    text-align: left;
    transition: all 0.3s ease;
}

.template-btn:hover {
    transform: translateX(5px);
    border-color: var(--accent-primary);
}

.template-btn.active {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
    transform: translateX(5px);
}

/* ===================================
   STATISTICS
   =================================== */

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item strong {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

/* ===================================
   ALERTS
   =================================== */

.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}

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

.alert-success {
    background: rgba(0, 212, 170, 0.2);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(255, 71, 87, 0.2);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: rgba(55, 66, 250, 0.2);
    color: var(--info);
    border-left: 4px solid var(--info);
}

.alert-warning {
    background: rgba(255, 165, 2, 0.2);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

/* ===================================
   SIGNATURE PAD
   =================================== */

.signature-pad-container {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    padding: 10px;
    cursor: crosshair;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

#signaturePad {
    display: block;
    width: 100%;
    height: 200px;
    border-radius: 5px;
}

/* ===================================
   MODAL
   =================================== */

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
}

.modal-header {
    background: var(--bg-card-header);
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-secondary);
}

.modal-body h6 {
    color: var(--accent-primary);
    margin-top: 1rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.btn-close {
    filter: invert(1);
}

/* ===================================
   SCROLLBAR
   =================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

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

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 991px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

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

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.border-secondary {
    border-color: var(--border-color) !important;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--bg-card-header) 0%, var(--bg-card) 100%);
}