/* Business Invoice System - CSS */
/* Farben: RGB(32, 77, 156) #204d9c und #333333 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333333;
    line-height: 1.6;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #204d9c;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    background-color: #1a3d7a;
    border-bottom: 2px solid #2a5db0;
}

.sidebar-header h1 {
    font-size: 22px;
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    background-color: transparent;
    border: none;
    border-left: 4px solid transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
}

.menu-item.active {
    background-color: #1a3d7a;
    border-left-color: white;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 0;
}

.top-bar {
    background-color: white;
    padding: 20px 40px;
    border-bottom: 2px solid #e0e0e0;
}

.top-bar h2 {
    font-size: 24px;
    color: #333333;
    font-weight: 600;
}

.content-area {
    padding: 40px;
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: white;
    padding: 25px;
    border: 2px solid #e0e0e0;
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 32px;
    color: #204d9c;
    font-weight: 700;
}

.stat-card .label {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

/* Tables */
.data-table-container {
    background-color: white;
    border: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.table-header {
    padding: 20px 25px;
    background-color: #fafafa;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 18px;
    color: #333333;
    font-weight: 600;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: #fafafa;
}

.data-table th {
    padding: 15px 25px;
    text-align: left;
    font-weight: 600;
    color: #333333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f0;
    color: #333333;
    font-size: 14px;
}

.data-table tbody tr {
    background-color: white;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #204d9c;
    color: white;
}

.btn-secondary {
    background-color: #333333;
    color: white;
}

.btn-small {
    padding: 8px 15px;
    font-size: 13px;
}

.btn-icon {
    padding: 10px 15px;
    background-color: transparent;
    border: 2px solid #e0e0e0;
    color: #333333;
}

/* Forms */
.form-container {
    background-color: white;
    border: 2px solid #e0e0e0;
    padding: 30px;
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-grid.single {
    grid-template-columns: 1fr;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    color: #333333;
}

.form-control:focus {
    outline: none;
    border-color: #204d9c;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background-color: #ffebee;
    color: #c62828;
}

.status-paid {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background-color: #fff3e0;
    color: #ef6c00;
}

.status-overdue {
    background-color: #ffebee;
    color: #c62828;
}

/* Actions */
.action-buttons {
    display: flex;
    gap: 10px;
}

.action-link {
    color: #204d9c;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    border: 2px solid transparent;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 25px;
    background-color: #204d9c;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    background-color: #fafafa;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Utility Classes */
.text-right {
    text-align: right;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.hidden {
    display: none;
}
