/* Shared Utility Styles - Bootstrap-like classes */

/* Grid System */
.row { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
.col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; padding: 0 15px; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; padding: 0 15px; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; padding: 0 15px; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; padding: 0 15px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
.col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; padding: 0 15px; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 15px; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; padding: 0 15px; }
.col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; padding: 0 15px; }
.col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; padding: 0 15px; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; padding: 0 15px; }

/* Spacing */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 1rem; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Display & Flex */
.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }
.flex-grow { flex: 1; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Text */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: #6c757d; }
.text-primary { color: #00AC5A !important; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.font-weight-bold { font-weight: 700; }
.fw-bold { font-weight: 700; }

/* Background & Borders */
.bg-light { background-color: #f8f9fa; }
.bg-white { background-color: #fff; }
.border { border: 1px solid #dee2e6; }
.border-top { border-top: 1px solid #dee2e6; }
.border-bottom { border-bottom: 1px solid #dee2e6; }
.rounded { border-radius: 0.25rem; }
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); }

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-primary {
    color: #fff;
    background-color: #00AC5A;
    border-color: #00AC5A;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    border: 0;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    border: 0;
}

.btn-success {
    background: #00AC5A;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.btn-outline-primary {
    color: #00AC5A;
    border-color: #00AC5A;
    font-size: 1.2rem;
    background: transparent;
}
.btn-outline-primary:hover { background: #00AC5A; color: #fff; }

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background: transparent;
}
.btn-outline-secondary:hover { background: #6c757d; color: #fff; }

.btn-outline-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
    background: transparent;
}
.btn-outline-danger:hover { background: #dc3545; color: white; }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.btn-lg { padding: 0.5rem 1rem; font-size: 1.25rem; }

/* Form Controls */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.form-control-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.form-control-plaintext { background-color: transparent; border: solid transparent; border-width: 1px 0; }

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 0 10px;
    display: flex;
    align-items: center;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-size: 0.85rem;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #e7f3ff;
    border-color: #b8daff;
    color: #004085;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.kunde {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.badge.lieferant {
    background-color: #f3e5f5;
    color: #4a148c;
}

/* Utility */
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Page Layout Helpers */
.page-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.options-bar {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

/* Search Components */
.search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.search-input-wrapper input {
    padding-left: 30px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
}

.search-results li {
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.search-results li:hover {
    background-color: #f0f0f0;
}

/* Button Icons */
.btn-icon {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 5px;
    font-size: 1.1rem;
    transition: transform 0.1s;
}

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

.btn-icon.edit { color: #007bff; }
.btn-icon.delete { color: #dc3545; }
