/* Verein Buchhaltung - Ultra-Modernes Mobile-First Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #dc2626;
    --primary-red-dark: #b91c1c;
    --primary-red-darker: #991b1b;
    --secondary-gray: #6b7280;
    --light-gray: #f3f4f6;
    --success-green: #059669;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --shadow-light: 0 1px 3px rgba(220, 38, 38, 0.1);
    --shadow-medium: 0 4px 15px rgba(220, 38, 38, 0.15);
    --shadow-heavy: 0 8px 25px rgba(220, 38, 38, 0.2);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #fef7f7 0%, #fef2f2 50%, #fff5f5 100%);
    min-height: 100vh;
    padding: 8px;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced mobile support */
@media (min-width: 640px) {
    body {
        padding: 16px;
        font-size: 15px;
    }
}

@media (min-width: 1024px) {
    body {
        padding: 24px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    padding: 16px;
    border: 1px solid rgba(220, 38, 38, 0.08);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-dark));
    z-index: 1;
}

/* Mobile-first responsive design */
@media (min-width: 640px) {
    .container {
        padding: 24px;
        border-radius: 16px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 32px;
    }
}

h1 {
    color: var(--primary-red);
    margin-bottom: 24px;
    border-bottom: 3px solid var(--primary-red);
    padding-bottom: 12px;
    font-weight: 800;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red-dark), var(--primary-red));
    border-radius: 2px;
}

h2 {
    color: var(--primary-red-dark);
    margin: 32px 0 16px 0;
    font-weight: 700;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    letter-spacing: -0.01em;
}

h3 {
    color: var(--primary-red-darker);
    margin: 24px 0 12px 0;
    font-weight: 600;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

/* Modern Navigation Grid */
.nav-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
}

@media (min-width: 640px) {
    .nav-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .nav-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.nav-list li {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.nav-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-list li:hover::before {
    left: 100%;
}

.nav-list li:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    background: linear-gradient(135deg, var(--primary-red-dark), var(--primary-red-darker));
}

.nav-list li:active {
    transform: translateY(0) scale(0.98);
}

.nav-list li a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 20px;
    font-weight: 600;
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: var(--transition);
    min-height: 70px;
}

@media (min-width: 640px) {
    .nav-list li a {
        padding: 24px;
        font-size: 16px;
        min-height: 80px;
    }
}

.nav-list li a:hover {
    color: #fef2f2;
}

/* Modern Form System */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.025em;
}

input[type="text"], 
input[type="number"], 
input[type="date"], 
input[type="file"],
input[type="email"],
input[type="password"],
select, 
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius-small);
    font-size: 16px;
    transition: var(--transition);
    background: white;
    font-family: inherit;
    line-height: 1.5;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Prevent zoom on iOS */
@media (max-width: 640px) {
    input[type="text"], 
    input[type="number"], 
    input[type="date"], 
    input[type="email"],
    input[type="password"],
    select, 
    textarea {
        font-size: 16px;
    }
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

input:valid {
    border-color: var(--success-green);
}

input:invalid:not(:placeholder-shown) {
    border-color: var(--danger-red);
}

/* Enhanced file input */
input[type="file"] {
    padding: 12px;
    background: var(--light-gray);
    border-style: dashed;
}

input[type="file"]:hover {
    background: #f1f5f9;
    border-color: var(--primary-red);
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Modern Button System */
.btn {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    padding: 16px 24px;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin: 4px;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

@media (min-width: 640px) {
    .btn {
        flex: none;
        min-width: 120px;
        padding: 14px 28px;
        margin: 6px;
    }
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, var(--primary-red-dark), var(--primary-red-darker));
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

/* Button container for mobile */
.btn-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

@media (min-width: 640px) {
    .btn-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-gray), #4b5563);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.15);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    box-shadow: var(--shadow-medium);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-red), var(--primary-red));
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    box-shadow: var(--shadow-medium);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green), #047857);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.15);
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-red);
    color: white;
    box-shadow: var(--shadow-light);
}

/* Modern Table Design */
.table-container {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(220, 38, 38, 0.1);
    background: white;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-dark));
    z-index: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 500px;
    font-size: 14px;
}

