.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.vending-machine {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.machine-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
}

.machine-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 15px;
    min-height: 120px;
}

.row-label {
    color: white;
    font-weight: bold;
    font-size: 16px;
    background: rgba(0,0,0,0.3);
    padding: 15px 10px;
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.row-slots {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: space-around;
    flex-wrap: wrap;
}

.slot-container {
    background: white;
    border-radius: 8px;
    padding: 10px;
    width: 110px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.slot-container:hover {
    transform: translateY(-2px);
}

.slot-position {
    font-weight: bold;
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 5px;
}

.slot-image {
    height: 60px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-image img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.empty-slot {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #6c757d;
}

.slot-info {
    flex: 1;
    margin-bottom: 8px;
}

.slot-name {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
    height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.slot-price {
    color: #28a745;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
}

.slot-stock {
    font-size: 10px;
    color: #6c757d;
    margin-bottom: 5px;
}

.buy-btn {
    width: 100%;
    font-size: 12px;
    padding: 6px 8px;
}

.restock-btn {
    width: 100%;
    font-size: 11px;
    padding: 4px 6px;
}

.slot-container .btn {
    margin-bottom: 2px;
    font-size: 10px;
    padding: 3px 6px;
}

.slot-container .btn:last-child {
    margin-bottom: 0;
}

.btn-xs {
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.2rem;
}

.table-sm td {
    padding: 0.3rem;
    vertical-align: middle;
}

.table-sm small {
    display: block;
    line-height: 1.2;
}

.btn-group .btn {
    margin-right: 0;
}

.card-body .row .col-md-6 h6 {
    color: #495057;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

@media (max-width: 768px) {
    .machine-row {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .row-label {
        writing-mode: horizontal-tb;
        min-width: 80px;
        padding: 8px 15px;
    }
    
    .row-slots {
        gap: 8px;
        justify-content: center;
    }
    
    .slot-container {
        width: 90px;
        min-height: 120px;
        padding: 8px;
    }
    
    .slot-image img,
    .empty-slot {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .row-slots {
        gap: 5px;
    }
    
    .slot-container {
        width: 75px;
        min-height: 100px;
        padding: 6px;
    }
    
    .slot-name {
        font-size: 9px;
        height: 25px;
    }
    
    .slot-price {
        font-size: 12px;
    }
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.navbar-brand i {
    margin-right: 10px;
}

.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
}

.modal .form-control[readonly] {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.modal .btn-success {
    font-weight: 600;
}
