/* General Styles */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid #dee2e6;
    background-color: var(--light-color);
    margin-top: auto;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
    font-weight: 500;
}

.card-header i {
    margin-right: 0.5rem;
}

/* Rack Cards */
.rack-card {
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1.5rem;
}

.rack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #e7f1ff;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.rack-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.rack-actions {
    display: flex;
    gap: 0.5rem;
}

.rack-actions button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* Item List */
.item-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.item-card:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.item-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.item-box-badge {
    background-color: var(--success-color);
}

.item-quantity {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.item-description {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.25rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.item-actions button {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn i {
    margin-right: 0.4rem;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Search */
.input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#searchInput {
    padding: 0.75rem;
    font-size: 1rem;
}

/* Inventory Display */
.inventory-rack {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary-color);
}

.inventory-rack-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.inventory-rack-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.inventory-items {
    margin-top: 1rem;
}

.inventory-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-item:last-child {
    border-bottom: none;
}

.inventory-item-left {
    flex: 1;
}

.inventory-item-name {
    font-weight: 600;
    color: var(--dark-color);
}

.inventory-item-type {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: #e7f1ff;
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: 500;
}

.inventory-item-type.box {
    background-color: #d1f0d1;
    color: var(--success-color);
}

.inventory-item-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.inventory-item-quantity {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 60px;
    text-align: right;
}

.search-highlight {
    background-color: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

/* No Results */
.no-results {
    padding: 2rem;
    text-align: center;
    color: #999;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-info {
    background-color: #e7f3ff;
    color: #0066cc;
}

.alert-warning {
    background-color: #fff8e7;
    color: #cc8800;
}

.alert-success {
    background-color: #e7f8f5;
    color: #008060;
}

.alert-danger {
    background-color: #ffe7e7;
    color: #cc0000;
}

/* Responsive */
@media (max-width: 768px) {
    .rack-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rack-actions {
        width: 100%;
        margin-top: 0.75rem;
    }

    .rack-actions button {
        flex: 1;
    }

    .item-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-actions {
        width: 100%;
        margin-top: 0.75rem;
    }

    .item-actions button {
        flex: 1;
    }

    .inventory-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .inventory-item-quantity {
        margin-top: 0.5rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .input-group {
        display: none;
    }

    .inventory-rack {
        page-break-inside: avoid;
    }
}