@media (min-width: 640px) {
    table {
        min-width: 700px;
        font-size: 15px;
    }
}

@media (min-width: 1024px) {
    table {
        font-size: 16px;
    }
}

thead {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    position: sticky;
    top: 0;
    z-index: 2;
}

thead th {
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

@media (min-width: 640px) {
    thead th {
        padding: 20px 16px;
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    thead th {
        font-size: 15px;
    }
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid #f8f9fa;
    transition: var(--transition);
    vertical-align: middle;
}

@media (min-width: 640px) {
    tbody td {
        padding: 16px;
    }
}

@media (min-width: 1024px) {
    tbody td {
        padding: 20px 16px;
    }
}

tbody tr {
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

tbody tr:hover {
    background: linear-gradient(90deg, #fef7f7, #fef2f2, #fef7f7);
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

tbody tr:nth-child(even) {
    background-color: #fafafa;
}

tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #fef7f7, #fef2f2, #fef7f7);
}

/* Mobile table improvements */
@media (max-width: 640px) {
    .table-container {
        margin: 16px -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    table {
        min-width: 100%;
    }
    
    tbody td {
        padding: 8px;
        font-size: 13px;
    }
    
    tbody td:first-child {
        font-weight: 600;
    }
}

/* Zahlen rechtsbündig */
.number {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.positive {
    color: #059669;
    font-weight: 600;
}

.negative {
    color: #dc2626;
    font-weight: 600;
}

/* Suchbox */
.search-container {
    position: relative;
    margin: 20px 0;
}

.search-box {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fefefe;
}

.search-box:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    background: white;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
}

/* Modern Card System */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-red);
    transition: var(--transition);
    border: 1px solid rgba(220, 38, 38, 0.08);
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .card {
        padding: 24px;
        margin: 20px 0;
    }
}

@media (min-width: 1024px) {
    .card {
        padding: 28px;
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-red), var(--primary-red-dark));
    transition: height 0.3s ease;
}

.card:hover::before {
    height: 100%;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-left-color: var(--primary-red-dark);
}

.card-header {
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 16px;
    font-size: clamp(16px, 4vw, 20px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-content {
    color: #4b5563;
    line-height: 1.6;
}

/* Card Grid System */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1280px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    .nav-list {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 12px;
    }
    
    thead th, tbody td {
        padding: 8px 6px;
    }
}

/* Status Badges */
.badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Upload Bereich */
.upload-area {
    border: 3px dashed #dc2626;
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    background: #fef2f2;
    margin: 25px 0;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: #fee2e2;
    border-color: #b91c1c;
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .upload-area {
        padding: 30px 20px;
    }
}

.upload-area input[type="file"] {
    margin: 10px 0;
}

/* Modern Breadcrumb */
/* User Info Header */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--border-radius);
    font-size: 14px;
    color: var(--text-secondary);
}

.logout-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.logout-link:hover {
    color: var(--primary-red-dark);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .user-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: rgba(220, 38, 38, 0.04);
    border-radius: var(--border-radius-small);
    font-size: 14px;
    color: var(--secondary-gray);
    gap: 4px;
}

@media (min-width: 640px) {
    .breadcrumb {
        padding: 12px 20px;
        font-size: 15px;
    }
}

.breadcrumb a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
}

.breadcrumb a:hover {
    color: var(--primary-red-dark);
    background: rgba(220, 38, 38, 0.1);
}

.breadcrumb span {
    margin: 0 4px;
    color: var(--secondary-gray);
    user-select: none;
}

.breadcrumb span:last-child {
    font-weight: 600;
    color: #1f2937;
}

/* Mobile breadcrumb optimization */
@media (max-width: 480px) {
    .breadcrumb {
        font-size: 13px;
        padding: 8px 12px;
        margin-bottom: 16px;
    }
    
    .breadcrumb a {
        padding: 2px 6px;
    }
}

.breadcrumb span {
    margin: 0 8px;
}

/* Erfolgs- und Fehlermeldungen */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #bbf7d0);
    border: 1px solid #86efac;
    color: #065f46;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #fca5a5;
    color: #7f1d1d;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.1);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 1px solid #93c5fd;
    color: #1e3a8a;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}