
:root {
    --primary-color: #1190cb;
    --secondary-color: #32babf;
    --accent-color: #d21a62;
    --background-color: #f4f6fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --white: #ffffff;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Form Elements */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(17, 144, 203, 0.1);
    }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

    .btn-primary:hover {
        background-color: #0f7ab5;
    }

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

    .btn-secondary:hover {
        background-color: #2ca8ac;
    }

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

    .btn-accent:hover {
        background-color: #b4144d;
    }

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    padding: 1.5rem;
}

/* Header */
.header-main {
    background-color: var(--white);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 40;
    margin-left: 0;
}

/* Navigation */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

    .nav-link:hover {
        background-color: rgba(17, 144, 203, 0.1);
        color: var(--primary-color);
    }

    .nav-link.active {
        background-color: var(--primary-color);
        color: var(--white);
    }

/* Status Pills */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.status-approved {
    background-color: #d1fae5;
    color: #059669;
}

.status-rejected {
    background-color: #fee2e2;
    color: #dc2626;
}

.status-processing {
    background-color: #dbeafe;
    color: #2563eb;
}

/* Tables */
.table-custom {
    width: 100%;
    border-collapse: collapse;
}

    .table-custom thead th {
        background-color: #f9fafb;
        padding: 0.75rem 1rem;
        text-align: left;
        font-weight: 600;
        font-size: 0.875rem;
        color: var(--text-secondary);
        border-bottom: 1px solid #e5e7eb;
    }

    .table-custom tbody td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f3f4f6;
    }

    .table-custom tbody tr:hover {
        background-color: #f9fafb;
    }

/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
    display: none;
    padding: 0.5rem 0;
    z-index: 50;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
    }

    body {
        padding-bottom: 4rem;
    }

    /* Hide desktop sidebar on mobile */
    .sidebar {
        display: none;
    }

    /* Remove left margin on mobile */
    body.has-sidebar {
        margin-left: 0;
    }

    /* Adjust header on mobile */
    .header-main {
        position: relative;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
}

    .mobile-nav-item:hover {
        color: var(--primary-color);
    }

    .mobile-nav-item.active {
        color: var(--primary-color);
    }

    .mobile-nav-item svg {
        width: 1.5rem;
        height: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .mobile-nav-item span {
        font-size: 0.75rem;
    }

/* Sidebar */
.sidebar {
    background-color: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 1.25rem;
}

/* Color Dots */
.color-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    display: inline-block;
}

.color-dot-primary {
    background-color: var(--primary-color);
}

.color-dot-secondary {
    background-color: var(--secondary-color);
}

.color-dot-accent {
    background-color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive Grid */
.dashboard-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* File Input Custom Style */
input[type="file"] {
    font-size: 0.875rem;
}

    input[type="file"]::file-selector-button {
        margin-right: 1rem;
        padding: 0.5rem 1rem;
        border-radius: 9999px;
        border: none;
        font-size: 0.875rem;
        font-weight: 600;
        background-color: var(--secondary-color);
        color: var(--white);
        cursor: pointer;
        transition: all 0.2s;
    }

        input[type="file"]::file-selector-button:hover {
            background-color: var(--primary-color);
        }

/* Validation */
.field-validation-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: #dc2626;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f4f6;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background-color: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}
/* Invoice Index Styles */

/* Statistik-Karten */
.card {
    transition: transform 0.2s;
}

    .card:hover {
        transform: translateY(-2px);
    }

/* Tabellen-Hover-Effekt */
.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.02);
    cursor: pointer;
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Sortier-Icons */
.bi-caret-up-fill,
.bi-caret-down-fill {
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

/* Action Buttons */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group-sm > .btn {
        padding: 0.2rem 0.4rem;
    }

    .pagination {
        font-size: 0.875rem;
    }
}

/* Filter-Karte */
.card-body form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
}

/* Überfällige Rechnungen hervorheben */
tr:has(.text-danger) {
    background-color: rgba(220, 53, 69, 0.05);
}

/* Pagination Active State */
.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Empty State */
.text-center.py-5 {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    height: 100%;
    width: 100%;
    z-index: 50;
}

/* Modal Container */
.modal-container {
    position: relative;
    margin: 5rem auto;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 56rem; /* 896px */
    width: 90%;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

    .modal-close:hover {
        color: #6b7280;
    }

/* Modal Body */
.modal-body {
    padding: 1.5rem;
    min-height: 400px;
}

/* PDF Container */
.pdf-container {
    width: 100%;
    height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
}

/* PDF Fallback */
.pdf-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

    .pdf-fallback p {
        margin-bottom: 1rem;
        color: #6b7280;
    }

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Form Groups in Modal */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

textarea.form-control {
    resize: vertical;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .modal-container {
        margin: 2rem auto;
        width: 95%;
    }

    .pdf-container {
        height: 400px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

        .modal-footer button {
            width: 100%;
        }
}
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
}
